1/* Generated by Cython 0.21.2 */
2
3#define PY_SSIZE_T_CLEAN
4#ifndef CYTHON_USE_PYLONG_INTERNALS
5#ifdef PYLONG_BITS_IN_DIGIT
6#define CYTHON_USE_PYLONG_INTERNALS 0
7#else
8#include "pyconfig.h"
9#ifdef PYLONG_BITS_IN_DIGIT
10#define CYTHON_USE_PYLONG_INTERNALS 1
11#else
12#define CYTHON_USE_PYLONG_INTERNALS 0
13#endif
14#endif
15#endif
16#include "Python.h"
17#ifndef Py_PYTHON_H
18    #error Python headers needed to compile C extensions, please install development version of Python.
19#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
20    #error Cython requires Python 2.6+ or Python 3.2+.
21#else
22#define CYTHON_ABI "0_21_2"
23#include <stddef.h>
24#ifndef offsetof
25#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
26#endif
27#if !defined(WIN32) && !defined(MS_WINDOWS)
28  #ifndef __stdcall
29    #define __stdcall
30  #endif
31  #ifndef __cdecl
32    #define __cdecl
33  #endif
34  #ifndef __fastcall
35    #define __fastcall
36  #endif
37#endif
38#ifndef DL_IMPORT
39  #define DL_IMPORT(t) t
40#endif
41#ifndef DL_EXPORT
42  #define DL_EXPORT(t) t
43#endif
44#ifndef PY_LONG_LONG
45  #define PY_LONG_LONG LONG_LONG
46#endif
47#ifndef Py_HUGE_VAL
48  #define Py_HUGE_VAL HUGE_VAL
49#endif
50#ifdef PYPY_VERSION
51#define CYTHON_COMPILING_IN_PYPY 1
52#define CYTHON_COMPILING_IN_CPYTHON 0
53#else
54#define CYTHON_COMPILING_IN_PYPY 0
55#define CYTHON_COMPILING_IN_CPYTHON 1
56#endif
57#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
58#define Py_OptimizeFlag 0
59#endif
60#define __PYX_BUILD_PY_SSIZE_T "n"
61#define CYTHON_FORMAT_SSIZE_T "z"
62#if PY_MAJOR_VERSION < 3
63  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
64  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
65          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
66  #define __Pyx_DefaultClassType PyClass_Type
67#else
68  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
69  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
70          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
71  #define __Pyx_DefaultClassType PyType_Type
72#endif
73#if PY_MAJOR_VERSION >= 3
74  #define Py_TPFLAGS_CHECKTYPES 0
75  #define Py_TPFLAGS_HAVE_INDEX 0
76  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
77#endif
78#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
79  #define Py_TPFLAGS_HAVE_FINALIZE 0
80#endif
81#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
82  #define CYTHON_PEP393_ENABLED 1
83  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
84                                              0 : _PyUnicode_Ready((PyObject *)(op)))
85  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
86  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
87  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
88  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
89  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
90#else
91  #define CYTHON_PEP393_ENABLED 0
92  #define __Pyx_PyUnicode_READY(op)       (0)
93  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
94  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
95  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
96  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
97  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
98#endif
99#if CYTHON_COMPILING_IN_PYPY
100  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
101  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
102  #define __Pyx_PyFrozenSet_Size(s)         PyObject_Size(s)
103#else
104  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
105  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
106      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
107  #define __Pyx_PyFrozenSet_Size(s)         PySet_Size(s)
108#endif
109#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
110#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
111#if PY_MAJOR_VERSION >= 3
112  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
113#else
114  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
115#endif
116#if PY_MAJOR_VERSION >= 3
117  #define PyBaseString_Type            PyUnicode_Type
118  #define PyStringObject               PyUnicodeObject
119  #define PyString_Type                PyUnicode_Type
120  #define PyString_Check               PyUnicode_Check
121  #define PyString_CheckExact          PyUnicode_CheckExact
122#endif
123#if PY_MAJOR_VERSION >= 3
124  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
125  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
126#else
127  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
128  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
129#endif
130#ifndef PySet_CheckExact
131  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
132#endif
133#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
134#if PY_MAJOR_VERSION >= 3
135  #define PyIntObject                  PyLongObject
136  #define PyInt_Type                   PyLong_Type
137  #define PyInt_Check(op)              PyLong_Check(op)
138  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
139  #define PyInt_FromString             PyLong_FromString
140  #define PyInt_FromUnicode            PyLong_FromUnicode
141  #define PyInt_FromLong               PyLong_FromLong
142  #define PyInt_FromSize_t             PyLong_FromSize_t
143  #define PyInt_FromSsize_t            PyLong_FromSsize_t
144  #define PyInt_AsLong                 PyLong_AsLong
145  #define PyInt_AS_LONG                PyLong_AS_LONG
146  #define PyInt_AsSsize_t              PyLong_AsSsize_t
147  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
148  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
149  #define PyNumber_Int                 PyNumber_Long
150#endif
151#if PY_MAJOR_VERSION >= 3
152  #define PyBoolObject                 PyLongObject
153#endif
154#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
155  #ifndef PyUnicode_InternFromString
156    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
157  #endif
158#endif
159#if PY_VERSION_HEX < 0x030200A4
160  typedef long Py_hash_t;
161  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
162  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
163#else
164  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
165  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
166#endif
167#if PY_MAJOR_VERSION >= 3
168  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
169#else
170  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
171#endif
172#ifndef CYTHON_INLINE
173  #if defined(__GNUC__)
174    #define CYTHON_INLINE __inline__
175  #elif defined(_MSC_VER)
176    #define CYTHON_INLINE __inline
177  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
178    #define CYTHON_INLINE inline
179  #else
180    #define CYTHON_INLINE
181  #endif
182#endif
183#ifndef CYTHON_RESTRICT
184  #if defined(__GNUC__)
185    #define CYTHON_RESTRICT __restrict__
186  #elif defined(_MSC_VER) && _MSC_VER >= 1400
187    #define CYTHON_RESTRICT __restrict
188  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
189    #define CYTHON_RESTRICT restrict
190  #else
191    #define CYTHON_RESTRICT
192  #endif
193#endif
194#ifdef NAN
195#define __PYX_NAN() ((float) NAN)
196#else
197static CYTHON_INLINE float __PYX_NAN() {
198  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
199   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
200   a quiet NaN. */
201  float value;
202  memset(&value, 0xFF, sizeof(value));
203  return value;
204}
205#endif
206#ifdef __cplusplus
207template<typename T>
208void __Pyx_call_destructor(T* x) {
209    x->~T();
210}
211#endif
212
213
214#if PY_MAJOR_VERSION >= 3
215  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
216  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
217#else
218  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
219  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
220#endif
221
222#ifndef __PYX_EXTERN_C
223  #ifdef __cplusplus
224    #define __PYX_EXTERN_C extern "C"
225  #else
226    #define __PYX_EXTERN_C extern
227  #endif
228#endif
229
230#if defined(WIN32) || defined(MS_WINDOWS)
231#define _USE_MATH_DEFINES
232#endif
233#include <math.h>
234#define __PYX_HAVE__zmq__backend__cython__message
235#define __PYX_HAVE_API__zmq__backend__cython__message
236#include "string.h"
237#include "stdio.h"
238#include "pythread.h"
239#include "zmq_compat.h"
240#include "zmq.h"
241#include "zmq_utils.h"
242#include "pyversion_compat.h"
243#include "stdlib.h"
244#include "errno.h"
245#ifdef _OPENMP
246#include <omp.h>
247#endif /* _OPENMP */
248
249#ifdef PYREX_WITHOUT_ASSERTIONS
250#define CYTHON_WITHOUT_ASSERTIONS
251#endif
252
253#ifndef CYTHON_UNUSED
254# if defined(__GNUC__)
255#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
256#     define CYTHON_UNUSED __attribute__ ((__unused__))
257#   else
258#     define CYTHON_UNUSED
259#   endif
260# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
261#   define CYTHON_UNUSED __attribute__ ((__unused__))
262# else
263#   define CYTHON_UNUSED
264# endif
265#endif
266typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
267                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
268
269#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
270#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
271#define __PYX_DEFAULT_STRING_ENCODING ""
272#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
273#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
274#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
275    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
276    (sizeof(type) > sizeof(Py_ssize_t) &&               \
277          likely(v < (type)PY_SSIZE_T_MAX ||            \
278                 v == (type)PY_SSIZE_T_MAX)  &&         \
279          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
280                                v == (type)PY_SSIZE_T_MIN)))  ||  \
281    (sizeof(type) == sizeof(Py_ssize_t) &&              \
282          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
283                               v == (type)PY_SSIZE_T_MAX)))  )
284static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
285static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
286#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
287#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
288#define __Pyx_PyBytes_FromString        PyBytes_FromString
289#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
290static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
291#if PY_MAJOR_VERSION < 3
292    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
293    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
294#else
295    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
296    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
297#endif
298#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
299#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
300#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((const char*)s)
301#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((const char*)s)
302#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((const char*)s)
303#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((const char*)s)
304#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
305#if PY_MAJOR_VERSION < 3
306static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
307{
308    const Py_UNICODE *u_end = u;
309    while (*u_end++) ;
310    return (size_t)(u_end - u - 1);
311}
312#else
313#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
314#endif
315#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
316#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
317#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
318#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
319#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
320static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
321static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
322static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
323static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
324#if CYTHON_COMPILING_IN_CPYTHON
325#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
326#else
327#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
328#endif
329#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
330#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
331static int __Pyx_sys_getdefaultencoding_not_ascii;
332static int __Pyx_init_sys_getdefaultencoding_params(void) {
333    PyObject* sys;
334    PyObject* default_encoding = NULL;
335    PyObject* ascii_chars_u = NULL;
336    PyObject* ascii_chars_b = NULL;
337    const char* default_encoding_c;
338    sys = PyImport_ImportModule("sys");
339    if (!sys) goto bad;
340    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
341    Py_DECREF(sys);
342    if (!default_encoding) goto bad;
343    default_encoding_c = PyBytes_AsString(default_encoding);
344    if (!default_encoding_c) goto bad;
345    if (strcmp(default_encoding_c, "ascii") == 0) {
346        __Pyx_sys_getdefaultencoding_not_ascii = 0;
347    } else {
348        char ascii_chars[128];
349        int c;
350        for (c = 0; c < 128; c++) {
351            ascii_chars[c] = c;
352        }
353        __Pyx_sys_getdefaultencoding_not_ascii = 1;
354        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
355        if (!ascii_chars_u) goto bad;
356        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
357        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
358            PyErr_Format(
359                PyExc_ValueError,
360                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
361                default_encoding_c);
362            goto bad;
363        }
364        Py_DECREF(ascii_chars_u);
365        Py_DECREF(ascii_chars_b);
366    }
367    Py_DECREF(default_encoding);
368    return 0;
369bad:
370    Py_XDECREF(default_encoding);
371    Py_XDECREF(ascii_chars_u);
372    Py_XDECREF(ascii_chars_b);
373    return -1;
374}
375#endif
376#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
377#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
378#else
379#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
380#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
381static char* __PYX_DEFAULT_STRING_ENCODING;
382static int __Pyx_init_sys_getdefaultencoding_params(void) {
383    PyObject* sys;
384    PyObject* default_encoding = NULL;
385    char* default_encoding_c;
386    sys = PyImport_ImportModule("sys");
387    if (!sys) goto bad;
388    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
389    Py_DECREF(sys);
390    if (!default_encoding) goto bad;
391    default_encoding_c = PyBytes_AsString(default_encoding);
392    if (!default_encoding_c) goto bad;
393    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
394    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
395    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
396    Py_DECREF(default_encoding);
397    return 0;
398bad:
399    Py_XDECREF(default_encoding);
400    return -1;
401}
402#endif
403#endif
404
405
406/* Test for GCC > 2.95 */
407#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
408  #define likely(x)   __builtin_expect(!!(x), 1)
409  #define unlikely(x) __builtin_expect(!!(x), 0)
410#else /* !__GNUC__ or GCC < 2.95 */
411  #define likely(x)   (x)
412  #define unlikely(x) (x)
413#endif /* __GNUC__ */
414
415static PyObject *__pyx_m;
416static PyObject *__pyx_d;
417static PyObject *__pyx_b;
418static PyObject *__pyx_empty_tuple;
419static PyObject *__pyx_empty_bytes;
420static int __pyx_lineno;
421static int __pyx_clineno = 0;
422static const char * __pyx_cfilenm= __FILE__;
423static const char *__pyx_filename;
424
425
426static const char *__pyx_f[] = {
427  "zmq/backend/cython/message.pyx",
428  "zmq/backend/cython/message.pxd",
429  "zmq/backend/cython/checkrc.pxd",
430  "zmq/utils/buffers.pxd",
431  "type.pxd",
432  "bool.pxd",
433  "complex.pxd",
434};
435
436/*--- Type declarations ---*/
437struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker;
438struct __pyx_obj_3zmq_7backend_6cython_7message_Frame;
439struct __pyx_t_3zmq_7backend_6cython_7message_zhint;
440typedef struct __pyx_t_3zmq_7backend_6cython_7message_zhint __pyx_t_3zmq_7backend_6cython_7message_zhint;
441
442/* "zmq/backend/cython/message.pyx":61
443 * #-----------------------------------------------------------------------------
444 *
445 * ctypedef struct zhint:             # <<<<<<<<<<<<<<
446 *     void *ctx
447 *     size_t id
448 */
449struct __pyx_t_3zmq_7backend_6cython_7message_zhint {
450  void *ctx;
451  size_t id;
452};
453
454/* "zmq/backend/cython/message.pxd":34
455 * #-----------------------------------------------------------------------------
456 *
457 * cdef class MessageTracker(object):             # <<<<<<<<<<<<<<
458 *
459 *     cdef set events  # Message Event objects to track.
460 */
461struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker {
462  PyObject_HEAD
463  PyObject *events;
464  PyObject *peers;
465};
466
467
468/* "zmq/backend/cython/message.pxd":40
469 *
470 *
471 * cdef class Frame:             # <<<<<<<<<<<<<<
472 *
473 *     cdef zmq_msg_t zmq_msg
474 */
475struct __pyx_obj_3zmq_7backend_6cython_7message_Frame {
476  PyObject_HEAD
477  struct __pyx_vtabstruct_3zmq_7backend_6cython_7message_Frame *__pyx_vtab;
478  zmq_msg_t zmq_msg;
479  PyObject *_data;
480  PyObject *_buffer;
481  PyObject *_bytes;
482  int _failed_init;
483  PyObject *tracker_event;
484  PyObject *tracker;
485  int more;
486};
487
488
489
490/* "zmq/backend/cython/message.pyx":111
491 * gc = None
492 *
493 * cdef class Frame:             # <<<<<<<<<<<<<<
494 *     """Frame(data=None, track=False)
495 *
496 */
497
498struct __pyx_vtabstruct_3zmq_7backend_6cython_7message_Frame {
499  struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *(*fast_copy)(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *);
500  PyObject *(*_getbuffer)(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *);
501};
502static struct __pyx_vtabstruct_3zmq_7backend_6cython_7message_Frame *__pyx_vtabptr_3zmq_7backend_6cython_7message_Frame;
503static PyObject *__pyx_f_3zmq_7backend_6cython_7message_5Frame__getbuffer(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *);
504#ifndef CYTHON_REFNANNY
505  #define CYTHON_REFNANNY 0
506#endif
507#if CYTHON_REFNANNY
508  typedef struct {
509    void (*INCREF)(void*, PyObject*, int);
510    void (*DECREF)(void*, PyObject*, int);
511    void (*GOTREF)(void*, PyObject*, int);
512    void (*GIVEREF)(void*, PyObject*, int);
513    void* (*SetupContext)(const char*, int, const char*);
514    void (*FinishContext)(void**);
515  } __Pyx_RefNannyAPIStruct;
516  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
517  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
518  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
519#ifdef WITH_THREAD
520  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
521          if (acquire_gil) { \
522              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
523              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
524              PyGILState_Release(__pyx_gilstate_save); \
525          } else { \
526              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
527          }
528#else
529  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
530          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
531#endif
532  #define __Pyx_RefNannyFinishContext() \
533          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
534  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
535  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
536  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
537  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
538  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
539  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
540  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
541  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
542#else
543  #define __Pyx_RefNannyDeclarations
544  #define __Pyx_RefNannySetupContext(name, acquire_gil)
545  #define __Pyx_RefNannyFinishContext()
546  #define __Pyx_INCREF(r) Py_INCREF(r)
547  #define __Pyx_DECREF(r) Py_DECREF(r)
548  #define __Pyx_GOTREF(r)
549  #define __Pyx_GIVEREF(r)
550  #define __Pyx_XINCREF(r) Py_XINCREF(r)
551  #define __Pyx_XDECREF(r) Py_XDECREF(r)
552  #define __Pyx_XGOTREF(r)
553  #define __Pyx_XGIVEREF(r)
554#endif
555#define __Pyx_XDECREF_SET(r, v) do {                            \
556        PyObject *tmp = (PyObject *) r;                         \
557        r = v; __Pyx_XDECREF(tmp);                              \
558    } while (0)
559#define __Pyx_DECREF_SET(r, v) do {                             \
560        PyObject *tmp = (PyObject *) r;                         \
561        r = v; __Pyx_DECREF(tmp);                               \
562    } while (0)
563#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
564#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
565
566#if CYTHON_COMPILING_IN_CPYTHON
567static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
568    PyTypeObject* tp = Py_TYPE(obj);
569    if (likely(tp->tp_getattro))
570        return tp->tp_getattro(obj, attr_name);
571#if PY_MAJOR_VERSION < 3
572    if (likely(tp->tp_getattr))
573        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
574#endif
575    return PyObject_GetAttr(obj, attr_name);
576}
577#else
578#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
579#endif
580
581static PyObject *__Pyx_GetBuiltinName(PyObject *name);
582
583static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
584
585static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
586    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
587    const char* function_name);
588
589static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
590    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
591
592static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
593
594#if CYTHON_COMPILING_IN_CPYTHON
595static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
596#else
597#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
598#endif
599
600#if CYTHON_COMPILING_IN_CPYTHON
601static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
602#endif
603
604static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
605
606#if CYTHON_COMPILING_IN_CPYTHON
607static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
608#else
609#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
610#endif
611
612static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
613static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
614
615static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
616
617static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
618
619static void __Pyx_WriteUnraisable(const char *name, int clineno,
620                                  int lineno, const char *filename,
621                                  int full_traceback);
622
623#include <string.h>
624
625static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
626         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
627         const char* encoding, const char* errors,
628         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
629
630static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
631static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
632
633static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
634
635static int __Pyx_SetVtable(PyObject *dict, void *vtable);
636
637static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name);
638
639typedef struct {
640    int code_line;
641    PyCodeObject* code_object;
642} __Pyx_CodeObjectCacheEntry;
643struct __Pyx_CodeObjectCache {
644    int count;
645    int max_count;
646    __Pyx_CodeObjectCacheEntry* entries;
647};
648static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
649static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
650static PyCodeObject *__pyx_find_code_object(int code_line);
651static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
652
653static void __Pyx_AddTraceback(const char *funcname, int c_line,
654                               int py_line, const char *filename);
655
656static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
657
658static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
659
660static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
661
662#ifndef __PYX_FORCE_INIT_THREADS
663  #define __PYX_FORCE_INIT_THREADS 0
664#endif
665
666static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
667
668static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
669
670static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
671
672static int __Pyx_check_binary_version(void);
673
674#if !defined(__Pyx_PyIdentifier_FromString)
675#if PY_MAJOR_VERSION < 3
676  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
677#else
678  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
679#endif
680#endif
681
682static PyObject *__Pyx_ImportModule(const char *name);
683
684static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
685
686static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
687
688static struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_f_3zmq_7backend_6cython_7message_5Frame_fast_copy(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto*/
689static PyObject *__pyx_f_3zmq_7backend_6cython_7message_5Frame__getbuffer(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto*/
690
691/* Module declarations from 'cpython.version' */
692
693/* Module declarations from 'cpython.ref' */
694
695/* Module declarations from 'cpython.exc' */
696
697/* Module declarations from 'cpython.module' */
698
699/* Module declarations from 'cpython.mem' */
700
701/* Module declarations from 'cpython.tuple' */
702
703/* Module declarations from 'cpython.list' */
704
705/* Module declarations from 'libc.string' */
706
707/* Module declarations from 'libc.stdio' */
708
709/* Module declarations from 'cpython.object' */
710
711/* Module declarations from 'cpython.sequence' */
712
713/* Module declarations from 'cpython.mapping' */
714
715/* Module declarations from 'cpython.iterator' */
716
717/* Module declarations from '__builtin__' */
718
719/* Module declarations from 'cpython.type' */
720static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
721
722/* Module declarations from 'cpython.number' */
723
724/* Module declarations from 'cpython.int' */
725
726/* Module declarations from '__builtin__' */
727
728/* Module declarations from 'cpython.bool' */
729static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
730
731/* Module declarations from 'cpython.long' */
732
733/* Module declarations from 'cpython.float' */
734
735/* Module declarations from '__builtin__' */
736
737/* Module declarations from 'cpython.complex' */
738static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
739
740/* Module declarations from 'cpython.string' */
741
742/* Module declarations from 'cpython.unicode' */
743
744/* Module declarations from 'cpython.dict' */
745
746/* Module declarations from 'cpython.instance' */
747
748/* Module declarations from 'cpython.function' */
749
750/* Module declarations from 'cpython.method' */
751
752/* Module declarations from 'cpython.weakref' */
753
754/* Module declarations from 'cpython.getargs' */
755
756/* Module declarations from 'cpython.pythread' */
757
758/* Module declarations from 'cpython.pystate' */
759
760/* Module declarations from 'cpython.cobject' */
761
762/* Module declarations from 'cpython.oldbuffer' */
763
764/* Module declarations from 'cpython.set' */
765
766/* Module declarations from 'cpython.buffer' */
767
768/* Module declarations from 'cpython.bytes' */
769
770/* Module declarations from 'cpython.pycapsule' */
771
772/* Module declarations from 'cpython' */
773
774/* Module declarations from 'zmq.backend.cython.libzmq' */
775
776/* Module declarations from 'buffers' */
777static CYTHON_INLINE int __pyx_f_7buffers_memoryview_available(void); /*proto*/
778static CYTHON_INLINE int __pyx_f_7buffers_oldstyle_available(void); /*proto*/
779static CYTHON_INLINE int __pyx_f_7buffers_check_buffer(PyObject *); /*proto*/
780static CYTHON_INLINE PyObject *__pyx_f_7buffers_asbuffer(PyObject *, int, int, void **, Py_ssize_t *, Py_ssize_t *); /*proto*/
781static CYTHON_INLINE PyObject *__pyx_f_7buffers_asbuffer_r(PyObject *, void **, Py_ssize_t *); /*proto*/
782static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_3(void *, Py_ssize_t, int); /*proto*/
783static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_2(void *, Py_ssize_t, int); /*proto*/
784static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer(void *, Py_ssize_t, int); /*proto*/
785static CYTHON_INLINE PyObject *__pyx_f_7buffers_viewfromobject(PyObject *, int); /*proto*/
786static CYTHON_INLINE PyObject *__pyx_f_7buffers_viewfromobject_r(PyObject *); /*proto*/
787
788/* Module declarations from 'libc.stdlib' */
789
790/* Module declarations from 'libc.errno' */
791
792/* Module declarations from 'zmq.backend.cython.checkrc' */
793static CYTHON_INLINE int __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(int); /*proto*/
794
795/* Module declarations from 'zmq.backend.cython.message' */
796static PyTypeObject *__pyx_ptype_3zmq_7backend_6cython_7message_MessageTracker = 0;
797static PyTypeObject *__pyx_ptype_3zmq_7backend_6cython_7message_Frame = 0;
798static CYTHON_INLINE PyObject *__pyx_f_3zmq_7backend_6cython_7message_copy_zmq_msg_bytes(zmq_msg_t *); /*proto*/
799static void __pyx_f_3zmq_7backend_6cython_7message_free_python_msg(void *, void *); /*proto*/
800#define __Pyx_MODULE_NAME "zmq.backend.cython.message"
801int __pyx_module_is_main_zmq__backend__cython__message = 0;
802
803/* Implementation of 'zmq.backend.cython.message' */
804static PyObject *__pyx_builtin_ImportError;
805static PyObject *__pyx_builtin_AttributeError;
806static PyObject *__pyx_builtin_property;
807static PyObject *__pyx_builtin_TypeError;
808static PyObject *__pyx_builtin_SystemError;
809static PyObject *__pyx_builtin_NotImplementedError;
810static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame___cinit__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_track, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
811static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_2__init__(CYTHON_UNUSED struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_track); /* proto */
812static void __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4__dealloc__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
813static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_6__getbuffer__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
814#if PY_MAJOR_VERSION < 3
815static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_8__getsegcount__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /* proto */
816#endif
817#if PY_MAJOR_VERSION < 3
818static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_10__getreadbuffer__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /* proto */
819#endif
820static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_12__copy__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
821static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_14__len__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
822static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_16__str__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
823static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_18buffer(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
824static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_20bytes(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
825static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_22set(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, int __pyx_v_option, int __pyx_v_value); /* proto */
826static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_24get(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_option); /* proto */
827static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
828static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
829static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_4__del__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
830static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
831static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
832static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_4__del__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
833static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self); /* proto */
834static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
835static PyObject *__pyx_tp_new_3zmq_7backend_6cython_7message_MessageTracker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
836static PyObject *__pyx_tp_new_3zmq_7backend_6cython_7message_Frame(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
837static char __pyx_k_B[] = "B";
838static char __pyx_k__7[] = "";
839static char __pyx_k_gc[] = "gc";
840static char __pyx_k_all[] = "__all__";
841static char __pyx_k_zmq[] = "zmq";
842static char __pyx_k_char[] = "char";
843static char __pyx_k_data[] = "data";
844static char __pyx_k_main[] = "__main__";
845static char __pyx_k_test[] = "__test__";
846static char __pyx_k_time[] = "time";
847static char __pyx_k_utf8[] = "utf8";
848static char __pyx_k_Again[] = "Again";
849static char __pyx_k_Event[] = "Event";
850static char __pyx_k_Frame[] = "Frame";
851static char __pyx_k_ascii[] = "ascii";
852static char __pyx_k_bytes[] = "bytes";
853static char __pyx_k_dtype[] = "dtype";
854static char __pyx_k_store[] = "store";
855static char __pyx_k_track[] = "track";
856static char __pyx_k_value[] = "value";
857static char __pyx_k_buffer[] = "buffer";
858static char __pyx_k_decode[] = "decode";
859static char __pyx_k_encode[] = "encode";
860static char __pyx_k_import[] = "__import__";
861static char __pyx_k_option[] = "option";
862static char __pyx_k_Event_2[] = "_Event";
863static char __pyx_k_Message[] = "Message";
864static char __pyx_k_context[] = "_context";
865static char __pyx_k_unicode[] = "unicode";
866static char __pyx_k_ZMQError[] = "ZMQError";
867static char __pyx_k_itemsize[] = "itemsize";
868static char __pyx_k_property[] = "property";
869static char __pyx_k_typecode[] = "typecode";
870static char __pyx_k_TypeError[] = "TypeError";
871static char __pyx_k_threading[] = "threading";
872static char __pyx_k_zmq_error[] = "zmq.error";
873static char __pyx_k_basestring[] = "basestring";
874static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
875static char __pyx_k_underlying[] = "underlying";
876static char __pyx_k_ImportError[] = "ImportError";
877static char __pyx_k_SystemError[] = "SystemError";
878static char __pyx_k_check_version[] = "_check_version";
879static char __pyx_k_AttributeError[] = "AttributeError";
880static char __pyx_k_MessageTracker[] = "MessageTracker";
881static char __pyx_k_ContextTerminated[] = "ContextTerminated";
882static char __pyx_k_zmq_utils_garbage[] = "zmq.utils.garbage";
883static char __pyx_k_expected_str_got_r[] = "expected str, got: %r";
884static char __pyx_k_inproc_pyzmq_gc_01[] = "inproc://pyzmq.gc.01";
885static char __pyx_k_zmq_utils_strtypes[] = "zmq.utils.strtypes";
886static char __pyx_k_NotImplementedError[] = "NotImplementedError";
887static char __pyx_k_get_string_properties[] = "get string properties";
888static char __pyx_k_pyzmq_gc_send_failed_s[] = "pyzmq-gc send failed: %s\n";
889static char __pyx_k_pyzmq_gc_connect_failed_s[] = "pyzmq-gc connect failed: %s\n";
890static char __pyx_k_0MQ_Message_related_classes[] = "0MQ Message related classes.";
891static char __pyx_k_Old_style_buffers_not_available[] = "Old style buffers not available.";
892static char __pyx_k_r_does_not_provide_a_buffer_int[] = "%r does not provide a buffer interface.";
893static char __pyx_k_Unicode_objects_not_allowed_Only[] = "Unicode objects not allowed. Only: str/bytes, buffer interfaces.";
894static char __pyx_k_accessing_non_existent_buffer_se[] = "accessing non-existent buffer segment";
895static PyObject *__pyx_n_s_Again;
896static PyObject *__pyx_n_s_AttributeError;
897static PyObject *__pyx_n_b_B;
898static PyObject *__pyx_n_s_ContextTerminated;
899static PyObject *__pyx_n_s_Event;
900static PyObject *__pyx_n_s_Event_2;
901static PyObject *__pyx_n_s_Frame;
902static PyObject *__pyx_n_s_ImportError;
903static PyObject *__pyx_n_s_Message;
904static PyObject *__pyx_n_s_MessageTracker;
905static PyObject *__pyx_n_s_NotImplementedError;
906static PyObject *__pyx_kp_s_Old_style_buffers_not_available;
907static PyObject *__pyx_n_s_SystemError;
908static PyObject *__pyx_n_s_TypeError;
909static PyObject *__pyx_kp_s_Unicode_objects_not_allowed_Only;
910static PyObject *__pyx_n_s_ZMQError;
911static PyObject *__pyx_kp_s__7;
912static PyObject *__pyx_kp_s_accessing_non_existent_buffer_se;
913static PyObject *__pyx_n_s_all;
914static PyObject *__pyx_n_s_ascii;
915static PyObject *__pyx_n_s_basestring;
916static PyObject *__pyx_n_s_buffer;
917static PyObject *__pyx_n_s_bytes;
918static PyObject *__pyx_n_s_char;
919static PyObject *__pyx_n_s_check_version;
920static PyObject *__pyx_n_s_context;
921static PyObject *__pyx_n_s_data;
922static PyObject *__pyx_n_s_decode;
923static PyObject *__pyx_n_s_dtype;
924static PyObject *__pyx_n_s_encode;
925static PyObject *__pyx_kp_s_expected_str_got_r;
926static PyObject *__pyx_n_s_gc;
927static PyObject *__pyx_kp_s_get_string_properties;
928static PyObject *__pyx_n_s_import;
929static PyObject *__pyx_n_s_itemsize;
930static PyObject *__pyx_n_s_main;
931static PyObject *__pyx_n_s_option;
932static PyObject *__pyx_n_s_property;
933static PyObject *__pyx_n_s_pyx_vtable;
934static PyObject *__pyx_kp_s_r_does_not_provide_a_buffer_int;
935static PyObject *__pyx_n_s_store;
936static PyObject *__pyx_n_s_test;
937static PyObject *__pyx_n_s_threading;
938static PyObject *__pyx_n_s_time;
939static PyObject *__pyx_n_s_track;
940static PyObject *__pyx_n_s_typecode;
941static PyObject *__pyx_n_s_underlying;
942static PyObject *__pyx_n_s_unicode;
943static PyObject *__pyx_n_s_utf8;
944static PyObject *__pyx_n_s_value;
945static PyObject *__pyx_n_s_zmq;
946static PyObject *__pyx_n_s_zmq_error;
947static PyObject *__pyx_n_s_zmq_utils_garbage;
948static PyObject *__pyx_n_s_zmq_utils_strtypes;
949static PyObject *__pyx_int_1;
950static PyObject *__pyx_int_4;
951static PyObject *__pyx_tuple_;
952static PyObject *__pyx_tuple__2;
953static PyObject *__pyx_tuple__3;
954static PyObject *__pyx_tuple__4;
955static PyObject *__pyx_tuple__5;
956static PyObject *__pyx_tuple__6;
957static PyObject *__pyx_tuple__8;
958
959/* "zmq/backend/cython/message.pyx":65
960 *     size_t id
961 *
962 * cdef void free_python_msg(void *data, void *vhint) nogil:             # <<<<<<<<<<<<<<
963 *     """A pure-C function for DECREF'ing Python-owned message data.
964 *
965 */
966
967static void __pyx_f_3zmq_7backend_6cython_7message_free_python_msg(CYTHON_UNUSED void *__pyx_v_data, void *__pyx_v_vhint) {
968  void *__pyx_v_push;
969  zmq_msg_t __pyx_v_msg;
970  __pyx_t_3zmq_7backend_6cython_7message_zhint *__pyx_v_hint;
971  int __pyx_v_rc;
972  int __pyx_t_1;
973
974  /* "zmq/backend/cython/message.pyx":87
975 *     cdef void *push
976 *     cdef zmq_msg_t msg
977 *     cdef zhint *hint = <zhint *> vhint             # <<<<<<<<<<<<<<
978 *     if hint != NULL:
979 *         zmq_msg_init_size(&msg, sizeof(size_t))
980 */
981  __pyx_v_hint = ((__pyx_t_3zmq_7backend_6cython_7message_zhint *)__pyx_v_vhint);
982
983  /* "zmq/backend/cython/message.pyx":88
984 *     cdef zmq_msg_t msg
985 *     cdef zhint *hint = <zhint *> vhint
986 *     if hint != NULL:             # <<<<<<<<<<<<<<
987 *         zmq_msg_init_size(&msg, sizeof(size_t))
988 *         memcpy(zmq_msg_data(&msg), &hint.id, sizeof(size_t))
989 */
990  __pyx_t_1 = ((__pyx_v_hint != NULL) != 0);
991  if (__pyx_t_1) {
992
993    /* "zmq/backend/cython/message.pyx":89
994 *     cdef zhint *hint = <zhint *> vhint
995 *     if hint != NULL:
996 *         zmq_msg_init_size(&msg, sizeof(size_t))             # <<<<<<<<<<<<<<
997 *         memcpy(zmq_msg_data(&msg), &hint.id, sizeof(size_t))
998 *
999 */
1000    zmq_msg_init_size((&__pyx_v_msg), (sizeof(size_t)));
1001
1002    /* "zmq/backend/cython/message.pyx":90
1003 *     if hint != NULL:
1004 *         zmq_msg_init_size(&msg, sizeof(size_t))
1005 *         memcpy(zmq_msg_data(&msg), &hint.id, sizeof(size_t))             # <<<<<<<<<<<<<<
1006 *
1007 *         push = zmq_socket(hint.ctx, ZMQ_PUSH)
1008 */
1009    memcpy(zmq_msg_data((&__pyx_v_msg)), (&__pyx_v_hint->id), (sizeof(size_t)));
1010
1011    /* "zmq/backend/cython/message.pyx":92
1012 *         memcpy(zmq_msg_data(&msg), &hint.id, sizeof(size_t))
1013 *
1014 *         push = zmq_socket(hint.ctx, ZMQ_PUSH)             # <<<<<<<<<<<<<<
1015 *         if push == NULL:
1016 *             # this will happen if the context has been terminated
1017 */
1018    __pyx_v_push = zmq_socket(__pyx_v_hint->ctx, ZMQ_PUSH);
1019
1020    /* "zmq/backend/cython/message.pyx":93
1021 *
1022 *         push = zmq_socket(hint.ctx, ZMQ_PUSH)
1023 *         if push == NULL:             # <<<<<<<<<<<<<<
1024 *             # this will happen if the context has been terminated
1025 *             return
1026 */
1027    __pyx_t_1 = ((__pyx_v_push == NULL) != 0);
1028    if (__pyx_t_1) {
1029
1030      /* "zmq/backend/cython/message.pyx":95
1031 *         if push == NULL:
1032 *             # this will happen if the context has been terminated
1033 *             return             # <<<<<<<<<<<<<<
1034 *         rc = zmq_connect(push, "inproc://pyzmq.gc.01")
1035 *         if rc < 0:
1036 */
1037      goto __pyx_L0;
1038    }
1039
1040    /* "zmq/backend/cython/message.pyx":96
1041 *             # this will happen if the context has been terminated
1042 *             return
1043 *         rc = zmq_connect(push, "inproc://pyzmq.gc.01")             # <<<<<<<<<<<<<<
1044 *         if rc < 0:
1045 *             fprintf(cstderr, "pyzmq-gc connect failed: %s\n", zmq_strerror(zmq_errno()))
1046 */
1047    __pyx_v_rc = zmq_connect(__pyx_v_push, __pyx_k_inproc_pyzmq_gc_01);
1048
1049    /* "zmq/backend/cython/message.pyx":97
1050 *             return
1051 *         rc = zmq_connect(push, "inproc://pyzmq.gc.01")
1052 *         if rc < 0:             # <<<<<<<<<<<<<<
1053 *             fprintf(cstderr, "pyzmq-gc connect failed: %s\n", zmq_strerror(zmq_errno()))
1054 *             return
1055 */
1056    __pyx_t_1 = ((__pyx_v_rc < 0) != 0);
1057    if (__pyx_t_1) {
1058
1059      /* "zmq/backend/cython/message.pyx":98
1060 *         rc = zmq_connect(push, "inproc://pyzmq.gc.01")
1061 *         if rc < 0:
1062 *             fprintf(cstderr, "pyzmq-gc connect failed: %s\n", zmq_strerror(zmq_errno()))             # <<<<<<<<<<<<<<
1063 *             return
1064 *
1065 */
1066      fprintf(stderr, __pyx_k_pyzmq_gc_connect_failed_s, zmq_strerror(zmq_errno()));
1067
1068      /* "zmq/backend/cython/message.pyx":99
1069 *         if rc < 0:
1070 *             fprintf(cstderr, "pyzmq-gc connect failed: %s\n", zmq_strerror(zmq_errno()))
1071 *             return             # <<<<<<<<<<<<<<
1072 *
1073 *         rc = zmq_msg_send(&msg, push, 0)
1074 */
1075      goto __pyx_L0;
1076    }
1077
1078    /* "zmq/backend/cython/message.pyx":101
1079 *             return
1080 *
1081 *         rc = zmq_msg_send(&msg, push, 0)             # <<<<<<<<<<<<<<
1082 *         if rc < 0:
1083 *             fprintf(cstderr, "pyzmq-gc send failed: %s\n", zmq_strerror(zmq_errno()))
1084 */
1085    __pyx_v_rc = zmq_msg_send((&__pyx_v_msg), __pyx_v_push, 0);
1086
1087    /* "zmq/backend/cython/message.pyx":102
1088 *
1089 *         rc = zmq_msg_send(&msg, push, 0)
1090 *         if rc < 0:             # <<<<<<<<<<<<<<
1091 *             fprintf(cstderr, "pyzmq-gc send failed: %s\n", zmq_strerror(zmq_errno()))
1092 *
1093 */
1094    __pyx_t_1 = ((__pyx_v_rc < 0) != 0);
1095    if (__pyx_t_1) {
1096
1097      /* "zmq/backend/cython/message.pyx":103
1098 *         rc = zmq_msg_send(&msg, push, 0)
1099 *         if rc < 0:
1100 *             fprintf(cstderr, "pyzmq-gc send failed: %s\n", zmq_strerror(zmq_errno()))             # <<<<<<<<<<<<<<
1101 *
1102 *         zmq_msg_close(&msg)
1103 */
1104      fprintf(stderr, __pyx_k_pyzmq_gc_send_failed_s, zmq_strerror(zmq_errno()));
1105      goto __pyx_L6;
1106    }
1107    __pyx_L6:;
1108
1109    /* "zmq/backend/cython/message.pyx":105
1110 *             fprintf(cstderr, "pyzmq-gc send failed: %s\n", zmq_strerror(zmq_errno()))
1111 *
1112 *         zmq_msg_close(&msg)             # <<<<<<<<<<<<<<
1113 *         zmq_close(push)
1114 *         free(hint)
1115 */
1116    zmq_msg_close((&__pyx_v_msg));
1117
1118    /* "zmq/backend/cython/message.pyx":106
1119 *
1120 *         zmq_msg_close(&msg)
1121 *         zmq_close(push)             # <<<<<<<<<<<<<<
1122 *         free(hint)
1123 *
1124 */
1125    zmq_close(__pyx_v_push);
1126
1127    /* "zmq/backend/cython/message.pyx":107
1128 *         zmq_msg_close(&msg)
1129 *         zmq_close(push)
1130 *         free(hint)             # <<<<<<<<<<<<<<
1131 *
1132 * gc = None
1133 */
1134    free(__pyx_v_hint);
1135    goto __pyx_L3;
1136  }
1137  __pyx_L3:;
1138
1139  /* "zmq/backend/cython/message.pyx":65
1140 *     size_t id
1141 *
1142 * cdef void free_python_msg(void *data, void *vhint) nogil:             # <<<<<<<<<<<<<<
1143 *     """A pure-C function for DECREF'ing Python-owned message data.
1144 *
1145 */
1146
1147  /* function exit code */
1148  __pyx_L0:;
1149}
1150
1151/* "zmq/backend/cython/message.pyx":138
1152 *     """
1153 *
1154 *     def __cinit__(self, object data=None, track=False, **kwargs):             # <<<<<<<<<<<<<<
1155 *         cdef int rc
1156 *         cdef char *data_c = NULL
1157 */
1158
1159/* Python wrapper */
1160static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1161static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1162  PyObject *__pyx_v_data = 0;
1163  PyObject *__pyx_v_track = 0;
1164  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
1165  int __pyx_lineno = 0;
1166  const char *__pyx_filename = NULL;
1167  int __pyx_clineno = 0;
1168  int __pyx_r;
1169  __Pyx_RefNannyDeclarations
1170  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
1171  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
1172  __Pyx_GOTREF(__pyx_v_kwargs);
1173  {
1174    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_track,0};
1175    PyObject* values[2] = {0,0};
1176    values[0] = ((PyObject *)Py_None);
1177    values[1] = ((PyObject *)Py_False);
1178    if (unlikely(__pyx_kwds)) {
1179      Py_ssize_t kw_args;
1180      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1181      switch (pos_args) {
1182        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1183        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1184        case  0: break;
1185        default: goto __pyx_L5_argtuple_error;
1186      }
1187      kw_args = PyDict_Size(__pyx_kwds);
1188      switch (pos_args) {
1189        case  0:
1190        if (kw_args > 0) {
1191          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data);
1192          if (value) { values[0] = value; kw_args--; }
1193        }
1194        case  1:
1195        if (kw_args > 0) {
1196          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track);
1197          if (value) { values[1] = value; kw_args--; }
1198        }
1199      }
1200      if (unlikely(kw_args > 0)) {
1201        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1202      }
1203    } else {
1204      switch (PyTuple_GET_SIZE(__pyx_args)) {
1205        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1206        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1207        case  0: break;
1208        default: goto __pyx_L5_argtuple_error;
1209      }
1210    }
1211    __pyx_v_data = values[0];
1212    __pyx_v_track = values[1];
1213  }
1214  goto __pyx_L4_argument_unpacking_done;
1215  __pyx_L5_argtuple_error:;
1216  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1217  __pyx_L3_error:;
1218  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
1219  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1220  __Pyx_RefNannyFinishContext();
1221  return -1;
1222  __pyx_L4_argument_unpacking_done:;
1223  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame___cinit__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), __pyx_v_data, __pyx_v_track, __pyx_v_kwargs);
1224
1225  /* function exit code */
1226  __Pyx_XDECREF(__pyx_v_kwargs);
1227  __Pyx_RefNannyFinishContext();
1228  return __pyx_r;
1229}
1230
1231static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame___cinit__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_track, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
1232  int __pyx_v_rc;
1233  char *__pyx_v_data_c;
1234  Py_ssize_t __pyx_v_data_len_c;
1235  __pyx_t_3zmq_7backend_6cython_7message_zhint *__pyx_v_hint;
1236  PyObject *__pyx_v_evt = NULL;
1237  int __pyx_r;
1238  __Pyx_RefNannyDeclarations
1239  int __pyx_t_1;
1240  PyObject *__pyx_t_2 = NULL;
1241  PyObject *__pyx_t_3 = NULL;
1242  PyObject *__pyx_t_4 = NULL;
1243  PyObject *__pyx_t_5 = NULL;
1244  int __pyx_t_6;
1245  int __pyx_t_7;
1246  Py_ssize_t __pyx_t_8;
1247  size_t __pyx_t_9;
1248  int __pyx_lineno = 0;
1249  const char *__pyx_filename = NULL;
1250  int __pyx_clineno = 0;
1251  __Pyx_RefNannySetupContext("__cinit__", 0);
1252
1253  /* "zmq/backend/cython/message.pyx":140
1254 *     def __cinit__(self, object data=None, track=False, **kwargs):
1255 *         cdef int rc
1256 *         cdef char *data_c = NULL             # <<<<<<<<<<<<<<
1257 *         cdef Py_ssize_t data_len_c=0
1258 *         cdef zhint *hint
1259 */
1260  __pyx_v_data_c = NULL;
1261
1262  /* "zmq/backend/cython/message.pyx":141
1263 *         cdef int rc
1264 *         cdef char *data_c = NULL
1265 *         cdef Py_ssize_t data_len_c=0             # <<<<<<<<<<<<<<
1266 *         cdef zhint *hint
1267 *
1268 */
1269  __pyx_v_data_len_c = 0;
1270
1271  /* "zmq/backend/cython/message.pyx":145
1272 *
1273 *         # init more as False
1274 *         self.more = False             # <<<<<<<<<<<<<<
1275 *
1276 *         # Save the data object in case the user wants the the data as a str.
1277 */
1278  __pyx_v_self->more = 0;
1279
1280  /* "zmq/backend/cython/message.pyx":148
1281 *
1282 *         # Save the data object in case the user wants the the data as a str.
1283 *         self._data = data             # <<<<<<<<<<<<<<
1284 *         self._failed_init = True  # bool switch for dealloc
1285 *         self._buffer = None       # buffer view of data
1286 */
1287  __Pyx_INCREF(__pyx_v_data);
1288  __Pyx_GIVEREF(__pyx_v_data);
1289  __Pyx_GOTREF(__pyx_v_self->_data);
1290  __Pyx_DECREF(__pyx_v_self->_data);
1291  __pyx_v_self->_data = __pyx_v_data;
1292
1293  /* "zmq/backend/cython/message.pyx":149
1294 *         # Save the data object in case the user wants the the data as a str.
1295 *         self._data = data
1296 *         self._failed_init = True  # bool switch for dealloc             # <<<<<<<<<<<<<<
1297 *         self._buffer = None       # buffer view of data
1298 *         self._bytes = None        # bytes copy of data
1299 */
1300  __pyx_v_self->_failed_init = 1;
1301
1302  /* "zmq/backend/cython/message.pyx":150
1303 *         self._data = data
1304 *         self._failed_init = True  # bool switch for dealloc
1305 *         self._buffer = None       # buffer view of data             # <<<<<<<<<<<<<<
1306 *         self._bytes = None        # bytes copy of data
1307 *
1308 */
1309  __Pyx_INCREF(Py_None);
1310  __Pyx_GIVEREF(Py_None);
1311  __Pyx_GOTREF(__pyx_v_self->_buffer);
1312  __Pyx_DECREF(__pyx_v_self->_buffer);
1313  __pyx_v_self->_buffer = Py_None;
1314
1315  /* "zmq/backend/cython/message.pyx":151
1316 *         self._failed_init = True  # bool switch for dealloc
1317 *         self._buffer = None       # buffer view of data
1318 *         self._bytes = None        # bytes copy of data             # <<<<<<<<<<<<<<
1319 *
1320 *         # Event and MessageTracker for monitoring when zmq is done with data:
1321 */
1322  __Pyx_INCREF(Py_None);
1323  __Pyx_GIVEREF(Py_None);
1324  __Pyx_GOTREF(__pyx_v_self->_bytes);
1325  __Pyx_DECREF(__pyx_v_self->_bytes);
1326  __pyx_v_self->_bytes = Py_None;
1327
1328  /* "zmq/backend/cython/message.pyx":154
1329 *
1330 *         # Event and MessageTracker for monitoring when zmq is done with data:
1331 *         if track:             # <<<<<<<<<<<<<<
1332 *             evt = Event()
1333 *             self.tracker_event = evt
1334 */
1335  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_track); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1336  if (__pyx_t_1) {
1337
1338    /* "zmq/backend/cython/message.pyx":155
1339 *         # Event and MessageTracker for monitoring when zmq is done with data:
1340 *         if track:
1341 *             evt = Event()             # <<<<<<<<<<<<<<
1342 *             self.tracker_event = evt
1343 *             self.tracker = zmq.MessageTracker(evt)
1344 */
1345    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Event); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1346    __Pyx_GOTREF(__pyx_t_3);
1347    __pyx_t_4 = NULL;
1348    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
1349      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
1350      if (likely(__pyx_t_4)) {
1351        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
1352        __Pyx_INCREF(__pyx_t_4);
1353        __Pyx_INCREF(function);
1354        __Pyx_DECREF_SET(__pyx_t_3, function);
1355      }
1356    }
1357    if (__pyx_t_4) {
1358      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1359      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1360    } else {
1361      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1362    }
1363    __Pyx_GOTREF(__pyx_t_2);
1364    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1365    __pyx_v_evt = __pyx_t_2;
1366    __pyx_t_2 = 0;
1367
1368    /* "zmq/backend/cython/message.pyx":156
1369 *         if track:
1370 *             evt = Event()
1371 *             self.tracker_event = evt             # <<<<<<<<<<<<<<
1372 *             self.tracker = zmq.MessageTracker(evt)
1373 *         else:
1374 */
1375    __Pyx_INCREF(__pyx_v_evt);
1376    __Pyx_GIVEREF(__pyx_v_evt);
1377    __Pyx_GOTREF(__pyx_v_self->tracker_event);
1378    __Pyx_DECREF(__pyx_v_self->tracker_event);
1379    __pyx_v_self->tracker_event = __pyx_v_evt;
1380
1381    /* "zmq/backend/cython/message.pyx":157
1382 *             evt = Event()
1383 *             self.tracker_event = evt
1384 *             self.tracker = zmq.MessageTracker(evt)             # <<<<<<<<<<<<<<
1385 *         else:
1386 *             self.tracker_event = None
1387 */
1388    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zmq); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1389    __Pyx_GOTREF(__pyx_t_3);
1390    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_MessageTracker); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1391    __Pyx_GOTREF(__pyx_t_4);
1392    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1393    __pyx_t_3 = NULL;
1394    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
1395      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
1396      if (likely(__pyx_t_3)) {
1397        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
1398        __Pyx_INCREF(__pyx_t_3);
1399        __Pyx_INCREF(function);
1400        __Pyx_DECREF_SET(__pyx_t_4, function);
1401      }
1402    }
1403    if (!__pyx_t_3) {
1404      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_evt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1405      __Pyx_GOTREF(__pyx_t_2);
1406    } else {
1407      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1408      __Pyx_GOTREF(__pyx_t_5);
1409      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
1410      __Pyx_INCREF(__pyx_v_evt);
1411      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_evt);
1412      __Pyx_GIVEREF(__pyx_v_evt);
1413      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1414      __Pyx_GOTREF(__pyx_t_2);
1415      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1416    }
1417    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1418    __Pyx_GIVEREF(__pyx_t_2);
1419    __Pyx_GOTREF(__pyx_v_self->tracker);
1420    __Pyx_DECREF(__pyx_v_self->tracker);
1421    __pyx_v_self->tracker = __pyx_t_2;
1422    __pyx_t_2 = 0;
1423    goto __pyx_L3;
1424  }
1425  /*else*/ {
1426
1427    /* "zmq/backend/cython/message.pyx":159
1428 *             self.tracker = zmq.MessageTracker(evt)
1429 *         else:
1430 *             self.tracker_event = None             # <<<<<<<<<<<<<<
1431 *             self.tracker = None
1432 *
1433 */
1434    __Pyx_INCREF(Py_None);
1435    __Pyx_GIVEREF(Py_None);
1436    __Pyx_GOTREF(__pyx_v_self->tracker_event);
1437    __Pyx_DECREF(__pyx_v_self->tracker_event);
1438    __pyx_v_self->tracker_event = Py_None;
1439
1440    /* "zmq/backend/cython/message.pyx":160
1441 *         else:
1442 *             self.tracker_event = None
1443 *             self.tracker = None             # <<<<<<<<<<<<<<
1444 *
1445 *         if isinstance(data, unicode):
1446 */
1447    __Pyx_INCREF(Py_None);
1448    __Pyx_GIVEREF(Py_None);
1449    __Pyx_GOTREF(__pyx_v_self->tracker);
1450    __Pyx_DECREF(__pyx_v_self->tracker);
1451    __pyx_v_self->tracker = Py_None;
1452  }
1453  __pyx_L3:;
1454
1455  /* "zmq/backend/cython/message.pyx":162
1456 *             self.tracker = None
1457 *
1458 *         if isinstance(data, unicode):             # <<<<<<<<<<<<<<
1459 *             raise TypeError("Unicode objects not allowed. Only: str/bytes, buffer interfaces.")
1460 *
1461 */
1462  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1463  __Pyx_GOTREF(__pyx_t_2);
1464  __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1465  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1466  __pyx_t_6 = (__pyx_t_1 != 0);
1467  if (__pyx_t_6) {
1468
1469    /* "zmq/backend/cython/message.pyx":163
1470 *
1471 *         if isinstance(data, unicode):
1472 *             raise TypeError("Unicode objects not allowed. Only: str/bytes, buffer interfaces.")             # <<<<<<<<<<<<<<
1473 *
1474 *         if data is None:
1475 */
1476    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1477    __Pyx_GOTREF(__pyx_t_2);
1478    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
1479    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1480    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1481  }
1482
1483  /* "zmq/backend/cython/message.pyx":165
1484 *             raise TypeError("Unicode objects not allowed. Only: str/bytes, buffer interfaces.")
1485 *
1486 *         if data is None:             # <<<<<<<<<<<<<<
1487 *             rc = zmq_msg_init(&self.zmq_msg)
1488 *             _check_rc(rc)
1489 */
1490  __pyx_t_6 = (__pyx_v_data == Py_None);
1491  __pyx_t_1 = (__pyx_t_6 != 0);
1492  if (__pyx_t_1) {
1493
1494    /* "zmq/backend/cython/message.pyx":166
1495 *
1496 *         if data is None:
1497 *             rc = zmq_msg_init(&self.zmq_msg)             # <<<<<<<<<<<<<<
1498 *             _check_rc(rc)
1499 *             self._failed_init = False
1500 */
1501    __pyx_v_rc = zmq_msg_init((&__pyx_v_self->zmq_msg));
1502
1503    /* "zmq/backend/cython/message.pyx":167
1504 *         if data is None:
1505 *             rc = zmq_msg_init(&self.zmq_msg)
1506 *             _check_rc(rc)             # <<<<<<<<<<<<<<
1507 *             self._failed_init = False
1508 *             return
1509 */
1510    __pyx_t_7 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1511
1512    /* "zmq/backend/cython/message.pyx":168
1513 *             rc = zmq_msg_init(&self.zmq_msg)
1514 *             _check_rc(rc)
1515 *             self._failed_init = False             # <<<<<<<<<<<<<<
1516 *             return
1517 *         else:
1518 */
1519    __pyx_v_self->_failed_init = 0;
1520
1521    /* "zmq/backend/cython/message.pyx":169
1522 *             _check_rc(rc)
1523 *             self._failed_init = False
1524 *             return             # <<<<<<<<<<<<<<
1525 *         else:
1526 *             asbuffer_r(data, <void **>&data_c, &data_len_c)
1527 */
1528    __pyx_r = 0;
1529    goto __pyx_L0;
1530  }
1531  /*else*/ {
1532
1533    /* "zmq/backend/cython/message.pyx":171
1534 *             return
1535 *         else:
1536 *             asbuffer_r(data, <void **>&data_c, &data_len_c)             # <<<<<<<<<<<<<<
1537 *
1538 *         # create the hint for zmq_free_fn
1539 */
1540    __pyx_t_2 = __pyx_f_7buffers_asbuffer_r(__pyx_v_data, ((void **)(&__pyx_v_data_c)), (&__pyx_v_data_len_c)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1541    __Pyx_GOTREF(__pyx_t_2);
1542    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1543  }
1544
1545  /* "zmq/backend/cython/message.pyx":177
1546 *         # allows libzmq to signal to Python when it is done with Python-owned memory.
1547 *         global gc
1548 *         if gc is None:             # <<<<<<<<<<<<<<
1549 *             from zmq.utils.garbage import gc
1550 *
1551 */
1552  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1553  __Pyx_GOTREF(__pyx_t_2);
1554  __pyx_t_1 = (__pyx_t_2 == Py_None);
1555  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1556  __pyx_t_6 = (__pyx_t_1 != 0);
1557  if (__pyx_t_6) {
1558
1559    /* "zmq/backend/cython/message.pyx":178
1560 *         global gc
1561 *         if gc is None:
1562 *             from zmq.utils.garbage import gc             # <<<<<<<<<<<<<<
1563 *
1564 *         hint = <zhint *> malloc(sizeof(zhint))
1565 */
1566    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1567    __Pyx_GOTREF(__pyx_t_2);
1568    __Pyx_INCREF(__pyx_n_s_gc);
1569    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_gc);
1570    __Pyx_GIVEREF(__pyx_n_s_gc);
1571    __pyx_t_4 = __Pyx_Import(__pyx_n_s_zmq_utils_garbage, __pyx_t_2, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1572    __Pyx_GOTREF(__pyx_t_4);
1573    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1574    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_gc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1575    __Pyx_GOTREF(__pyx_t_2);
1576    if (PyDict_SetItem(__pyx_d, __pyx_n_s_gc, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1577    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1578    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1579    goto __pyx_L6;
1580  }
1581  __pyx_L6:;
1582
1583  /* "zmq/backend/cython/message.pyx":180
1584 *             from zmq.utils.garbage import gc
1585 *
1586 *         hint = <zhint *> malloc(sizeof(zhint))             # <<<<<<<<<<<<<<
1587 *         hint.id = gc.store(data, self.tracker_event)
1588 *         hint.ctx = <void *> <size_t> gc._context.underlying
1589 */
1590  __pyx_v_hint = ((__pyx_t_3zmq_7backend_6cython_7message_zhint *)malloc((sizeof(__pyx_t_3zmq_7backend_6cython_7message_zhint))));
1591
1592  /* "zmq/backend/cython/message.pyx":181
1593 *
1594 *         hint = <zhint *> malloc(sizeof(zhint))
1595 *         hint.id = gc.store(data, self.tracker_event)             # <<<<<<<<<<<<<<
1596 *         hint.ctx = <void *> <size_t> gc._context.underlying
1597 *
1598 */
1599  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1600  __Pyx_GOTREF(__pyx_t_2);
1601  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_store); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1602  __Pyx_GOTREF(__pyx_t_5);
1603  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1604  __pyx_t_2 = NULL;
1605  __pyx_t_8 = 0;
1606  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
1607    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
1608    if (likely(__pyx_t_2)) {
1609      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
1610      __Pyx_INCREF(__pyx_t_2);
1611      __Pyx_INCREF(function);
1612      __Pyx_DECREF_SET(__pyx_t_5, function);
1613      __pyx_t_8 = 1;
1614    }
1615  }
1616  __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1617  __Pyx_GOTREF(__pyx_t_3);
1618  if (__pyx_t_2) {
1619    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
1620  }
1621  __Pyx_INCREF(__pyx_v_data);
1622  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_v_data);
1623  __Pyx_GIVEREF(__pyx_v_data);
1624  __Pyx_INCREF(__pyx_v_self->tracker_event);
1625  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_self->tracker_event);
1626  __Pyx_GIVEREF(__pyx_v_self->tracker_event);
1627  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1628  __Pyx_GOTREF(__pyx_t_4);
1629  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1630  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1631  __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1632  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1633  __pyx_v_hint->id = __pyx_t_9;
1634
1635  /* "zmq/backend/cython/message.pyx":182
1636 *         hint = <zhint *> malloc(sizeof(zhint))
1637 *         hint.id = gc.store(data, self.tracker_event)
1638 *         hint.ctx = <void *> <size_t> gc._context.underlying             # <<<<<<<<<<<<<<
1639 *
1640 *         rc = zmq_msg_init_data(
1641 */
1642  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1643  __Pyx_GOTREF(__pyx_t_4);
1644  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_context); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1645  __Pyx_GOTREF(__pyx_t_5);
1646  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1647  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_underlying); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1648  __Pyx_GOTREF(__pyx_t_4);
1649  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1650  __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1651  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1652  __pyx_v_hint->ctx = ((void *)((size_t)__pyx_t_9));
1653
1654  /* "zmq/backend/cython/message.pyx":184
1655 *         hint.ctx = <void *> <size_t> gc._context.underlying
1656 *
1657 *         rc = zmq_msg_init_data(             # <<<<<<<<<<<<<<
1658 *                 &self.zmq_msg, <void *>data_c, data_len_c,
1659 *                 <zmq_free_fn *>free_python_msg, <void *>hint
1660 */
1661  __pyx_v_rc = zmq_msg_init_data((&__pyx_v_self->zmq_msg), ((void *)__pyx_v_data_c), __pyx_v_data_len_c, ((zmq_free_fn *)__pyx_f_3zmq_7backend_6cython_7message_free_python_msg), ((void *)__pyx_v_hint));
1662
1663  /* "zmq/backend/cython/message.pyx":188
1664 *                 <zmq_free_fn *>free_python_msg, <void *>hint
1665 *             )
1666 *         if rc != 0:             # <<<<<<<<<<<<<<
1667 *             free(hint)
1668 *             _check_rc(rc)
1669 */
1670  __pyx_t_6 = ((__pyx_v_rc != 0) != 0);
1671  if (__pyx_t_6) {
1672
1673    /* "zmq/backend/cython/message.pyx":189
1674 *             )
1675 *         if rc != 0:
1676 *             free(hint)             # <<<<<<<<<<<<<<
1677 *             _check_rc(rc)
1678 *         self._failed_init = False
1679 */
1680    free(__pyx_v_hint);
1681
1682    /* "zmq/backend/cython/message.pyx":190
1683 *         if rc != 0:
1684 *             free(hint)
1685 *             _check_rc(rc)             # <<<<<<<<<<<<<<
1686 *         self._failed_init = False
1687 *
1688 */
1689    __pyx_t_7 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1690    goto __pyx_L7;
1691  }
1692  __pyx_L7:;
1693
1694  /* "zmq/backend/cython/message.pyx":191
1695 *             free(hint)
1696 *             _check_rc(rc)
1697 *         self._failed_init = False             # <<<<<<<<<<<<<<
1698 *
1699 *     def __init__(self, object data=None, track=False):
1700 */
1701  __pyx_v_self->_failed_init = 0;
1702
1703  /* "zmq/backend/cython/message.pyx":138
1704 *     """
1705 *
1706 *     def __cinit__(self, object data=None, track=False, **kwargs):             # <<<<<<<<<<<<<<
1707 *         cdef int rc
1708 *         cdef char *data_c = NULL
1709 */
1710
1711  /* function exit code */
1712  __pyx_r = 0;
1713  goto __pyx_L0;
1714  __pyx_L1_error:;
1715  __Pyx_XDECREF(__pyx_t_2);
1716  __Pyx_XDECREF(__pyx_t_3);
1717  __Pyx_XDECREF(__pyx_t_4);
1718  __Pyx_XDECREF(__pyx_t_5);
1719  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1720  __pyx_r = -1;
1721  __pyx_L0:;
1722  __Pyx_XDECREF(__pyx_v_evt);
1723  __Pyx_RefNannyFinishContext();
1724  return __pyx_r;
1725}
1726
1727/* "zmq/backend/cython/message.pyx":193
1728 *         self._failed_init = False
1729 *
1730 *     def __init__(self, object data=None, track=False):             # <<<<<<<<<<<<<<
1731 *         """Enforce signature"""
1732 *         pass
1733 */
1734
1735/* Python wrapper */
1736static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1737static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_2__init__[] = "Enforce signature";
1738#if CYTHON_COMPILING_IN_CPYTHON
1739struct wrapperbase __pyx_wrapperbase_3zmq_7backend_6cython_7message_5Frame_2__init__;
1740#endif
1741static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1742  CYTHON_UNUSED PyObject *__pyx_v_data = 0;
1743  CYTHON_UNUSED PyObject *__pyx_v_track = 0;
1744  int __pyx_lineno = 0;
1745  const char *__pyx_filename = NULL;
1746  int __pyx_clineno = 0;
1747  int __pyx_r;
1748  __Pyx_RefNannyDeclarations
1749  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
1750  {
1751    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_track,0};
1752    PyObject* values[2] = {0,0};
1753    values[0] = ((PyObject *)Py_None);
1754    values[1] = ((PyObject *)Py_False);
1755    if (unlikely(__pyx_kwds)) {
1756      Py_ssize_t kw_args;
1757      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
1758      switch (pos_args) {
1759        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1760        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1761        case  0: break;
1762        default: goto __pyx_L5_argtuple_error;
1763      }
1764      kw_args = PyDict_Size(__pyx_kwds);
1765      switch (pos_args) {
1766        case  0:
1767        if (kw_args > 0) {
1768          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data);
1769          if (value) { values[0] = value; kw_args--; }
1770        }
1771        case  1:
1772        if (kw_args > 0) {
1773          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_track);
1774          if (value) { values[1] = value; kw_args--; }
1775        }
1776      }
1777      if (unlikely(kw_args > 0)) {
1778        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1779      }
1780    } else {
1781      switch (PyTuple_GET_SIZE(__pyx_args)) {
1782        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1783        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1784        case  0: break;
1785        default: goto __pyx_L5_argtuple_error;
1786      }
1787    }
1788    __pyx_v_data = values[0];
1789    __pyx_v_track = values[1];
1790  }
1791  goto __pyx_L4_argument_unpacking_done;
1792  __pyx_L5_argtuple_error:;
1793  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1794  __pyx_L3_error:;
1795  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
1796  __Pyx_RefNannyFinishContext();
1797  return -1;
1798  __pyx_L4_argument_unpacking_done:;
1799  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_2__init__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), __pyx_v_data, __pyx_v_track);
1800
1801  /* function exit code */
1802  __Pyx_RefNannyFinishContext();
1803  return __pyx_r;
1804}
1805
1806static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_2__init__(CYTHON_UNUSED struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_data, CYTHON_UNUSED PyObject *__pyx_v_track) {
1807  int __pyx_r;
1808  __Pyx_RefNannyDeclarations
1809  __Pyx_RefNannySetupContext("__init__", 0);
1810
1811  /* function exit code */
1812  __pyx_r = 0;
1813  __Pyx_RefNannyFinishContext();
1814  return __pyx_r;
1815}
1816
1817/* "zmq/backend/cython/message.pyx":197
1818 *         pass
1819 *
1820 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
1821 *         cdef int rc
1822 *         if self._failed_init:
1823 */
1824
1825/* Python wrapper */
1826static void __pyx_pw_3zmq_7backend_6cython_7message_5Frame_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
1827static void __pyx_pw_3zmq_7backend_6cython_7message_5Frame_5__dealloc__(PyObject *__pyx_v_self) {
1828  __Pyx_RefNannyDeclarations
1829  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
1830  __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4__dealloc__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
1831
1832  /* function exit code */
1833  __Pyx_RefNannyFinishContext();
1834}
1835
1836static void __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4__dealloc__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
1837  int __pyx_v_rc;
1838  __Pyx_RefNannyDeclarations
1839  int __pyx_t_1;
1840  int __pyx_t_2;
1841  int __pyx_lineno = 0;
1842  const char *__pyx_filename = NULL;
1843  int __pyx_clineno = 0;
1844  __Pyx_RefNannySetupContext("__dealloc__", 0);
1845
1846  /* "zmq/backend/cython/message.pyx":199
1847 *     def __dealloc__(self):
1848 *         cdef int rc
1849 *         if self._failed_init:             # <<<<<<<<<<<<<<
1850 *             return
1851 *         # This simply decreases the 0MQ ref-count of zmq_msg.
1852 */
1853  __pyx_t_1 = (__pyx_v_self->_failed_init != 0);
1854  if (__pyx_t_1) {
1855
1856    /* "zmq/backend/cython/message.pyx":200
1857 *         cdef int rc
1858 *         if self._failed_init:
1859 *             return             # <<<<<<<<<<<<<<
1860 *         # This simply decreases the 0MQ ref-count of zmq_msg.
1861 *         with nogil:
1862 */
1863    goto __pyx_L0;
1864  }
1865
1866  /* "zmq/backend/cython/message.pyx":202
1867 *             return
1868 *         # This simply decreases the 0MQ ref-count of zmq_msg.
1869 *         with nogil:             # <<<<<<<<<<<<<<
1870 *             rc = zmq_msg_close(&self.zmq_msg)
1871 *         _check_rc(rc)
1872 */
1873  {
1874      #ifdef WITH_THREAD
1875      PyThreadState *_save;
1876      Py_UNBLOCK_THREADS
1877      #endif
1878      /*try:*/ {
1879
1880        /* "zmq/backend/cython/message.pyx":203
1881 *         # This simply decreases the 0MQ ref-count of zmq_msg.
1882 *         with nogil:
1883 *             rc = zmq_msg_close(&self.zmq_msg)             # <<<<<<<<<<<<<<
1884 *         _check_rc(rc)
1885 *
1886 */
1887        __pyx_v_rc = zmq_msg_close((&__pyx_v_self->zmq_msg));
1888      }
1889
1890      /* "zmq/backend/cython/message.pyx":202
1891 *             return
1892 *         # This simply decreases the 0MQ ref-count of zmq_msg.
1893 *         with nogil:             # <<<<<<<<<<<<<<
1894 *             rc = zmq_msg_close(&self.zmq_msg)
1895 *         _check_rc(rc)
1896 */
1897      /*finally:*/ {
1898        /*normal exit:*/{
1899          #ifdef WITH_THREAD
1900          Py_BLOCK_THREADS
1901          #endif
1902          goto __pyx_L6;
1903        }
1904        __pyx_L6:;
1905      }
1906  }
1907
1908  /* "zmq/backend/cython/message.pyx":204
1909 *         with nogil:
1910 *             rc = zmq_msg_close(&self.zmq_msg)
1911 *         _check_rc(rc)             # <<<<<<<<<<<<<<
1912 *
1913 *     # buffer interface code adapted from petsc4py by Lisandro Dalcin, a BSD project
1914 */
1915  __pyx_t_2 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1916
1917  /* "zmq/backend/cython/message.pyx":197
1918 *         pass
1919 *
1920 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
1921 *         cdef int rc
1922 *         if self._failed_init:
1923 */
1924
1925  /* function exit code */
1926  goto __pyx_L0;
1927  __pyx_L1_error:;
1928  __Pyx_WriteUnraisable("zmq.backend.cython.message.Frame.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
1929  __pyx_L0:;
1930  __Pyx_RefNannyFinishContext();
1931}
1932
1933/* "zmq/backend/cython/message.pyx":208
1934 *     # buffer interface code adapted from petsc4py by Lisandro Dalcin, a BSD project
1935 *
1936 *     def __getbuffer__(self, Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
1937 *         # new-style (memoryview) buffer interface
1938 *         buffer.buf = zmq_msg_data(&self.zmq_msg)
1939 */
1940
1941/* Python wrapper */
1942static CYTHON_UNUSED int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
1943static CYTHON_UNUSED int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
1944  int __pyx_r;
1945  __Pyx_RefNannyDeclarations
1946  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
1947  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_6__getbuffer__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));
1948
1949  /* function exit code */
1950  __Pyx_RefNannyFinishContext();
1951  return __pyx_r;
1952}
1953
1954static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_6__getbuffer__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
1955  int __pyx_r;
1956  __Pyx_RefNannyDeclarations
1957  __Pyx_RefNannySetupContext("__getbuffer__", 0);
1958  if (__pyx_v_buffer != NULL) {
1959    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
1960    __Pyx_GIVEREF(__pyx_v_buffer->obj);
1961  }
1962
1963  /* "zmq/backend/cython/message.pyx":210
1964 *     def __getbuffer__(self, Py_buffer* buffer, int flags):
1965 *         # new-style (memoryview) buffer interface
1966 *         buffer.buf = zmq_msg_data(&self.zmq_msg)             # <<<<<<<<<<<<<<
1967 *         buffer.len = zmq_msg_size(&self.zmq_msg)
1968 *
1969 */
1970  __pyx_v_buffer->buf = zmq_msg_data((&__pyx_v_self->zmq_msg));
1971
1972  /* "zmq/backend/cython/message.pyx":211
1973 *         # new-style (memoryview) buffer interface
1974 *         buffer.buf = zmq_msg_data(&self.zmq_msg)
1975 *         buffer.len = zmq_msg_size(&self.zmq_msg)             # <<<<<<<<<<<<<<
1976 *
1977 *         buffer.obj = self
1978 */
1979  __pyx_v_buffer->len = zmq_msg_size((&__pyx_v_self->zmq_msg));
1980
1981  /* "zmq/backend/cython/message.pyx":213
1982 *         buffer.len = zmq_msg_size(&self.zmq_msg)
1983 *
1984 *         buffer.obj = self             # <<<<<<<<<<<<<<
1985 *         buffer.readonly = 1
1986 *         buffer.format = "B"
1987 */
1988  __Pyx_INCREF(((PyObject *)__pyx_v_self));
1989  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
1990  __Pyx_GOTREF(__pyx_v_buffer->obj);
1991  __Pyx_DECREF(__pyx_v_buffer->obj);
1992  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);
1993
1994  /* "zmq/backend/cython/message.pyx":214
1995 *
1996 *         buffer.obj = self
1997 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
1998 *         buffer.format = "B"
1999 *         buffer.ndim = 0
2000 */
2001  __pyx_v_buffer->readonly = 1;
2002
2003  /* "zmq/backend/cython/message.pyx":215
2004 *         buffer.obj = self
2005 *         buffer.readonly = 1
2006 *         buffer.format = "B"             # <<<<<<<<<<<<<<
2007 *         buffer.ndim = 0
2008 *         buffer.shape = NULL
2009 */
2010  __pyx_v_buffer->format = __pyx_k_B;
2011
2012  /* "zmq/backend/cython/message.pyx":216
2013 *         buffer.readonly = 1
2014 *         buffer.format = "B"
2015 *         buffer.ndim = 0             # <<<<<<<<<<<<<<
2016 *         buffer.shape = NULL
2017 *         buffer.strides = NULL
2018 */
2019  __pyx_v_buffer->ndim = 0;
2020
2021  /* "zmq/backend/cython/message.pyx":217
2022 *         buffer.format = "B"
2023 *         buffer.ndim = 0
2024 *         buffer.shape = NULL             # <<<<<<<<<<<<<<
2025 *         buffer.strides = NULL
2026 *         buffer.suboffsets = NULL
2027 */
2028  __pyx_v_buffer->shape = NULL;
2029
2030  /* "zmq/backend/cython/message.pyx":218
2031 *         buffer.ndim = 0
2032 *         buffer.shape = NULL
2033 *         buffer.strides = NULL             # <<<<<<<<<<<<<<
2034 *         buffer.suboffsets = NULL
2035 *         buffer.itemsize = 1
2036 */
2037  __pyx_v_buffer->strides = NULL;
2038
2039  /* "zmq/backend/cython/message.pyx":219
2040 *         buffer.shape = NULL
2041 *         buffer.strides = NULL
2042 *         buffer.suboffsets = NULL             # <<<<<<<<<<<<<<
2043 *         buffer.itemsize = 1
2044 *         buffer.internal = NULL
2045 */
2046  __pyx_v_buffer->suboffsets = NULL;
2047
2048  /* "zmq/backend/cython/message.pyx":220
2049 *         buffer.strides = NULL
2050 *         buffer.suboffsets = NULL
2051 *         buffer.itemsize = 1             # <<<<<<<<<<<<<<
2052 *         buffer.internal = NULL
2053 *
2054 */
2055  __pyx_v_buffer->itemsize = 1;
2056
2057  /* "zmq/backend/cython/message.pyx":221
2058 *         buffer.suboffsets = NULL
2059 *         buffer.itemsize = 1
2060 *         buffer.internal = NULL             # <<<<<<<<<<<<<<
2061 *
2062 *     def __getsegcount__(self, Py_ssize_t *lenp):
2063 */
2064  __pyx_v_buffer->internal = NULL;
2065
2066  /* "zmq/backend/cython/message.pyx":208
2067 *     # buffer interface code adapted from petsc4py by Lisandro Dalcin, a BSD project
2068 *
2069 *     def __getbuffer__(self, Py_buffer* buffer, int flags):             # <<<<<<<<<<<<<<
2070 *         # new-style (memoryview) buffer interface
2071 *         buffer.buf = zmq_msg_data(&self.zmq_msg)
2072 */
2073
2074  /* function exit code */
2075  __pyx_r = 0;
2076  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
2077    __Pyx_GOTREF(Py_None);
2078    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
2079  }
2080  __Pyx_RefNannyFinishContext();
2081  return __pyx_r;
2082}
2083
2084/* "zmq/backend/cython/message.pyx":223
2085 *         buffer.internal = NULL
2086 *
2087 *     def __getsegcount__(self, Py_ssize_t *lenp):             # <<<<<<<<<<<<<<
2088 *         # required for getreadbuffer
2089 *         if lenp != NULL:
2090 */
2091
2092/* Python wrapper */
2093#if PY_MAJOR_VERSION < 3
2094static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_9__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /*proto*/
2095static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_9__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) {
2096  Py_ssize_t __pyx_r;
2097  __Pyx_RefNannyDeclarations
2098  __Pyx_RefNannySetupContext("__getsegcount__ (wrapper)", 0);
2099  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_8__getsegcount__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((Py_ssize_t *)__pyx_v_lenp));
2100
2101  /* function exit code */
2102  __Pyx_RefNannyFinishContext();
2103  return __pyx_r;
2104}
2105#endif /*!(#if PY_MAJOR_VERSION < 3)*/
2106
2107#if PY_MAJOR_VERSION < 3
2108static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_8__getsegcount__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) {
2109  Py_ssize_t __pyx_r;
2110  __Pyx_RefNannyDeclarations
2111  int __pyx_t_1;
2112  __Pyx_RefNannySetupContext("__getsegcount__", 0);
2113
2114  /* "zmq/backend/cython/message.pyx":225
2115 *     def __getsegcount__(self, Py_ssize_t *lenp):
2116 *         # required for getreadbuffer
2117 *         if lenp != NULL:             # <<<<<<<<<<<<<<
2118 *             lenp[0] = zmq_msg_size(&self.zmq_msg)
2119 *         return 1
2120 */
2121  __pyx_t_1 = ((__pyx_v_lenp != NULL) != 0);
2122  if (__pyx_t_1) {
2123
2124    /* "zmq/backend/cython/message.pyx":226
2125 *         # required for getreadbuffer
2126 *         if lenp != NULL:
2127 *             lenp[0] = zmq_msg_size(&self.zmq_msg)             # <<<<<<<<<<<<<<
2128 *         return 1
2129 *
2130 */
2131    (__pyx_v_lenp[0]) = zmq_msg_size((&__pyx_v_self->zmq_msg));
2132    goto __pyx_L3;
2133  }
2134  __pyx_L3:;
2135
2136  /* "zmq/backend/cython/message.pyx":227
2137 *         if lenp != NULL:
2138 *             lenp[0] = zmq_msg_size(&self.zmq_msg)
2139 *         return 1             # <<<<<<<<<<<<<<
2140 *
2141 *     def __getreadbuffer__(self, Py_ssize_t idx, void **p):
2142 */
2143  __pyx_r = 1;
2144  goto __pyx_L0;
2145
2146  /* "zmq/backend/cython/message.pyx":223
2147 *         buffer.internal = NULL
2148 *
2149 *     def __getsegcount__(self, Py_ssize_t *lenp):             # <<<<<<<<<<<<<<
2150 *         # required for getreadbuffer
2151 *         if lenp != NULL:
2152 */
2153
2154  /* function exit code */
2155  __pyx_L0:;
2156  __Pyx_RefNannyFinishContext();
2157  return __pyx_r;
2158}
2159#endif /*!(#if PY_MAJOR_VERSION < 3)*/
2160
2161/* "zmq/backend/cython/message.pyx":229
2162 *         return 1
2163 *
2164 *     def __getreadbuffer__(self, Py_ssize_t idx, void **p):             # <<<<<<<<<<<<<<
2165 *         # old-style (buffer) interface
2166 *         cdef char *data_c = NULL
2167 */
2168
2169/* Python wrapper */
2170#if PY_MAJOR_VERSION < 3
2171static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_11__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /*proto*/
2172static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_11__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) {
2173  Py_ssize_t __pyx_r;
2174  __Pyx_RefNannyDeclarations
2175  __Pyx_RefNannySetupContext("__getreadbuffer__ (wrapper)", 0);
2176  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_10__getreadbuffer__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((Py_ssize_t)__pyx_v_idx), ((void **)__pyx_v_p));
2177
2178  /* function exit code */
2179  __Pyx_RefNannyFinishContext();
2180  return __pyx_r;
2181}
2182#endif /*!(#if PY_MAJOR_VERSION < 3)*/
2183
2184#if PY_MAJOR_VERSION < 3
2185static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_10__getreadbuffer__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) {
2186  char *__pyx_v_data_c;
2187  Py_ssize_t __pyx_v_data_len_c;
2188  Py_ssize_t __pyx_r;
2189  __Pyx_RefNannyDeclarations
2190  int __pyx_t_1;
2191  PyObject *__pyx_t_2 = NULL;
2192  int __pyx_lineno = 0;
2193  const char *__pyx_filename = NULL;
2194  int __pyx_clineno = 0;
2195  __Pyx_RefNannySetupContext("__getreadbuffer__", 0);
2196
2197  /* "zmq/backend/cython/message.pyx":231
2198 *     def __getreadbuffer__(self, Py_ssize_t idx, void **p):
2199 *         # old-style (buffer) interface
2200 *         cdef char *data_c = NULL             # <<<<<<<<<<<<<<
2201 *         cdef Py_ssize_t data_len_c
2202 *         if idx != 0:
2203 */
2204  __pyx_v_data_c = NULL;
2205
2206  /* "zmq/backend/cython/message.pyx":233
2207 *         cdef char *data_c = NULL
2208 *         cdef Py_ssize_t data_len_c
2209 *         if idx != 0:             # <<<<<<<<<<<<<<
2210 *             raise SystemError("accessing non-existent buffer segment")
2211 *         # read-only, because we don't want to allow
2212 */
2213  __pyx_t_1 = ((__pyx_v_idx != 0) != 0);
2214  if (__pyx_t_1) {
2215
2216    /* "zmq/backend/cython/message.pyx":234
2217 *         cdef Py_ssize_t data_len_c
2218 *         if idx != 0:
2219 *             raise SystemError("accessing non-existent buffer segment")             # <<<<<<<<<<<<<<
2220 *         # read-only, because we don't want to allow
2221 *         # editing of the message in-place
2222 */
2223    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2224    __Pyx_GOTREF(__pyx_t_2);
2225    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
2226    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2227    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2228  }
2229
2230  /* "zmq/backend/cython/message.pyx":237
2231 *         # read-only, because we don't want to allow
2232 *         # editing of the message in-place
2233 *         data_c = <char *>zmq_msg_data(&self.zmq_msg)             # <<<<<<<<<<<<<<
2234 *         data_len_c = zmq_msg_size(&self.zmq_msg)
2235 *         if p != NULL:
2236 */
2237  __pyx_v_data_c = ((char *)zmq_msg_data((&__pyx_v_self->zmq_msg)));
2238
2239  /* "zmq/backend/cython/message.pyx":238
2240 *         # editing of the message in-place
2241 *         data_c = <char *>zmq_msg_data(&self.zmq_msg)
2242 *         data_len_c = zmq_msg_size(&self.zmq_msg)             # <<<<<<<<<<<<<<
2243 *         if p != NULL:
2244 *             p[0] = <void*>data_c
2245 */
2246  __pyx_v_data_len_c = zmq_msg_size((&__pyx_v_self->zmq_msg));
2247
2248  /* "zmq/backend/cython/message.pyx":239
2249 *         data_c = <char *>zmq_msg_data(&self.zmq_msg)
2250 *         data_len_c = zmq_msg_size(&self.zmq_msg)
2251 *         if p != NULL:             # <<<<<<<<<<<<<<
2252 *             p[0] = <void*>data_c
2253 *         return data_len_c
2254 */
2255  __pyx_t_1 = ((__pyx_v_p != NULL) != 0);
2256  if (__pyx_t_1) {
2257
2258    /* "zmq/backend/cython/message.pyx":240
2259 *         data_len_c = zmq_msg_size(&self.zmq_msg)
2260 *         if p != NULL:
2261 *             p[0] = <void*>data_c             # <<<<<<<<<<<<<<
2262 *         return data_len_c
2263 *
2264 */
2265    (__pyx_v_p[0]) = ((void *)__pyx_v_data_c);
2266    goto __pyx_L4;
2267  }
2268  __pyx_L4:;
2269
2270  /* "zmq/backend/cython/message.pyx":241
2271 *         if p != NULL:
2272 *             p[0] = <void*>data_c
2273 *         return data_len_c             # <<<<<<<<<<<<<<
2274 *
2275 *     # end buffer interface
2276 */
2277  __pyx_r = __pyx_v_data_len_c;
2278  goto __pyx_L0;
2279
2280  /* "zmq/backend/cython/message.pyx":229
2281 *         return 1
2282 *
2283 *     def __getreadbuffer__(self, Py_ssize_t idx, void **p):             # <<<<<<<<<<<<<<
2284 *         # old-style (buffer) interface
2285 *         cdef char *data_c = NULL
2286 */
2287
2288  /* function exit code */
2289  __pyx_L1_error:;
2290  __Pyx_XDECREF(__pyx_t_2);
2291  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__getreadbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2292  __pyx_r = -1;
2293  __pyx_L0:;
2294  __Pyx_RefNannyFinishContext();
2295  return __pyx_r;
2296}
2297#endif /*!(#if PY_MAJOR_VERSION < 3)*/
2298
2299/* "zmq/backend/cython/message.pyx":245
2300 *     # end buffer interface
2301 *
2302 *     def __copy__(self):             # <<<<<<<<<<<<<<
2303 *         """Create a shallow copy of the message.
2304 *
2305 */
2306
2307/* Python wrapper */
2308static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_13__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2309static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_12__copy__[] = "Create a shallow copy of the message.\n\n        This does not copy the contents of the Frame, just the pointer.\n        This will increment the 0MQ ref count of the message, but not\n        the ref count of the Python object. That is only done once when\n        the Python is first turned into a 0MQ message.\n        ";
2310static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_13__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2311  PyObject *__pyx_r = 0;
2312  __Pyx_RefNannyDeclarations
2313  __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0);
2314  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_12__copy__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
2315
2316  /* function exit code */
2317  __Pyx_RefNannyFinishContext();
2318  return __pyx_r;
2319}
2320
2321static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_12__copy__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2322  PyObject *__pyx_r = NULL;
2323  __Pyx_RefNannyDeclarations
2324  PyObject *__pyx_t_1 = NULL;
2325  int __pyx_lineno = 0;
2326  const char *__pyx_filename = NULL;
2327  int __pyx_clineno = 0;
2328  __Pyx_RefNannySetupContext("__copy__", 0);
2329
2330  /* "zmq/backend/cython/message.pyx":253
2331 *         the Python is first turned into a 0MQ message.
2332 *         """
2333 *         return self.fast_copy()             # <<<<<<<<<<<<<<
2334 *
2335 *     cdef Frame fast_copy(self):
2336 */
2337  __Pyx_XDECREF(__pyx_r);
2338  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self->__pyx_vtab)->fast_copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2339  __Pyx_GOTREF(__pyx_t_1);
2340  __pyx_r = __pyx_t_1;
2341  __pyx_t_1 = 0;
2342  goto __pyx_L0;
2343
2344  /* "zmq/backend/cython/message.pyx":245
2345 *     # end buffer interface
2346 *
2347 *     def __copy__(self):             # <<<<<<<<<<<<<<
2348 *         """Create a shallow copy of the message.
2349 *
2350 */
2351
2352  /* function exit code */
2353  __pyx_L1_error:;
2354  __Pyx_XDECREF(__pyx_t_1);
2355  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2356  __pyx_r = NULL;
2357  __pyx_L0:;
2358  __Pyx_XGIVEREF(__pyx_r);
2359  __Pyx_RefNannyFinishContext();
2360  return __pyx_r;
2361}
2362
2363/* "zmq/backend/cython/message.pyx":255
2364 *         return self.fast_copy()
2365 *
2366 *     cdef Frame fast_copy(self):             # <<<<<<<<<<<<<<
2367 *         """Fast, cdef'd version of shallow copy of the Frame."""
2368 *         cdef Frame new_msg
2369 */
2370
2371static struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_f_3zmq_7backend_6cython_7message_5Frame_fast_copy(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2372  struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_new_msg = 0;
2373  struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_r = NULL;
2374  __Pyx_RefNannyDeclarations
2375  PyObject *__pyx_t_1 = NULL;
2376  int __pyx_t_2;
2377  int __pyx_t_3;
2378  int __pyx_lineno = 0;
2379  const char *__pyx_filename = NULL;
2380  int __pyx_clineno = 0;
2381  __Pyx_RefNannySetupContext("fast_copy", 0);
2382
2383  /* "zmq/backend/cython/message.pyx":258
2384 *         """Fast, cdef'd version of shallow copy of the Frame."""
2385 *         cdef Frame new_msg
2386 *         new_msg = Frame()             # <<<<<<<<<<<<<<
2387 *         # This does not copy the contents, but just increases the ref-count
2388 *         # of the zmq_msg by one.
2389 */
2390  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_3zmq_7backend_6cython_7message_Frame)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2391  __Pyx_GOTREF(__pyx_t_1);
2392  __pyx_v_new_msg = ((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_t_1);
2393  __pyx_t_1 = 0;
2394
2395  /* "zmq/backend/cython/message.pyx":261
2396 *         # This does not copy the contents, but just increases the ref-count
2397 *         # of the zmq_msg by one.
2398 *         zmq_msg_copy(&new_msg.zmq_msg, &self.zmq_msg)             # <<<<<<<<<<<<<<
2399 *         # Copy the ref to data so the copy won't create a copy when str is
2400 *         # called.
2401 */
2402  zmq_msg_copy((&__pyx_v_new_msg->zmq_msg), (&__pyx_v_self->zmq_msg));
2403
2404  /* "zmq/backend/cython/message.pyx":264
2405 *         # Copy the ref to data so the copy won't create a copy when str is
2406 *         # called.
2407 *         if self._data is not None:             # <<<<<<<<<<<<<<
2408 *             new_msg._data = self._data
2409 *         if self._buffer is not None:
2410 */
2411  __pyx_t_2 = (__pyx_v_self->_data != Py_None);
2412  __pyx_t_3 = (__pyx_t_2 != 0);
2413  if (__pyx_t_3) {
2414
2415    /* "zmq/backend/cython/message.pyx":265
2416 *         # called.
2417 *         if self._data is not None:
2418 *             new_msg._data = self._data             # <<<<<<<<<<<<<<
2419 *         if self._buffer is not None:
2420 *             new_msg._buffer = self._buffer
2421 */
2422    __pyx_t_1 = __pyx_v_self->_data;
2423    __Pyx_INCREF(__pyx_t_1);
2424    __Pyx_GIVEREF(__pyx_t_1);
2425    __Pyx_GOTREF(__pyx_v_new_msg->_data);
2426    __Pyx_DECREF(__pyx_v_new_msg->_data);
2427    __pyx_v_new_msg->_data = __pyx_t_1;
2428    __pyx_t_1 = 0;
2429    goto __pyx_L3;
2430  }
2431  __pyx_L3:;
2432
2433  /* "zmq/backend/cython/message.pyx":266
2434 *         if self._data is not None:
2435 *             new_msg._data = self._data
2436 *         if self._buffer is not None:             # <<<<<<<<<<<<<<
2437 *             new_msg._buffer = self._buffer
2438 *         if self._bytes is not None:
2439 */
2440  __pyx_t_3 = (__pyx_v_self->_buffer != Py_None);
2441  __pyx_t_2 = (__pyx_t_3 != 0);
2442  if (__pyx_t_2) {
2443
2444    /* "zmq/backend/cython/message.pyx":267
2445 *             new_msg._data = self._data
2446 *         if self._buffer is not None:
2447 *             new_msg._buffer = self._buffer             # <<<<<<<<<<<<<<
2448 *         if self._bytes is not None:
2449 *             new_msg._bytes = self._bytes
2450 */
2451    __pyx_t_1 = __pyx_v_self->_buffer;
2452    __Pyx_INCREF(__pyx_t_1);
2453    __Pyx_GIVEREF(__pyx_t_1);
2454    __Pyx_GOTREF(__pyx_v_new_msg->_buffer);
2455    __Pyx_DECREF(__pyx_v_new_msg->_buffer);
2456    __pyx_v_new_msg->_buffer = __pyx_t_1;
2457    __pyx_t_1 = 0;
2458    goto __pyx_L4;
2459  }
2460  __pyx_L4:;
2461
2462  /* "zmq/backend/cython/message.pyx":268
2463 *         if self._buffer is not None:
2464 *             new_msg._buffer = self._buffer
2465 *         if self._bytes is not None:             # <<<<<<<<<<<<<<
2466 *             new_msg._bytes = self._bytes
2467 *
2468 */
2469  __pyx_t_2 = (__pyx_v_self->_bytes != Py_None);
2470  __pyx_t_3 = (__pyx_t_2 != 0);
2471  if (__pyx_t_3) {
2472
2473    /* "zmq/backend/cython/message.pyx":269
2474 *             new_msg._buffer = self._buffer
2475 *         if self._bytes is not None:
2476 *             new_msg._bytes = self._bytes             # <<<<<<<<<<<<<<
2477 *
2478 *         # Frame copies share the tracker and tracker_event
2479 */
2480    __pyx_t_1 = __pyx_v_self->_bytes;
2481    __Pyx_INCREF(__pyx_t_1);
2482    __Pyx_GIVEREF(__pyx_t_1);
2483    __Pyx_GOTREF(__pyx_v_new_msg->_bytes);
2484    __Pyx_DECREF(__pyx_v_new_msg->_bytes);
2485    __pyx_v_new_msg->_bytes = __pyx_t_1;
2486    __pyx_t_1 = 0;
2487    goto __pyx_L5;
2488  }
2489  __pyx_L5:;
2490
2491  /* "zmq/backend/cython/message.pyx":272
2492 *
2493 *         # Frame copies share the tracker and tracker_event
2494 *         new_msg.tracker_event = self.tracker_event             # <<<<<<<<<<<<<<
2495 *         new_msg.tracker = self.tracker
2496 *
2497 */
2498  __pyx_t_1 = __pyx_v_self->tracker_event;
2499  __Pyx_INCREF(__pyx_t_1);
2500  __Pyx_GIVEREF(__pyx_t_1);
2501  __Pyx_GOTREF(__pyx_v_new_msg->tracker_event);
2502  __Pyx_DECREF(__pyx_v_new_msg->tracker_event);
2503  __pyx_v_new_msg->tracker_event = __pyx_t_1;
2504  __pyx_t_1 = 0;
2505
2506  /* "zmq/backend/cython/message.pyx":273
2507 *         # Frame copies share the tracker and tracker_event
2508 *         new_msg.tracker_event = self.tracker_event
2509 *         new_msg.tracker = self.tracker             # <<<<<<<<<<<<<<
2510 *
2511 *         return new_msg
2512 */
2513  __pyx_t_1 = __pyx_v_self->tracker;
2514  __Pyx_INCREF(__pyx_t_1);
2515  __Pyx_GIVEREF(__pyx_t_1);
2516  __Pyx_GOTREF(__pyx_v_new_msg->tracker);
2517  __Pyx_DECREF(__pyx_v_new_msg->tracker);
2518  __pyx_v_new_msg->tracker = __pyx_t_1;
2519  __pyx_t_1 = 0;
2520
2521  /* "zmq/backend/cython/message.pyx":275
2522 *         new_msg.tracker = self.tracker
2523 *
2524 *         return new_msg             # <<<<<<<<<<<<<<
2525 *
2526 *     def __len__(self):
2527 */
2528  __Pyx_XDECREF(((PyObject *)__pyx_r));
2529  __Pyx_INCREF(((PyObject *)__pyx_v_new_msg));
2530  __pyx_r = __pyx_v_new_msg;
2531  goto __pyx_L0;
2532
2533  /* "zmq/backend/cython/message.pyx":255
2534 *         return self.fast_copy()
2535 *
2536 *     cdef Frame fast_copy(self):             # <<<<<<<<<<<<<<
2537 *         """Fast, cdef'd version of shallow copy of the Frame."""
2538 *         cdef Frame new_msg
2539 */
2540
2541  /* function exit code */
2542  __pyx_L1_error:;
2543  __Pyx_XDECREF(__pyx_t_1);
2544  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.fast_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2545  __pyx_r = 0;
2546  __pyx_L0:;
2547  __Pyx_XDECREF((PyObject *)__pyx_v_new_msg);
2548  __Pyx_XGIVEREF((PyObject *)__pyx_r);
2549  __Pyx_RefNannyFinishContext();
2550  return __pyx_r;
2551}
2552
2553/* "zmq/backend/cython/message.pyx":277
2554 *         return new_msg
2555 *
2556 *     def __len__(self):             # <<<<<<<<<<<<<<
2557 *         """Return the length of the message in bytes."""
2558 *         cdef size_t sz
2559 */
2560
2561/* Python wrapper */
2562static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_15__len__(PyObject *__pyx_v_self); /*proto*/
2563static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_14__len__[] = "Return the length of the message in bytes.";
2564#if CYTHON_COMPILING_IN_CPYTHON
2565struct wrapperbase __pyx_wrapperbase_3zmq_7backend_6cython_7message_5Frame_14__len__;
2566#endif
2567static Py_ssize_t __pyx_pw_3zmq_7backend_6cython_7message_5Frame_15__len__(PyObject *__pyx_v_self) {
2568  Py_ssize_t __pyx_r;
2569  __Pyx_RefNannyDeclarations
2570  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
2571  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_14__len__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
2572
2573  /* function exit code */
2574  __Pyx_RefNannyFinishContext();
2575  return __pyx_r;
2576}
2577
2578static Py_ssize_t __pyx_pf_3zmq_7backend_6cython_7message_5Frame_14__len__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2579  size_t __pyx_v_sz;
2580  Py_ssize_t __pyx_r;
2581  __Pyx_RefNannyDeclarations
2582  __Pyx_RefNannySetupContext("__len__", 0);
2583
2584  /* "zmq/backend/cython/message.pyx":280
2585 *         """Return the length of the message in bytes."""
2586 *         cdef size_t sz
2587 *         sz = zmq_msg_size(&self.zmq_msg)             # <<<<<<<<<<<<<<
2588 *         return sz
2589 *         # return <int>zmq_msg_size(&self.zmq_msg)
2590 */
2591  __pyx_v_sz = zmq_msg_size((&__pyx_v_self->zmq_msg));
2592
2593  /* "zmq/backend/cython/message.pyx":281
2594 *         cdef size_t sz
2595 *         sz = zmq_msg_size(&self.zmq_msg)
2596 *         return sz             # <<<<<<<<<<<<<<
2597 *         # return <int>zmq_msg_size(&self.zmq_msg)
2598 *
2599 */
2600  __pyx_r = __pyx_v_sz;
2601  goto __pyx_L0;
2602
2603  /* "zmq/backend/cython/message.pyx":277
2604 *         return new_msg
2605 *
2606 *     def __len__(self):             # <<<<<<<<<<<<<<
2607 *         """Return the length of the message in bytes."""
2608 *         cdef size_t sz
2609 */
2610
2611  /* function exit code */
2612  __pyx_L0:;
2613  __Pyx_RefNannyFinishContext();
2614  return __pyx_r;
2615}
2616
2617/* "zmq/backend/cython/message.pyx":284
2618 *         # return <int>zmq_msg_size(&self.zmq_msg)
2619 *
2620 *     def __str__(self):             # <<<<<<<<<<<<<<
2621 *         """Return the str form of the message."""
2622 *         if isinstance(self._data, bytes):
2623 */
2624
2625/* Python wrapper */
2626static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_17__str__(PyObject *__pyx_v_self); /*proto*/
2627static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_16__str__[] = "Return the str form of the message.";
2628#if CYTHON_COMPILING_IN_CPYTHON
2629struct wrapperbase __pyx_wrapperbase_3zmq_7backend_6cython_7message_5Frame_16__str__;
2630#endif
2631static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_17__str__(PyObject *__pyx_v_self) {
2632  PyObject *__pyx_r = 0;
2633  __Pyx_RefNannyDeclarations
2634  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
2635  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_16__str__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
2636
2637  /* function exit code */
2638  __Pyx_RefNannyFinishContext();
2639  return __pyx_r;
2640}
2641
2642static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_16__str__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2643  PyObject *__pyx_v_b = NULL;
2644  PyObject *__pyx_r = NULL;
2645  __Pyx_RefNannyDeclarations
2646  PyObject *__pyx_t_1 = NULL;
2647  PyObject *__pyx_t_2 = NULL;
2648  int __pyx_t_3;
2649  int __pyx_t_4;
2650  PyObject *__pyx_t_5 = NULL;
2651  int __pyx_lineno = 0;
2652  const char *__pyx_filename = NULL;
2653  int __pyx_clineno = 0;
2654  __Pyx_RefNannySetupContext("__str__", 0);
2655
2656  /* "zmq/backend/cython/message.pyx":286
2657 *     def __str__(self):
2658 *         """Return the str form of the message."""
2659 *         if isinstance(self._data, bytes):             # <<<<<<<<<<<<<<
2660 *             b = self._data
2661 *         else:
2662 */
2663  __pyx_t_1 = __pyx_v_self->_data;
2664  __Pyx_INCREF(__pyx_t_1);
2665  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2666  __Pyx_GOTREF(__pyx_t_2);
2667  __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2668  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2669  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2670  __pyx_t_4 = (__pyx_t_3 != 0);
2671  if (__pyx_t_4) {
2672
2673    /* "zmq/backend/cython/message.pyx":287
2674 *         """Return the str form of the message."""
2675 *         if isinstance(self._data, bytes):
2676 *             b = self._data             # <<<<<<<<<<<<<<
2677 *         else:
2678 *             b = self.bytes
2679 */
2680    __pyx_t_2 = __pyx_v_self->_data;
2681    __Pyx_INCREF(__pyx_t_2);
2682    __pyx_v_b = __pyx_t_2;
2683    __pyx_t_2 = 0;
2684    goto __pyx_L3;
2685  }
2686  /*else*/ {
2687
2688    /* "zmq/backend/cython/message.pyx":289
2689 *             b = self._data
2690 *         else:
2691 *             b = self.bytes             # <<<<<<<<<<<<<<
2692 *         if str is unicode:
2693 *             return b.decode()
2694 */
2695    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2696    __Pyx_GOTREF(__pyx_t_2);
2697    __pyx_v_b = __pyx_t_2;
2698    __pyx_t_2 = 0;
2699  }
2700  __pyx_L3:;
2701
2702  /* "zmq/backend/cython/message.pyx":290
2703 *         else:
2704 *             b = self.bytes
2705 *         if str is unicode:             # <<<<<<<<<<<<<<
2706 *             return b.decode()
2707 *         else:
2708 */
2709  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2710  __Pyx_GOTREF(__pyx_t_2);
2711  __pyx_t_4 = (((PyObject*)(&PyString_Type)) == ((PyObject*)__pyx_t_2));
2712  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2713  __pyx_t_3 = (__pyx_t_4 != 0);
2714  if (__pyx_t_3) {
2715
2716    /* "zmq/backend/cython/message.pyx":291
2717 *             b = self.bytes
2718 *         if str is unicode:
2719 *             return b.decode()             # <<<<<<<<<<<<<<
2720 *         else:
2721 *             return b
2722 */
2723    __Pyx_XDECREF(__pyx_r);
2724    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2725    __Pyx_GOTREF(__pyx_t_1);
2726    __pyx_t_5 = NULL;
2727    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
2728      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
2729      if (likely(__pyx_t_5)) {
2730        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
2731        __Pyx_INCREF(__pyx_t_5);
2732        __Pyx_INCREF(function);
2733        __Pyx_DECREF_SET(__pyx_t_1, function);
2734      }
2735    }
2736    if (__pyx_t_5) {
2737      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2738      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2739    } else {
2740      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2741    }
2742    __Pyx_GOTREF(__pyx_t_2);
2743    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2744    __pyx_r = __pyx_t_2;
2745    __pyx_t_2 = 0;
2746    goto __pyx_L0;
2747  }
2748  /*else*/ {
2749
2750    /* "zmq/backend/cython/message.pyx":293
2751 *             return b.decode()
2752 *         else:
2753 *             return b             # <<<<<<<<<<<<<<
2754 *
2755 *     cdef inline object _getbuffer(self):
2756 */
2757    __Pyx_XDECREF(__pyx_r);
2758    __Pyx_INCREF(__pyx_v_b);
2759    __pyx_r = __pyx_v_b;
2760    goto __pyx_L0;
2761  }
2762
2763  /* "zmq/backend/cython/message.pyx":284
2764 *         # return <int>zmq_msg_size(&self.zmq_msg)
2765 *
2766 *     def __str__(self):             # <<<<<<<<<<<<<<
2767 *         """Return the str form of the message."""
2768 *         if isinstance(self._data, bytes):
2769 */
2770
2771  /* function exit code */
2772  __pyx_L1_error:;
2773  __Pyx_XDECREF(__pyx_t_1);
2774  __Pyx_XDECREF(__pyx_t_2);
2775  __Pyx_XDECREF(__pyx_t_5);
2776  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2777  __pyx_r = NULL;
2778  __pyx_L0:;
2779  __Pyx_XDECREF(__pyx_v_b);
2780  __Pyx_XGIVEREF(__pyx_r);
2781  __Pyx_RefNannyFinishContext();
2782  return __pyx_r;
2783}
2784
2785/* "zmq/backend/cython/message.pyx":295
2786 *             return b
2787 *
2788 *     cdef inline object _getbuffer(self):             # <<<<<<<<<<<<<<
2789 *         """Create a Python buffer/view of the message data.
2790 *
2791 */
2792
2793static PyObject *__pyx_f_3zmq_7backend_6cython_7message_5Frame__getbuffer(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2794  PyObject *__pyx_r = NULL;
2795  __Pyx_RefNannyDeclarations
2796  int __pyx_t_1;
2797  int __pyx_t_2;
2798  PyObject *__pyx_t_3 = NULL;
2799  PyObject *__pyx_t_4 = NULL;
2800  int __pyx_lineno = 0;
2801  const char *__pyx_filename = NULL;
2802  int __pyx_clineno = 0;
2803  __Pyx_RefNannySetupContext("_getbuffer", 0);
2804
2805  /* "zmq/backend/cython/message.pyx":301
2806 *         is accessed. Subsequent calls use a cached copy.
2807 *         """
2808 *         if self._data is None:             # <<<<<<<<<<<<<<
2809 *             return viewfromobject_r(self)
2810 *         else:
2811 */
2812  __pyx_t_1 = (__pyx_v_self->_data == Py_None);
2813  __pyx_t_2 = (__pyx_t_1 != 0);
2814  if (__pyx_t_2) {
2815
2816    /* "zmq/backend/cython/message.pyx":302
2817 *         """
2818 *         if self._data is None:
2819 *             return viewfromobject_r(self)             # <<<<<<<<<<<<<<
2820 *         else:
2821 *             return viewfromobject_r(self._data)
2822 */
2823    __Pyx_XDECREF(__pyx_r);
2824    __pyx_t_3 = __pyx_f_7buffers_viewfromobject_r(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2825    __Pyx_GOTREF(__pyx_t_3);
2826    __pyx_r = __pyx_t_3;
2827    __pyx_t_3 = 0;
2828    goto __pyx_L0;
2829  }
2830  /*else*/ {
2831
2832    /* "zmq/backend/cython/message.pyx":304
2833 *             return viewfromobject_r(self)
2834 *         else:
2835 *             return viewfromobject_r(self._data)             # <<<<<<<<<<<<<<
2836 *
2837 *     @property
2838 */
2839    __Pyx_XDECREF(__pyx_r);
2840    __pyx_t_3 = __pyx_v_self->_data;
2841    __Pyx_INCREF(__pyx_t_3);
2842    __pyx_t_4 = __pyx_f_7buffers_viewfromobject_r(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2843    __Pyx_GOTREF(__pyx_t_4);
2844    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2845    __pyx_r = __pyx_t_4;
2846    __pyx_t_4 = 0;
2847    goto __pyx_L0;
2848  }
2849
2850  /* "zmq/backend/cython/message.pyx":295
2851 *             return b
2852 *
2853 *     cdef inline object _getbuffer(self):             # <<<<<<<<<<<<<<
2854 *         """Create a Python buffer/view of the message data.
2855 *
2856 */
2857
2858  /* function exit code */
2859  __pyx_L1_error:;
2860  __Pyx_XDECREF(__pyx_t_3);
2861  __Pyx_XDECREF(__pyx_t_4);
2862  __Pyx_AddTraceback("zmq.backend.cython.message.Frame._getbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
2863  __pyx_r = 0;
2864  __pyx_L0:;
2865  __Pyx_XGIVEREF(__pyx_r);
2866  __Pyx_RefNannyFinishContext();
2867  return __pyx_r;
2868}
2869
2870/* "zmq/backend/cython/message.pyx":307
2871 *
2872 *     @property
2873 *     def buffer(self):             # <<<<<<<<<<<<<<
2874 *         """A read-only buffer view of the message contents."""
2875 *         if self._buffer is None:
2876 */
2877
2878/* Python wrapper */
2879static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_19buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2880static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_18buffer[] = "A read-only buffer view of the message contents.";
2881static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_19buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2882  PyObject *__pyx_r = 0;
2883  __Pyx_RefNannyDeclarations
2884  __Pyx_RefNannySetupContext("buffer (wrapper)", 0);
2885  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_18buffer(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
2886
2887  /* function exit code */
2888  __Pyx_RefNannyFinishContext();
2889  return __pyx_r;
2890}
2891
2892static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_18buffer(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2893  PyObject *__pyx_r = NULL;
2894  __Pyx_RefNannyDeclarations
2895  int __pyx_t_1;
2896  int __pyx_t_2;
2897  PyObject *__pyx_t_3 = NULL;
2898  int __pyx_lineno = 0;
2899  const char *__pyx_filename = NULL;
2900  int __pyx_clineno = 0;
2901  __Pyx_RefNannySetupContext("buffer", 0);
2902
2903  /* "zmq/backend/cython/message.pyx":309
2904 *     def buffer(self):
2905 *         """A read-only buffer view of the message contents."""
2906 *         if self._buffer is None:             # <<<<<<<<<<<<<<
2907 *             self._buffer = self._getbuffer()
2908 *         return self._buffer
2909 */
2910  __pyx_t_1 = (__pyx_v_self->_buffer == Py_None);
2911  __pyx_t_2 = (__pyx_t_1 != 0);
2912  if (__pyx_t_2) {
2913
2914    /* "zmq/backend/cython/message.pyx":310
2915 *         """A read-only buffer view of the message contents."""
2916 *         if self._buffer is None:
2917 *             self._buffer = self._getbuffer()             # <<<<<<<<<<<<<<
2918 *         return self._buffer
2919 *
2920 */
2921    __pyx_t_3 = __pyx_f_3zmq_7backend_6cython_7message_5Frame__getbuffer(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2922    __Pyx_GOTREF(__pyx_t_3);
2923    __Pyx_GIVEREF(__pyx_t_3);
2924    __Pyx_GOTREF(__pyx_v_self->_buffer);
2925    __Pyx_DECREF(__pyx_v_self->_buffer);
2926    __pyx_v_self->_buffer = __pyx_t_3;
2927    __pyx_t_3 = 0;
2928    goto __pyx_L3;
2929  }
2930  __pyx_L3:;
2931
2932  /* "zmq/backend/cython/message.pyx":311
2933 *         if self._buffer is None:
2934 *             self._buffer = self._getbuffer()
2935 *         return self._buffer             # <<<<<<<<<<<<<<
2936 *
2937 *     @property
2938 */
2939  __Pyx_XDECREF(__pyx_r);
2940  __Pyx_INCREF(__pyx_v_self->_buffer);
2941  __pyx_r = __pyx_v_self->_buffer;
2942  goto __pyx_L0;
2943
2944  /* "zmq/backend/cython/message.pyx":307
2945 *
2946 *     @property
2947 *     def buffer(self):             # <<<<<<<<<<<<<<
2948 *         """A read-only buffer view of the message contents."""
2949 *         if self._buffer is None:
2950 */
2951
2952  /* function exit code */
2953  __pyx_L1_error:;
2954  __Pyx_XDECREF(__pyx_t_3);
2955  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
2956  __pyx_r = NULL;
2957  __pyx_L0:;
2958  __Pyx_XGIVEREF(__pyx_r);
2959  __Pyx_RefNannyFinishContext();
2960  return __pyx_r;
2961}
2962
2963/* "zmq/backend/cython/message.pyx":314
2964 *
2965 *     @property
2966 *     def bytes(self):             # <<<<<<<<<<<<<<
2967 *         """The message content as a Python bytes object.
2968 *
2969 */
2970
2971/* Python wrapper */
2972static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_21bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2973static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_20bytes[] = "The message content as a Python bytes object.\n\n        The first time this property is accessed, a copy of the message \n        contents is made. From then on that same copy of the message is\n        returned.\n        ";
2974static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_21bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2975  PyObject *__pyx_r = 0;
2976  __Pyx_RefNannyDeclarations
2977  __Pyx_RefNannySetupContext("bytes (wrapper)", 0);
2978  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_20bytes(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
2979
2980  /* function exit code */
2981  __Pyx_RefNannyFinishContext();
2982  return __pyx_r;
2983}
2984
2985static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_20bytes(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
2986  PyObject *__pyx_r = NULL;
2987  __Pyx_RefNannyDeclarations
2988  int __pyx_t_1;
2989  int __pyx_t_2;
2990  PyObject *__pyx_t_3 = NULL;
2991  int __pyx_lineno = 0;
2992  const char *__pyx_filename = NULL;
2993  int __pyx_clineno = 0;
2994  __Pyx_RefNannySetupContext("bytes", 0);
2995
2996  /* "zmq/backend/cython/message.pyx":321
2997 *         returned.
2998 *         """
2999 *         if self._bytes is None:             # <<<<<<<<<<<<<<
3000 *             self._bytes = copy_zmq_msg_bytes(&self.zmq_msg)
3001 *         return self._bytes
3002 */
3003  __pyx_t_1 = (__pyx_v_self->_bytes == Py_None);
3004  __pyx_t_2 = (__pyx_t_1 != 0);
3005  if (__pyx_t_2) {
3006
3007    /* "zmq/backend/cython/message.pyx":322
3008 *         """
3009 *         if self._bytes is None:
3010 *             self._bytes = copy_zmq_msg_bytes(&self.zmq_msg)             # <<<<<<<<<<<<<<
3011 *         return self._bytes
3012 *
3013 */
3014    __pyx_t_3 = __pyx_f_3zmq_7backend_6cython_7message_copy_zmq_msg_bytes((&__pyx_v_self->zmq_msg)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3015    __Pyx_GOTREF(__pyx_t_3);
3016    __Pyx_GIVEREF(__pyx_t_3);
3017    __Pyx_GOTREF(__pyx_v_self->_bytes);
3018    __Pyx_DECREF(__pyx_v_self->_bytes);
3019    __pyx_v_self->_bytes = __pyx_t_3;
3020    __pyx_t_3 = 0;
3021    goto __pyx_L3;
3022  }
3023  __pyx_L3:;
3024
3025  /* "zmq/backend/cython/message.pyx":323
3026 *         if self._bytes is None:
3027 *             self._bytes = copy_zmq_msg_bytes(&self.zmq_msg)
3028 *         return self._bytes             # <<<<<<<<<<<<<<
3029 *
3030 *     def set(self, int option, int value):
3031 */
3032  __Pyx_XDECREF(__pyx_r);
3033  __Pyx_INCREF(__pyx_v_self->_bytes);
3034  __pyx_r = __pyx_v_self->_bytes;
3035  goto __pyx_L0;
3036
3037  /* "zmq/backend/cython/message.pyx":314
3038 *
3039 *     @property
3040 *     def bytes(self):             # <<<<<<<<<<<<<<
3041 *         """The message content as a Python bytes object.
3042 *
3043 */
3044
3045  /* function exit code */
3046  __pyx_L1_error:;
3047  __Pyx_XDECREF(__pyx_t_3);
3048  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
3049  __pyx_r = NULL;
3050  __pyx_L0:;
3051  __Pyx_XGIVEREF(__pyx_r);
3052  __Pyx_RefNannyFinishContext();
3053  return __pyx_r;
3054}
3055
3056/* "zmq/backend/cython/message.pyx":325
3057 *         return self._bytes
3058 *
3059 *     def set(self, int option, int value):             # <<<<<<<<<<<<<<
3060 *         """Frame.set(option, value)
3061 *
3062 */
3063
3064/* Python wrapper */
3065static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_23set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3066static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_22set[] = "Frame.set(option, value)\n        \n        Set a Frame option.\n        \n        See the 0MQ API documentation for zmq_msg_set\n        for details on specific options.\n        \n        .. versionadded:: libzmq-3.2\n        .. versionadded:: 13.0\n        ";
3067static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_23set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3068  int __pyx_v_option;
3069  int __pyx_v_value;
3070  int __pyx_lineno = 0;
3071  const char *__pyx_filename = NULL;
3072  int __pyx_clineno = 0;
3073  PyObject *__pyx_r = 0;
3074  __Pyx_RefNannyDeclarations
3075  __Pyx_RefNannySetupContext("set (wrapper)", 0);
3076  {
3077    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_option,&__pyx_n_s_value,0};
3078    PyObject* values[2] = {0,0};
3079    if (unlikely(__pyx_kwds)) {
3080      Py_ssize_t kw_args;
3081      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3082      switch (pos_args) {
3083        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3084        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3085        case  0: break;
3086        default: goto __pyx_L5_argtuple_error;
3087      }
3088      kw_args = PyDict_Size(__pyx_kwds);
3089      switch (pos_args) {
3090        case  0:
3091        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_option)) != 0)) kw_args--;
3092        else goto __pyx_L5_argtuple_error;
3093        case  1:
3094        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
3095        else {
3096          __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3097        }
3098      }
3099      if (unlikely(kw_args > 0)) {
3100        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3101      }
3102    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
3103      goto __pyx_L5_argtuple_error;
3104    } else {
3105      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3106      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3107    }
3108    __pyx_v_option = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_option == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3109    __pyx_v_value = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3110  }
3111  goto __pyx_L4_argument_unpacking_done;
3112  __pyx_L5_argtuple_error:;
3113  __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3114  __pyx_L3_error:;
3115  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
3116  __Pyx_RefNannyFinishContext();
3117  return NULL;
3118  __pyx_L4_argument_unpacking_done:;
3119  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_22set(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), __pyx_v_option, __pyx_v_value);
3120
3121  /* function exit code */
3122  __Pyx_RefNannyFinishContext();
3123  return __pyx_r;
3124}
3125
3126static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_22set(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, int __pyx_v_option, int __pyx_v_value) {
3127  int __pyx_v_rc;
3128  PyObject *__pyx_r = NULL;
3129  __Pyx_RefNannyDeclarations
3130  int __pyx_t_1;
3131  int __pyx_lineno = 0;
3132  const char *__pyx_filename = NULL;
3133  int __pyx_clineno = 0;
3134  __Pyx_RefNannySetupContext("set", 0);
3135
3136  /* "zmq/backend/cython/message.pyx":336
3137 *         .. versionadded:: 13.0
3138 *         """
3139 *         cdef int rc = zmq_msg_set(&self.zmq_msg, option, value)             # <<<<<<<<<<<<<<
3140 *         _check_rc(rc)
3141 *
3142 */
3143  __pyx_v_rc = zmq_msg_set((&__pyx_v_self->zmq_msg), __pyx_v_option, __pyx_v_value);
3144
3145  /* "zmq/backend/cython/message.pyx":337
3146 *         """
3147 *         cdef int rc = zmq_msg_set(&self.zmq_msg, option, value)
3148 *         _check_rc(rc)             # <<<<<<<<<<<<<<
3149 *
3150 *     def get(self, option):
3151 */
3152  __pyx_t_1 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3153
3154  /* "zmq/backend/cython/message.pyx":325
3155 *         return self._bytes
3156 *
3157 *     def set(self, int option, int value):             # <<<<<<<<<<<<<<
3158 *         """Frame.set(option, value)
3159 *
3160 */
3161
3162  /* function exit code */
3163  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3164  goto __pyx_L0;
3165  __pyx_L1_error:;
3166  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
3167  __pyx_r = NULL;
3168  __pyx_L0:;
3169  __Pyx_XGIVEREF(__pyx_r);
3170  __Pyx_RefNannyFinishContext();
3171  return __pyx_r;
3172}
3173
3174/* "zmq/backend/cython/message.pyx":339
3175 *         _check_rc(rc)
3176 *
3177 *     def get(self, option):             # <<<<<<<<<<<<<<
3178 *         """Frame.get(option)
3179 *
3180 */
3181
3182/* Python wrapper */
3183static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_25get(PyObject *__pyx_v_self, PyObject *__pyx_v_option); /*proto*/
3184static char __pyx_doc_3zmq_7backend_6cython_7message_5Frame_24get[] = "Frame.get(option)\n\n        Get a Frame option or property.\n\n        See the 0MQ API documentation for zmq_msg_get and zmq_msg_gets\n        for details on specific options.\n\n        .. versionadded:: libzmq-3.2\n        .. versionadded:: 13.0\n        \n        .. versionchanged:: 14.3\n            add support for zmq_msg_gets (requires libzmq-4.1)\n        ";
3185static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_25get(PyObject *__pyx_v_self, PyObject *__pyx_v_option) {
3186  PyObject *__pyx_r = 0;
3187  __Pyx_RefNannyDeclarations
3188  __Pyx_RefNannySetupContext("get (wrapper)", 0);
3189  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_24get(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((PyObject *)__pyx_v_option));
3190
3191  /* function exit code */
3192  __Pyx_RefNannyFinishContext();
3193  return __pyx_r;
3194}
3195
3196static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_24get(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_option) {
3197  int __pyx_v_rc;
3198  char *__pyx_v_property_c;
3199  CYTHON_UNUSED Py_ssize_t __pyx_v_property_len_c;
3200  char const *__pyx_v_result;
3201  PyObject *__pyx_r = NULL;
3202  __Pyx_RefNannyDeclarations
3203  int __pyx_t_1;
3204  int __pyx_t_2;
3205  int __pyx_t_3;
3206  PyObject *__pyx_t_4 = NULL;
3207  PyObject *__pyx_t_5 = NULL;
3208  char *__pyx_t_6;
3209  int __pyx_lineno = 0;
3210  const char *__pyx_filename = NULL;
3211  int __pyx_clineno = 0;
3212  __Pyx_RefNannySetupContext("get", 0);
3213  __Pyx_INCREF(__pyx_v_option);
3214
3215  /* "zmq/backend/cython/message.pyx":353
3216 *             add support for zmq_msg_gets (requires libzmq-4.1)
3217 *         """
3218 *         cdef int rc = 0             # <<<<<<<<<<<<<<
3219 *         cdef char *property_c = NULL
3220 *         cdef Py_ssize_t property_len_c = 0
3221 */
3222  __pyx_v_rc = 0;
3223
3224  /* "zmq/backend/cython/message.pyx":354
3225 *         """
3226 *         cdef int rc = 0
3227 *         cdef char *property_c = NULL             # <<<<<<<<<<<<<<
3228 *         cdef Py_ssize_t property_len_c = 0
3229 *
3230 */
3231  __pyx_v_property_c = NULL;
3232
3233  /* "zmq/backend/cython/message.pyx":355
3234 *         cdef int rc = 0
3235 *         cdef char *property_c = NULL
3236 *         cdef Py_ssize_t property_len_c = 0             # <<<<<<<<<<<<<<
3237 *
3238 *         # zmq_msg_get
3239 */
3240  __pyx_v_property_len_c = 0;
3241
3242  /* "zmq/backend/cython/message.pyx":358
3243 *
3244 *         # zmq_msg_get
3245 *         if isinstance(option, int):             # <<<<<<<<<<<<<<
3246 *             rc = zmq_msg_get(&self.zmq_msg, option)
3247 *             _check_rc(rc)
3248 */
3249  __pyx_t_1 = PyInt_Check(__pyx_v_option);
3250  __pyx_t_2 = (__pyx_t_1 != 0);
3251  if (__pyx_t_2) {
3252
3253    /* "zmq/backend/cython/message.pyx":359
3254 *         # zmq_msg_get
3255 *         if isinstance(option, int):
3256 *             rc = zmq_msg_get(&self.zmq_msg, option)             # <<<<<<<<<<<<<<
3257 *             _check_rc(rc)
3258 *             return rc
3259 */
3260    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_option); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3261    __pyx_v_rc = zmq_msg_get((&__pyx_v_self->zmq_msg), __pyx_t_3);
3262
3263    /* "zmq/backend/cython/message.pyx":360
3264 *         if isinstance(option, int):
3265 *             rc = zmq_msg_get(&self.zmq_msg, option)
3266 *             _check_rc(rc)             # <<<<<<<<<<<<<<
3267 *             return rc
3268 *
3269 */
3270    __pyx_t_3 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3271
3272    /* "zmq/backend/cython/message.pyx":361
3273 *             rc = zmq_msg_get(&self.zmq_msg, option)
3274 *             _check_rc(rc)
3275 *             return rc             # <<<<<<<<<<<<<<
3276 *
3277 *         # zmq_msg_gets
3278 */
3279    __Pyx_XDECREF(__pyx_r);
3280    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3281    __Pyx_GOTREF(__pyx_t_4);
3282    __pyx_r = __pyx_t_4;
3283    __pyx_t_4 = 0;
3284    goto __pyx_L0;
3285  }
3286
3287  /* "zmq/backend/cython/message.pyx":364
3288 *
3289 *         # zmq_msg_gets
3290 *         _check_version((4,1), "get string properties")             # <<<<<<<<<<<<<<
3291 *         if isinstance(option, unicode):
3292 *             option = option.encode('utf8')
3293 */
3294  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_version); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3295  __Pyx_GOTREF(__pyx_t_4);
3296  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3297  __Pyx_GOTREF(__pyx_t_5);
3298  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3299  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3300
3301  /* "zmq/backend/cython/message.pyx":365
3302 *         # zmq_msg_gets
3303 *         _check_version((4,1), "get string properties")
3304 *         if isinstance(option, unicode):             # <<<<<<<<<<<<<<
3305 *             option = option.encode('utf8')
3306 *
3307 */
3308  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3309  __Pyx_GOTREF(__pyx_t_5);
3310  __pyx_t_2 = PyObject_IsInstance(__pyx_v_option, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3311  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3312  __pyx_t_1 = (__pyx_t_2 != 0);
3313  if (__pyx_t_1) {
3314
3315    /* "zmq/backend/cython/message.pyx":366
3316 *         _check_version((4,1), "get string properties")
3317 *         if isinstance(option, unicode):
3318 *             option = option.encode('utf8')             # <<<<<<<<<<<<<<
3319 *
3320 *         if not isinstance(option, bytes):
3321 */
3322    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_option, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3323    __Pyx_GOTREF(__pyx_t_5);
3324    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3325    __Pyx_GOTREF(__pyx_t_4);
3326    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3327    __Pyx_DECREF_SET(__pyx_v_option, __pyx_t_4);
3328    __pyx_t_4 = 0;
3329    goto __pyx_L4;
3330  }
3331  __pyx_L4:;
3332
3333  /* "zmq/backend/cython/message.pyx":368
3334 *             option = option.encode('utf8')
3335 *
3336 *         if not isinstance(option, bytes):             # <<<<<<<<<<<<<<
3337 *             raise TypeError("expected str, got: %r" % option)
3338 *
3339 */
3340  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3341  __Pyx_GOTREF(__pyx_t_4);
3342  __pyx_t_1 = PyObject_IsInstance(__pyx_v_option, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3343  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3344  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
3345  if (__pyx_t_2) {
3346
3347    /* "zmq/backend/cython/message.pyx":369
3348 *
3349 *         if not isinstance(option, bytes):
3350 *             raise TypeError("expected str, got: %r" % option)             # <<<<<<<<<<<<<<
3351 *
3352 *         property_c = option
3353 */
3354    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_expected_str_got_r, __pyx_v_option); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3355    __Pyx_GOTREF(__pyx_t_4);
3356    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3357    __Pyx_GOTREF(__pyx_t_5);
3358    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
3359    __Pyx_GIVEREF(__pyx_t_4);
3360    __pyx_t_4 = 0;
3361    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3362    __Pyx_GOTREF(__pyx_t_4);
3363    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3364    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
3365    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3366    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3367  }
3368
3369  /* "zmq/backend/cython/message.pyx":371
3370 *             raise TypeError("expected str, got: %r" % option)
3371 *
3372 *         property_c = option             # <<<<<<<<<<<<<<
3373 *
3374 *         cdef const char *result = <char *>zmq_msg_gets(&self.zmq_msg, property_c)
3375 */
3376  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_option); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3377  __pyx_v_property_c = __pyx_t_6;
3378
3379  /* "zmq/backend/cython/message.pyx":373
3380 *         property_c = option
3381 *
3382 *         cdef const char *result = <char *>zmq_msg_gets(&self.zmq_msg, property_c)             # <<<<<<<<<<<<<<
3383 *         if result == NULL:
3384 *             _check_rc(-1)
3385 */
3386  __pyx_v_result = ((char *)zmq_msg_gets((&__pyx_v_self->zmq_msg), __pyx_v_property_c));
3387
3388  /* "zmq/backend/cython/message.pyx":374
3389 *
3390 *         cdef const char *result = <char *>zmq_msg_gets(&self.zmq_msg, property_c)
3391 *         if result == NULL:             # <<<<<<<<<<<<<<
3392 *             _check_rc(-1)
3393 *         return result.decode('utf8')
3394 */
3395  __pyx_t_2 = ((__pyx_v_result == NULL) != 0);
3396  if (__pyx_t_2) {
3397
3398    /* "zmq/backend/cython/message.pyx":375
3399 *         cdef const char *result = <char *>zmq_msg_gets(&self.zmq_msg, property_c)
3400 *         if result == NULL:
3401 *             _check_rc(-1)             # <<<<<<<<<<<<<<
3402 *         return result.decode('utf8')
3403 *
3404 */
3405    __pyx_t_3 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(-1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3406    goto __pyx_L6;
3407  }
3408  __pyx_L6:;
3409
3410  /* "zmq/backend/cython/message.pyx":376
3411 *         if result == NULL:
3412 *             _check_rc(-1)
3413 *         return result.decode('utf8')             # <<<<<<<<<<<<<<
3414 *
3415 * # legacy Message name
3416 */
3417  __Pyx_XDECREF(__pyx_r);
3418  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_result, 0, strlen(__pyx_v_result), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3419  __Pyx_GOTREF(__pyx_t_4);
3420  __pyx_r = __pyx_t_4;
3421  __pyx_t_4 = 0;
3422  goto __pyx_L0;
3423
3424  /* "zmq/backend/cython/message.pyx":339
3425 *         _check_rc(rc)
3426 *
3427 *     def get(self, option):             # <<<<<<<<<<<<<<
3428 *         """Frame.get(option)
3429 *
3430 */
3431
3432  /* function exit code */
3433  __pyx_L1_error:;
3434  __Pyx_XDECREF(__pyx_t_4);
3435  __Pyx_XDECREF(__pyx_t_5);
3436  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
3437  __pyx_r = NULL;
3438  __pyx_L0:;
3439  __Pyx_XDECREF(__pyx_v_option);
3440  __Pyx_XGIVEREF(__pyx_r);
3441  __Pyx_RefNannyFinishContext();
3442  return __pyx_r;
3443}
3444
3445/* "zmq/backend/cython/message.pxd":47
3446 *     cdef object _bytes     # A bytes/str copy of the message.
3447 *     cdef bint _failed_init # Flag to handle failed zmq_msg_init
3448 *     cdef public object tracker_event  # Event for use with zmq_free_fn.             # <<<<<<<<<<<<<<
3449 *     cdef public object tracker        # MessageTracker object.
3450 *     cdef public bint more             # whether RCVMORE was set
3451 */
3452
3453/* Python wrapper */
3454static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_1__get__(PyObject *__pyx_v_self); /*proto*/
3455static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_1__get__(PyObject *__pyx_v_self) {
3456  PyObject *__pyx_r = 0;
3457  __Pyx_RefNannyDeclarations
3458  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3459  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event___get__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
3460
3461  /* function exit code */
3462  __Pyx_RefNannyFinishContext();
3463  return __pyx_r;
3464}
3465
3466static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
3467  PyObject *__pyx_r = NULL;
3468  __Pyx_RefNannyDeclarations
3469  __Pyx_RefNannySetupContext("__get__", 0);
3470  __Pyx_XDECREF(__pyx_r);
3471  __Pyx_INCREF(__pyx_v_self->tracker_event);
3472  __pyx_r = __pyx_v_self->tracker_event;
3473  goto __pyx_L0;
3474
3475  /* function exit code */
3476  __pyx_L0:;
3477  __Pyx_XGIVEREF(__pyx_r);
3478  __Pyx_RefNannyFinishContext();
3479  return __pyx_r;
3480}
3481
3482/* Python wrapper */
3483static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3484static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3485  int __pyx_r;
3486  __Pyx_RefNannyDeclarations
3487  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
3488  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_2__set__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3489
3490  /* function exit code */
3491  __Pyx_RefNannyFinishContext();
3492  return __pyx_r;
3493}
3494
3495static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value) {
3496  int __pyx_r;
3497  __Pyx_RefNannyDeclarations
3498  __Pyx_RefNannySetupContext("__set__", 0);
3499  __Pyx_INCREF(__pyx_v_value);
3500  __Pyx_GIVEREF(__pyx_v_value);
3501  __Pyx_GOTREF(__pyx_v_self->tracker_event);
3502  __Pyx_DECREF(__pyx_v_self->tracker_event);
3503  __pyx_v_self->tracker_event = __pyx_v_value;
3504
3505  /* function exit code */
3506  __pyx_r = 0;
3507  __Pyx_RefNannyFinishContext();
3508  return __pyx_r;
3509}
3510
3511/* Python wrapper */
3512static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_5__del__(PyObject *__pyx_v_self); /*proto*/
3513static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_13tracker_event_5__del__(PyObject *__pyx_v_self) {
3514  int __pyx_r;
3515  __Pyx_RefNannyDeclarations
3516  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
3517  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_4__del__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
3518
3519  /* function exit code */
3520  __Pyx_RefNannyFinishContext();
3521  return __pyx_r;
3522}
3523
3524static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_13tracker_event_4__del__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
3525  int __pyx_r;
3526  __Pyx_RefNannyDeclarations
3527  __Pyx_RefNannySetupContext("__del__", 0);
3528  __Pyx_INCREF(Py_None);
3529  __Pyx_GIVEREF(Py_None);
3530  __Pyx_GOTREF(__pyx_v_self->tracker_event);
3531  __Pyx_DECREF(__pyx_v_self->tracker_event);
3532  __pyx_v_self->tracker_event = Py_None;
3533
3534  /* function exit code */
3535  __pyx_r = 0;
3536  __Pyx_RefNannyFinishContext();
3537  return __pyx_r;
3538}
3539
3540/* "zmq/backend/cython/message.pxd":48
3541 *     cdef bint _failed_init # Flag to handle failed zmq_msg_init
3542 *     cdef public object tracker_event  # Event for use with zmq_free_fn.
3543 *     cdef public object tracker        # MessageTracker object.             # <<<<<<<<<<<<<<
3544 *     cdef public bint more             # whether RCVMORE was set
3545 *
3546 */
3547
3548/* Python wrapper */
3549static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_1__get__(PyObject *__pyx_v_self); /*proto*/
3550static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_1__get__(PyObject *__pyx_v_self) {
3551  PyObject *__pyx_r = 0;
3552  __Pyx_RefNannyDeclarations
3553  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3554  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker___get__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
3555
3556  /* function exit code */
3557  __Pyx_RefNannyFinishContext();
3558  return __pyx_r;
3559}
3560
3561static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
3562  PyObject *__pyx_r = NULL;
3563  __Pyx_RefNannyDeclarations
3564  __Pyx_RefNannySetupContext("__get__", 0);
3565  __Pyx_XDECREF(__pyx_r);
3566  __Pyx_INCREF(__pyx_v_self->tracker);
3567  __pyx_r = __pyx_v_self->tracker;
3568  goto __pyx_L0;
3569
3570  /* function exit code */
3571  __pyx_L0:;
3572  __Pyx_XGIVEREF(__pyx_r);
3573  __Pyx_RefNannyFinishContext();
3574  return __pyx_r;
3575}
3576
3577/* Python wrapper */
3578static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3579static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3580  int __pyx_r;
3581  __Pyx_RefNannyDeclarations
3582  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
3583  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_2__set__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3584
3585  /* function exit code */
3586  __Pyx_RefNannyFinishContext();
3587  return __pyx_r;
3588}
3589
3590static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value) {
3591  int __pyx_r;
3592  __Pyx_RefNannyDeclarations
3593  __Pyx_RefNannySetupContext("__set__", 0);
3594  __Pyx_INCREF(__pyx_v_value);
3595  __Pyx_GIVEREF(__pyx_v_value);
3596  __Pyx_GOTREF(__pyx_v_self->tracker);
3597  __Pyx_DECREF(__pyx_v_self->tracker);
3598  __pyx_v_self->tracker = __pyx_v_value;
3599
3600  /* function exit code */
3601  __pyx_r = 0;
3602  __Pyx_RefNannyFinishContext();
3603  return __pyx_r;
3604}
3605
3606/* Python wrapper */
3607static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_5__del__(PyObject *__pyx_v_self); /*proto*/
3608static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_7tracker_5__del__(PyObject *__pyx_v_self) {
3609  int __pyx_r;
3610  __Pyx_RefNannyDeclarations
3611  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
3612  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_4__del__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
3613
3614  /* function exit code */
3615  __Pyx_RefNannyFinishContext();
3616  return __pyx_r;
3617}
3618
3619static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_7tracker_4__del__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
3620  int __pyx_r;
3621  __Pyx_RefNannyDeclarations
3622  __Pyx_RefNannySetupContext("__del__", 0);
3623  __Pyx_INCREF(Py_None);
3624  __Pyx_GIVEREF(Py_None);
3625  __Pyx_GOTREF(__pyx_v_self->tracker);
3626  __Pyx_DECREF(__pyx_v_self->tracker);
3627  __pyx_v_self->tracker = Py_None;
3628
3629  /* function exit code */
3630  __pyx_r = 0;
3631  __Pyx_RefNannyFinishContext();
3632  return __pyx_r;
3633}
3634
3635/* "zmq/backend/cython/message.pxd":49
3636 *     cdef public object tracker_event  # Event for use with zmq_free_fn.
3637 *     cdef public object tracker        # MessageTracker object.
3638 *     cdef public bint more             # whether RCVMORE was set             # <<<<<<<<<<<<<<
3639 *
3640 *     cdef Frame fast_copy(self) # Create shallow copy of Message object.
3641 */
3642
3643/* Python wrapper */
3644static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_4more_1__get__(PyObject *__pyx_v_self); /*proto*/
3645static PyObject *__pyx_pw_3zmq_7backend_6cython_7message_5Frame_4more_1__get__(PyObject *__pyx_v_self) {
3646  PyObject *__pyx_r = 0;
3647  __Pyx_RefNannyDeclarations
3648  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3649  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more___get__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self));
3650
3651  /* function exit code */
3652  __Pyx_RefNannyFinishContext();
3653  return __pyx_r;
3654}
3655
3656static PyObject *__pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more___get__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self) {
3657  PyObject *__pyx_r = NULL;
3658  __Pyx_RefNannyDeclarations
3659  PyObject *__pyx_t_1 = NULL;
3660  int __pyx_lineno = 0;
3661  const char *__pyx_filename = NULL;
3662  int __pyx_clineno = 0;
3663  __Pyx_RefNannySetupContext("__get__", 0);
3664  __Pyx_XDECREF(__pyx_r);
3665  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->more); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3666  __Pyx_GOTREF(__pyx_t_1);
3667  __pyx_r = __pyx_t_1;
3668  __pyx_t_1 = 0;
3669  goto __pyx_L0;
3670
3671  /* function exit code */
3672  __pyx_L1_error:;
3673  __Pyx_XDECREF(__pyx_t_1);
3674  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.more.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3675  __pyx_r = NULL;
3676  __pyx_L0:;
3677  __Pyx_XGIVEREF(__pyx_r);
3678  __Pyx_RefNannyFinishContext();
3679  return __pyx_r;
3680}
3681
3682/* Python wrapper */
3683static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_4more_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3684static int __pyx_pw_3zmq_7backend_6cython_7message_5Frame_4more_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3685  int __pyx_r;
3686  __Pyx_RefNannyDeclarations
3687  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
3688  __pyx_r = __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more_2__set__(((struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *)__pyx_v_self), ((PyObject *)__pyx_v_value));
3689
3690  /* function exit code */
3691  __Pyx_RefNannyFinishContext();
3692  return __pyx_r;
3693}
3694
3695static int __pyx_pf_3zmq_7backend_6cython_7message_5Frame_4more_2__set__(struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *__pyx_v_self, PyObject *__pyx_v_value) {
3696  int __pyx_r;
3697  __Pyx_RefNannyDeclarations
3698  int __pyx_t_1;
3699  int __pyx_lineno = 0;
3700  const char *__pyx_filename = NULL;
3701  int __pyx_clineno = 0;
3702  __Pyx_RefNannySetupContext("__set__", 0);
3703  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3704  __pyx_v_self->more = __pyx_t_1;
3705
3706  /* function exit code */
3707  __pyx_r = 0;
3708  goto __pyx_L0;
3709  __pyx_L1_error:;
3710  __Pyx_AddTraceback("zmq.backend.cython.message.Frame.more.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3711  __pyx_r = -1;
3712  __pyx_L0:;
3713  __Pyx_RefNannyFinishContext();
3714  return __pyx_r;
3715}
3716
3717/* "zmq/backend/cython/checkrc.pxd":5
3718 * from libzmq cimport zmq_errno, ZMQ_ETERM
3719 *
3720 * cdef inline int _check_rc(int rc) except -1:             # <<<<<<<<<<<<<<
3721 *     """internal utility for checking zmq return condition
3722 *
3723 */
3724
3725static CYTHON_INLINE int __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(int __pyx_v_rc) {
3726  int __pyx_v_errno;
3727  PyObject *__pyx_v_Again = NULL;
3728  PyObject *__pyx_v_ContextTerminated = NULL;
3729  PyObject *__pyx_v_ZMQError = NULL;
3730  int __pyx_r;
3731  __Pyx_RefNannyDeclarations
3732  int __pyx_t_1;
3733  int __pyx_t_2;
3734  PyObject *__pyx_t_3 = NULL;
3735  PyObject *__pyx_t_4 = NULL;
3736  PyObject *__pyx_t_5 = NULL;
3737  PyObject *__pyx_t_6 = NULL;
3738  PyObject *__pyx_t_7 = NULL;
3739  int __pyx_lineno = 0;
3740  const char *__pyx_filename = NULL;
3741  int __pyx_clineno = 0;
3742  __Pyx_RefNannySetupContext("_check_rc", 0);
3743
3744  /* "zmq/backend/cython/checkrc.pxd":10
3745 *     and raising the appropriate Exception class
3746 *     """
3747 *     cdef int errno = zmq_errno()             # <<<<<<<<<<<<<<
3748 *     PyErr_CheckSignals()
3749 *     if rc < 0:
3750 */
3751  __pyx_v_errno = zmq_errno();
3752
3753  /* "zmq/backend/cython/checkrc.pxd":11
3754 *     """
3755 *     cdef int errno = zmq_errno()
3756 *     PyErr_CheckSignals()             # <<<<<<<<<<<<<<
3757 *     if rc < 0:
3758 *         if errno == EAGAIN:
3759 */
3760  __pyx_t_1 = PyErr_CheckSignals(); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3761
3762  /* "zmq/backend/cython/checkrc.pxd":12
3763 *     cdef int errno = zmq_errno()
3764 *     PyErr_CheckSignals()
3765 *     if rc < 0:             # <<<<<<<<<<<<<<
3766 *         if errno == EAGAIN:
3767 *             from zmq.error import Again
3768 */
3769  __pyx_t_2 = ((__pyx_v_rc < 0) != 0);
3770  if (__pyx_t_2) {
3771
3772    /* "zmq/backend/cython/checkrc.pxd":16
3773 *             from zmq.error import Again
3774 *             raise Again(errno)
3775 *         elif errno == ZMQ_ETERM:             # <<<<<<<<<<<<<<
3776 *             from zmq.error import ContextTerminated
3777 *             raise ContextTerminated(errno)
3778 */
3779    switch (__pyx_v_errno) {
3780
3781      /* "zmq/backend/cython/checkrc.pxd":13
3782 *     PyErr_CheckSignals()
3783 *     if rc < 0:
3784 *         if errno == EAGAIN:             # <<<<<<<<<<<<<<
3785 *             from zmq.error import Again
3786 *             raise Again(errno)
3787 */
3788      case EAGAIN:
3789
3790      /* "zmq/backend/cython/checkrc.pxd":14
3791 *     if rc < 0:
3792 *         if errno == EAGAIN:
3793 *             from zmq.error import Again             # <<<<<<<<<<<<<<
3794 *             raise Again(errno)
3795 *         elif errno == ZMQ_ETERM:
3796 */
3797      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3798      __Pyx_GOTREF(__pyx_t_3);
3799      __Pyx_INCREF(__pyx_n_s_Again);
3800      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Again);
3801      __Pyx_GIVEREF(__pyx_n_s_Again);
3802      __pyx_t_4 = __Pyx_Import(__pyx_n_s_zmq_error, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3803      __Pyx_GOTREF(__pyx_t_4);
3804      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3805      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Again); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3806      __Pyx_GOTREF(__pyx_t_3);
3807      __Pyx_INCREF(__pyx_t_3);
3808      __pyx_v_Again = __pyx_t_3;
3809      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3810      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3811
3812      /* "zmq/backend/cython/checkrc.pxd":15
3813 *         if errno == EAGAIN:
3814 *             from zmq.error import Again
3815 *             raise Again(errno)             # <<<<<<<<<<<<<<
3816 *         elif errno == ZMQ_ETERM:
3817 *             from zmq.error import ContextTerminated
3818 */
3819      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_errno); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3820      __Pyx_GOTREF(__pyx_t_3);
3821      __Pyx_INCREF(__pyx_v_Again);
3822      __pyx_t_5 = __pyx_v_Again; __pyx_t_6 = NULL;
3823      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
3824        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
3825        if (likely(__pyx_t_6)) {
3826          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
3827          __Pyx_INCREF(__pyx_t_6);
3828          __Pyx_INCREF(function);
3829          __Pyx_DECREF_SET(__pyx_t_5, function);
3830        }
3831      }
3832      if (!__pyx_t_6) {
3833        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3834        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3835        __Pyx_GOTREF(__pyx_t_4);
3836      } else {
3837        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3838        __Pyx_GOTREF(__pyx_t_7);
3839        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
3840        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
3841        __Pyx_GIVEREF(__pyx_t_3);
3842        __pyx_t_3 = 0;
3843        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3844        __Pyx_GOTREF(__pyx_t_4);
3845        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3846      }
3847      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3848      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
3849      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3850      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3851      break;
3852
3853      /* "zmq/backend/cython/checkrc.pxd":16
3854 *             from zmq.error import Again
3855 *             raise Again(errno)
3856 *         elif errno == ZMQ_ETERM:             # <<<<<<<<<<<<<<
3857 *             from zmq.error import ContextTerminated
3858 *             raise ContextTerminated(errno)
3859 */
3860      case ETERM:
3861
3862      /* "zmq/backend/cython/checkrc.pxd":17
3863 *             raise Again(errno)
3864 *         elif errno == ZMQ_ETERM:
3865 *             from zmq.error import ContextTerminated             # <<<<<<<<<<<<<<
3866 *             raise ContextTerminated(errno)
3867 *         else:
3868 */
3869      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3870      __Pyx_GOTREF(__pyx_t_4);
3871      __Pyx_INCREF(__pyx_n_s_ContextTerminated);
3872      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ContextTerminated);
3873      __Pyx_GIVEREF(__pyx_n_s_ContextTerminated);
3874      __pyx_t_5 = __Pyx_Import(__pyx_n_s_zmq_error, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3875      __Pyx_GOTREF(__pyx_t_5);
3876      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3877      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ContextTerminated); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3878      __Pyx_GOTREF(__pyx_t_4);
3879      __Pyx_INCREF(__pyx_t_4);
3880      __pyx_v_ContextTerminated = __pyx_t_4;
3881      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3882      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3883
3884      /* "zmq/backend/cython/checkrc.pxd":18
3885 *         elif errno == ZMQ_ETERM:
3886 *             from zmq.error import ContextTerminated
3887 *             raise ContextTerminated(errno)             # <<<<<<<<<<<<<<
3888 *         else:
3889 *             from zmq.error import ZMQError
3890 */
3891      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_errno); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3892      __Pyx_GOTREF(__pyx_t_4);
3893      __Pyx_INCREF(__pyx_v_ContextTerminated);
3894      __pyx_t_7 = __pyx_v_ContextTerminated; __pyx_t_3 = NULL;
3895      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
3896        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3897        if (likely(__pyx_t_3)) {
3898          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3899          __Pyx_INCREF(__pyx_t_3);
3900          __Pyx_INCREF(function);
3901          __Pyx_DECREF_SET(__pyx_t_7, function);
3902        }
3903      }
3904      if (!__pyx_t_3) {
3905        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3906        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3907        __Pyx_GOTREF(__pyx_t_5);
3908      } else {
3909        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3910        __Pyx_GOTREF(__pyx_t_6);
3911        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
3912        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
3913        __Pyx_GIVEREF(__pyx_t_4);
3914        __pyx_t_4 = 0;
3915        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3916        __Pyx_GOTREF(__pyx_t_5);
3917        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3918      }
3919      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3920      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3921      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3922      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3923      break;
3924      default:
3925
3926      /* "zmq/backend/cython/checkrc.pxd":20
3927 *             raise ContextTerminated(errno)
3928 *         else:
3929 *             from zmq.error import ZMQError             # <<<<<<<<<<<<<<
3930 *             raise ZMQError(errno)
3931 *         # return -1
3932 */
3933      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3934      __Pyx_GOTREF(__pyx_t_5);
3935      __Pyx_INCREF(__pyx_n_s_ZMQError);
3936      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ZMQError);
3937      __Pyx_GIVEREF(__pyx_n_s_ZMQError);
3938      __pyx_t_7 = __Pyx_Import(__pyx_n_s_zmq_error, __pyx_t_5, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3939      __Pyx_GOTREF(__pyx_t_7);
3940      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3941      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_ZMQError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3942      __Pyx_GOTREF(__pyx_t_5);
3943      __Pyx_INCREF(__pyx_t_5);
3944      __pyx_v_ZMQError = __pyx_t_5;
3945      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3946      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3947
3948      /* "zmq/backend/cython/checkrc.pxd":21
3949 *         else:
3950 *             from zmq.error import ZMQError
3951 *             raise ZMQError(errno)             # <<<<<<<<<<<<<<
3952 *         # return -1
3953 *     return 0
3954 */
3955      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_errno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3956      __Pyx_GOTREF(__pyx_t_5);
3957      __Pyx_INCREF(__pyx_v_ZMQError);
3958      __pyx_t_6 = __pyx_v_ZMQError; __pyx_t_4 = NULL;
3959      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
3960        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
3961        if (likely(__pyx_t_4)) {
3962          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
3963          __Pyx_INCREF(__pyx_t_4);
3964          __Pyx_INCREF(function);
3965          __Pyx_DECREF_SET(__pyx_t_6, function);
3966        }
3967      }
3968      if (!__pyx_t_4) {
3969        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3970        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3971        __Pyx_GOTREF(__pyx_t_7);
3972      } else {
3973        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3974        __Pyx_GOTREF(__pyx_t_3);
3975        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
3976        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
3977        __Pyx_GIVEREF(__pyx_t_5);
3978        __pyx_t_5 = 0;
3979        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3980        __Pyx_GOTREF(__pyx_t_7);
3981        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3982      }
3983      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3984      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
3985      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3986      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3987      break;
3988    }
3989  }
3990
3991  /* "zmq/backend/cython/checkrc.pxd":23
3992 *             raise ZMQError(errno)
3993 *         # return -1
3994 *     return 0             # <<<<<<<<<<<<<<
3995 */
3996  __pyx_r = 0;
3997  goto __pyx_L0;
3998
3999  /* "zmq/backend/cython/checkrc.pxd":5
4000 * from libzmq cimport zmq_errno, ZMQ_ETERM
4001 *
4002 * cdef inline int _check_rc(int rc) except -1:             # <<<<<<<<<<<<<<
4003 *     """internal utility for checking zmq return condition
4004 *
4005 */
4006
4007  /* function exit code */
4008  __pyx_L1_error:;
4009  __Pyx_XDECREF(__pyx_t_3);
4010  __Pyx_XDECREF(__pyx_t_4);
4011  __Pyx_XDECREF(__pyx_t_5);
4012  __Pyx_XDECREF(__pyx_t_6);
4013  __Pyx_XDECREF(__pyx_t_7);
4014  __Pyx_AddTraceback("zmq.backend.cython.checkrc._check_rc", __pyx_clineno, __pyx_lineno, __pyx_filename);
4015  __pyx_r = -1;
4016  __pyx_L0:;
4017  __Pyx_XDECREF(__pyx_v_Again);
4018  __Pyx_XDECREF(__pyx_v_ContextTerminated);
4019  __Pyx_XDECREF(__pyx_v_ZMQError);
4020  __Pyx_RefNannyFinishContext();
4021  return __pyx_r;
4022}
4023
4024/* "zmq/backend/cython/message.pxd":55
4025 *
4026 *
4027 * cdef inline object copy_zmq_msg_bytes(zmq_msg_t *zmq_msg):             # <<<<<<<<<<<<<<
4028 *     """ Copy the data from a zmq_msg_t """
4029 *     cdef char *data_c = NULL
4030 */
4031
4032static CYTHON_INLINE PyObject *__pyx_f_3zmq_7backend_6cython_7message_copy_zmq_msg_bytes(zmq_msg_t *__pyx_v_zmq_msg) {
4033  char *__pyx_v_data_c;
4034  Py_ssize_t __pyx_v_data_len_c;
4035  PyObject *__pyx_r = NULL;
4036  __Pyx_RefNannyDeclarations
4037  PyObject *__pyx_t_1 = NULL;
4038  int __pyx_lineno = 0;
4039  const char *__pyx_filename = NULL;
4040  int __pyx_clineno = 0;
4041  __Pyx_RefNannySetupContext("copy_zmq_msg_bytes", 0);
4042
4043  /* "zmq/backend/cython/message.pxd":57
4044 * cdef inline object copy_zmq_msg_bytes(zmq_msg_t *zmq_msg):
4045 *     """ Copy the data from a zmq_msg_t """
4046 *     cdef char *data_c = NULL             # <<<<<<<<<<<<<<
4047 *     cdef Py_ssize_t data_len_c
4048 *     data_c = <char *>zmq_msg_data(zmq_msg)
4049 */
4050  __pyx_v_data_c = NULL;
4051
4052  /* "zmq/backend/cython/message.pxd":59
4053 *     cdef char *data_c = NULL
4054 *     cdef Py_ssize_t data_len_c
4055 *     data_c = <char *>zmq_msg_data(zmq_msg)             # <<<<<<<<<<<<<<
4056 *     data_len_c = zmq_msg_size(zmq_msg)
4057 *     return PyBytes_FromStringAndSize(data_c, data_len_c)
4058 */
4059  __pyx_v_data_c = ((char *)zmq_msg_data(__pyx_v_zmq_msg));
4060
4061  /* "zmq/backend/cython/message.pxd":60
4062 *     cdef Py_ssize_t data_len_c
4063 *     data_c = <char *>zmq_msg_data(zmq_msg)
4064 *     data_len_c = zmq_msg_size(zmq_msg)             # <<<<<<<<<<<<<<
4065 *     return PyBytes_FromStringAndSize(data_c, data_len_c)
4066 *
4067 */
4068  __pyx_v_data_len_c = zmq_msg_size(__pyx_v_zmq_msg);
4069
4070  /* "zmq/backend/cython/message.pxd":61
4071 *     data_c = <char *>zmq_msg_data(zmq_msg)
4072 *     data_len_c = zmq_msg_size(zmq_msg)
4073 *     return PyBytes_FromStringAndSize(data_c, data_len_c)             # <<<<<<<<<<<<<<
4074 *
4075 *
4076 */
4077  __Pyx_XDECREF(__pyx_r);
4078  __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_data_c, __pyx_v_data_len_c); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4079  __Pyx_GOTREF(__pyx_t_1);
4080  __pyx_r = __pyx_t_1;
4081  __pyx_t_1 = 0;
4082  goto __pyx_L0;
4083
4084  /* "zmq/backend/cython/message.pxd":55
4085 *
4086 *
4087 * cdef inline object copy_zmq_msg_bytes(zmq_msg_t *zmq_msg):             # <<<<<<<<<<<<<<
4088 *     """ Copy the data from a zmq_msg_t """
4089 *     cdef char *data_c = NULL
4090 */
4091
4092  /* function exit code */
4093  __pyx_L1_error:;
4094  __Pyx_XDECREF(__pyx_t_1);
4095  __Pyx_AddTraceback("zmq.backend.cython.message.copy_zmq_msg_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
4096  __pyx_r = 0;
4097  __pyx_L0:;
4098  __Pyx_XGIVEREF(__pyx_r);
4099  __Pyx_RefNannyFinishContext();
4100  return __pyx_r;
4101}
4102
4103/* "buffers.pxd":88
4104 *
4105 *
4106 * cdef inline int memoryview_available():             # <<<<<<<<<<<<<<
4107 *     return PY_MAJOR_VERSION >= 3 or (PY_MAJOR_VERSION >=2 and PY_MINOR_VERSION >= 7)
4108 *
4109 */
4110
4111static CYTHON_INLINE int __pyx_f_7buffers_memoryview_available(void) {
4112  int __pyx_r;
4113  __Pyx_RefNannyDeclarations
4114  int __pyx_t_1;
4115  int __pyx_t_2;
4116  __Pyx_RefNannySetupContext("memoryview_available", 0);
4117
4118  /* "buffers.pxd":89
4119 *
4120 * cdef inline int memoryview_available():
4121 *     return PY_MAJOR_VERSION >= 3 or (PY_MAJOR_VERSION >=2 and PY_MINOR_VERSION >= 7)             # <<<<<<<<<<<<<<
4122 *
4123 * cdef inline int oldstyle_available():
4124 */
4125  __pyx_t_2 = (PY_MAJOR_VERSION >= 3);
4126  if (!__pyx_t_2) {
4127  } else {
4128    __pyx_t_1 = __pyx_t_2;
4129    goto __pyx_L3_bool_binop_done;
4130  }
4131  __pyx_t_2 = (PY_MAJOR_VERSION >= 2);
4132  if (__pyx_t_2) {
4133  } else {
4134    __pyx_t_1 = __pyx_t_2;
4135    goto __pyx_L3_bool_binop_done;
4136  }
4137  __pyx_t_2 = (PY_MINOR_VERSION >= 7);
4138  __pyx_t_1 = __pyx_t_2;
4139  __pyx_L3_bool_binop_done:;
4140  __pyx_r = __pyx_t_1;
4141  goto __pyx_L0;
4142
4143  /* "buffers.pxd":88
4144 *
4145 *
4146 * cdef inline int memoryview_available():             # <<<<<<<<<<<<<<
4147 *     return PY_MAJOR_VERSION >= 3 or (PY_MAJOR_VERSION >=2 and PY_MINOR_VERSION >= 7)
4148 *
4149 */
4150
4151  /* function exit code */
4152  __pyx_L0:;
4153  __Pyx_RefNannyFinishContext();
4154  return __pyx_r;
4155}
4156
4157/* "buffers.pxd":91
4158 *     return PY_MAJOR_VERSION >= 3 or (PY_MAJOR_VERSION >=2 and PY_MINOR_VERSION >= 7)
4159 *
4160 * cdef inline int oldstyle_available():             # <<<<<<<<<<<<<<
4161 *     return PY_MAJOR_VERSION < 3
4162 *
4163 */
4164
4165static CYTHON_INLINE int __pyx_f_7buffers_oldstyle_available(void) {
4166  int __pyx_r;
4167  __Pyx_RefNannyDeclarations
4168  __Pyx_RefNannySetupContext("oldstyle_available", 0);
4169
4170  /* "buffers.pxd":92
4171 *
4172 * cdef inline int oldstyle_available():
4173 *     return PY_MAJOR_VERSION < 3             # <<<<<<<<<<<<<<
4174 *
4175 *
4176 */
4177  __pyx_r = (PY_MAJOR_VERSION < 3);
4178  goto __pyx_L0;
4179
4180  /* "buffers.pxd":91
4181 *     return PY_MAJOR_VERSION >= 3 or (PY_MAJOR_VERSION >=2 and PY_MINOR_VERSION >= 7)
4182 *
4183 * cdef inline int oldstyle_available():             # <<<<<<<<<<<<<<
4184 *     return PY_MAJOR_VERSION < 3
4185 *
4186 */
4187
4188  /* function exit code */
4189  __pyx_L0:;
4190  __Pyx_RefNannyFinishContext();
4191  return __pyx_r;
4192}
4193
4194/* "buffers.pxd":95
4195 *
4196 *
4197 * cdef inline int check_buffer(object ob):             # <<<<<<<<<<<<<<
4198 *     """Version independent check for whether an object is a buffer.
4199 *
4200 */
4201
4202static CYTHON_INLINE int __pyx_f_7buffers_check_buffer(PyObject *__pyx_v_ob) {
4203  int __pyx_r;
4204  __Pyx_RefNannyDeclarations
4205  int __pyx_t_1;
4206  int __pyx_t_2;
4207  int __pyx_t_3;
4208  __Pyx_RefNannySetupContext("check_buffer", 0);
4209
4210  /* "buffers.pxd":107
4211 *     int : 0 if no buffer interface, 3 if newstyle buffer interface, 2 if oldstyle.
4212 *     """
4213 *     if PyObject_CheckBuffer(ob):             # <<<<<<<<<<<<<<
4214 *         return 3
4215 *     if oldstyle_available():
4216 */
4217  __pyx_t_1 = (PyObject_CheckBuffer(__pyx_v_ob) != 0);
4218  if (__pyx_t_1) {
4219
4220    /* "buffers.pxd":108
4221 *     """
4222 *     if PyObject_CheckBuffer(ob):
4223 *         return 3             # <<<<<<<<<<<<<<
4224 *     if oldstyle_available():
4225 *         return PyObject_CheckReadBuffer(ob) and 2
4226 */
4227    __pyx_r = 3;
4228    goto __pyx_L0;
4229  }
4230
4231  /* "buffers.pxd":109
4232 *     if PyObject_CheckBuffer(ob):
4233 *         return 3
4234 *     if oldstyle_available():             # <<<<<<<<<<<<<<
4235 *         return PyObject_CheckReadBuffer(ob) and 2
4236 *     return 0
4237 */
4238  __pyx_t_1 = (__pyx_f_7buffers_oldstyle_available() != 0);
4239  if (__pyx_t_1) {
4240
4241    /* "buffers.pxd":110
4242 *         return 3
4243 *     if oldstyle_available():
4244 *         return PyObject_CheckReadBuffer(ob) and 2             # <<<<<<<<<<<<<<
4245 *     return 0
4246 *
4247 */
4248    __pyx_t_3 = PyObject_CheckReadBuffer(__pyx_v_ob);
4249    if (__pyx_t_3) {
4250    } else {
4251      __pyx_t_2 = __pyx_t_3;
4252      goto __pyx_L5_bool_binop_done;
4253    }
4254    __pyx_t_2 = 2;
4255    __pyx_L5_bool_binop_done:;
4256    __pyx_r = __pyx_t_2;
4257    goto __pyx_L0;
4258  }
4259
4260  /* "buffers.pxd":111
4261 *     if oldstyle_available():
4262 *         return PyObject_CheckReadBuffer(ob) and 2
4263 *     return 0             # <<<<<<<<<<<<<<
4264 *
4265 *
4266 */
4267  __pyx_r = 0;
4268  goto __pyx_L0;
4269
4270  /* "buffers.pxd":95
4271 *
4272 *
4273 * cdef inline int check_buffer(object ob):             # <<<<<<<<<<<<<<
4274 *     """Version independent check for whether an object is a buffer.
4275 *
4276 */
4277
4278  /* function exit code */
4279  __pyx_L0:;
4280  __Pyx_RefNannyFinishContext();
4281  return __pyx_r;
4282}
4283
4284/* "buffers.pxd":114
4285 *
4286 *
4287 * cdef inline object asbuffer(object ob, int writable, int format,             # <<<<<<<<<<<<<<
4288 *                             void **base, Py_ssize_t *size,
4289 *                             Py_ssize_t *itemsize):
4290 */
4291
4292static CYTHON_INLINE PyObject *__pyx_f_7buffers_asbuffer(PyObject *__pyx_v_ob, int __pyx_v_writable, int __pyx_v_format, void **__pyx_v_base, Py_ssize_t *__pyx_v_size, Py_ssize_t *__pyx_v_itemsize) {
4293  void *__pyx_v_bptr;
4294  Py_ssize_t __pyx_v_blen;
4295  Py_ssize_t __pyx_v_bitemlen;
4296  Py_buffer __pyx_v_view;
4297  int __pyx_v_flags;
4298  int __pyx_v_mode;
4299  PyObject *__pyx_v_bfmt = NULL;
4300  PyObject *__pyx_v_dtype = NULL;
4301  PyObject *__pyx_r = NULL;
4302  __Pyx_RefNannyDeclarations
4303  int __pyx_t_1;
4304  PyObject *__pyx_t_2 = NULL;
4305  PyObject *__pyx_t_3 = NULL;
4306  int __pyx_t_4;
4307  void *__pyx_t_5;
4308  Py_ssize_t __pyx_t_6;
4309  PyObject *__pyx_t_7 = NULL;
4310  PyObject *__pyx_t_8 = NULL;
4311  PyObject *__pyx_t_9 = NULL;
4312  PyObject *__pyx_t_10 = NULL;
4313  PyObject *__pyx_t_11 = NULL;
4314  PyObject *__pyx_t_12 = NULL;
4315  PyObject *__pyx_t_13 = NULL;
4316  PyObject *__pyx_t_14 = NULL;
4317  PyObject *__pyx_t_15 = NULL;
4318  PyObject *__pyx_t_16 = NULL;
4319  int __pyx_t_17;
4320  int __pyx_t_18;
4321  int __pyx_lineno = 0;
4322  const char *__pyx_filename = NULL;
4323  int __pyx_clineno = 0;
4324  __Pyx_RefNannySetupContext("asbuffer", 0);
4325
4326  /* "buffers.pxd":141
4327 *     """
4328 *
4329 *     cdef void *bptr = NULL             # <<<<<<<<<<<<<<
4330 *     cdef Py_ssize_t blen = 0, bitemlen = 0
4331 *     cdef Py_buffer view
4332 */
4333  __pyx_v_bptr = NULL;
4334
4335  /* "buffers.pxd":142
4336 *
4337 *     cdef void *bptr = NULL
4338 *     cdef Py_ssize_t blen = 0, bitemlen = 0             # <<<<<<<<<<<<<<
4339 *     cdef Py_buffer view
4340 *     cdef int flags = PyBUF_SIMPLE
4341 */
4342  __pyx_v_blen = 0;
4343  __pyx_v_bitemlen = 0;
4344
4345  /* "buffers.pxd":144
4346 *     cdef Py_ssize_t blen = 0, bitemlen = 0
4347 *     cdef Py_buffer view
4348 *     cdef int flags = PyBUF_SIMPLE             # <<<<<<<<<<<<<<
4349 *     cdef int mode = 0
4350 *
4351 */
4352  __pyx_v_flags = PyBUF_SIMPLE;
4353
4354  /* "buffers.pxd":145
4355 *     cdef Py_buffer view
4356 *     cdef int flags = PyBUF_SIMPLE
4357 *     cdef int mode = 0             # <<<<<<<<<<<<<<
4358 *
4359 *     bfmt = None
4360 */
4361  __pyx_v_mode = 0;
4362
4363  /* "buffers.pxd":147
4364 *     cdef int mode = 0
4365 *
4366 *     bfmt = None             # <<<<<<<<<<<<<<
4367 *
4368 *     mode = check_buffer(ob)
4369 */
4370  __Pyx_INCREF(Py_None);
4371  __pyx_v_bfmt = Py_None;
4372
4373  /* "buffers.pxd":149
4374 *     bfmt = None
4375 *
4376 *     mode = check_buffer(ob)             # <<<<<<<<<<<<<<
4377 *     if mode == 0:
4378 *         raise TypeError("%r does not provide a buffer interface."%ob)
4379 */
4380  __pyx_v_mode = __pyx_f_7buffers_check_buffer(__pyx_v_ob);
4381
4382  /* "buffers.pxd":150
4383 *
4384 *     mode = check_buffer(ob)
4385 *     if mode == 0:             # <<<<<<<<<<<<<<
4386 *         raise TypeError("%r does not provide a buffer interface."%ob)
4387 *
4388 */
4389  __pyx_t_1 = ((__pyx_v_mode == 0) != 0);
4390  if (__pyx_t_1) {
4391
4392    /* "buffers.pxd":151
4393 *     mode = check_buffer(ob)
4394 *     if mode == 0:
4395 *         raise TypeError("%r does not provide a buffer interface."%ob)             # <<<<<<<<<<<<<<
4396 *
4397 *     if mode == 3:
4398 */
4399    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_r_does_not_provide_a_buffer_int, __pyx_v_ob); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4400    __Pyx_GOTREF(__pyx_t_2);
4401    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4402    __Pyx_GOTREF(__pyx_t_3);
4403    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
4404    __Pyx_GIVEREF(__pyx_t_2);
4405    __pyx_t_2 = 0;
4406    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4407    __Pyx_GOTREF(__pyx_t_2);
4408    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4409    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4410    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4411    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4412  }
4413
4414  /* "buffers.pxd":153
4415 *         raise TypeError("%r does not provide a buffer interface."%ob)
4416 *
4417 *     if mode == 3:             # <<<<<<<<<<<<<<
4418 *         flags = PyBUF_ANY_CONTIGUOUS
4419 *         if writable:
4420 */
4421  __pyx_t_1 = ((__pyx_v_mode == 3) != 0);
4422  if (__pyx_t_1) {
4423
4424    /* "buffers.pxd":154
4425 *
4426 *     if mode == 3:
4427 *         flags = PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
4428 *         if writable:
4429 *             flags |= PyBUF_WRITABLE
4430 */
4431    __pyx_v_flags = PyBUF_ANY_CONTIGUOUS;
4432
4433    /* "buffers.pxd":155
4434 *     if mode == 3:
4435 *         flags = PyBUF_ANY_CONTIGUOUS
4436 *         if writable:             # <<<<<<<<<<<<<<
4437 *             flags |= PyBUF_WRITABLE
4438 *         if format:
4439 */
4440    __pyx_t_1 = (__pyx_v_writable != 0);
4441    if (__pyx_t_1) {
4442
4443      /* "buffers.pxd":156
4444 *         flags = PyBUF_ANY_CONTIGUOUS
4445 *         if writable:
4446 *             flags |= PyBUF_WRITABLE             # <<<<<<<<<<<<<<
4447 *         if format:
4448 *             flags |= PyBUF_FORMAT
4449 */
4450      __pyx_v_flags = (__pyx_v_flags | PyBUF_WRITABLE);
4451      goto __pyx_L5;
4452    }
4453    __pyx_L5:;
4454
4455    /* "buffers.pxd":157
4456 *         if writable:
4457 *             flags |= PyBUF_WRITABLE
4458 *         if format:             # <<<<<<<<<<<<<<
4459 *             flags |= PyBUF_FORMAT
4460 *         PyObject_GetBuffer(ob, &view, flags)
4461 */
4462    __pyx_t_1 = (__pyx_v_format != 0);
4463    if (__pyx_t_1) {
4464
4465      /* "buffers.pxd":158
4466 *             flags |= PyBUF_WRITABLE
4467 *         if format:
4468 *             flags |= PyBUF_FORMAT             # <<<<<<<<<<<<<<
4469 *         PyObject_GetBuffer(ob, &view, flags)
4470 *         bptr = view.buf
4471 */
4472      __pyx_v_flags = (__pyx_v_flags | PyBUF_FORMAT);
4473      goto __pyx_L6;
4474    }
4475    __pyx_L6:;
4476
4477    /* "buffers.pxd":159
4478 *         if format:
4479 *             flags |= PyBUF_FORMAT
4480 *         PyObject_GetBuffer(ob, &view, flags)             # <<<<<<<<<<<<<<
4481 *         bptr = view.buf
4482 *         blen = view.len
4483 */
4484    __pyx_t_4 = PyObject_GetBuffer(__pyx_v_ob, (&__pyx_v_view), __pyx_v_flags); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4485
4486    /* "buffers.pxd":160
4487 *             flags |= PyBUF_FORMAT
4488 *         PyObject_GetBuffer(ob, &view, flags)
4489 *         bptr = view.buf             # <<<<<<<<<<<<<<
4490 *         blen = view.len
4491 *         if format:
4492 */
4493    __pyx_t_5 = __pyx_v_view.buf;
4494    __pyx_v_bptr = __pyx_t_5;
4495
4496    /* "buffers.pxd":161
4497 *         PyObject_GetBuffer(ob, &view, flags)
4498 *         bptr = view.buf
4499 *         blen = view.len             # <<<<<<<<<<<<<<
4500 *         if format:
4501 *             if view.format != NULL:
4502 */
4503    __pyx_t_6 = __pyx_v_view.len;
4504    __pyx_v_blen = __pyx_t_6;
4505
4506    /* "buffers.pxd":162
4507 *         bptr = view.buf
4508 *         blen = view.len
4509 *         if format:             # <<<<<<<<<<<<<<
4510 *             if view.format != NULL:
4511 *                 bfmt = view.format
4512 */
4513    __pyx_t_1 = (__pyx_v_format != 0);
4514    if (__pyx_t_1) {
4515
4516      /* "buffers.pxd":163
4517 *         blen = view.len
4518 *         if format:
4519 *             if view.format != NULL:             # <<<<<<<<<<<<<<
4520 *                 bfmt = view.format
4521 *                 bitemlen = view.itemsize
4522 */
4523      __pyx_t_1 = ((__pyx_v_view.format != NULL) != 0);
4524      if (__pyx_t_1) {
4525
4526        /* "buffers.pxd":164
4527 *         if format:
4528 *             if view.format != NULL:
4529 *                 bfmt = view.format             # <<<<<<<<<<<<<<
4530 *                 bitemlen = view.itemsize
4531 *         PyBuffer_Release(&view)
4532 */
4533        __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_view.format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4534        __Pyx_GOTREF(__pyx_t_2);
4535        __Pyx_DECREF_SET(__pyx_v_bfmt, __pyx_t_2);
4536        __pyx_t_2 = 0;
4537
4538        /* "buffers.pxd":165
4539 *             if view.format != NULL:
4540 *                 bfmt = view.format
4541 *                 bitemlen = view.itemsize             # <<<<<<<<<<<<<<
4542 *         PyBuffer_Release(&view)
4543 *     else: # oldstyle
4544 */
4545        __pyx_t_6 = __pyx_v_view.itemsize;
4546        __pyx_v_bitemlen = __pyx_t_6;
4547        goto __pyx_L8;
4548      }
4549      __pyx_L8:;
4550      goto __pyx_L7;
4551    }
4552    __pyx_L7:;
4553
4554    /* "buffers.pxd":166
4555 *                 bfmt = view.format
4556 *                 bitemlen = view.itemsize
4557 *         PyBuffer_Release(&view)             # <<<<<<<<<<<<<<
4558 *     else: # oldstyle
4559 *         if writable:
4560 */
4561    PyBuffer_Release((&__pyx_v_view));
4562    goto __pyx_L4;
4563  }
4564  /*else*/ {
4565
4566    /* "buffers.pxd":168
4567 *         PyBuffer_Release(&view)
4568 *     else: # oldstyle
4569 *         if writable:             # <<<<<<<<<<<<<<
4570 *             PyObject_AsWriteBuffer(ob, &bptr, &blen)
4571 *         else:
4572 */
4573    __pyx_t_1 = (__pyx_v_writable != 0);
4574    if (__pyx_t_1) {
4575
4576      /* "buffers.pxd":169
4577 *     else: # oldstyle
4578 *         if writable:
4579 *             PyObject_AsWriteBuffer(ob, &bptr, &blen)             # <<<<<<<<<<<<<<
4580 *         else:
4581 *             PyObject_AsReadBuffer(ob, <const_void **>&bptr, &blen)
4582 */
4583      __pyx_t_4 = PyObject_AsWriteBuffer(__pyx_v_ob, (&__pyx_v_bptr), (&__pyx_v_blen)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4584      goto __pyx_L9;
4585    }
4586    /*else*/ {
4587
4588      /* "buffers.pxd":171
4589 *             PyObject_AsWriteBuffer(ob, &bptr, &blen)
4590 *         else:
4591 *             PyObject_AsReadBuffer(ob, <const_void **>&bptr, &blen)             # <<<<<<<<<<<<<<
4592 *         if format:
4593 *             try: # numpy.ndarray
4594 */
4595      __pyx_t_4 = PyObject_AsReadBuffer(__pyx_v_ob, ((const void **)(&__pyx_v_bptr)), (&__pyx_v_blen)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4596    }
4597    __pyx_L9:;
4598
4599    /* "buffers.pxd":172
4600 *         else:
4601 *             PyObject_AsReadBuffer(ob, <const_void **>&bptr, &blen)
4602 *         if format:             # <<<<<<<<<<<<<<
4603 *             try: # numpy.ndarray
4604 *                 dtype = ob.dtype
4605 */
4606    __pyx_t_1 = (__pyx_v_format != 0);
4607    if (__pyx_t_1) {
4608
4609      /* "buffers.pxd":173
4610 *             PyObject_AsReadBuffer(ob, <const_void **>&bptr, &blen)
4611 *         if format:
4612 *             try: # numpy.ndarray             # <<<<<<<<<<<<<<
4613 *                 dtype = ob.dtype
4614 *                 bfmt = dtype.char
4615 */
4616      {
4617        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
4618        __Pyx_XGOTREF(__pyx_t_7);
4619        __Pyx_XGOTREF(__pyx_t_8);
4620        __Pyx_XGOTREF(__pyx_t_9);
4621        /*try:*/ {
4622
4623          /* "buffers.pxd":174
4624 *         if format:
4625 *             try: # numpy.ndarray
4626 *                 dtype = ob.dtype             # <<<<<<<<<<<<<<
4627 *                 bfmt = dtype.char
4628 *                 bitemlen = dtype.itemsize
4629 */
4630          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ob, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
4631          __Pyx_GOTREF(__pyx_t_2);
4632          __pyx_v_dtype = __pyx_t_2;
4633          __pyx_t_2 = 0;
4634
4635          /* "buffers.pxd":175
4636 *             try: # numpy.ndarray
4637 *                 dtype = ob.dtype
4638 *                 bfmt = dtype.char             # <<<<<<<<<<<<<<
4639 *                 bitemlen = dtype.itemsize
4640 *             except AttributeError:
4641 */
4642          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_char); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
4643          __Pyx_GOTREF(__pyx_t_2);
4644          __Pyx_DECREF_SET(__pyx_v_bfmt, __pyx_t_2);
4645          __pyx_t_2 = 0;
4646
4647          /* "buffers.pxd":176
4648 *                 dtype = ob.dtype
4649 *                 bfmt = dtype.char
4650 *                 bitemlen = dtype.itemsize             # <<<<<<<<<<<<<<
4651 *             except AttributeError:
4652 *                 try: # array.array
4653 */
4654          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
4655          __Pyx_GOTREF(__pyx_t_2);
4656          __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
4657          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4658          __pyx_v_bitemlen = __pyx_t_6;
4659        }
4660        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4661        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
4662        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
4663        goto __pyx_L18_try_end;
4664        __pyx_L11_error:;
4665        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4666        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4667
4668        /* "buffers.pxd":177
4669 *                 bfmt = dtype.char
4670 *                 bitemlen = dtype.itemsize
4671 *             except AttributeError:             # <<<<<<<<<<<<<<
4672 *                 try: # array.array
4673 *                     bfmt = ob.typecode
4674 */
4675        __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
4676        if (__pyx_t_4) {
4677          __Pyx_AddTraceback("buffers.asbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
4678          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
4679          __Pyx_GOTREF(__pyx_t_2);
4680          __Pyx_GOTREF(__pyx_t_3);
4681          __Pyx_GOTREF(__pyx_t_10);
4682
4683          /* "buffers.pxd":178
4684 *                 bitemlen = dtype.itemsize
4685 *             except AttributeError:
4686 *                 try: # array.array             # <<<<<<<<<<<<<<
4687 *                     bfmt = ob.typecode
4688 *                     bitemlen = ob.itemsize
4689 */
4690          {
4691            __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
4692            __Pyx_XGOTREF(__pyx_t_11);
4693            __Pyx_XGOTREF(__pyx_t_12);
4694            __Pyx_XGOTREF(__pyx_t_13);
4695            /*try:*/ {
4696
4697              /* "buffers.pxd":179
4698 *             except AttributeError:
4699 *                 try: # array.array
4700 *                     bfmt = ob.typecode             # <<<<<<<<<<<<<<
4701 *                     bitemlen = ob.itemsize
4702 *                 except AttributeError:
4703 */
4704              __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_ob, __pyx_n_s_typecode); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
4705              __Pyx_GOTREF(__pyx_t_14);
4706              __Pyx_DECREF_SET(__pyx_v_bfmt, __pyx_t_14);
4707              __pyx_t_14 = 0;
4708
4709              /* "buffers.pxd":180
4710 *                 try: # array.array
4711 *                     bfmt = ob.typecode
4712 *                     bitemlen = ob.itemsize             # <<<<<<<<<<<<<<
4713 *                 except AttributeError:
4714 *                     if isinstance(ob, bytes):
4715 */
4716              __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_ob, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
4717              __Pyx_GOTREF(__pyx_t_14);
4718              __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_14); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
4719              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4720              __pyx_v_bitemlen = __pyx_t_6;
4721            }
4722            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
4723            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
4724            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
4725            goto __pyx_L28_try_end;
4726            __pyx_L21_error:;
4727            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
4728
4729            /* "buffers.pxd":181
4730 *                     bfmt = ob.typecode
4731 *                     bitemlen = ob.itemsize
4732 *                 except AttributeError:             # <<<<<<<<<<<<<<
4733 *                     if isinstance(ob, bytes):
4734 *                         bfmt = b"B"
4735 */
4736            __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
4737            if (__pyx_t_4) {
4738              __Pyx_AddTraceback("buffers.asbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
4739              if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L23_except_error;}
4740              __Pyx_GOTREF(__pyx_t_14);
4741              __Pyx_GOTREF(__pyx_t_15);
4742              __Pyx_GOTREF(__pyx_t_16);
4743
4744              /* "buffers.pxd":182
4745 *                     bitemlen = ob.itemsize
4746 *                 except AttributeError:
4747 *                     if isinstance(ob, bytes):             # <<<<<<<<<<<<<<
4748 *                         bfmt = b"B"
4749 *                         bitemlen = 1
4750 */
4751              __pyx_t_1 = PyBytes_Check(__pyx_v_ob);
4752              __pyx_t_17 = (__pyx_t_1 != 0);
4753              if (__pyx_t_17) {
4754
4755                /* "buffers.pxd":183
4756 *                 except AttributeError:
4757 *                     if isinstance(ob, bytes):
4758 *                         bfmt = b"B"             # <<<<<<<<<<<<<<
4759 *                         bitemlen = 1
4760 *                     else:
4761 */
4762                __Pyx_INCREF(__pyx_n_b_B);
4763                __Pyx_DECREF_SET(__pyx_v_bfmt, __pyx_n_b_B);
4764
4765                /* "buffers.pxd":184
4766 *                     if isinstance(ob, bytes):
4767 *                         bfmt = b"B"
4768 *                         bitemlen = 1             # <<<<<<<<<<<<<<
4769 *                     else:
4770 *                         # nothing found
4771 */
4772                __pyx_v_bitemlen = 1;
4773                goto __pyx_L31;
4774              }
4775              /*else*/ {
4776
4777                /* "buffers.pxd":187
4778 *                     else:
4779 *                         # nothing found
4780 *                         bfmt = None             # <<<<<<<<<<<<<<
4781 *                         bitemlen = 0
4782 *     if base: base[0] = <void *>bptr
4783 */
4784                __Pyx_INCREF(Py_None);
4785                __Pyx_DECREF_SET(__pyx_v_bfmt, Py_None);
4786
4787                /* "buffers.pxd":188
4788 *                         # nothing found
4789 *                         bfmt = None
4790 *                         bitemlen = 0             # <<<<<<<<<<<<<<
4791 *     if base: base[0] = <void *>bptr
4792 *     if size: size[0] = <Py_ssize_t>blen
4793 */
4794                __pyx_v_bitemlen = 0;
4795              }
4796              __pyx_L31:;
4797              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
4798              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
4799              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
4800              goto __pyx_L22_exception_handled;
4801            }
4802            goto __pyx_L23_except_error;
4803            __pyx_L23_except_error:;
4804            __Pyx_XGIVEREF(__pyx_t_11);
4805            __Pyx_XGIVEREF(__pyx_t_12);
4806            __Pyx_XGIVEREF(__pyx_t_13);
4807            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
4808            goto __pyx_L13_except_error;
4809            __pyx_L22_exception_handled:;
4810            __Pyx_XGIVEREF(__pyx_t_11);
4811            __Pyx_XGIVEREF(__pyx_t_12);
4812            __Pyx_XGIVEREF(__pyx_t_13);
4813            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
4814            __pyx_L28_try_end:;
4815          }
4816          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4817          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4818          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4819          goto __pyx_L12_exception_handled;
4820        }
4821        goto __pyx_L13_except_error;
4822        __pyx_L13_except_error:;
4823        __Pyx_XGIVEREF(__pyx_t_7);
4824        __Pyx_XGIVEREF(__pyx_t_8);
4825        __Pyx_XGIVEREF(__pyx_t_9);
4826        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
4827        goto __pyx_L1_error;
4828        __pyx_L12_exception_handled:;
4829        __Pyx_XGIVEREF(__pyx_t_7);
4830        __Pyx_XGIVEREF(__pyx_t_8);
4831        __Pyx_XGIVEREF(__pyx_t_9);
4832        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
4833        __pyx_L18_try_end:;
4834      }
4835      goto __pyx_L10;
4836    }
4837    __pyx_L10:;
4838  }
4839  __pyx_L4:;
4840
4841  /* "buffers.pxd":189
4842 *                         bfmt = None
4843 *                         bitemlen = 0
4844 *     if base: base[0] = <void *>bptr             # <<<<<<<<<<<<<<
4845 *     if size: size[0] = <Py_ssize_t>blen
4846 *     if itemsize: itemsize[0] = <Py_ssize_t>bitemlen
4847 */
4848  __pyx_t_17 = (__pyx_v_base != 0);
4849  if (__pyx_t_17) {
4850    (__pyx_v_base[0]) = ((void *)__pyx_v_bptr);
4851    goto __pyx_L32;
4852  }
4853  __pyx_L32:;
4854
4855  /* "buffers.pxd":190
4856 *                         bitemlen = 0
4857 *     if base: base[0] = <void *>bptr
4858 *     if size: size[0] = <Py_ssize_t>blen             # <<<<<<<<<<<<<<
4859 *     if itemsize: itemsize[0] = <Py_ssize_t>bitemlen
4860 *
4861 */
4862  __pyx_t_17 = (__pyx_v_size != 0);
4863  if (__pyx_t_17) {
4864    (__pyx_v_size[0]) = ((Py_ssize_t)__pyx_v_blen);
4865    goto __pyx_L33;
4866  }
4867  __pyx_L33:;
4868
4869  /* "buffers.pxd":191
4870 *     if base: base[0] = <void *>bptr
4871 *     if size: size[0] = <Py_ssize_t>blen
4872 *     if itemsize: itemsize[0] = <Py_ssize_t>bitemlen             # <<<<<<<<<<<<<<
4873 *
4874 *     if PY_MAJOR_VERSION >= 3 and bfmt is not None:
4875 */
4876  __pyx_t_17 = (__pyx_v_itemsize != 0);
4877  if (__pyx_t_17) {
4878    (__pyx_v_itemsize[0]) = ((Py_ssize_t)__pyx_v_bitemlen);
4879    goto __pyx_L34;
4880  }
4881  __pyx_L34:;
4882
4883  /* "buffers.pxd":193
4884 *     if itemsize: itemsize[0] = <Py_ssize_t>bitemlen
4885 *
4886 *     if PY_MAJOR_VERSION >= 3 and bfmt is not None:             # <<<<<<<<<<<<<<
4887 *         return bfmt.decode('ascii')
4888 *     return bfmt
4889 */
4890  __pyx_t_1 = ((PY_MAJOR_VERSION >= 3) != 0);
4891  if (__pyx_t_1) {
4892  } else {
4893    __pyx_t_17 = __pyx_t_1;
4894    goto __pyx_L36_bool_binop_done;
4895  }
4896  __pyx_t_1 = (__pyx_v_bfmt != Py_None);
4897  __pyx_t_18 = (__pyx_t_1 != 0);
4898  __pyx_t_17 = __pyx_t_18;
4899  __pyx_L36_bool_binop_done:;
4900  if (__pyx_t_17) {
4901
4902    /* "buffers.pxd":194
4903 *
4904 *     if PY_MAJOR_VERSION >= 3 and bfmt is not None:
4905 *         return bfmt.decode('ascii')             # <<<<<<<<<<<<<<
4906 *     return bfmt
4907 *
4908 */
4909    __Pyx_XDECREF(__pyx_r);
4910    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_bfmt, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4911    __Pyx_GOTREF(__pyx_t_10);
4912    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4913    __Pyx_GOTREF(__pyx_t_3);
4914    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
4915    __pyx_r = __pyx_t_3;
4916    __pyx_t_3 = 0;
4917    goto __pyx_L0;
4918  }
4919
4920  /* "buffers.pxd":195
4921 *     if PY_MAJOR_VERSION >= 3 and bfmt is not None:
4922 *         return bfmt.decode('ascii')
4923 *     return bfmt             # <<<<<<<<<<<<<<
4924 *
4925 *
4926 */
4927  __Pyx_XDECREF(__pyx_r);
4928  __Pyx_INCREF(__pyx_v_bfmt);
4929  __pyx_r = __pyx_v_bfmt;
4930  goto __pyx_L0;
4931
4932  /* "buffers.pxd":114
4933 *
4934 *
4935 * cdef inline object asbuffer(object ob, int writable, int format,             # <<<<<<<<<<<<<<
4936 *                             void **base, Py_ssize_t *size,
4937 *                             Py_ssize_t *itemsize):
4938 */
4939
4940  /* function exit code */
4941  __pyx_L1_error:;
4942  __Pyx_XDECREF(__pyx_t_2);
4943  __Pyx_XDECREF(__pyx_t_3);
4944  __Pyx_XDECREF(__pyx_t_10);
4945  __Pyx_XDECREF(__pyx_t_14);
4946  __Pyx_XDECREF(__pyx_t_15);
4947  __Pyx_XDECREF(__pyx_t_16);
4948  __Pyx_AddTraceback("buffers.asbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
4949  __pyx_r = 0;
4950  __pyx_L0:;
4951  __Pyx_XDECREF(__pyx_v_bfmt);
4952  __Pyx_XDECREF(__pyx_v_dtype);
4953  __Pyx_XGIVEREF(__pyx_r);
4954  __Pyx_RefNannyFinishContext();
4955  return __pyx_r;
4956}
4957
4958/* "buffers.pxd":198
4959 *
4960 *
4961 * cdef inline object asbuffer_r(object ob, void **base, Py_ssize_t *size):             # <<<<<<<<<<<<<<
4962 *     """Wrapper for standard calls to asbuffer with a readonly buffer."""
4963 *     asbuffer(ob, 0, 0, base, size, NULL)
4964 */
4965
4966static CYTHON_INLINE PyObject *__pyx_f_7buffers_asbuffer_r(PyObject *__pyx_v_ob, void **__pyx_v_base, Py_ssize_t *__pyx_v_size) {
4967  PyObject *__pyx_r = NULL;
4968  __Pyx_RefNannyDeclarations
4969  PyObject *__pyx_t_1 = NULL;
4970  int __pyx_lineno = 0;
4971  const char *__pyx_filename = NULL;
4972  int __pyx_clineno = 0;
4973  __Pyx_RefNannySetupContext("asbuffer_r", 0);
4974
4975  /* "buffers.pxd":200
4976 * cdef inline object asbuffer_r(object ob, void **base, Py_ssize_t *size):
4977 *     """Wrapper for standard calls to asbuffer with a readonly buffer."""
4978 *     asbuffer(ob, 0, 0, base, size, NULL)             # <<<<<<<<<<<<<<
4979 *     return ob
4980 *
4981 */
4982  __pyx_t_1 = __pyx_f_7buffers_asbuffer(__pyx_v_ob, 0, 0, __pyx_v_base, __pyx_v_size, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4983  __Pyx_GOTREF(__pyx_t_1);
4984  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4985
4986  /* "buffers.pxd":201
4987 *     """Wrapper for standard calls to asbuffer with a readonly buffer."""
4988 *     asbuffer(ob, 0, 0, base, size, NULL)
4989 *     return ob             # <<<<<<<<<<<<<<
4990 *
4991 *
4992 */
4993  __Pyx_XDECREF(__pyx_r);
4994  __Pyx_INCREF(__pyx_v_ob);
4995  __pyx_r = __pyx_v_ob;
4996  goto __pyx_L0;
4997
4998  /* "buffers.pxd":198
4999 *
5000 *
5001 * cdef inline object asbuffer_r(object ob, void **base, Py_ssize_t *size):             # <<<<<<<<<<<<<<
5002 *     """Wrapper for standard calls to asbuffer with a readonly buffer."""
5003 *     asbuffer(ob, 0, 0, base, size, NULL)
5004 */
5005
5006  /* function exit code */
5007  __pyx_L1_error:;
5008  __Pyx_XDECREF(__pyx_t_1);
5009  __Pyx_AddTraceback("buffers.asbuffer_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
5010  __pyx_r = 0;
5011  __pyx_L0:;
5012  __Pyx_XGIVEREF(__pyx_r);
5013  __Pyx_RefNannyFinishContext();
5014  return __pyx_r;
5015}
5016
5017/* "buffers.pxd":204
5018 *
5019 *
5020 * cdef inline object asbuffer_w(object ob, void **base, Py_ssize_t *size):             # <<<<<<<<<<<<<<
5021 *     """Wrapper for standard calls to asbuffer with a writable buffer."""
5022 *     asbuffer(ob, 1, 0, base, size, NULL)
5023 */
5024
5025static CYTHON_INLINE PyObject *__pyx_f_7buffers_asbuffer_w(PyObject *__pyx_v_ob, void **__pyx_v_base, Py_ssize_t *__pyx_v_size) {
5026  PyObject *__pyx_r = NULL;
5027  __Pyx_RefNannyDeclarations
5028  PyObject *__pyx_t_1 = NULL;
5029  int __pyx_lineno = 0;
5030  const char *__pyx_filename = NULL;
5031  int __pyx_clineno = 0;
5032  __Pyx_RefNannySetupContext("asbuffer_w", 0);
5033
5034  /* "buffers.pxd":206
5035 * cdef inline object asbuffer_w(object ob, void **base, Py_ssize_t *size):
5036 *     """Wrapper for standard calls to asbuffer with a writable buffer."""
5037 *     asbuffer(ob, 1, 0, base, size, NULL)             # <<<<<<<<<<<<<<
5038 *     return ob
5039 *
5040 */
5041  __pyx_t_1 = __pyx_f_7buffers_asbuffer(__pyx_v_ob, 1, 0, __pyx_v_base, __pyx_v_size, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5042  __Pyx_GOTREF(__pyx_t_1);
5043  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5044
5045  /* "buffers.pxd":207
5046 *     """Wrapper for standard calls to asbuffer with a writable buffer."""
5047 *     asbuffer(ob, 1, 0, base, size, NULL)
5048 *     return ob             # <<<<<<<<<<<<<<
5049 *
5050 * #------------------------------------------------------------------------------
5051 */
5052  __Pyx_XDECREF(__pyx_r);
5053  __Pyx_INCREF(__pyx_v_ob);
5054  __pyx_r = __pyx_v_ob;
5055  goto __pyx_L0;
5056
5057  /* "buffers.pxd":204
5058 *
5059 *
5060 * cdef inline object asbuffer_w(object ob, void **base, Py_ssize_t *size):             # <<<<<<<<<<<<<<
5061 *     """Wrapper for standard calls to asbuffer with a writable buffer."""
5062 *     asbuffer(ob, 1, 0, base, size, NULL)
5063 */
5064
5065  /* function exit code */
5066  __pyx_L1_error:;
5067  __Pyx_XDECREF(__pyx_t_1);
5068  __Pyx_AddTraceback("buffers.asbuffer_w", __pyx_clineno, __pyx_lineno, __pyx_filename);
5069  __pyx_r = 0;
5070  __pyx_L0:;
5071  __Pyx_XGIVEREF(__pyx_r);
5072  __Pyx_RefNannyFinishContext();
5073  return __pyx_r;
5074}
5075
5076/* "buffers.pxd":214
5077 *
5078 *
5079 * cdef inline object frombuffer_3(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5080 *     """Python 3 version of frombuffer.
5081 *
5082 */
5083
5084static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_3(void *__pyx_v_ptr, Py_ssize_t __pyx_v_s, int __pyx_v_readonly) {
5085  Py_buffer __pyx_v_pybuf;
5086  Py_ssize_t *__pyx_v_shape;
5087  PyObject *__pyx_v_astr = 0;
5088  PyObject *__pyx_r = NULL;
5089  __Pyx_RefNannyDeclarations
5090  Py_ssize_t __pyx_t_1[1];
5091  int __pyx_t_2;
5092  PyObject *__pyx_t_3 = NULL;
5093  int __pyx_lineno = 0;
5094  const char *__pyx_filename = NULL;
5095  int __pyx_clineno = 0;
5096  __Pyx_RefNannySetupContext("frombuffer_3", 0);
5097
5098  /* "buffers.pxd":221
5099 *     """
5100 *     cdef Py_buffer pybuf
5101 *     cdef Py_ssize_t *shape = [s]             # <<<<<<<<<<<<<<
5102 *     cdef str astr=""
5103 *     PyBuffer_FillInfo(&pybuf, astr, ptr, s, readonly, PyBUF_SIMPLE)
5104 */
5105  __pyx_t_1[0] = __pyx_v_s;
5106  __pyx_v_shape = __pyx_t_1;
5107
5108  /* "buffers.pxd":222
5109 *     cdef Py_buffer pybuf
5110 *     cdef Py_ssize_t *shape = [s]
5111 *     cdef str astr=""             # <<<<<<<<<<<<<<
5112 *     PyBuffer_FillInfo(&pybuf, astr, ptr, s, readonly, PyBUF_SIMPLE)
5113 *     pybuf.format = "B"
5114 */
5115  __Pyx_INCREF(__pyx_kp_s__7);
5116  __pyx_v_astr = __pyx_kp_s__7;
5117
5118  /* "buffers.pxd":223
5119 *     cdef Py_ssize_t *shape = [s]
5120 *     cdef str astr=""
5121 *     PyBuffer_FillInfo(&pybuf, astr, ptr, s, readonly, PyBUF_SIMPLE)             # <<<<<<<<<<<<<<
5122 *     pybuf.format = "B"
5123 *     pybuf.shape = shape
5124 */
5125  __pyx_t_2 = PyBuffer_FillInfo((&__pyx_v_pybuf), __pyx_v_astr, __pyx_v_ptr, __pyx_v_s, __pyx_v_readonly, PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5126
5127  /* "buffers.pxd":224
5128 *     cdef str astr=""
5129 *     PyBuffer_FillInfo(&pybuf, astr, ptr, s, readonly, PyBUF_SIMPLE)
5130 *     pybuf.format = "B"             # <<<<<<<<<<<<<<
5131 *     pybuf.shape = shape
5132 *     return PyMemoryView_FromBuffer(&pybuf)
5133 */
5134  __pyx_v_pybuf.format = __pyx_k_B;
5135
5136  /* "buffers.pxd":225
5137 *     PyBuffer_FillInfo(&pybuf, astr, ptr, s, readonly, PyBUF_SIMPLE)
5138 *     pybuf.format = "B"
5139 *     pybuf.shape = shape             # <<<<<<<<<<<<<<
5140 *     return PyMemoryView_FromBuffer(&pybuf)
5141 *
5142 */
5143  __pyx_v_pybuf.shape = __pyx_v_shape;
5144
5145  /* "buffers.pxd":226
5146 *     pybuf.format = "B"
5147 *     pybuf.shape = shape
5148 *     return PyMemoryView_FromBuffer(&pybuf)             # <<<<<<<<<<<<<<
5149 *
5150 *
5151 */
5152  __Pyx_XDECREF(__pyx_r);
5153  __pyx_t_3 = PyMemoryView_FromBuffer((&__pyx_v_pybuf)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5154  __Pyx_GOTREF(__pyx_t_3);
5155  __pyx_r = __pyx_t_3;
5156  __pyx_t_3 = 0;
5157  goto __pyx_L0;
5158
5159  /* "buffers.pxd":214
5160 *
5161 *
5162 * cdef inline object frombuffer_3(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5163 *     """Python 3 version of frombuffer.
5164 *
5165 */
5166
5167  /* function exit code */
5168  __pyx_L1_error:;
5169  __Pyx_XDECREF(__pyx_t_3);
5170  __Pyx_AddTraceback("buffers.frombuffer_3", __pyx_clineno, __pyx_lineno, __pyx_filename);
5171  __pyx_r = 0;
5172  __pyx_L0:;
5173  __Pyx_XDECREF(__pyx_v_astr);
5174  __Pyx_XGIVEREF(__pyx_r);
5175  __Pyx_RefNannyFinishContext();
5176  return __pyx_r;
5177}
5178
5179/* "buffers.pxd":229
5180 *
5181 *
5182 * cdef inline object frombuffer_2(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5183 *     """Python 2 version of frombuffer.
5184 *
5185 */
5186
5187static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_2(void *__pyx_v_ptr, Py_ssize_t __pyx_v_s, int __pyx_v_readonly) {
5188  PyObject *__pyx_r = NULL;
5189  __Pyx_RefNannyDeclarations
5190  int __pyx_t_1;
5191  PyObject *__pyx_t_2 = NULL;
5192  int __pyx_lineno = 0;
5193  const char *__pyx_filename = NULL;
5194  int __pyx_clineno = 0;
5195  __Pyx_RefNannySetupContext("frombuffer_2", 0);
5196
5197  /* "buffers.pxd":235
5198 *     """
5199 *
5200 *     if oldstyle_available():             # <<<<<<<<<<<<<<
5201 *         if readonly:
5202 *             return PyBuffer_FromMemory(ptr, s)
5203 */
5204  __pyx_t_1 = (__pyx_f_7buffers_oldstyle_available() != 0);
5205  if (__pyx_t_1) {
5206
5207    /* "buffers.pxd":236
5208 *
5209 *     if oldstyle_available():
5210 *         if readonly:             # <<<<<<<<<<<<<<
5211 *             return PyBuffer_FromMemory(ptr, s)
5212 *         else:
5213 */
5214    __pyx_t_1 = (__pyx_v_readonly != 0);
5215    if (__pyx_t_1) {
5216
5217      /* "buffers.pxd":237
5218 *     if oldstyle_available():
5219 *         if readonly:
5220 *             return PyBuffer_FromMemory(ptr, s)             # <<<<<<<<<<<<<<
5221 *         else:
5222 *             return PyBuffer_FromReadWriteMemory(ptr, s)
5223 */
5224      __Pyx_XDECREF(__pyx_r);
5225      __pyx_t_2 = PyBuffer_FromMemory(__pyx_v_ptr, __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5226      __Pyx_GOTREF(__pyx_t_2);
5227      __pyx_r = __pyx_t_2;
5228      __pyx_t_2 = 0;
5229      goto __pyx_L0;
5230    }
5231    /*else*/ {
5232
5233      /* "buffers.pxd":239
5234 *             return PyBuffer_FromMemory(ptr, s)
5235 *         else:
5236 *             return PyBuffer_FromReadWriteMemory(ptr, s)             # <<<<<<<<<<<<<<
5237 *     else:
5238 *         raise NotImplementedError("Old style buffers not available.")
5239 */
5240      __Pyx_XDECREF(__pyx_r);
5241      __pyx_t_2 = PyBuffer_FromReadWriteMemory(__pyx_v_ptr, __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5242      __Pyx_GOTREF(__pyx_t_2);
5243      __pyx_r = __pyx_t_2;
5244      __pyx_t_2 = 0;
5245      goto __pyx_L0;
5246    }
5247  }
5248  /*else*/ {
5249
5250    /* "buffers.pxd":241
5251 *             return PyBuffer_FromReadWriteMemory(ptr, s)
5252 *     else:
5253 *         raise NotImplementedError("Old style buffers not available.")             # <<<<<<<<<<<<<<
5254 *
5255 *
5256 */
5257    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5258    __Pyx_GOTREF(__pyx_t_2);
5259    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
5260    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5261    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5262  }
5263
5264  /* "buffers.pxd":229
5265 *
5266 *
5267 * cdef inline object frombuffer_2(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5268 *     """Python 2 version of frombuffer.
5269 *
5270 */
5271
5272  /* function exit code */
5273  __pyx_L1_error:;
5274  __Pyx_XDECREF(__pyx_t_2);
5275  __Pyx_AddTraceback("buffers.frombuffer_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
5276  __pyx_r = 0;
5277  __pyx_L0:;
5278  __Pyx_XGIVEREF(__pyx_r);
5279  __Pyx_RefNannyFinishContext();
5280  return __pyx_r;
5281}
5282
5283/* "buffers.pxd":244
5284 *
5285 *
5286 * cdef inline object frombuffer(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5287 *     """Create a Python Buffer/View of a C array.
5288 *
5289 */
5290
5291static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer(void *__pyx_v_ptr, Py_ssize_t __pyx_v_s, int __pyx_v_readonly) {
5292  PyObject *__pyx_r = NULL;
5293  __Pyx_RefNannyDeclarations
5294  int __pyx_t_1;
5295  PyObject *__pyx_t_2 = NULL;
5296  int __pyx_lineno = 0;
5297  const char *__pyx_filename = NULL;
5298  int __pyx_clineno = 0;
5299  __Pyx_RefNannySetupContext("frombuffer", 0);
5300
5301  /* "buffers.pxd":261
5302 *     """
5303 *     # oldstyle first priority for now
5304 *     if oldstyle_available():             # <<<<<<<<<<<<<<
5305 *         return frombuffer_2(ptr, s, readonly)
5306 *     else:
5307 */
5308  __pyx_t_1 = (__pyx_f_7buffers_oldstyle_available() != 0);
5309  if (__pyx_t_1) {
5310
5311    /* "buffers.pxd":262
5312 *     # oldstyle first priority for now
5313 *     if oldstyle_available():
5314 *         return frombuffer_2(ptr, s, readonly)             # <<<<<<<<<<<<<<
5315 *     else:
5316 *         return frombuffer_3(ptr, s, readonly)
5317 */
5318    __Pyx_XDECREF(__pyx_r);
5319    __pyx_t_2 = __pyx_f_7buffers_frombuffer_2(__pyx_v_ptr, __pyx_v_s, __pyx_v_readonly); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5320    __Pyx_GOTREF(__pyx_t_2);
5321    __pyx_r = __pyx_t_2;
5322    __pyx_t_2 = 0;
5323    goto __pyx_L0;
5324  }
5325  /*else*/ {
5326
5327    /* "buffers.pxd":264
5328 *         return frombuffer_2(ptr, s, readonly)
5329 *     else:
5330 *         return frombuffer_3(ptr, s, readonly)             # <<<<<<<<<<<<<<
5331 *
5332 *
5333 */
5334    __Pyx_XDECREF(__pyx_r);
5335    __pyx_t_2 = __pyx_f_7buffers_frombuffer_3(__pyx_v_ptr, __pyx_v_s, __pyx_v_readonly); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5336    __Pyx_GOTREF(__pyx_t_2);
5337    __pyx_r = __pyx_t_2;
5338    __pyx_t_2 = 0;
5339    goto __pyx_L0;
5340  }
5341
5342  /* "buffers.pxd":244
5343 *
5344 *
5345 * cdef inline object frombuffer(void *ptr, Py_ssize_t s, int readonly):             # <<<<<<<<<<<<<<
5346 *     """Create a Python Buffer/View of a C array.
5347 *
5348 */
5349
5350  /* function exit code */
5351  __pyx_L1_error:;
5352  __Pyx_XDECREF(__pyx_t_2);
5353  __Pyx_AddTraceback("buffers.frombuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
5354  __pyx_r = 0;
5355  __pyx_L0:;
5356  __Pyx_XGIVEREF(__pyx_r);
5357  __Pyx_RefNannyFinishContext();
5358  return __pyx_r;
5359}
5360
5361/* "buffers.pxd":267
5362 *
5363 *
5364 * cdef inline object frombuffer_r(void *ptr, Py_ssize_t s):             # <<<<<<<<<<<<<<
5365 *     """Wrapper for readonly view frombuffer."""
5366 *     return frombuffer(ptr, s, 1)
5367 */
5368
5369static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_r(void *__pyx_v_ptr, Py_ssize_t __pyx_v_s) {
5370  PyObject *__pyx_r = NULL;
5371  __Pyx_RefNannyDeclarations
5372  PyObject *__pyx_t_1 = NULL;
5373  int __pyx_lineno = 0;
5374  const char *__pyx_filename = NULL;
5375  int __pyx_clineno = 0;
5376  __Pyx_RefNannySetupContext("frombuffer_r", 0);
5377
5378  /* "buffers.pxd":269
5379 * cdef inline object frombuffer_r(void *ptr, Py_ssize_t s):
5380 *     """Wrapper for readonly view frombuffer."""
5381 *     return frombuffer(ptr, s, 1)             # <<<<<<<<<<<<<<
5382 *
5383 *
5384 */
5385  __Pyx_XDECREF(__pyx_r);
5386  __pyx_t_1 = __pyx_f_7buffers_frombuffer(__pyx_v_ptr, __pyx_v_s, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5387  __Pyx_GOTREF(__pyx_t_1);
5388  __pyx_r = __pyx_t_1;
5389  __pyx_t_1 = 0;
5390  goto __pyx_L0;
5391
5392  /* "buffers.pxd":267
5393 *
5394 *
5395 * cdef inline object frombuffer_r(void *ptr, Py_ssize_t s):             # <<<<<<<<<<<<<<
5396 *     """Wrapper for readonly view frombuffer."""
5397 *     return frombuffer(ptr, s, 1)
5398 */
5399
5400  /* function exit code */
5401  __pyx_L1_error:;
5402  __Pyx_XDECREF(__pyx_t_1);
5403  __Pyx_AddTraceback("buffers.frombuffer_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
5404  __pyx_r = 0;
5405  __pyx_L0:;
5406  __Pyx_XGIVEREF(__pyx_r);
5407  __Pyx_RefNannyFinishContext();
5408  return __pyx_r;
5409}
5410
5411/* "buffers.pxd":272
5412 *
5413 *
5414 * cdef inline object frombuffer_w(void *ptr, Py_ssize_t s):             # <<<<<<<<<<<<<<
5415 *     """Wrapper for writable view frombuffer."""
5416 *     return frombuffer(ptr, s, 0)
5417 */
5418
5419static CYTHON_INLINE PyObject *__pyx_f_7buffers_frombuffer_w(void *__pyx_v_ptr, Py_ssize_t __pyx_v_s) {
5420  PyObject *__pyx_r = NULL;
5421  __Pyx_RefNannyDeclarations
5422  PyObject *__pyx_t_1 = NULL;
5423  int __pyx_lineno = 0;
5424  const char *__pyx_filename = NULL;
5425  int __pyx_clineno = 0;
5426  __Pyx_RefNannySetupContext("frombuffer_w", 0);
5427
5428  /* "buffers.pxd":274
5429 * cdef inline object frombuffer_w(void *ptr, Py_ssize_t s):
5430 *     """Wrapper for writable view frombuffer."""
5431 *     return frombuffer(ptr, s, 0)             # <<<<<<<<<<<<<<
5432 *
5433 * #------------------------------------------------------------------------------
5434 */
5435  __Pyx_XDECREF(__pyx_r);
5436  __pyx_t_1 = __pyx_f_7buffers_frombuffer(__pyx_v_ptr, __pyx_v_s, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5437  __Pyx_GOTREF(__pyx_t_1);
5438  __pyx_r = __pyx_t_1;
5439  __pyx_t_1 = 0;
5440  goto __pyx_L0;
5441
5442  /* "buffers.pxd":272
5443 *
5444 *
5445 * cdef inline object frombuffer_w(void *ptr, Py_ssize_t s):             # <<<<<<<<<<<<<<
5446 *     """Wrapper for writable view frombuffer."""
5447 *     return frombuffer(ptr, s, 0)
5448 */
5449
5450  /* function exit code */
5451  __pyx_L1_error:;
5452  __Pyx_XDECREF(__pyx_t_1);
5453  __Pyx_AddTraceback("buffers.frombuffer_w", __pyx_clineno, __pyx_lineno, __pyx_filename);
5454  __pyx_r = 0;
5455  __pyx_L0:;
5456  __Pyx_XGIVEREF(__pyx_r);
5457  __Pyx_RefNannyFinishContext();
5458  return __pyx_r;
5459}
5460
5461/* "buffers.pxd":281
5462 * #------------------------------------------------------------------------------
5463 *
5464 * cdef inline object viewfromobject(object obj, int readonly):             # <<<<<<<<<<<<<<
5465 *     """Construct a Python Buffer/View object from another Python object.
5466 *
5467 */
5468
5469static CYTHON_INLINE PyObject *__pyx_f_7buffers_viewfromobject(PyObject *__pyx_v_obj, int __pyx_v_readonly) {
5470  PyObject *__pyx_r = NULL;
5471  __Pyx_RefNannyDeclarations
5472  int __pyx_t_1;
5473  PyObject *__pyx_t_2 = NULL;
5474  int __pyx_lineno = 0;
5475  const char *__pyx_filename = NULL;
5476  int __pyx_clineno = 0;
5477  __Pyx_RefNannySetupContext("viewfromobject", 0);
5478
5479  /* "buffers.pxd":297
5480 *     Buffer/View of the original object.
5481 *     """
5482 *     if not memoryview_available():             # <<<<<<<<<<<<<<
5483 *         if readonly:
5484 *             return PyBuffer_FromObject(obj, 0, Py_END_OF_BUFFER)
5485 */
5486  __pyx_t_1 = ((!(__pyx_f_7buffers_memoryview_available() != 0)) != 0);
5487  if (__pyx_t_1) {
5488
5489    /* "buffers.pxd":298
5490 *     """
5491 *     if not memoryview_available():
5492 *         if readonly:             # <<<<<<<<<<<<<<
5493 *             return PyBuffer_FromObject(obj, 0, Py_END_OF_BUFFER)
5494 *         else:
5495 */
5496    __pyx_t_1 = (__pyx_v_readonly != 0);
5497    if (__pyx_t_1) {
5498
5499      /* "buffers.pxd":299
5500 *     if not memoryview_available():
5501 *         if readonly:
5502 *             return PyBuffer_FromObject(obj, 0, Py_END_OF_BUFFER)             # <<<<<<<<<<<<<<
5503 *         else:
5504 *             return PyBuffer_FromReadWriteObject(obj, 0, Py_END_OF_BUFFER)
5505 */
5506      __Pyx_XDECREF(__pyx_r);
5507      __pyx_t_2 = PyBuffer_FromObject(__pyx_v_obj, 0, Py_END_OF_BUFFER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5508      __Pyx_GOTREF(__pyx_t_2);
5509      __pyx_r = __pyx_t_2;
5510      __pyx_t_2 = 0;
5511      goto __pyx_L0;
5512    }
5513    /*else*/ {
5514
5515      /* "buffers.pxd":301
5516 *             return PyBuffer_FromObject(obj, 0, Py_END_OF_BUFFER)
5517 *         else:
5518 *             return PyBuffer_FromReadWriteObject(obj, 0, Py_END_OF_BUFFER)             # <<<<<<<<<<<<<<
5519 *     else:
5520 *         return PyMemoryView_FromObject(obj)
5521 */
5522      __Pyx_XDECREF(__pyx_r);
5523      __pyx_t_2 = PyBuffer_FromReadWriteObject(__pyx_v_obj, 0, Py_END_OF_BUFFER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5524      __Pyx_GOTREF(__pyx_t_2);
5525      __pyx_r = __pyx_t_2;
5526      __pyx_t_2 = 0;
5527      goto __pyx_L0;
5528    }
5529  }
5530  /*else*/ {
5531
5532    /* "buffers.pxd":303
5533 *             return PyBuffer_FromReadWriteObject(obj, 0, Py_END_OF_BUFFER)
5534 *     else:
5535 *         return PyMemoryView_FromObject(obj)             # <<<<<<<<<<<<<<
5536 *
5537 *
5538 */
5539    __Pyx_XDECREF(__pyx_r);
5540    __pyx_t_2 = PyMemoryView_FromObject(__pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5541    __Pyx_GOTREF(__pyx_t_2);
5542    __pyx_r = __pyx_t_2;
5543    __pyx_t_2 = 0;
5544    goto __pyx_L0;
5545  }
5546
5547  /* "buffers.pxd":281
5548 * #------------------------------------------------------------------------------
5549 *
5550 * cdef inline object viewfromobject(object obj, int readonly):             # <<<<<<<<<<<<<<
5551 *     """Construct a Python Buffer/View object from another Python object.
5552 *
5553 */
5554
5555  /* function exit code */
5556  __pyx_L1_error:;
5557  __Pyx_XDECREF(__pyx_t_2);
5558  __Pyx_AddTraceback("buffers.viewfromobject", __pyx_clineno, __pyx_lineno, __pyx_filename);
5559  __pyx_r = 0;
5560  __pyx_L0:;
5561  __Pyx_XGIVEREF(__pyx_r);
5562  __Pyx_RefNannyFinishContext();
5563  return __pyx_r;
5564}
5565
5566/* "buffers.pxd":306
5567 *
5568 *
5569 * cdef inline object viewfromobject_r(object obj):             # <<<<<<<<<<<<<<
5570 *     """Wrapper for readonly viewfromobject."""
5571 *     return viewfromobject(obj, 1)
5572 */
5573
5574static CYTHON_INLINE PyObject *__pyx_f_7buffers_viewfromobject_r(PyObject *__pyx_v_obj) {
5575  PyObject *__pyx_r = NULL;
5576  __Pyx_RefNannyDeclarations
5577  PyObject *__pyx_t_1 = NULL;
5578  int __pyx_lineno = 0;
5579  const char *__pyx_filename = NULL;
5580  int __pyx_clineno = 0;
5581  __Pyx_RefNannySetupContext("viewfromobject_r", 0);
5582
5583  /* "buffers.pxd":308
5584 * cdef inline object viewfromobject_r(object obj):
5585 *     """Wrapper for readonly viewfromobject."""
5586 *     return viewfromobject(obj, 1)             # <<<<<<<<<<<<<<
5587 *
5588 *
5589 */
5590  __Pyx_XDECREF(__pyx_r);
5591  __pyx_t_1 = __pyx_f_7buffers_viewfromobject(__pyx_v_obj, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5592  __Pyx_GOTREF(__pyx_t_1);
5593  __pyx_r = __pyx_t_1;
5594  __pyx_t_1 = 0;
5595  goto __pyx_L0;
5596
5597  /* "buffers.pxd":306
5598 *
5599 *
5600 * cdef inline object viewfromobject_r(object obj):             # <<<<<<<<<<<<<<
5601 *     """Wrapper for readonly viewfromobject."""
5602 *     return viewfromobject(obj, 1)
5603 */
5604
5605  /* function exit code */
5606  __pyx_L1_error:;
5607  __Pyx_XDECREF(__pyx_t_1);
5608  __Pyx_AddTraceback("buffers.viewfromobject_r", __pyx_clineno, __pyx_lineno, __pyx_filename);
5609  __pyx_r = 0;
5610  __pyx_L0:;
5611  __Pyx_XGIVEREF(__pyx_r);
5612  __Pyx_RefNannyFinishContext();
5613  return __pyx_r;
5614}
5615
5616/* "buffers.pxd":311
5617 *
5618 *
5619 * cdef inline object viewfromobject_w(object obj):             # <<<<<<<<<<<<<<
5620 *     """Wrapper for writable viewfromobject."""
5621 *     return viewfromobject(obj, 0)
5622 */
5623
5624static CYTHON_INLINE PyObject *__pyx_f_7buffers_viewfromobject_w(PyObject *__pyx_v_obj) {
5625  PyObject *__pyx_r = NULL;
5626  __Pyx_RefNannyDeclarations
5627  PyObject *__pyx_t_1 = NULL;
5628  int __pyx_lineno = 0;
5629  const char *__pyx_filename = NULL;
5630  int __pyx_clineno = 0;
5631  __Pyx_RefNannySetupContext("viewfromobject_w", 0);
5632
5633  /* "buffers.pxd":313
5634 * cdef inline object viewfromobject_w(object obj):
5635 *     """Wrapper for writable viewfromobject."""
5636 *     return viewfromobject(obj, 0)             # <<<<<<<<<<<<<<
5637 */
5638  __Pyx_XDECREF(__pyx_r);
5639  __pyx_t_1 = __pyx_f_7buffers_viewfromobject(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5640  __Pyx_GOTREF(__pyx_t_1);
5641  __pyx_r = __pyx_t_1;
5642  __pyx_t_1 = 0;
5643  goto __pyx_L0;
5644
5645  /* "buffers.pxd":311
5646 *
5647 *
5648 * cdef inline object viewfromobject_w(object obj):             # <<<<<<<<<<<<<<
5649 *     """Wrapper for writable viewfromobject."""
5650 *     return viewfromobject(obj, 0)
5651 */
5652
5653  /* function exit code */
5654  __pyx_L1_error:;
5655  __Pyx_XDECREF(__pyx_t_1);
5656  __Pyx_AddTraceback("buffers.viewfromobject_w", __pyx_clineno, __pyx_lineno, __pyx_filename);
5657  __pyx_r = 0;
5658  __pyx_L0:;
5659  __Pyx_XGIVEREF(__pyx_r);
5660  __Pyx_RefNannyFinishContext();
5661  return __pyx_r;
5662}
5663
5664static PyObject *__pyx_tp_new_3zmq_7backend_6cython_7message_MessageTracker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
5665  struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *p;
5666  PyObject *o;
5667  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
5668    o = (*t->tp_alloc)(t, 0);
5669  } else {
5670    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
5671  }
5672  if (unlikely(!o)) return 0;
5673  p = ((struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *)o);
5674  p->events = ((PyObject*)Py_None); Py_INCREF(Py_None);
5675  p->peers = ((PyObject*)Py_None); Py_INCREF(Py_None);
5676  return o;
5677}
5678
5679static void __pyx_tp_dealloc_3zmq_7backend_6cython_7message_MessageTracker(PyObject *o) {
5680  struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *p = (struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *)o;
5681  #if PY_VERSION_HEX >= 0x030400a1
5682  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
5683    if (PyObject_CallFinalizerFromDealloc(o)) return;
5684  }
5685  #endif
5686  PyObject_GC_UnTrack(o);
5687  Py_CLEAR(p->events);
5688  Py_CLEAR(p->peers);
5689  (*Py_TYPE(o)->tp_free)(o);
5690}
5691
5692static int __pyx_tp_traverse_3zmq_7backend_6cython_7message_MessageTracker(PyObject *o, visitproc v, void *a) {
5693  int e;
5694  struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *p = (struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *)o;
5695  if (p->events) {
5696    e = (*v)(p->events, a); if (e) return e;
5697  }
5698  if (p->peers) {
5699    e = (*v)(p->peers, a); if (e) return e;
5700  }
5701  return 0;
5702}
5703
5704static int __pyx_tp_clear_3zmq_7backend_6cython_7message_MessageTracker(PyObject *o) {
5705  PyObject* tmp;
5706  struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *p = (struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker *)o;
5707  tmp = ((PyObject*)p->events);
5708  p->events = ((PyObject*)Py_None); Py_INCREF(Py_None);
5709  Py_XDECREF(tmp);
5710  tmp = ((PyObject*)p->peers);
5711  p->peers = ((PyObject*)Py_None); Py_INCREF(Py_None);
5712  Py_XDECREF(tmp);
5713  return 0;
5714}
5715
5716static PyTypeObject __pyx_type_3zmq_7backend_6cython_7message_MessageTracker = {
5717  PyVarObject_HEAD_INIT(0, 0)
5718  "zmq.backend.cython.message.MessageTracker", /*tp_name*/
5719  sizeof(struct __pyx_obj_3zmq_7backend_6cython_7message_MessageTracker), /*tp_basicsize*/
5720  0, /*tp_itemsize*/
5721  __pyx_tp_dealloc_3zmq_7backend_6cython_7message_MessageTracker, /*tp_dealloc*/
5722  0, /*tp_print*/
5723  0, /*tp_getattr*/
5724  0, /*tp_setattr*/
5725  #if PY_MAJOR_VERSION < 3
5726  0, /*tp_compare*/
5727  #else
5728  0, /*reserved*/
5729  #endif
5730  0, /*tp_repr*/
5731  0, /*tp_as_number*/
5732  0, /*tp_as_sequence*/
5733  0, /*tp_as_mapping*/
5734  0, /*tp_hash*/
5735  0, /*tp_call*/
5736  0, /*tp_str*/
5737  0, /*tp_getattro*/
5738  0, /*tp_setattro*/
5739  0, /*tp_as_buffer*/
5740  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
5741  0, /*tp_doc*/
5742  __pyx_tp_traverse_3zmq_7backend_6cython_7message_MessageTracker, /*tp_traverse*/
5743  __pyx_tp_clear_3zmq_7backend_6cython_7message_MessageTracker, /*tp_clear*/
5744  0, /*tp_richcompare*/
5745  0, /*tp_weaklistoffset*/
5746  0, /*tp_iter*/
5747  0, /*tp_iternext*/
5748  0, /*tp_methods*/
5749  0, /*tp_members*/
5750  0, /*tp_getset*/
5751  0, /*tp_base*/
5752  0, /*tp_dict*/
5753  0, /*tp_descr_get*/
5754  0, /*tp_descr_set*/
5755  0, /*tp_dictoffset*/
5756  0, /*tp_init*/
5757  0, /*tp_alloc*/
5758  __pyx_tp_new_3zmq_7backend_6cython_7message_MessageTracker, /*tp_new*/
5759  0, /*tp_free*/
5760  0, /*tp_is_gc*/
5761  0, /*tp_bases*/
5762  0, /*tp_mro*/
5763  0, /*tp_cache*/
5764  0, /*tp_subclasses*/
5765  0, /*tp_weaklist*/
5766  0, /*tp_del*/
5767  0, /*tp_version_tag*/
5768  #if PY_VERSION_HEX >= 0x030400a1
5769  0, /*tp_finalize*/
5770  #endif
5771};
5772static struct __pyx_vtabstruct_3zmq_7backend_6cython_7message_Frame __pyx_vtable_3zmq_7backend_6cython_7message_Frame;
5773
5774static PyObject *__pyx_tp_new_3zmq_7backend_6cython_7message_Frame(PyTypeObject *t, PyObject *a, PyObject *k) {
5775  struct __pyx_obj_3zmq_7backend_6cython_7message_Frame *p;
5776  PyObject *o;
5777  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
5778    o = (*t->tp_alloc)(t, 0);
5779  } else {
5780    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
5781  }
5782  if (unlikely(!o)) return 0;
5783  p = ((struct __pyx_obj_3zmq_7backend_6cython_7message_F