# Path: pyczmq/_cffi.py
# C = ffi.dlopen('czmq')
# Z = ffi.dlopen('zmq')
# def ptop(typ, val):
# def cdef(decl, returns_string=False, nullable=False):
#     def wrap(f):
#         def inner_f(*args):


from pyczmq._cffi import ffi, C, ptop, cdef

__doc__ = """
The zloop class provides an event-driven reactor pattern. The reactor
handles zmq_pollitem_t items (pollers or writers, sockets or fds), and
once-off or repeated timers. Its resolution is 1 msec. It uses a
tickless timer to reduce CPU interrupts in inactive processes.
"""


cdef('typedef struct _zloop_t zloop_t;')
cdef('typedef int (zloop_fn) (zloop_t *loop, zmq_pollitem_t *item, void *arg);')
cdef('typedef int (zloop_timer_fn) (zloop_t *loop, int timer_id, void *arg);')


def poll_callback(f):

# Path: pyczmq/_cffi.py
# C = ffi.dlopen('czmq')
# Z = ffi.dlopen('zmq')
# def ptop(typ, val):
# def cdef(decl, returns_string=False, nullable=False):
#     def wrap(f):
#         def inner_f(*args):


# Path: pyczmq/zloop.py
from pyczmq._cffi import ffi, C, ptop, cdef


__doc__ = """
The zloop class provides an event-driven reactor pattern. The reactor
handles zmq_pollitem_t items (pollers or writers, sockets or fds), and
once-off or repeated timers. Its resolution is 1 msec. It uses a
tickless timer to reduce CPU interrupts in inactive processes.
"""


cdef('typedef struct _zloop_t zloop_t;')
cdef('typedef int (zloop_fn) (zloop_t *loop, zmq_pollitem_t *item, void *arg);')
cdef('typedef int (zloop_timer_fn) (zloop_t *loop, int timer_id, void *arg);')


def poll_callback(f):

    @ffi.callback('zloop_fn')