File tree 2 files changed +6
-5
lines changed 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ cdef extern from "mutex.h" nogil:
7
7
cdef int mutex_unlock(mutex_t* )
8
8
9
9
cdef extern from " getpid_compat.h" :
10
- int getpid()
10
+ cdef int getpid()
11
11
12
12
cdef extern from " ipcmaxlen.h" :
13
- int get_ipc_path_max_len()
13
+ cdef int get_ipc_path_max_len()
Original file line number Diff line number Diff line change 156
156
_check_version ,
157
157
)
158
158
159
- IPC_PATH_MAX_LEN = get_ipc_path_max_len ()
159
+ IPC_PATH_MAX_LEN : int = get_ipc_path_max_len ()
160
160
161
161
162
162
@cfunc
@@ -925,10 +925,11 @@ def bind(self, addr: str | bytes):
925
925
rc : C .int = zmq_bind (self .handle , c_addr )
926
926
if rc != 0 :
927
927
_errno : C .int = _zmq_errno ()
928
- if IPC_PATH_MAX_LEN and _errno == ENAMETOOLONG :
928
+ _ipc_max : C .int = get_ipc_path_max_len ()
929
+ if _ipc_max and _errno == ENAMETOOLONG :
929
930
path = addr .split ('://' , 1 )[- 1 ]
930
931
msg = (
931
- f'ipc path "{ path } " is longer than { IPC_PATH_MAX_LEN } '
932
+ f'ipc path "{ path } " is longer than { _ipc_max } '
932
933
'characters (sizeof(sockaddr_un.sun_path)). '
933
934
'zmq.IPC_PATH_MAX_LEN constant can be used '
934
935
'to check addr length (if it is defined).'
You can’t perform that action at this time.
0 commit comments