fix: 编译cpython

This commit is contained in:
meiqi
2026-03-30 23:09:04 +08:00
parent 86e36d0859
commit 16702a0853
2 changed files with 14 additions and 5 deletions

5
.gitignore vendored
View File

@@ -13,3 +13,8 @@ root@117.78.11.244
c/bin c/bin
*__pycache__* *__pycache__*
/python/build
/python/omnisocket.egg-info
*.so*

View File

@@ -8,15 +8,19 @@ typedef struct PyOmniSession {
omnisocket_session_t session; omnisocket_session_t session;
} PyOmniSession; } PyOmniSession;
static const char *PyOmniSession_recv_doc = PyDoc_STRVAR(
"recv(timeout_ms=-1) -> (from_peer, msg_type, payload) | None"; PyOmniSession_recv_doc,
"recv(timeout_ms=-1) -> (from_peer, msg_type, payload) | None"
);
static const char *PyOmniSession_recv_into_doc = PyDoc_STRVAR(
PyOmniSession_recv_into_doc,
"recv_into(buffer, timeout_ms=-1) -> dict | None\n" "recv_into(buffer, timeout_ms=-1) -> dict | None\n"
"\n" "\n"
"The writable buffer must be large enough for the full message body.\n" "The writable buffer must be large enough for the full message body.\n"
"If it is too small, BufferError reports the required size but the\n" "If it is too small, BufferError reports the required size but the\n"
"current frame has already been consumed and is lost."; "current frame has already been consumed and is lost."
);
static PyObject *PyOmniSession_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { static PyObject *PyOmniSession_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) {
PyOmniSession *self; PyOmniSession *self;