/* Generated by Cython 0.15.1 on Mon Dec 19 01:21:26 2011 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#else

#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__zmq__core__constants
#define __PYX_HAVE_API__zmq__core__constants
#include "allocate.h"
#include "errno.h"
#include "string.h"
#include "zmq_compat.h"
#include "zmq.h"
#include "zmq_utils.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || defined(__INTEL_COMPILER)
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "constants.pyx",
};

/*--- Type declarations ---*/

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif

#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name)           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (PyList_Append(L, x) < 0) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    }
    else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static int __Pyx_check_binary_version(void);

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

/* Module declarations from 'zmq.core.libzmq' */

/* Module declarations from 'zmq.core.constants' */
#define __Pyx_MODULE_NAME "zmq.core.constants"
int __pyx_module_is_main_zmq__core__constants = 0;

/* Implementation of 'zmq.core.constants' */
static char __pyx_k_1[] = "0MQ Constants.";
static char __pyx_k__FD[] = "FD";
static char __pyx_k__HWM[] = "HWM";
static char __pyx_k__PUB[] = "PUB";
static char __pyx_k__REP[] = "REP";
static char __pyx_k__REQ[] = "REQ";
static char __pyx_k__SUB[] = "SUB";
static char __pyx_k__EFSM[] = "EFSM";
static char __pyx_k__PAIR[] = "PAIR";
static char __pyx_k__PULL[] = "PULL";
static char __pyx_k__PUSH[] = "PUSH";
static char __pyx_k__RATE[] = "RATE";
static char __pyx_k__SWAP[] = "SWAP";
static char __pyx_k__TYPE[] = "TYPE";
static char __pyx_k__XPUB[] = "XPUB";
static char __pyx_k__XREP[] = "XREP";
static char __pyx_k__XREQ[] = "XREQ";
static char __pyx_k__XSUB[] = "XSUB";
static char __pyx_k__ETERM[] = "ETERM";
static char __pyx_k__QUEUE[] = "QUEUE";
static char __pyx_k__DEALER[] = "DEALER";
static char __pyx_k__EAGAIN[] = "EAGAIN";
static char __pyx_k__EFAULT[] = "EFAULT";
static char __pyx_k__EINVAL[] = "EINVAL";
static char __pyx_k__ENODEV[] = "ENODEV";
static char __pyx_k__ENOMEM[] = "ENOMEM";
static char __pyx_k__EVENTS[] = "EVENTS";
static char __pyx_k__LINGER[] = "LINGER";
static char __pyx_k__POLLIN[] = "POLLIN";
static char __pyx_k__RCVBUF[] = "RCVBUF";
static char __pyx_k__RCVCMD[] = "RCVCMD";
static char __pyx_k__RCVHWM[] = "RCVHWM";
static char __pyx_k__ROUTER[] = "ROUTER";
static char __pyx_k__SNDBUF[] = "SNDBUF";
static char __pyx_k__SNDCMD[] = "SNDCMD";
static char __pyx_k__SNDHWM[] = "SNDHWM";
static char __pyx_k__extend[] = "extend";
static char __pyx_k__BACKLOG[] = "BACKLOG";
static char __pyx_k__ENOBUFS[] = "ENOBUFS";
static char __pyx_k__ENOTSUP[] = "ENOTSUP";
static char __pyx_k__NOBLOCK[] = "NOBLOCK";
static char __pyx_k__POLLERR[] = "POLLERR";
static char __pyx_k__POLLOUT[] = "POLLOUT";
static char __pyx_k__RCVMORE[] = "RCVMORE";
static char __pyx_k__SNDMORE[] = "SNDMORE";
static char __pyx_k____all__[] = "__all__";
static char __pyx_k__AFFINITY[] = "AFFINITY";
static char __pyx_k__DONTWAIT[] = "DONTWAIT";
static char __pyx_k__EMTHREAD[] = "EMTHREAD";
static char __pyx_k__ENETDOWN[] = "ENETDOWN";
static char __pyx_k__ENOTSOCK[] = "ENOTSOCK";
static char __pyx_k__IDENTITY[] = "IDENTITY";
static char __pyx_k__RCVLABEL[] = "RCVLABEL";
static char __pyx_k__RCVTIMEO[] = "RCVTIMEO";
static char __pyx_k__SNDLABEL[] = "SNDLABEL";
static char __pyx_k__SNDTIMEO[] = "SNDTIMEO";
static char __pyx_k__STREAMER[] = "STREAMER";
static char __pyx_k__UPSTREAM[] = "UPSTREAM";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__switched[] = "switched";
static char __pyx_k__FORWARDER[] = "FORWARDER";
static char __pyx_k__SUBSCRIBE[] = "SUBSCRIBE";
static char __pyx_k__DOWNSTREAM[] = "DOWNSTREAM";
static char __pyx_k__EADDRINUSE[] = "EADDRINUSE";
static char __pyx_k__ECANTROUTE[] = "ECANTROUTE";
static char __pyx_k__MAXMSGSIZE[] = "MAXMSGSIZE";
static char __pyx_k__MCAST_LOOP[] = "MCAST_LOOP";
static char __pyx_k___optionals[] = "_optionals";
static char __pyx_k__EINPROGRESS[] = "EINPROGRESS";
static char __pyx_k__UNSUBSCRIBE[] = "UNSUBSCRIBE";
static char __pyx_k__ECONNREFUSED[] = "ECONNREFUSED";
static char __pyx_k__RECOVERY_IVL[] = "RECOVERY_IVL";
static char __pyx_k__int_sockopts[] = "int_sockopts";
static char __pyx_k__EADDRNOTAVAIL[] = "EADDRNOTAVAIL";
static char __pyx_k__RECONNECT_IVL[] = "RECONNECT_IVL";
static char __pyx_k__ENOCOMPATPROTO[] = "ENOCOMPATPROTO";
static char __pyx_k__MULTICAST_HOPS[] = "MULTICAST_HOPS";
static char __pyx_k__bytes_sockopts[] = "bytes_sockopts";
static char __pyx_k__int64_sockopts[] = "int64_sockopts";
static char __pyx_k__EPROTONOSUPPORT[] = "EPROTONOSUPPORT";
static char __pyx_k__RECONNECT_IVL_MAX[] = "RECONNECT_IVL_MAX";
static char __pyx_k__RECOVERY_IVL_MSEC[] = "RECOVERY_IVL_MSEC";
static PyObject *__pyx_n_s__AFFINITY;
static PyObject *__pyx_n_s__BACKLOG;
static PyObject *__pyx_n_s__DEALER;
static PyObject *__pyx_n_s__DONTWAIT;
static PyObject *__pyx_n_s__DOWNSTREAM;
static PyObject *__pyx_n_s__EADDRINUSE;
static PyObject *__pyx_n_s__EADDRNOTAVAIL;
static PyObject *__pyx_n_s__EAGAIN;
static PyObject *__pyx_n_s__ECANTROUTE;
static PyObject *__pyx_n_s__ECONNREFUSED;
static PyObject *__pyx_n_s__EFAULT;
static PyObject *__pyx_n_s__EFSM;
static PyObject *__pyx_n_s__EINPROGRESS;
static PyObject *__pyx_n_s__EINVAL;
static PyObject *__pyx_n_s__EMTHREAD;
static PyObject *__pyx_n_s__ENETDOWN;
static PyObject *__pyx_n_s__ENOBUFS;
static PyObject *__pyx_n_s__ENOCOMPATPROTO;
static PyObject *__pyx_n_s__ENODEV;
static PyObject *__pyx_n_s__ENOMEM;
static PyObject *__pyx_n_s__ENOTSOCK;
static PyObject *__pyx_n_s__ENOTSUP;
static PyObject *__pyx_n_s__EPROTONOSUPPORT;
static PyObject *__pyx_n_s__ETERM;
static PyObject *__pyx_n_s__EVENTS;
static PyObject *__pyx_n_s__FD;
static PyObject *__pyx_n_s__FORWARDER;
static PyObject *__pyx_n_s__HWM;
static PyObject *__pyx_n_s__IDENTITY;
static PyObject *__pyx_n_s__LINGER;
static PyObject *__pyx_n_s__MAXMSGSIZE;
static PyObject *__pyx_n_s__MCAST_LOOP;
static PyObject *__pyx_n_s__MULTICAST_HOPS;
static PyObject *__pyx_n_s__NOBLOCK;
static PyObject *__pyx_n_s__PAIR;
static PyObject *__pyx_n_s__POLLERR;
static PyObject *__pyx_n_s__POLLIN;
static PyObject *__pyx_n_s__POLLOUT;
static PyObject *__pyx_n_s__PUB;
static PyObject *__pyx_n_s__PULL;
static PyObject *__pyx_n_s__PUSH;
static PyObject *__pyx_n_s__QUEUE;
static PyObject *__pyx_n_s__RATE;
static PyObject *__pyx_n_s__RCVBUF;
static PyObject *__pyx_n_s__RCVCMD;
static PyObject *__pyx_n_s__RCVHWM;
static PyObject *__pyx_n_s__RCVLABEL;
static PyObject *__pyx_n_s__RCVMORE;
static PyObject *__pyx_n_s__RCVTIMEO;
static PyObject *__pyx_n_s__RECONNECT_IVL;
static PyObject *__pyx_n_s__RECONNECT_IVL_MAX;
static PyObject *__pyx_n_s__RECOVERY_IVL;
static PyObject *__pyx_n_s__RECOVERY_IVL_MSEC;
static PyObject *__pyx_n_s__REP;
static PyObject *__pyx_n_s__REQ;
static PyObject *__pyx_n_s__ROUTER;
static PyObject *__pyx_n_s__SNDBUF;
static PyObject *__pyx_n_s__SNDCMD;
static PyObject *__pyx_n_s__SNDHWM;
static PyObject *__pyx_n_s__SNDLABEL;
static PyObject *__pyx_n_s__SNDMORE;
static PyObject *__pyx_n_s__SNDTIMEO;
static PyObject *__pyx_n_s__STREAMER;
static PyObject *__pyx_n_s__SUB;
static PyObject *__pyx_n_s__SUBSCRIBE;
static PyObject *__pyx_n_s__SWAP;
static PyObject *__pyx_n_s__TYPE;
static PyObject *__pyx_n_s__UNSUBSCRIBE;
static PyObject *__pyx_n_s__UPSTREAM;
static PyObject *__pyx_n_s__XPUB;
static PyObject *__pyx_n_s__XREP;
static PyObject *__pyx_n_s__XREQ;
static PyObject *__pyx_n_s__XSUB;
static PyObject *__pyx_n_s____all__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___optionals;
static PyObject *__pyx_n_s__bytes_sockopts;
static PyObject *__pyx_n_s__extend;
static PyObject *__pyx_n_s__int64_sockopts;
static PyObject *__pyx_n_s__int_sockopts;
static PyObject *__pyx_n_s__switched;

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("constants"),
    __Pyx_DOCSTR(__pyx_k_1), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s__AFFINITY, __pyx_k__AFFINITY, sizeof(__pyx_k__AFFINITY), 0, 0, 1, 1},
  {&__pyx_n_s__BACKLOG, __pyx_k__BACKLOG, sizeof(__pyx_k__BACKLOG), 0, 0, 1, 1},
  {&__pyx_n_s__DEALER, __pyx_k__DEALER, sizeof(__pyx_k__DEALER), 0, 0, 1, 1},
  {&__pyx_n_s__DONTWAIT, __pyx_k__DONTWAIT, sizeof(__pyx_k__DONTWAIT), 0, 0, 1, 1},
  {&__pyx_n_s__DOWNSTREAM, __pyx_k__DOWNSTREAM, sizeof(__pyx_k__DOWNSTREAM), 0, 0, 1, 1},
  {&__pyx_n_s__EADDRINUSE, __pyx_k__EADDRINUSE, sizeof(__pyx_k__EADDRINUSE), 0, 0, 1, 1},
  {&__pyx_n_s__EADDRNOTAVAIL, __pyx_k__EADDRNOTAVAIL, sizeof(__pyx_k__EADDRNOTAVAIL), 0, 0, 1, 1},
  {&__pyx_n_s__EAGAIN, __pyx_k__EAGAIN, sizeof(__pyx_k__EAGAIN), 0, 0, 1, 1},
  {&__pyx_n_s__ECANTROUTE, __pyx_k__ECANTROUTE, sizeof(__pyx_k__ECANTROUTE), 0, 0, 1, 1},
  {&__pyx_n_s__ECONNREFUSED, __pyx_k__ECONNREFUSED, sizeof(__pyx_k__ECONNREFUSED), 0, 0, 1, 1},
  {&__pyx_n_s__EFAULT, __pyx_k__EFAULT, sizeof(__pyx_k__EFAULT), 0, 0, 1, 1},
  {&__pyx_n_s__EFSM, __pyx_k__EFSM, sizeof(__pyx_k__EFSM), 0, 0, 1, 1},
  {&__pyx_n_s__EINPROGRESS, __pyx_k__EINPROGRESS, sizeof(__pyx_k__EINPROGRESS), 0, 0, 1, 1},
  {&__pyx_n_s__EINVAL, __pyx_k__EINVAL, sizeof(__pyx_k__EINVAL), 0, 0, 1, 1},
  {&__pyx_n_s__EMTHREAD, __pyx_k__EMTHREAD, sizeof(__pyx_k__EMTHREAD), 0, 0, 1, 1},
  {&__pyx_n_s__ENETDOWN, __pyx_k__ENETDOWN, sizeof(__pyx_k__ENETDOWN), 0, 0, 1, 1},
  {&__pyx_n_s__ENOBUFS, __pyx_k__ENOBUFS, sizeof(__pyx_k__ENOBUFS), 0, 0, 1, 1},
  {&__pyx_n_s__ENOCOMPATPROTO, __pyx_k__ENOCOMPATPROTO, sizeof(__pyx_k__ENOCOMPATPROTO), 0, 0, 1, 1},
  {&__pyx_n_s__ENODEV, __pyx_k__ENODEV, sizeof(__pyx_k__ENODEV), 0, 0, 1, 1},
  {&__pyx_n_s__ENOMEM, __pyx_k__ENOMEM, sizeof(__pyx_k__ENOMEM), 0, 0, 1, 1},
  {&__pyx_n_s__ENOTSOCK, __pyx_k__ENOTSOCK, sizeof(__pyx_k__ENOTSOCK), 0, 0, 1, 1},
  {&__pyx_n_s__ENOTSUP, __pyx_k__ENOTSUP, sizeof(__pyx_k__ENOTSUP), 0, 0, 1, 1},
  {&__pyx_n_s__EPROTONOSUPPORT, __pyx_k__EPROTONOSUPPORT, sizeof(__pyx_k__EPROTONOSUPPORT), 0, 0, 1, 1},
  {&__pyx_n_s__ETERM, __pyx_k__ETERM, sizeof(__pyx_k__ETERM), 0, 0, 1, 1},
  {&__pyx_n_s__EVENTS, __pyx_k__EVENTS, sizeof(__pyx_k__EVENTS), 0, 0, 1, 1},
  {&__pyx_n_s__FD, __pyx_k__FD, sizeof(__pyx_k__FD), 0, 0, 1, 1},
  {&__pyx_n_s__FORWARDER, __pyx_k__FORWARDER, sizeof(__pyx_k__FORWARDER), 0, 0, 1, 1},
  {&__pyx_n_s__HWM, __pyx_k__HWM, sizeof(__pyx_k__HWM), 0, 0, 1, 1},
  {&__pyx_n_s__IDENTITY, __pyx_k__IDENTITY, sizeof(__pyx_k__IDENTITY), 0, 0, 1, 1},
  {&__pyx_n_s__LINGER, __pyx_k__LINGER, sizeof(__pyx_k__LINGER), 0, 0, 1, 1},
  {&__pyx_n_s__MAXMSGSIZE, __pyx_k__MAXMSGSIZE, sizeof(__pyx_k__MAXMSGSIZE), 0, 0, 1, 1},
  {&__pyx_n_s__MCAST_LOOP, __pyx_k__MCAST_LOOP, sizeof(__pyx_k__MCAST_LOOP), 0, 0, 1, 1},
  {&__pyx_n_s__MULTICAST_HOPS, __pyx_k__MULTICAST_HOPS, sizeof(__pyx_k__MULTICAST_HOPS), 0, 0, 1, 1},
  {&__pyx_n_s__NOBLOCK, __pyx_k__NOBLOCK, sizeof(__pyx_k__NOBLOCK), 0, 0, 1, 1},
  {&__pyx_n_s__PAIR, __pyx_k__PAIR, sizeof(__pyx_k__PAIR), 0, 0, 1, 1},
  {&__pyx_n_s__POLLERR, __pyx_k__POLLERR, sizeof(__pyx_k__POLLERR), 0, 0, 1, 1},
  {&__pyx_n_s__POLLIN, __pyx_k__POLLIN, sizeof(__pyx_k__POLLIN), 0, 0, 1, 1},
  {&__pyx_n_s__POLLOUT, __pyx_k__POLLOUT, sizeof(__pyx_k__POLLOUT), 0, 0, 1, 1},
  {&__pyx_n_s__PUB, __pyx_k__PUB, sizeof(__pyx_k__PUB), 0, 0, 1, 1},
  {&__pyx_n_s__PULL, __pyx_k__PULL, sizeof(__pyx_k__PULL), 0, 0, 1, 1},
  {&__pyx_n_s__PUSH, __pyx_k__PUSH, sizeof(__pyx_k__PUSH), 0, 0, 1, 1},
  {&__pyx_n_s__QUEUE, __pyx_k__QUEUE, sizeof(__pyx_k__QUEUE), 0, 0, 1, 1},
  {&__pyx_n_s__RATE, __pyx_k__RATE, sizeof(__pyx_k__RATE), 0, 0, 1, 1},
  {&__pyx_n_s__RCVBUF, __pyx_k__RCVBUF, sizeof(__pyx_k__RCVBUF), 0, 0, 1, 1},
  {&__pyx_n_s__RCVCMD, __pyx_k__RCVCMD, sizeof(__pyx_k__RCVCMD), 0, 0, 1, 1},
  {&__pyx_n_s__RCVHWM, __pyx_k__RCVHWM, sizeof(__pyx_k__RCVHWM), 0, 0, 1, 1},
  {&__pyx_n_s__RCVLABEL, __pyx_k__RCVLABEL, sizeof(__pyx_k__RCVLABEL), 0, 0, 1, 1},
  {&__pyx_n_s__RCVMORE, __pyx_k__RCVMORE, sizeof(__pyx_k__RCVMORE), 0, 0, 1, 1},
  {&__pyx_n_s__RCVTIMEO, __pyx_k__RCVTIMEO, sizeof(__pyx_k__RCVTIMEO), 0, 0, 1, 1},
  {&__pyx_n_s__RECONNECT_IVL, __pyx_k__RECONNECT_IVL, sizeof(__pyx_k__RECONNECT_IVL), 0, 0, 1, 1},
  {&__pyx_n_s__RECONNECT_IVL_MAX, __pyx_k__RECONNECT_IVL_MAX, sizeof(__pyx_k__RECONNECT_IVL_MAX), 0, 0, 1, 1},
  {&__pyx_n_s__RECOVERY_IVL, __pyx_k__RECOVERY_IVL, sizeof(__pyx_k__RECOVERY_IVL), 0, 0, 1, 1},
  {&__pyx_n_s__RECOVERY_IVL_MSEC, __pyx_k__RECOVERY_IVL_MSEC, sizeof(__pyx_k__RECOVERY_IVL_MSEC), 0, 0, 1, 1},
  {&__pyx_n_s__REP, __pyx_k__REP, sizeof(__pyx_k__REP), 0, 0, 1, 1},
  {&__pyx_n_s__REQ, __pyx_k__REQ, sizeof(__pyx_k__REQ), 0, 0, 1, 1},
  {&__pyx_n_s__ROUTER, __pyx_k__ROUTER, sizeof(__pyx_k__ROUTER), 0, 0, 1, 1},
  {&__pyx_n_s__SNDBUF, __pyx_k__SNDBUF, sizeof(__pyx_k__SNDBUF), 0, 0, 1, 1},
  {&__pyx_n_s__SNDCMD, __pyx_k__SNDCMD, sizeof(__pyx_k__SNDCMD), 0, 0, 1, 1},
  {&__pyx_n_s__SNDHWM, __pyx_k__SNDHWM, sizeof(__pyx_k__SNDHWM), 0, 0, 1, 1},
  {&__pyx_n_s__SNDLABEL, __pyx_k__SNDLABEL, sizeof(__pyx_k__SNDLABEL), 0, 0, 1, 1},
  {&__pyx_n_s__SNDMORE, __pyx_k__SNDMORE, sizeof(__pyx_k__SNDMORE), 0, 0, 1, 1},
  {&__pyx_n_s__SNDTIMEO, __pyx_k__SNDTIMEO, sizeof(__pyx_k__SNDTIMEO), 0, 0, 1, 1},
  {&__pyx_n_s__STREAMER, __pyx_k__STREAMER, sizeof(__pyx_k__STREAMER), 0, 0, 1, 1},
  {&__pyx_n_s__SUB, __pyx_k__SUB, sizeof(__pyx_k__SUB), 0, 0, 1, 1},
  {&__pyx_n_s__SUBSCRIBE, __pyx_k__SUBSCRIBE, sizeof(__pyx_k__SUBSCRIBE), 0, 0, 1, 1},
  {&__pyx_n_s__SWAP, __pyx_k__SWAP, sizeof(__pyx_k__SWAP), 0, 0, 1, 1},
  {&__pyx_n_s__TYPE, __pyx_k__TYPE, sizeof(__pyx_k__TYPE), 0, 0, 1, 1},
  {&__pyx_n_s__UNSUBSCRIBE, __pyx_k__UNSUBSCRIBE, sizeof(__pyx_k__UNSUBSCRIBE), 0, 0, 1, 1},
  {&__pyx_n_s__UPSTREAM, __pyx_k__UPSTREAM, sizeof(__pyx_k__UPSTREAM), 0, 0, 1, 1},
  {&__pyx_n_s__XPUB, __pyx_k__XPUB, sizeof(__pyx_k__XPUB), 0, 0, 1, 1},
  {&__pyx_n_s__XREP, __pyx_k__XREP, sizeof(__pyx_k__XREP), 0, 0, 1, 1},
  {&__pyx_n_s__XREQ, __pyx_k__XREQ, sizeof(__pyx_k__XREQ), 0, 0, 1, 1},
  {&__pyx_n_s__XSUB, __pyx_k__XSUB, sizeof(__pyx_k__XSUB), 0, 0, 1, 1},
  {&__pyx_n_s____all__, __pyx_k____all__, sizeof(__pyx_k____all__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___optionals, __pyx_k___optionals, sizeof(__pyx_k___optionals), 0, 0, 1, 1},
  {&__pyx_n_s__bytes_sockopts, __pyx_k__bytes_sockopts, sizeof(__pyx_k__bytes_sockopts), 0, 0, 1, 1},
  {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
  {&__pyx_n_s__int64_sockopts, __pyx_k__int64_sockopts, sizeof(__pyx_k__int64_sockopts), 0, 0, 1, 1},
  {&__pyx_n_s__int_sockopts, __pyx_k__int_sockopts, sizeof(__pyx_k__int_sockopts), 0, 0, 1, 1},
  {&__pyx_n_s__switched, __pyx_k__switched, sizeof(__pyx_k__switched), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  return 0;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initconstants(void); /*proto*/
PyMODINIT_FUNC initconstants(void)
#else
PyMODINIT_FUNC PyInit_constants(void); /*proto*/
PyMODINIT_FUNC PyInit_constants(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_constants(void)");
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __pyx_binding_PyCFunctionType_USED
  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("constants"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_1), 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_zmq__core__constants) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "zmq/core/constants.pyx":32
 * #-----------------------------------------------------------------------------
 * 
 * _optionals = []             # <<<<<<<<<<<<<<
 * 
 * if ZMQ_VERSION < 30000:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___optionals, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":34
 * _optionals = []
 * 
 * if ZMQ_VERSION < 30000:             # <<<<<<<<<<<<<<
 *     # backport DONTWAIT as alias to NOBLOCK
 *     NOBLOCK = ZMQ_NOBLOCK
 */
  __pyx_t_2 = (ZMQ_VERSION < 30000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":36
 * if ZMQ_VERSION < 30000:
 *     # backport DONTWAIT as alias to NOBLOCK
 *     NOBLOCK = ZMQ_NOBLOCK             # <<<<<<<<<<<<<<
 *     DONTWAIT = ZMQ_NOBLOCK
 * else:
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_NOBLOCK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NOBLOCK, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "zmq/core/constants.pyx":37
 *     # backport DONTWAIT as alias to NOBLOCK
 *     NOBLOCK = ZMQ_NOBLOCK
 *     DONTWAIT = ZMQ_NOBLOCK             # <<<<<<<<<<<<<<
 * else:
 *     # keep NOBLOCK as alias for new DONTWAIT
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_NOBLOCK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DONTWAIT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":40
 * else:
 *     # keep NOBLOCK as alias for new DONTWAIT
 *     NOBLOCK = ZMQ_DONTWAIT             # <<<<<<<<<<<<<<
 *     DONTWAIT = ZMQ_DONTWAIT
 * # socket types
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_DONTWAIT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NOBLOCK, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "zmq/core/constants.pyx":41
 *     # keep NOBLOCK as alias for new DONTWAIT
 *     NOBLOCK = ZMQ_DONTWAIT
 *     DONTWAIT = ZMQ_DONTWAIT             # <<<<<<<<<<<<<<
 * # socket types
 * PAIR = ZMQ_PAIR
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_DONTWAIT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DONTWAIT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L2:;

  /* "zmq/core/constants.pyx":43
 *     DONTWAIT = ZMQ_DONTWAIT
 * # socket types
 * PAIR = ZMQ_PAIR             # <<<<<<<<<<<<<<
 * PUB = ZMQ_PUB
 * SUB = ZMQ_SUB
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_PAIR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PAIR, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":44
 * # socket types
 * PAIR = ZMQ_PAIR
 * PUB = ZMQ_PUB             # <<<<<<<<<<<<<<
 * SUB = ZMQ_SUB
 * REQ = ZMQ_REQ
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_PUB); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PUB, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":45
 * PAIR = ZMQ_PAIR
 * PUB = ZMQ_PUB
 * SUB = ZMQ_SUB             # <<<<<<<<<<<<<<
 * REQ = ZMQ_REQ
 * REP = ZMQ_REP
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_SUB); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SUB, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":46
 * PUB = ZMQ_PUB
 * SUB = ZMQ_SUB
 * REQ = ZMQ_REQ             # <<<<<<<<<<<<<<
 * REP = ZMQ_REP
 * XREQ = ZMQ_XREQ
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_REQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__REQ, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":47
 * SUB = ZMQ_SUB
 * REQ = ZMQ_REQ
 * REP = ZMQ_REP             # <<<<<<<<<<<<<<
 * XREQ = ZMQ_XREQ
 * XREP = ZMQ_XREP
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_REP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__REP, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":48
 * REQ = ZMQ_REQ
 * REP = ZMQ_REP
 * XREQ = ZMQ_XREQ             # <<<<<<<<<<<<<<
 * XREP = ZMQ_XREP
 * PULL = ZMQ_PULL
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_XREQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XREQ, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":49
 * REP = ZMQ_REP
 * XREQ = ZMQ_XREQ
 * XREP = ZMQ_XREP             # <<<<<<<<<<<<<<
 * PULL = ZMQ_PULL
 * PUSH = ZMQ_PUSH
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_XREP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XREP, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":50
 * XREQ = ZMQ_XREQ
 * XREP = ZMQ_XREP
 * PULL = ZMQ_PULL             # <<<<<<<<<<<<<<
 * PUSH = ZMQ_PUSH
 * XPUB = ZMQ_XPUB
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_PULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PULL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":51
 * XREP = ZMQ_XREP
 * PULL = ZMQ_PULL
 * PUSH = ZMQ_PUSH             # <<<<<<<<<<<<<<
 * XPUB = ZMQ_XPUB
 * XSUB = ZMQ_XSUB
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_PUSH); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PUSH, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":52
 * PULL = ZMQ_PULL
 * PUSH = ZMQ_PUSH
 * XPUB = ZMQ_XPUB             # <<<<<<<<<<<<<<
 * XSUB = ZMQ_XSUB
 * 
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_XPUB); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XPUB, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":53
 * PUSH = ZMQ_PUSH
 * XPUB = ZMQ_XPUB
 * XSUB = ZMQ_XSUB             # <<<<<<<<<<<<<<
 * 
 * if ZMQ_DEALER == -1:
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_XSUB); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XSUB, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":55
 * XSUB = ZMQ_XSUB
 * 
 * if ZMQ_DEALER == -1:             # <<<<<<<<<<<<<<
 *     DEALER = XREQ
 * else:
 */
  __pyx_t_2 = (ZMQ_DEALER == -1);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":56
 * 
 * if ZMQ_DEALER == -1:
 *     DEALER = XREQ             # <<<<<<<<<<<<<<
 * else:
 *     DEALER = ZMQ_DEALER
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__XREQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DEALER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":58
 *     DEALER = XREQ
 * else:
 *     DEALER = ZMQ_DEALER             # <<<<<<<<<<<<<<
 * if ZMQ_ROUTER == -1:
 *     ROUTER = XREP
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_DEALER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DEALER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "zmq/core/constants.pyx":59
 * else:
 *     DEALER = ZMQ_DEALER
 * if ZMQ_ROUTER == -1:             # <<<<<<<<<<<<<<
 *     ROUTER = XREP
 * else:
 */
  __pyx_t_2 = (ZMQ_ROUTER == -1);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":60
 *     DEALER = ZMQ_DEALER
 * if ZMQ_ROUTER == -1:
 *     ROUTER = XREP             # <<<<<<<<<<<<<<
 * else:
 *     ROUTER = ZMQ_ROUTER
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__XREP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ROUTER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":62
 *     ROUTER = XREP
 * else:
 *     ROUTER = ZMQ_ROUTER             # <<<<<<<<<<<<<<
 * 
 * if ZMQ_VERSION < 30000:
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_ROUTER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ROUTER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "zmq/core/constants.pyx":64
 *     ROUTER = ZMQ_ROUTER
 * 
 * if ZMQ_VERSION < 30000:             # <<<<<<<<<<<<<<
 *     UPSTREAM = ZMQ_UPSTREAM
 *     DOWNSTREAM = ZMQ_DOWNSTREAM
 */
  __pyx_t_2 = (ZMQ_VERSION < 30000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":65
 * 
 * if ZMQ_VERSION < 30000:
 *     UPSTREAM = ZMQ_UPSTREAM             # <<<<<<<<<<<<<<
 *     DOWNSTREAM = ZMQ_DOWNSTREAM
 *     _optionals.extend(['UPSTREAM','DOWNSTREAM'])
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_UPSTREAM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UPSTREAM, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "zmq/core/constants.pyx":66
 * if ZMQ_VERSION < 30000:
 *     UPSTREAM = ZMQ_UPSTREAM
 *     DOWNSTREAM = ZMQ_DOWNSTREAM             # <<<<<<<<<<<<<<
 *     _optionals.extend(['UPSTREAM','DOWNSTREAM'])
 * 
 */
    __pyx_t_1 = PyInt_FromLong(ZMQ_DOWNSTREAM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DOWNSTREAM, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "zmq/core/constants.pyx":67
 *     UPSTREAM = ZMQ_UPSTREAM
 *     DOWNSTREAM = ZMQ_DOWNSTREAM
 *     _optionals.extend(['UPSTREAM','DOWNSTREAM'])             # <<<<<<<<<<<<<<
 * 
 * # socket options
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__UPSTREAM));
    PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__UPSTREAM));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UPSTREAM));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__DOWNSTREAM));
    PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__DOWNSTREAM));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DOWNSTREAM));
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "zmq/core/constants.pyx":70
 * 
 * # socket options
 * AFFINITY = ZMQ_AFFINITY             # <<<<<<<<<<<<<<
 * SUBSCRIBE = ZMQ_SUBSCRIBE
 * UNSUBSCRIBE = ZMQ_UNSUBSCRIBE
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_AFFINITY); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__AFFINITY, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":71
 * # socket options
 * AFFINITY = ZMQ_AFFINITY
 * SUBSCRIBE = ZMQ_SUBSCRIBE             # <<<<<<<<<<<<<<
 * UNSUBSCRIBE = ZMQ_UNSUBSCRIBE
 * RATE = ZMQ_RATE
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_SUBSCRIBE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SUBSCRIBE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":72
 * AFFINITY = ZMQ_AFFINITY
 * SUBSCRIBE = ZMQ_SUBSCRIBE
 * UNSUBSCRIBE = ZMQ_UNSUBSCRIBE             # <<<<<<<<<<<<<<
 * RATE = ZMQ_RATE
 * RECOVERY_IVL = ZMQ_RECOVERY_IVL
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_UNSUBSCRIBE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__UNSUBSCRIBE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":73
 * SUBSCRIBE = ZMQ_SUBSCRIBE
 * UNSUBSCRIBE = ZMQ_UNSUBSCRIBE
 * RATE = ZMQ_RATE             # <<<<<<<<<<<<<<
 * RECOVERY_IVL = ZMQ_RECOVERY_IVL
 * RECONNECT_IVL_MAX = ZMQ_RECONNECT_IVL_MAX
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_RATE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RATE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":74
 * UNSUBSCRIBE = ZMQ_UNSUBSCRIBE
 * RATE = ZMQ_RATE
 * RECOVERY_IVL = ZMQ_RECOVERY_IVL             # <<<<<<<<<<<<<<
 * RECONNECT_IVL_MAX = ZMQ_RECONNECT_IVL_MAX
 * SNDBUF = ZMQ_SNDBUF
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_RECOVERY_IVL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RECOVERY_IVL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":75
 * RATE = ZMQ_RATE
 * RECOVERY_IVL = ZMQ_RECOVERY_IVL
 * RECONNECT_IVL_MAX = ZMQ_RECONNECT_IVL_MAX             # <<<<<<<<<<<<<<
 * SNDBUF = ZMQ_SNDBUF
 * RCVBUF = ZMQ_RCVBUF
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_RECONNECT_IVL_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RECONNECT_IVL_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":76
 * RECOVERY_IVL = ZMQ_RECOVERY_IVL
 * RECONNECT_IVL_MAX = ZMQ_RECONNECT_IVL_MAX
 * SNDBUF = ZMQ_SNDBUF             # <<<<<<<<<<<<<<
 * RCVBUF = ZMQ_RCVBUF
 * RCVMORE = ZMQ_RCVMORE
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_SNDBUF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDBUF, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":77
 * RECONNECT_IVL_MAX = ZMQ_RECONNECT_IVL_MAX
 * SNDBUF = ZMQ_SNDBUF
 * RCVBUF = ZMQ_RCVBUF             # <<<<<<<<<<<<<<
 * RCVMORE = ZMQ_RCVMORE
 * SNDMORE = ZMQ_SNDMORE
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_RCVBUF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVBUF, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":78
 * SNDBUF = ZMQ_SNDBUF
 * RCVBUF = ZMQ_RCVBUF
 * RCVMORE = ZMQ_RCVMORE             # <<<<<<<<<<<<<<
 * SNDMORE = ZMQ_SNDMORE
 * POLLIN = ZMQ_POLLIN
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_RCVMORE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVMORE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":79
 * RCVBUF = ZMQ_RCVBUF
 * RCVMORE = ZMQ_RCVMORE
 * SNDMORE = ZMQ_SNDMORE             # <<<<<<<<<<<<<<
 * POLLIN = ZMQ_POLLIN
 * POLLOUT = ZMQ_POLLOUT
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_SNDMORE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDMORE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":80
 * RCVMORE = ZMQ_RCVMORE
 * SNDMORE = ZMQ_SNDMORE
 * POLLIN = ZMQ_POLLIN             # <<<<<<<<<<<<<<
 * POLLOUT = ZMQ_POLLOUT
 * POLLERR = ZMQ_POLLERR
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_POLLIN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__POLLIN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":81
 * SNDMORE = ZMQ_SNDMORE
 * POLLIN = ZMQ_POLLIN
 * POLLOUT = ZMQ_POLLOUT             # <<<<<<<<<<<<<<
 * POLLERR = ZMQ_POLLERR
 * 
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_POLLOUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__POLLOUT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":82
 * POLLIN = ZMQ_POLLIN
 * POLLOUT = ZMQ_POLLOUT
 * POLLERR = ZMQ_POLLERR             # <<<<<<<<<<<<<<
 * 
 * STREAMER = ZMQ_STREAMER
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_POLLERR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__POLLERR, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":84
 * POLLERR = ZMQ_POLLERR
 * 
 * STREAMER = ZMQ_STREAMER             # <<<<<<<<<<<<<<
 * FORWARDER = ZMQ_FORWARDER
 * QUEUE = ZMQ_QUEUE
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_STREAMER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__STREAMER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":85
 * 
 * STREAMER = ZMQ_STREAMER
 * FORWARDER = ZMQ_FORWARDER             # <<<<<<<<<<<<<<
 * QUEUE = ZMQ_QUEUE
 * 
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_FORWARDER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FORWARDER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":86
 * STREAMER = ZMQ_STREAMER
 * FORWARDER = ZMQ_FORWARDER
 * QUEUE = ZMQ_QUEUE             # <<<<<<<<<<<<<<
 * 
 * # collections of sockopts, based on type:
 */
  __pyx_t_1 = PyInt_FromLong(ZMQ_QUEUE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__QUEUE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "zmq/core/constants.pyx":89
 * 
 * # collections of sockopts, based on type:
 * bytes_sockopts = [SUBSCRIBE, UNSUBSCRIBE]             # <<<<<<<<<<<<<<
 * int64_sockopts = [AFFINITY]
 * int_sockopts = [RECONNECT_IVL_MAX]
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__SUBSCRIBE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__UNSUBSCRIBE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bytes_sockopts, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "zmq/core/constants.pyx":90
 * # collections of sockopts, based on type:
 * bytes_sockopts = [SUBSCRIBE, UNSUBSCRIBE]
 * int64_sockopts = [AFFINITY]             # <<<<<<<<<<<<<<
 * int_sockopts = [RECONNECT_IVL_MAX]
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__AFFINITY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__int64_sockopts, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":91
 * bytes_sockopts = [SUBSCRIBE, UNSUBSCRIBE]
 * int64_sockopts = [AFFINITY]
 * int_sockopts = [RECONNECT_IVL_MAX]             # <<<<<<<<<<<<<<
 * 
 * # some sockopts changed type from 2.x to 3.0
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__RECONNECT_IVL_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__int_sockopts, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "zmq/core/constants.pyx":94
 * 
 * # some sockopts changed type from 2.x to 3.0
 * switched = [RATE, RECOVERY_IVL, SNDBUF, RCVBUF, RCVMORE]             # <<<<<<<<<<<<<<
 * if ZMQ_VERSION < 30000:
 *     int64_sockopts.extend(switched)
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__RATE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__RECOVERY_IVL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__SNDBUF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__RCVBUF); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__RCVMORE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyList_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__switched, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

  /* "zmq/core/constants.pyx":95
 * # some sockopts changed type from 2.x to 3.0
 * switched = [RATE, RECOVERY_IVL, SNDBUF, RCVBUF, RCVMORE]
 * if ZMQ_VERSION < 30000:             # <<<<<<<<<<<<<<
 *     int64_sockopts.extend(switched)
 * else:
 */
  __pyx_t_2 = (ZMQ_VERSION < 30000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":96
 * switched = [RATE, RECOVERY_IVL, SNDBUF, RCVBUF, RCVMORE]
 * if ZMQ_VERSION < 30000:
 *     int64_sockopts.extend(switched)             # <<<<<<<<<<<<<<
 * else:
 *     int_sockopts.extend(switched)
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__int64_sockopts); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__switched); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":98
 *     int64_sockopts.extend(switched)
 * else:
 *     int_sockopts.extend(switched)             # <<<<<<<<<<<<<<
 * 
 * if ZMQ_VERSION < 30000:
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__int_sockopts); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__switched); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_L6:;

  /* "zmq/core/constants.pyx":100
 *     int_sockopts.extend(switched)
 * 
 * if ZMQ_VERSION < 30000:             # <<<<<<<<<<<<<<
 *     # sockopts removed in 3.0.0
 *     HWM = ZMQ_HWM
 */
  __pyx_t_2 = (ZMQ_VERSION < 30000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":102
 * if ZMQ_VERSION < 30000:
 *     # sockopts removed in 3.0.0
 *     HWM = ZMQ_HWM             # <<<<<<<<<<<<<<
 *     SWAP = ZMQ_SWAP
 *     MCAST_LOOP = ZMQ_MCAST_LOOP
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_HWM); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__HWM, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":103
 *     # sockopts removed in 3.0.0
 *     HWM = ZMQ_HWM
 *     SWAP = ZMQ_SWAP             # <<<<<<<<<<<<<<
 *     MCAST_LOOP = ZMQ_MCAST_LOOP
 *     RECOVERY_IVL_MSEC = ZMQ_RECOVERY_IVL_MSEC
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_SWAP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SWAP, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":104
 *     HWM = ZMQ_HWM
 *     SWAP = ZMQ_SWAP
 *     MCAST_LOOP = ZMQ_MCAST_LOOP             # <<<<<<<<<<<<<<
 *     RECOVERY_IVL_MSEC = ZMQ_RECOVERY_IVL_MSEC
 *     _optionals.extend(['HWM', 'SWAP', 'MCAST_LOOP', 'RECOVERY_IVL_MSEC'])
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_MCAST_LOOP); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MCAST_LOOP, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":105
 *     SWAP = ZMQ_SWAP
 *     MCAST_LOOP = ZMQ_MCAST_LOOP
 *     RECOVERY_IVL_MSEC = ZMQ_RECOVERY_IVL_MSEC             # <<<<<<<<<<<<<<
 *     _optionals.extend(['HWM', 'SWAP', 'MCAST_LOOP', 'RECOVERY_IVL_MSEC'])
 *     int64_sockopts.extend([HWM, SWAP, MCAST_LOOP, RECOVERY_IVL_MSEC])
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_RECOVERY_IVL_MSEC); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RECOVERY_IVL_MSEC, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":106
 *     MCAST_LOOP = ZMQ_MCAST_LOOP
 *     RECOVERY_IVL_MSEC = ZMQ_RECOVERY_IVL_MSEC
 *     _optionals.extend(['HWM', 'SWAP', 'MCAST_LOOP', 'RECOVERY_IVL_MSEC'])             # <<<<<<<<<<<<<<
 *     int64_sockopts.extend([HWM, SWAP, MCAST_LOOP, RECOVERY_IVL_MSEC])
 * else:
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__extend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__HWM));
    PyList_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__HWM));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__HWM));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__SWAP));
    PyList_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__SWAP));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SWAP));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__MCAST_LOOP));
    PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_n_s__MCAST_LOOP));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MCAST_LOOP));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__RECOVERY_IVL_MSEC));
    PyList_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_n_s__RECOVERY_IVL_MSEC));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RECOVERY_IVL_MSEC));
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
    __pyx_t_7 = 0;
    __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":107
 *     RECOVERY_IVL_MSEC = ZMQ_RECOVERY_IVL_MSEC
 *     _optionals.extend(['HWM', 'SWAP', 'MCAST_LOOP', 'RECOVERY_IVL_MSEC'])
 *     int64_sockopts.extend([HWM, SWAP, MCAST_LOOP, RECOVERY_IVL_MSEC])             # <<<<<<<<<<<<<<
 * else:
 *     # new in 3.0.0
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__int64_sockopts); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__HWM); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__SWAP); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__MCAST_LOOP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__RECOVERY_IVL_MSEC); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":110
 * else:
 *     # new in 3.0.0
 *     MAXMSGSIZE = ZMQ_MAXMSGSIZE             # <<<<<<<<<<<<<<
 *     SNDHWM = ZMQ_SNDHWM
 *     RCVHWM = ZMQ_RCVHWM
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_MAXMSGSIZE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MAXMSGSIZE, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":111
 *     # new in 3.0.0
 *     MAXMSGSIZE = ZMQ_MAXMSGSIZE
 *     SNDHWM = ZMQ_SNDHWM             # <<<<<<<<<<<<<<
 *     RCVHWM = ZMQ_RCVHWM
 *     SNDLABEL = ZMQ_SNDLABEL # a FLAG, not a sockopt
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_SNDHWM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDHWM, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":112
 *     MAXMSGSIZE = ZMQ_MAXMSGSIZE
 *     SNDHWM = ZMQ_SNDHWM
 *     RCVHWM = ZMQ_RCVHWM             # <<<<<<<<<<<<<<
 *     SNDLABEL = ZMQ_SNDLABEL # a FLAG, not a sockopt
 *     RCVLABEL = ZMQ_RCVLABEL
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_RCVHWM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVHWM, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":113
 *     SNDHWM = ZMQ_SNDHWM
 *     RCVHWM = ZMQ_RCVHWM
 *     SNDLABEL = ZMQ_SNDLABEL # a FLAG, not a sockopt             # <<<<<<<<<<<<<<
 *     RCVLABEL = ZMQ_RCVLABEL
 *     SNDTIMEO = ZMQ_SNDTIMEO
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_SNDLABEL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDLABEL, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":114
 *     RCVHWM = ZMQ_RCVHWM
 *     SNDLABEL = ZMQ_SNDLABEL # a FLAG, not a sockopt
 *     RCVLABEL = ZMQ_RCVLABEL             # <<<<<<<<<<<<<<
 *     SNDTIMEO = ZMQ_SNDTIMEO
 *     RCVTIMEO = ZMQ_RCVTIMEO
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_RCVLABEL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVLABEL, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":115
 *     SNDLABEL = ZMQ_SNDLABEL # a FLAG, not a sockopt
 *     RCVLABEL = ZMQ_RCVLABEL
 *     SNDTIMEO = ZMQ_SNDTIMEO             # <<<<<<<<<<<<<<
 *     RCVTIMEO = ZMQ_RCVTIMEO
 *     MULTICAST_HOPS = ZMQ_MULTICAST_HOPS
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_SNDTIMEO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDTIMEO, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":116
 *     RCVLABEL = ZMQ_RCVLABEL
 *     SNDTIMEO = ZMQ_SNDTIMEO
 *     RCVTIMEO = ZMQ_RCVTIMEO             # <<<<<<<<<<<<<<
 *     MULTICAST_HOPS = ZMQ_MULTICAST_HOPS
 * 
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_RCVTIMEO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVTIMEO, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":117
 *     SNDTIMEO = ZMQ_SNDTIMEO
 *     RCVTIMEO = ZMQ_RCVTIMEO
 *     MULTICAST_HOPS = ZMQ_MULTICAST_HOPS             # <<<<<<<<<<<<<<
 * 
 *     _optionals.extend(['MAXMSGSIZE', 'SNDHWM', 'RCVHWM', 'MULTICAST_HOPS',
 */
    __pyx_t_3 = PyInt_FromLong(ZMQ_MULTICAST_HOPS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__MULTICAST_HOPS, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":119
 *     MULTICAST_HOPS = ZMQ_MULTICAST_HOPS
 * 
 *     _optionals.extend(['MAXMSGSIZE', 'SNDHWM', 'RCVHWM', 'MULTICAST_HOPS',             # <<<<<<<<<<<<<<
 *                         'RCVTIMEO', 'SNDTIMEO'])
 *     int64_sockopts.append(MAXMSGSIZE)
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__extend); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__MAXMSGSIZE));
    PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__MAXMSGSIZE));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MAXMSGSIZE));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__SNDHWM));
    PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__SNDHWM));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNDHWM));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__RCVHWM));
    PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__RCVHWM));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RCVHWM));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__MULTICAST_HOPS));
    PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__MULTICAST_HOPS));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MULTICAST_HOPS));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__RCVTIMEO));
    PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__RCVTIMEO));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RCVTIMEO));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__SNDTIMEO));
    PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_n_s__SNDTIMEO));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNDTIMEO));
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "zmq/core/constants.pyx":121
 *     _optionals.extend(['MAXMSGSIZE', 'SNDHWM', 'RCVHWM', 'MULTICAST_HOPS',
 *                         'RCVTIMEO', 'SNDTIMEO'])
 *     int64_sockopts.append(MAXMSGSIZE)             # <<<<<<<<<<<<<<
 *     int_sockopts.extend([SNDHWM, RCVHWM, MULTICAST_HOPS, RCVTIMEO, SNDTIMEO])
 * 
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__int64_sockopts); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__MAXMSGSIZE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "zmq/core/constants.pyx":122
 *                         'RCVTIMEO', 'SNDTIMEO'])
 *     int64_sockopts.append(MAXMSGSIZE)
 *     int_sockopts.extend([SNDHWM, RCVHWM, MULTICAST_HOPS, RCVTIMEO, SNDTIMEO])             # <<<<<<<<<<<<<<
 * 
 * if ZMQ_VERSION < 40000:
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__int_sockopts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__SNDHWM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__RCVHWM); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__MULTICAST_HOPS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__RCVTIMEO); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__SNDTIMEO); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_8, 4, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_8));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L7:;

  /* "zmq/core/constants.pyx":124
 *     int_sockopts.extend([SNDHWM, RCVHWM, MULTICAST_HOPS, RCVTIMEO, SNDTIMEO])
 * 
 * if ZMQ_VERSION < 40000:             # <<<<<<<<<<<<<<
 *     # removed in 4.0.0
 *     IDENTITY = ZMQ_IDENTITY
 */
  __pyx_t_2 = (ZMQ_VERSION < 40000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":126
 * if ZMQ_VERSION < 40000:
 *     # removed in 4.0.0
 *     IDENTITY = ZMQ_IDENTITY             # <<<<<<<<<<<<<<
 *     bytes_sockopts.append(IDENTITY)
 *     _optionals.append('IDENTITY')
 */
    __pyx_t_8 = PyInt_FromLong(ZMQ_IDENTITY); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IDENTITY, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "zmq/core/constants.pyx":127
 *     # removed in 4.0.0
 *     IDENTITY = ZMQ_IDENTITY
 *     bytes_sockopts.append(IDENTITY)             # <<<<<<<<<<<<<<
 *     _optionals.append('IDENTITY')
 * else:
 */
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__bytes_sockopts); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__IDENTITY); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "zmq/core/constants.pyx":128
 *     IDENTITY = ZMQ_IDENTITY
 *     bytes_sockopts.append(IDENTITY)
 *     _optionals.append('IDENTITY')             # <<<<<<<<<<<<<<
 * else:
 *     # new in 4.0.0
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_5, ((PyObject *)__pyx_n_s__IDENTITY)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "zmq/core/constants.pyx":131
 * else:
 *     # new in 4.0.0
 *     RCVCMD = ZMQ_RCVCMD             # <<<<<<<<<<<<<<
 *     SNDCMD = ZMQ_SNDCMD # flag, not a sockopt
 *     int_sockopts.append(RCVCMD)
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_RCVCMD); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RCVCMD, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":132
 *     # new in 4.0.0
 *     RCVCMD = ZMQ_RCVCMD
 *     SNDCMD = ZMQ_SNDCMD # flag, not a sockopt             # <<<<<<<<<<<<<<
 *     int_sockopts.append(RCVCMD)
 *     _optionals.append('RCVCMD')
 */
    __pyx_t_7 = PyInt_FromLong(ZMQ_SNDCMD); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__SNDCMD, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "zmq/core/constants.pyx":133
 *     RCVCMD = ZMQ_RCVCMD
 *     SNDCMD = ZMQ_SNDCMD # flag, not a sockopt
 *     int_sockopts.append(RCVCMD)             # <<<<<<<<<<<<<<
 *     _optionals.append('RCVCMD')
 * 
 */
    __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__int_sockopts); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__RCVCMD); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "zmq/core/constants.pyx":134
 *     SNDCMD = ZMQ_SNDCMD # flag, not a sockopt
 *     int_sockopts.append(RCVCMD)
 *     _optionals.append('RCVCMD')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_8, ((PyObject *)__pyx_n_s__RCVCMD)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L8:;

  /* "zmq/core/constants.pyx":138
 * 
 * 
 * FD = ZMQ_FD             # <<<<<<<<<<<<<<
 * EVENTS = ZMQ_EVENTS
 * TYPE = ZMQ_TYPE
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_FD); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FD, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":139
 * 
 * FD = ZMQ_FD
 * EVENTS = ZMQ_EVENTS             # <<<<<<<<<<<<<<
 * TYPE = ZMQ_TYPE
 * LINGER = ZMQ_LINGER
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_EVENTS); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EVENTS, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":140
 * FD = ZMQ_FD
 * EVENTS = ZMQ_EVENTS
 * TYPE = ZMQ_TYPE             # <<<<<<<<<<<<<<
 * LINGER = ZMQ_LINGER
 * RECONNECT_IVL = ZMQ_RECONNECT_IVL
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_TYPE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__TYPE, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":141
 * EVENTS = ZMQ_EVENTS
 * TYPE = ZMQ_TYPE
 * LINGER = ZMQ_LINGER             # <<<<<<<<<<<<<<
 * RECONNECT_IVL = ZMQ_RECONNECT_IVL
 * BACKLOG = ZMQ_BACKLOG
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_LINGER); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__LINGER, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":142
 * TYPE = ZMQ_TYPE
 * LINGER = ZMQ_LINGER
 * RECONNECT_IVL = ZMQ_RECONNECT_IVL             # <<<<<<<<<<<<<<
 * BACKLOG = ZMQ_BACKLOG
 * int_sockopts.extend([EVENTS, TYPE, LINGER, RECONNECT_IVL, BACKLOG])
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_RECONNECT_IVL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__RECONNECT_IVL, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":143
 * LINGER = ZMQ_LINGER
 * RECONNECT_IVL = ZMQ_RECONNECT_IVL
 * BACKLOG = ZMQ_BACKLOG             # <<<<<<<<<<<<<<
 * int_sockopts.extend([EVENTS, TYPE, LINGER, RECONNECT_IVL, BACKLOG])
 * 
 */
  __pyx_t_5 = PyInt_FromLong(ZMQ_BACKLOG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BACKLOG, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "zmq/core/constants.pyx":144
 * RECONNECT_IVL = ZMQ_RECONNECT_IVL
 * BACKLOG = ZMQ_BACKLOG
 * int_sockopts.extend([EVENTS, TYPE, LINGER, RECONNECT_IVL, BACKLOG])             # <<<<<<<<<<<<<<
 * 
 * # As new constants are added in future versions, add a new block here
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__int_sockopts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__extend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__EVENTS); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__TYPE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__LINGER); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__RECONNECT_IVL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__BACKLOG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_7 = 0;
  __pyx_t_6 = 0;
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":156
 * 
 * # Often used (these are alse in errno.)
 * EAGAIN = ZMQ_EAGAIN             # <<<<<<<<<<<<<<
 * EINVAL = ZMQ_EINVAL
 * EFAULT = ZMQ_EFAULT
 */
  __pyx_t_4 = PyInt_FromLong(EAGAIN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EAGAIN, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":157
 * # Often used (these are alse in errno.)
 * EAGAIN = ZMQ_EAGAIN
 * EINVAL = ZMQ_EINVAL             # <<<<<<<<<<<<<<
 * EFAULT = ZMQ_EFAULT
 * ENOMEM = ZMQ_ENOMEM
 */
  __pyx_t_4 = PyInt_FromLong(EINVAL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EINVAL, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":158
 * EAGAIN = ZMQ_EAGAIN
 * EINVAL = ZMQ_EINVAL
 * EFAULT = ZMQ_EFAULT             # <<<<<<<<<<<<<<
 * ENOMEM = ZMQ_ENOMEM
 * ENODEV = ZMQ_ENODEV
 */
  __pyx_t_4 = PyInt_FromLong(EFAULT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EFAULT, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":159
 * EINVAL = ZMQ_EINVAL
 * EFAULT = ZMQ_EFAULT
 * ENOMEM = ZMQ_ENOMEM             # <<<<<<<<<<<<<<
 * ENODEV = ZMQ_ENODEV
 * 
 */
  __pyx_t_4 = PyInt_FromLong(ENOMEM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENOMEM, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":160
 * EFAULT = ZMQ_EFAULT
 * ENOMEM = ZMQ_ENOMEM
 * ENODEV = ZMQ_ENODEV             # <<<<<<<<<<<<<<
 * 
 * # For Windows compatability
 */
  __pyx_t_4 = PyInt_FromLong(ENODEV); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENODEV, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":163
 * 
 * # For Windows compatability
 * ENOTSUP = ZMQ_ENOTSUP             # <<<<<<<<<<<<<<
 * EPROTONOSUPPORT = ZMQ_EPROTONOSUPPORT
 * ENOBUFS = ZMQ_ENOBUFS
 */
  __pyx_t_4 = PyInt_FromLong(ENOTSUP); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENOTSUP, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":164
 * # For Windows compatability
 * ENOTSUP = ZMQ_ENOTSUP
 * EPROTONOSUPPORT = ZMQ_EPROTONOSUPPORT             # <<<<<<<<<<<<<<
 * ENOBUFS = ZMQ_ENOBUFS
 * ENETDOWN = ZMQ_ENETDOWN
 */
  __pyx_t_4 = PyInt_FromLong(EPROTONOSUPPORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EPROTONOSUPPORT, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":165
 * ENOTSUP = ZMQ_ENOTSUP
 * EPROTONOSUPPORT = ZMQ_EPROTONOSUPPORT
 * ENOBUFS = ZMQ_ENOBUFS             # <<<<<<<<<<<<<<
 * ENETDOWN = ZMQ_ENETDOWN
 * EADDRINUSE = ZMQ_EADDRINUSE
 */
  __pyx_t_4 = PyInt_FromLong(ENOBUFS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENOBUFS, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":166
 * EPROTONOSUPPORT = ZMQ_EPROTONOSUPPORT
 * ENOBUFS = ZMQ_ENOBUFS
 * ENETDOWN = ZMQ_ENETDOWN             # <<<<<<<<<<<<<<
 * EADDRINUSE = ZMQ_EADDRINUSE
 * EADDRNOTAVAIL = ZMQ_EADDRNOTAVAIL
 */
  __pyx_t_4 = PyInt_FromLong(ENETDOWN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENETDOWN, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":167
 * ENOBUFS = ZMQ_ENOBUFS
 * ENETDOWN = ZMQ_ENETDOWN
 * EADDRINUSE = ZMQ_EADDRINUSE             # <<<<<<<<<<<<<<
 * EADDRNOTAVAIL = ZMQ_EADDRNOTAVAIL
 * ECONNREFUSED = ZMQ_ECONNREFUSED
 */
  __pyx_t_4 = PyInt_FromLong(EADDRINUSE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EADDRINUSE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":168
 * ENETDOWN = ZMQ_ENETDOWN
 * EADDRINUSE = ZMQ_EADDRINUSE
 * EADDRNOTAVAIL = ZMQ_EADDRNOTAVAIL             # <<<<<<<<<<<<<<
 * ECONNREFUSED = ZMQ_ECONNREFUSED
 * EINPROGRESS = ZMQ_EINPROGRESS
 */
  __pyx_t_4 = PyInt_FromLong(EADDRNOTAVAIL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EADDRNOTAVAIL, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":169
 * EADDRINUSE = ZMQ_EADDRINUSE
 * EADDRNOTAVAIL = ZMQ_EADDRNOTAVAIL
 * ECONNREFUSED = ZMQ_ECONNREFUSED             # <<<<<<<<<<<<<<
 * EINPROGRESS = ZMQ_EINPROGRESS
 * ENOTSOCK = ZMQ_ENOTSOCK
 */
  __pyx_t_4 = PyInt_FromLong(ECONNREFUSED); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ECONNREFUSED, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":170
 * EADDRNOTAVAIL = ZMQ_EADDRNOTAVAIL
 * ECONNREFUSED = ZMQ_ECONNREFUSED
 * EINPROGRESS = ZMQ_EINPROGRESS             # <<<<<<<<<<<<<<
 * ENOTSOCK = ZMQ_ENOTSOCK
 * 
 */
  __pyx_t_4 = PyInt_FromLong(EINPROGRESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EINPROGRESS, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":171
 * ECONNREFUSED = ZMQ_ECONNREFUSED
 * EINPROGRESS = ZMQ_EINPROGRESS
 * ENOTSOCK = ZMQ_ENOTSOCK             # <<<<<<<<<<<<<<
 * 
 * # 0MQ Native
 */
  __pyx_t_4 = PyInt_FromLong(ENOTSOCK); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENOTSOCK, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":174
 * 
 * # 0MQ Native
 * EFSM = ZMQ_EFSM             # <<<<<<<<<<<<<<
 * ENOCOMPATPROTO = ZMQ_ENOCOMPATPROTO
 * ETERM = ZMQ_ETERM
 */
  __pyx_t_4 = PyInt_FromLong(EFSM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EFSM, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":175
 * # 0MQ Native
 * EFSM = ZMQ_EFSM
 * ENOCOMPATPROTO = ZMQ_ENOCOMPATPROTO             # <<<<<<<<<<<<<<
 * ETERM = ZMQ_ETERM
 * EMTHREAD = ZMQ_EMTHREAD
 */
  __pyx_t_4 = PyInt_FromLong(ENOCOMPATPROTO); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ENOCOMPATPROTO, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":176
 * EFSM = ZMQ_EFSM
 * ENOCOMPATPROTO = ZMQ_ENOCOMPATPROTO
 * ETERM = ZMQ_ETERM             # <<<<<<<<<<<<<<
 * EMTHREAD = ZMQ_EMTHREAD
 * if ZMQ_VERSION >= 400000:
 */
  __pyx_t_4 = PyInt_FromLong(ETERM); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ETERM, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":177
 * ENOCOMPATPROTO = ZMQ_ENOCOMPATPROTO
 * ETERM = ZMQ_ETERM
 * EMTHREAD = ZMQ_EMTHREAD             # <<<<<<<<<<<<<<
 * if ZMQ_VERSION >= 400000:
 *     ECANTROUTE = ZMQ_ECANTROUTE
 */
  __pyx_t_4 = PyInt_FromLong(EMTHREAD); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__EMTHREAD, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "zmq/core/constants.pyx":178
 * ETERM = ZMQ_ETERM
 * EMTHREAD = ZMQ_EMTHREAD
 * if ZMQ_VERSION >= 400000:             # <<<<<<<<<<<<<<
 *     ECANTROUTE = ZMQ_ECANTROUTE
 *     _optionals.append('ECANTROUTE')
 */
  __pyx_t_2 = (ZMQ_VERSION >= 400000);
  if (__pyx_t_2) {

    /* "zmq/core/constants.pyx":179
 * EMTHREAD = ZMQ_EMTHREAD
 * if ZMQ_VERSION >= 400000:
 *     ECANTROUTE = ZMQ_ECANTROUTE             # <<<<<<<<<<<<<<
 *     _optionals.append('ECANTROUTE')
 * 
 */
    __pyx_t_4 = PyInt_FromLong(ECANTROUTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ECANTROUTE, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "zmq/core/constants.pyx":180
 * if ZMQ_VERSION >= 400000:
 *     ECANTROUTE = ZMQ_ECANTROUTE
 *     _optionals.append('ECANTROUTE')             # <<<<<<<<<<<<<<
 * 
 * #-----------------------------------------------------------------------------
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_4, ((PyObject *)__pyx_n_s__ECANTROUTE)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "zmq/core/constants.pyx":186
 * #-----------------------------------------------------------------------------
 * 
 * __all__ = [             # <<<<<<<<<<<<<<
 *     'NOBLOCK',
 *     'DONTWAIT',
 */
  __pyx_t_3 = PyList_New(58); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__NOBLOCK));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__NOBLOCK));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__NOBLOCK));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__DONTWAIT));
  PyList_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_n_s__DONTWAIT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DONTWAIT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__FD));
  PyList_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_n_s__FD));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FD));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EVENTS));
  PyList_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_n_s__EVENTS));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EVENTS));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__TYPE));
  PyList_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_n_s__TYPE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__TYPE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__LINGER));
  PyList_SET_ITEM(__pyx_t_3, 5, ((PyObject *)__pyx_n_s__LINGER));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__LINGER));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RECONNECT_IVL));
  PyList_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_n_s__RECONNECT_IVL));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RECONNECT_IVL));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__BACKLOG));
  PyList_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_n_s__BACKLOG));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__BACKLOG));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PAIR));
  PyList_SET_ITEM(__pyx_t_3, 8, ((PyObject *)__pyx_n_s__PAIR));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PAIR));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PUB));
  PyList_SET_ITEM(__pyx_t_3, 9, ((PyObject *)__pyx_n_s__PUB));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PUB));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__SUB));
  PyList_SET_ITEM(__pyx_t_3, 10, ((PyObject *)__pyx_n_s__SUB));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SUB));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__XPUB));
  PyList_SET_ITEM(__pyx_t_3, 11, ((PyObject *)__pyx_n_s__XPUB));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__XPUB));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__XSUB));
  PyList_SET_ITEM(__pyx_t_3, 12, ((PyObject *)__pyx_n_s__XSUB));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__XSUB));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__REQ));
  PyList_SET_ITEM(__pyx_t_3, 13, ((PyObject *)__pyx_n_s__REQ));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REQ));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__REP));
  PyList_SET_ITEM(__pyx_t_3, 14, ((PyObject *)__pyx_n_s__REP));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__REP));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__XREQ));
  PyList_SET_ITEM(__pyx_t_3, 15, ((PyObject *)__pyx_n_s__XREQ));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__XREQ));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__DEALER));
  PyList_SET_ITEM(__pyx_t_3, 16, ((PyObject *)__pyx_n_s__DEALER));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DEALER));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__XREP));
  PyList_SET_ITEM(__pyx_t_3, 17, ((PyObject *)__pyx_n_s__XREP));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__XREP));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ROUTER));
  PyList_SET_ITEM(__pyx_t_3, 18, ((PyObject *)__pyx_n_s__ROUTER));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ROUTER));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PULL));
  PyList_SET_ITEM(__pyx_t_3, 19, ((PyObject *)__pyx_n_s__PULL));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PULL));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PUSH));
  PyList_SET_ITEM(__pyx_t_3, 20, ((PyObject *)__pyx_n_s__PUSH));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PUSH));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__AFFINITY));
  PyList_SET_ITEM(__pyx_t_3, 21, ((PyObject *)__pyx_n_s__AFFINITY));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__AFFINITY));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__SUBSCRIBE));
  PyList_SET_ITEM(__pyx_t_3, 22, ((PyObject *)__pyx_n_s__SUBSCRIBE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SUBSCRIBE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__UNSUBSCRIBE));
  PyList_SET_ITEM(__pyx_t_3, 23, ((PyObject *)__pyx_n_s__UNSUBSCRIBE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__UNSUBSCRIBE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RATE));
  PyList_SET_ITEM(__pyx_t_3, 24, ((PyObject *)__pyx_n_s__RATE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RATE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RECOVERY_IVL));
  PyList_SET_ITEM(__pyx_t_3, 25, ((PyObject *)__pyx_n_s__RECOVERY_IVL));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RECOVERY_IVL));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RECONNECT_IVL_MAX));
  PyList_SET_ITEM(__pyx_t_3, 26, ((PyObject *)__pyx_n_s__RECONNECT_IVL_MAX));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RECONNECT_IVL_MAX));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__SNDBUF));
  PyList_SET_ITEM(__pyx_t_3, 27, ((PyObject *)__pyx_n_s__SNDBUF));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNDBUF));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RCVBUF));
  PyList_SET_ITEM(__pyx_t_3, 28, ((PyObject *)__pyx_n_s__RCVBUF));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RCVBUF));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__SNDMORE));
  PyList_SET_ITEM(__pyx_t_3, 29, ((PyObject *)__pyx_n_s__SNDMORE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__SNDMORE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__RCVMORE));
  PyList_SET_ITEM(__pyx_t_3, 30, ((PyObject *)__pyx_n_s__RCVMORE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__RCVMORE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__POLLIN));
  PyList_SET_ITEM(__pyx_t_3, 31, ((PyObject *)__pyx_n_s__POLLIN));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__POLLIN));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__POLLOUT));
  PyList_SET_ITEM(__pyx_t_3, 32, ((PyObject *)__pyx_n_s__POLLOUT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__POLLOUT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__POLLERR));
  PyList_SET_ITEM(__pyx_t_3, 33, ((PyObject *)__pyx_n_s__POLLERR));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__POLLERR));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__STREAMER));
  PyList_SET_ITEM(__pyx_t_3, 34, ((PyObject *)__pyx_n_s__STREAMER));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__STREAMER));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__FORWARDER));
  PyList_SET_ITEM(__pyx_t_3, 35, ((PyObject *)__pyx_n_s__FORWARDER));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__FORWARDER));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__QUEUE));
  PyList_SET_ITEM(__pyx_t_3, 36, ((PyObject *)__pyx_n_s__QUEUE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__QUEUE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EAGAIN));
  PyList_SET_ITEM(__pyx_t_3, 37, ((PyObject *)__pyx_n_s__EAGAIN));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EAGAIN));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EINVAL));
  PyList_SET_ITEM(__pyx_t_3, 38, ((PyObject *)__pyx_n_s__EINVAL));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EINVAL));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENOTSUP));
  PyList_SET_ITEM(__pyx_t_3, 39, ((PyObject *)__pyx_n_s__ENOTSUP));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENOTSUP));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EPROTONOSUPPORT));
  PyList_SET_ITEM(__pyx_t_3, 40, ((PyObject *)__pyx_n_s__EPROTONOSUPPORT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EPROTONOSUPPORT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENOBUFS));
  PyList_SET_ITEM(__pyx_t_3, 41, ((PyObject *)__pyx_n_s__ENOBUFS));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENOBUFS));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENETDOWN));
  PyList_SET_ITEM(__pyx_t_3, 42, ((PyObject *)__pyx_n_s__ENETDOWN));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENETDOWN));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EADDRINUSE));
  PyList_SET_ITEM(__pyx_t_3, 43, ((PyObject *)__pyx_n_s__EADDRINUSE));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EADDRINUSE));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EADDRNOTAVAIL));
  PyList_SET_ITEM(__pyx_t_3, 44, ((PyObject *)__pyx_n_s__EADDRNOTAVAIL));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EADDRNOTAVAIL));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ECONNREFUSED));
  PyList_SET_ITEM(__pyx_t_3, 45, ((PyObject *)__pyx_n_s__ECONNREFUSED));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ECONNREFUSED));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EINPROGRESS));
  PyList_SET_ITEM(__pyx_t_3, 46, ((PyObject *)__pyx_n_s__EINPROGRESS));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EINPROGRESS));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENOTSOCK));
  PyList_SET_ITEM(__pyx_t_3, 47, ((PyObject *)__pyx_n_s__ENOTSOCK));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENOTSOCK));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EFSM));
  PyList_SET_ITEM(__pyx_t_3, 48, ((PyObject *)__pyx_n_s__EFSM));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EFSM));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENOCOMPATPROTO));
  PyList_SET_ITEM(__pyx_t_3, 49, ((PyObject *)__pyx_n_s__ENOCOMPATPROTO));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENOCOMPATPROTO));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ETERM));
  PyList_SET_ITEM(__pyx_t_3, 50, ((PyObject *)__pyx_n_s__ETERM));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ETERM));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EMTHREAD));
  PyList_SET_ITEM(__pyx_t_3, 51, ((PyObject *)__pyx_n_s__EMTHREAD));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EMTHREAD));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__EFAULT));
  PyList_SET_ITEM(__pyx_t_3, 52, ((PyObject *)__pyx_n_s__EFAULT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__EFAULT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENOMEM));
  PyList_SET_ITEM(__pyx_t_3, 53, ((PyObject *)__pyx_n_s__ENOMEM));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENOMEM));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ENODEV));
  PyList_SET_ITEM(__pyx_t_3, 54, ((PyObject *)__pyx_n_s__ENODEV));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ENODEV));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bytes_sockopts));
  PyList_SET_ITEM(__pyx_t_3, 55, ((PyObject *)__pyx_n_s__bytes_sockopts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bytes_sockopts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int_sockopts));
  PyList_SET_ITEM(__pyx_t_3, 56, ((PyObject *)__pyx_n_s__int_sockopts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int_sockopts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__int64_sockopts));
  PyList_SET_ITEM(__pyx_t_3, 57, ((PyObject *)__pyx_n_s__int64_sockopts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__int64_sockopts));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____all__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "zmq/core/constants.pyx":248
 *     'int64_sockopts'
 * ]
 * __all__.extend(_optionals)             # <<<<<<<<<<<<<<
 * del _optionals
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s____all__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__extend); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___optionals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "zmq/core/constants.pyx":249
 * ]
 * __all__.extend(_optionals)
 * del _optionals             # <<<<<<<<<<<<<<
 */
  if (__Pyx_DelAttrString(__pyx_m, "_optionals") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "zmq/core/constants.pyx":1
 * """0MQ Constants."""             # <<<<<<<<<<<<<<
 * 
 * #
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    __Pyx_AddTraceback("init zmq.core.constants", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init zmq.core.constants");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */

#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
