From 16702a0853dfd0f27d8a9a93836bab399b87a766 Mon Sep 17 00:00:00 2001 From: meiqi <976161896@qq.com> Date: Mon, 30 Mar 2026 23:09:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=AF=91cpython?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 ++++++- python/omnisocket/_omnisocket.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9e8716c..784b1d7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,9 @@ root@117.78.11.244 c/bin -*__pycache__* \ No newline at end of file +*__pycache__* + +/python/build +/python/omnisocket.egg-info + +*.so* \ No newline at end of file diff --git a/python/omnisocket/_omnisocket.c b/python/omnisocket/_omnisocket.c index 4027388..38d852f 100644 --- a/python/omnisocket/_omnisocket.c +++ b/python/omnisocket/_omnisocket.c @@ -8,15 +8,19 @@ typedef struct PyOmniSession { omnisocket_session_t session; } PyOmniSession; -static const char *PyOmniSession_recv_doc = - "recv(timeout_ms=-1) -> (from_peer, msg_type, payload) | None"; +PyDoc_STRVAR( + 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" "\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" - "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) { PyOmniSession *self;