scripts : use official split.py for cpp-httplib (#19588)
* scripts : use official split.py for cpp-httplib Using the official script is safer and ensures the generated code aligns with the library's standards. Signed-off-by: Adrien Gallouët <angt@huggingface.co> * Catch generic errors Signed-off-by: Adrien Gallouët <angt@huggingface.co> * Allow print() Signed-off-by: Adrien Gallouët <angt@huggingface.co> * Ensure robust cleanup Signed-off-by: Adrien Gallouët <angt@huggingface.co> --------- Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
parent
0d00ef65ed
commit
c7db95f106
3 changed files with 19 additions and 20 deletions
3
vendor/cpp-httplib/httplib.cpp
vendored
3
vendor/cpp-httplib/httplib.cpp
vendored
|
|
@ -1,7 +1,6 @@
|
|||
#include "httplib.h"
|
||||
namespace httplib {
|
||||
|
||||
|
||||
/*
|
||||
* Implementation that will be part of the .cc file if split into .h + .cc.
|
||||
*/
|
||||
|
|
@ -1219,7 +1218,7 @@ int close_socket(socket_t sock) {
|
|||
#endif
|
||||
}
|
||||
|
||||
template <typename T> inline ssize_t handle_EINTR(T fn) {
|
||||
template <typename T> ssize_t handle_EINTR(T fn) {
|
||||
ssize_t res = 0;
|
||||
while (true) {
|
||||
res = fn();
|
||||
|
|
|
|||
1
vendor/cpp-httplib/httplib.h
vendored
1
vendor/cpp-httplib/httplib.h
vendored
|
|
@ -3336,7 +3336,6 @@ private:
|
|||
} // namespace sse
|
||||
|
||||
|
||||
|
||||
} // namespace httplib
|
||||
|
||||
#endif // CPPHTTPLIB_HTTPLIB_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue