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;