003 File Manager
Current Path:
/usr/local/lib/python3.8/site-packages/zmq/utils
usr
/
local
/
lib
/
python3.8
/
site-packages
/
zmq
/
utils
/
📁
..
📄
__init__.py
(0 B)
📁
__pycache__
📄
buffers.pxd
(6.87 KB)
📄
compiler.json
(310 B)
📄
config.json
(344 B)
📄
constant_names.py
(11.23 KB)
📄
garbage.py
(6.04 KB)
📄
getpid_compat.h
(116 B)
📄
interop.py
(685 B)
📄
ipcmaxlen.h
(522 B)
📄
jsonapi.py
(1018 B)
📄
monitor.py
(2.02 KB)
📄
mutex.h
(1.59 KB)
📄
pyversion_compat.h
(284 B)
📄
strtypes.py
(1.09 KB)
📄
win32.py
(5.08 KB)
📄
z85.py
(1.78 KB)
📄
zmq_compat.h
(3.17 KB)
📄
zmq_constants.h
(18.4 KB)
Editing: interop.py
"""Utils for interoperability with other libraries. Just CFFI pointer casting for now. """ # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from typing import Any def cast_int_addr(n: Any) -> int: """Cast an address to a Python int This could be a Python integer or a CFFI pointer """ if isinstance(n, int): return n try: import cffi # type: ignore except ImportError: pass else: # from pyzmq, this is an FFI void * ffi = cffi.FFI() if isinstance(n, ffi.CData): return int(ffi.cast("size_t", n)) raise ValueError("Cannot cast %r to int" % n)
Upload File
Create Folder