text: /* Generated by Cython 0.14.1 on Wed Jul  6 17:45:43 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)   PyInt_AsLong(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_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
  
  #ifdef __cplusplus
  #define __PYX_EXTERN_C extern "C"
  #else
  #define __PYX_EXTERN_C extern
  #endif
  
  #if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
  #endif
  #include <math.h>
  #define __PYX_HAVE_API__pybloomfilter
  #include "primetester.h"
  #include "mmapbitarray.h"
  #include "bloomfilter.h"
  #include "stdio.h"
  #include "pythread.h"
  
  #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_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[] = {
    "pybloomfilter.pyx",
    "bool.pxd",
    "complex.pxd",
  };
  
  /* Type declarations */
  
  /* "pybloomfilter.pyx":43
   *     pass
   * 
   * cdef class BloomFilter:             # <<<<<<<<<<<<<<
   *     """
   *     The BloomFilter class implements a bloom filter that uses mmap'd files.
   */
  
  struct __pyx_obj_13pybloomfilter_BloomFilter {
    PyObject_HEAD
    BloomFilter *_bf;
    int _closed;
    int _anonymous;
  };
  
  #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) {
      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;
    }
    #define __Pyx_RefNannySetupContext(name)           void *__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_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
  #else
    #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_XDECREF(r) Py_XDECREF(r)
  #endif /* CYTHON_REFNANNY */
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
  
  static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
  
  static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
  static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
      return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
  }
  
  static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
      Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
  
  static void __Pyx_RaiseDoubleKeywordsError(
      const char* func_name, PyObject* kw_name); /*proto*/
  
  static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
  
  static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
  static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
  
  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
  
  static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
      const char *name, int exact); /*proto*/
  
  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
  
  static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
  
  static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                     PyObject *modname); /*proto*/
  
  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 PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
  
  static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
  
  static void __Pyx_AddTraceback(const char *funcname); /*proto*/
  
  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
  /* Module declarations from cbloomfilter */
  
  /* Module declarations from cpython.version */
  
  /* Module declarations from cpython.ref */
  
  /* Module declarations from cpython.exc */
  
  /* Module declarations from cpython.module */
  
  /* Module declarations from cpython.mem */
  
  /* Module declarations from cpython.tuple */
  
  /* Module declarations from cpython.list */
  
  /* Module declarations from libc.stdio */
  
  /* Module declarations from cpython.object */
  
  /* Module declarations from cpython.sequence */
  
  /* Module declarations from cpython.mapping */
  
  /* Module declarations from cpython.iterator */
  
  /* Module declarations from cpython.type */
  
  /* Module declarations from cpython.number */
  
  /* Module declarations from cpython.int */
  
  /* Module declarations from __builtin__ */
  
  /* Module declarations from cpython.bool */
  
  static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
  /* Module declarations from cpython.long */
  
  /* Module declarations from cpython.float */
  
  /* Module declarations from __builtin__ */
  
  /* Module declarations from cpython.complex */
  
  static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
  /* Module declarations from cpython.string */
  
  /* Module declarations from cpython.unicode */
  
  /* Module declarations from cpython.dict */
  
  /* Module declarations from cpython.instance */
  
  /* Module declarations from cpython.function */
  
  /* Module declarations from cpython.method */
  
  /* Module declarations from cpython.weakref */
  
  /* Module declarations from cpython.getargs */
  
  /* Module declarations from cpython.pythread */
  
  /* Module declarations from cpython.cobject */
  
  /* Module declarations from cpython.oldbuffer */
  
  /* Module declarations from cpython.set */
  
  /* Module declarations from cpython.buffer */
  
  /* Module declarations from cpython.bytes */
  
  /* Module declarations from cpython.pycapsule */
  
  /* Module declarations from cpython */
  
  /* Module declarations from pybloomfilter */
  
  static PyTypeObject *__pyx_ptype_13pybloomfilter_BloomFilter = 0;
  static PyObject *__pyx_v_13pybloomfilter_NoConstruct = 0;
  static PyObject *__pyx_v_13pybloomfilter_ReadFile = 0;
  static PyObject *__pyx_f_13pybloomfilter_construct_mode(PyObject *); /*proto*/
  #define __Pyx_MODULE_NAME "pybloomfilter"
  static int __pyx_module_is_main_pybloomfilter = 0;
  
  /* Implementation of pybloomfilter */
  static PyObject *__pyx_builtin_object;
  static PyObject *__pyx_builtin_ValueError;
  static PyObject *__pyx_builtin_staticmethod;
  static PyObject *__pyx_builtin_open;
  static PyObject *__pyx_builtin_OSError;
  static PyObject *__pyx_builtin_range;
  static PyObject *__pyx_builtin___repr__;
  static PyObject *__pyx_builtin_RuntimeError;
  static char __pyx_k_1[] = "+";
  static char __pyx_k_3[] = "w+";
  static char __pyx_k_6[] = "rw+";
  static char __pyx_k_7[] = "A filename must be provided.";
  static char __pyx_k_9[] = "File %s not found";
  static char __pyx_k_10[] = "Insufficient permissions for file %s";
  static char __pyx_k_12[] = "Invalid Bloomfilter file: %s";
  static char __pyx_k_13[] = "%s: %s";
  static char __pyx_k_17[] = "<BloomFilter capacity: %d, error: %0.3f, num_hashes: %d>";
  static char __pyx_k_18[] = "Anonymous mapped files cannot be copied.";
  static char __pyx_k_21[] = "Some problem occured while trying to add key.";
  static char __pyx_k_23[] = "IndeterminateCountError";
  static char __pyx_k_24[] = "Length of BloomFilter object is unavailable after intersection or union called.";
  static char __pyx_k_26[] = "I/O operation on closed file";
  static char __pyx_k_28[] = "The two BloomFilter objects are not the same type (hint, use copy_template)";
  static char __pyx_k_33[] = "Michael Axiak";
  static char __pyx_k__I[] = "I";
  static char __pyx_k__b[] = "b";
  static char __pyx_k__r[] = "r";
  static char __pyx_k__w[] = "w";
  static char __pyx_k__fd[] = "fd";
  static char __pyx_k__os[] = "os";
  static char __pyx_k__rw[] = "rw";
  static char __pyx_k___bf[] = "_bf";
  static char __pyx_k__add[] = "add";
  static char __pyx_k__eno[] = "eno";
  static char __pyx_k__log[] = "log";
  static char __pyx_k__pow[] = "pow";
  static char __pyx_k__bits[] = "bits";
  static char __pyx_k__ceil[] = "ceil";
  static char __pyx_k__copy[] = "copy";
  static char __pyx_k__math[] = "math";
  static char __pyx_k__name[] = "name";
  static char __pyx_k__open[] = "open";
  static char __pyx_k__path[] = "path";
  static char __pyx_k__perm[] = "perm";
  static char __pyx_k__read[] = "read";
  static char __pyx_k__zlib[] = "zlib";
  static char __pyx_k__array[] = "array";
  static char __pyx_k__close[] = "close";
  static char __pyx_k__errno[] = "errno";
  static char __pyx_k__nhash[] = "nhash";
  static char __pyx_k__range[] = "range";
  static char __pyx_k__shash[] = "shash";
  static char __pyx_k__write[] = "write";
  static char __pyx_k__AUTHOR[] = "AUTHOR";
  static char __pyx_k__ENOENT[] = "ENOENT";
  static char __pyx_k__O_RDWR[] = "O_RDWR";
  static char __pyx_k__access[] = "access";
  static char __pyx_k__base64[] = "base64";
  static char __pyx_k__decode[] = "decode";
  static char __pyx_k__encode[] = "encode";
  static char __pyx_k__exists[] = "exists";
  static char __pyx_k__extend[] = "extend";
  static char __pyx_k__object[] = "object";
  static char __pyx_k__random[] = "random";
  static char __pyx_k__shutil[] = "shutil";
  static char __pyx_k__string[] = "string";
  static char __pyx_k__unlink[] = "unlink";
  static char __pyx_k__OSError[] = "OSError";
  static char __pyx_k__O_CREAT[] = "O_CREAT";
  static char __pyx_k__VERSION[] = "VERSION";
  static char __pyx_k___closed[] = "_closed";
  static char __pyx_k__O_BINARY[] = "O_BINARY";
  static char __pyx_k__O_RDONLY[] = "O_RDONLY";
  static char __pyx_k____main__[] = "__main__";
  static char __pyx_k____repr__[] = "__repr__";
  static char __pyx_k____test__[] = "__test__";
  static char __pyx_k__capacity[] = "capacity";
  static char __pyx_k__compress[] = "compress";
  static char __pyx_k__endswith[] = "endswith";
  static char __pyx_k__filename[] = "filename";
  static char __pyx_k__strerror[] = "strerror";
  static char __pyx_k__tostring[] = "tostring";
  static char __pyx_k__anonymous[] = "anonymous";
  static char __pyx_k__ValueError[] = "ValueError";
  static char __pyx_k___anonymous[] = "_anonymous";
  static char __pyx_k__decompress[] = "decompress";
  static char __pyx_k__elem_count[] = "elem_count";
  static char __pyx_k__error_rate[] = "error_rate";
  static char __pyx_k__fromstring[] = "fromstring";
  static char __pyx_k__hash_seeds[] = "hash_seeds";
  static char __pyx_k__num_hashes[] = "num_hashes";
  static char __pyx_k__from_base64[] = "from_base64";
  static char __pyx_k__getrandbits[] = "getrandbits";
  static char __pyx_k__RuntimeError[] = "RuntimeError";
  static char __pyx_k___assert_open[] = "_assert_open";
  static char __pyx_k__bf_from_file[] = "bf_from_file";
  static char __pyx_k__max_num_elem[] = "max_num_elem";
  static char __pyx_k__staticmethod[] = "staticmethod";
  static char __pyx_k__count_correct[] = "count_correct";
  static char __pyx_k__pybloomfilter[] = "pybloomfilter";
  static char __pyx_k__bf_from_base64[] = "bf_from_base64";
  static char __pyx_k___assert_comparable[] = "_assert_comparable";
  static PyObject *__pyx_kp_s_1;
  static PyObject *__pyx_kp_s_10;
  static PyObject *__pyx_kp_s_12;
  static PyObject *__pyx_kp_s_13;
  static PyObject *__pyx_kp_s_17;
  static PyObject *__pyx_kp_s_18;
  static PyObject *__pyx_kp_s_21;
  static PyObject *__pyx_n_s_23;
  static PyObject *__pyx_kp_s_24;
  static PyObject *__pyx_kp_s_26;
  static PyObject *__pyx_kp_s_28;
  static PyObject *__pyx_kp_s_3;
  static PyObject *__pyx_kp_s_33;
  static PyObject *__pyx_kp_s_6;
  static PyObject *__pyx_kp_s_7;
  static PyObject *__pyx_kp_s_9;
  static PyObject *__pyx_n_s__AUTHOR;
  static PyObject *__pyx_n_s__ENOENT;
  static PyObject *__pyx_n_s__I;
  static PyObject *__pyx_n_s__OSError;
  static PyObject *__pyx_n_s__O_BINARY;
  static PyObject *__pyx_n_s__O_CREAT;
  static PyObject *__pyx_n_s__O_RDONLY;
  static PyObject *__pyx_n_s__O_RDWR;
  static PyObject *__pyx_n_s__RuntimeError;
  static PyObject *__pyx_n_s__VERSION;
  static PyObject *__pyx_n_s__ValueError;
  static PyObject *__pyx_n_s____main__;
  static PyObject *__pyx_n_s____repr__;
  static PyObject *__pyx_n_s____test__;
  static PyObject *__pyx_n_s___anonymous;
  static PyObject *__pyx_n_s___assert_comparable;
  static PyObject *__pyx_n_s___assert_open;
  static PyObject *__pyx_n_s___bf;
  static PyObject *__pyx_n_s___closed;
  static PyObject *__pyx_n_s__access;
  static PyObject *__pyx_n_s__add;
  static PyObject *__pyx_n_s__anonymous;
  static PyObject *__pyx_n_s__array;
  static PyObject *__pyx_n_s__b;
  static PyObject *__pyx_n_s__base64;
  static PyObject *__pyx_n_s__bf_from_base64;
  static PyObject *__pyx_n_s__bf_from_file;
  static PyObject *__pyx_n_s__bits;
  static PyObject *__pyx_n_s__capacity;
  static PyObject *__pyx_n_s__ceil;
  static PyObject *__pyx_n_s__close;
  static PyObject *__pyx_n_s__compress;
  static PyObject *__pyx_n_s__copy;
  static PyObject *__pyx_n_s__count_correct;
  static PyObject *__pyx_n_s__decode;
  static PyObject *__pyx_n_s__decompress;
  static PyObject *__pyx_n_s__elem_count;
  static PyObject *__pyx_n_s__encode;
  static PyObject *__pyx_n_s__endswith;
  static PyObject *__pyx_n_s__eno;
  static PyObject *__pyx_n_s__errno;
  static PyObject *__pyx_n_s__error_rate;
  static PyObject *__pyx_n_s__exists;
  static PyObject *__pyx_n_s__extend;
  static PyObject *__pyx_n_s__fd;
  static PyObject *__pyx_n_s__filename;
  static PyObject *__pyx_n_s__from_base64;
  static PyObject *__pyx_n_s__fromstring;
  static PyObject *__pyx_n_s__getrandbits;
  static PyObject *__pyx_n_s__hash_seeds;
  static PyObject *__pyx_n_s__log;
  static PyObject *__pyx_n_s__math;
  static PyObject *__pyx_n_s__max_num_elem;
  static PyObject *__pyx_n_s__name;
  static PyObject *__pyx_n_s__nhash;
  static PyObject *__pyx_n_s__num_hashes;
  static PyObject *__pyx_n_s__object;
  static PyObject *__pyx_n_s__open;
  static PyObject *__pyx_n_s__os;
  static PyObject *__pyx_n_s__path;
  static PyObject *__pyx_n_s__perm;
  static PyObject *__pyx_n_s__pow;
  static PyObject *__pyx_n_s__pybloomfilter;
  static PyObject *__pyx_n_s__r;
  static PyObject *__pyx_n_s__random;
  static PyObject *__pyx_n_s__range;
  static PyObject *__pyx_n_s__read;
  static PyObject *__pyx_n_s__rw;
  static PyObject *__pyx_n_s__shash;
  static PyObject *__pyx_n_s__shutil;
  static PyObject *__pyx_n_s__staticmethod;
  static PyObject *__pyx_n_s__strerror;
  static PyObject *__pyx_n_s__string;
  static PyObject *__pyx_n_s__tostring;
  static PyObject *__pyx_n_s__unlink;
  static PyObject *__pyx_n_s__w;
  static PyObject *__pyx_n_s__write;
  static PyObject *__pyx_n_s__zlib;
  static PyObject *__pyx_int_0;
  static PyObject *__pyx_int_2;
  static PyObject *__pyx_int_4;
  static PyObject *__pyx_int_5;
  static PyObject *__pyx_int_9;
  static PyObject *__pyx_int_32;
  static PyObject *__pyx_int_0755;
  static PyObject *__pyx_k_tuple_2;
  static PyObject *__pyx_k_tuple_4;
  static PyObject *__pyx_k_tuple_5;
  static PyObject *__pyx_k_tuple_8;
  static PyObject *__pyx_k_tuple_11;
  static PyObject *__pyx_k_tuple_14;
  static PyObject *__pyx_k_tuple_15;
  static PyObject *__pyx_k_tuple_16;
  static PyObject *__pyx_k_tuple_19;
  static PyObject *__pyx_k_tuple_20;
  static PyObject *__pyx_k_tuple_22;
  static PyObject *__pyx_k_tuple_25;
  static PyObject *__pyx_k_tuple_27;
  static PyObject *__pyx_k_tuple_29;
  static PyObject *__pyx_k_tuple_30;
  static PyObject *__pyx_k_tuple_31;
  static PyObject *__pyx_k_tuple_32;
  
  /* "pybloomfilter.pyx":18
   * global errno
   * 
   * cdef construct_mode(mode):             # <<<<<<<<<<<<<<
   *     result = os.O_RDONLY
   *     if 'w' in mode:
   */
  
  static  PyObject *__pyx_f_13pybloomfilter_construct_mode(PyObject *__pyx_v_mode) {
    PyObject *__pyx_v_result;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    int __pyx_t_3;
    int __pyx_t_4;
    int __pyx_t_5;
    __Pyx_RefNannySetupContext("construct_mode");
    __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":19
   * 
   * cdef construct_mode(mode):
   *     result = os.O_RDONLY             # <<<<<<<<<<<<<<
   *     if 'w' in mode:
   *         result |= os.O_RDWR
   */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_RDONLY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":20
   * cdef construct_mode(mode):
   *     result = os.O_RDONLY
   *     if 'w' in mode:             # <<<<<<<<<<<<<<
   *         result |= os.O_RDWR
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):
   */
    __pyx_t_3 = ((PySequence_Contains(__pyx_v_mode, ((PyObject *)__pyx_n_s__w)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
  
      /* "pybloomfilter.pyx":21
   *     result = os.O_RDONLY
   *     if 'w' in mode:
   *         result |= os.O_RDWR             # <<<<<<<<<<<<<<
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):
   *         result |= os.O_BINARY
   */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__O_RDWR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L3;
    }
    __pyx_L3:;
  
    /* "pybloomfilter.pyx":22
   *     if 'w' in mode:
   *         result |= os.O_RDWR
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):             # <<<<<<<<<<<<<<
   *         result |= os.O_BINARY
   *     if mode.endswith('+'):
   */
    __pyx_t_3 = ((PySequence_Contains(__pyx_v_mode, ((PyObject *)__pyx_n_s__b)))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = ((PyObject *)__pyx_n_s__O_BINARY);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = PyObject_HasAttr(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {
  
      /* "pybloomfilter.pyx":23
   *         result |= os.O_RDWR
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):
   *         result |= os.O_BINARY             # <<<<<<<<<<<<<<
   *     if mode.endswith('+'):
   *         result |= os.O_CREAT
   */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__O_BINARY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceOr(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;
  
    /* "pybloomfilter.pyx":24
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):
   *         result |= os.O_BINARY
   *     if mode.endswith('+'):             # <<<<<<<<<<<<<<
   *         result |= os.O_CREAT
   *     return result
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_mode, __pyx_n_s__endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {
  
      /* "pybloomfilter.pyx":25
   *         result |= os.O_BINARY
   *     if mode.endswith('+'):
   *         result |= os.O_CREAT             # <<<<<<<<<<<<<<
   *     return result
   * 
   */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__O_CREAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceOr(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  
    /* "pybloomfilter.pyx":26
   *     if mode.endswith('+'):
   *         result |= os.O_CREAT
   *     return result             # <<<<<<<<<<<<<<
   * 
   * cdef NoConstruct = object()
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.construct_mode");
    __pyx_r = 0;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_result);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":31
   * cdef ReadFile = object()
   * 
   * def bf_from_base64(filename, string, perm=0755):             # <<<<<<<<<<<<<<
   *     bfile = open(filename, 'w+', perm)
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_bf_from_base64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static PyMethodDef __pyx_mdef_13pybloomfilter_bf_from_base64 = {__Pyx_NAMESTR("bf_from_base64"), (PyCFunction)__pyx_pf_13pybloomfilter_bf_from_base64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
  static PyObject *__pyx_pf_13pybloomfilter_bf_from_base64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_filename = 0;
    PyObject *__pyx_v_string = 0;
    PyObject *__pyx_v_perm = 0;
    PyObject *__pyx_v_bfile;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    PyObject *__pyx_t_4 = NULL;
    PyObject *__pyx_t_5 = NULL;
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__string,&__pyx_n_s__perm,0};
    __Pyx_RefNannySetupContext("bf_from_base64");
    __pyx_self = __pyx_self;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
      PyObject* values[3] = {0,0,0};
      values[2] = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__string);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("bf_from_base64", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__perm);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bf_from_base64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_filename = values[0];
      __pyx_v_string = values[1];
      __pyx_v_perm = values[2];
    } else {
      __pyx_v_perm = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3:
        __pyx_v_perm = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2:
        __pyx_v_string = PyTuple_GET_ITEM(__pyx_args, 1);
        __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    goto __pyx_L4_argument_unpacking_done;
    __pyx_L5_argtuple_error:;
    __Pyx_RaiseArgtupleInvalid("bf_from_base64", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_L3_error:;
    __Pyx_AddTraceback("pybloomfilter.bf_from_base64");
    __Pyx_RefNannyFinishContext();
    return NULL;
    __pyx_L4_argument_unpacking_done:;
    __pyx_v_bfile = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":32
   * 
   * def bf_from_base64(filename, string, perm=0755):
   *     bfile = open(filename, 'w+', perm)             # <<<<<<<<<<<<<<
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))
   *     bfile.close()
   */
    __pyx_t_1 = PyTuple_New(3); 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));
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
    __Pyx_INCREF(__pyx_v_perm);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_perm);
    __Pyx_GIVEREF(__pyx_v_perm);
    __pyx_t_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_bfile);
    __pyx_v_bfile = __pyx_t_2;
    __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":33
   * def bf_from_base64(filename, string, perm=0755):
   *     bfile = open(filename, 'w+', perm)
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))             # <<<<<<<<<<<<<<
   *     bfile.close()
   *     return BloomFilter.open(filename)
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_bfile, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__decompress); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__decompress); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_string, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  
    /* "pybloomfilter.pyx":34
   *     bfile = open(filename, 'w+', perm)
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))
   *     bfile.close()             # <<<<<<<<<<<<<<
   *     return BloomFilter.open(filename)
   * 
   */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_bfile, __pyx_n_s__close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":35
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))
   *     bfile.close()
   *     return BloomFilter.open(filename)             # <<<<<<<<<<<<<<
   * 
   * def bf_from_file(filename):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_13pybloomfilter_BloomFilter)), __pyx_n_s__open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5);
    __Pyx_AddTraceback("pybloomfilter.bf_from_base64");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_bfile);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":37
   *     return BloomFilter.open(filename)
   * 
   * def bf_from_file(filename):             # <<<<<<<<<<<<<<
   *     return BloomFilter(ReadFile, 0.1, filename, 0)
   * 
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_1bf_from_file(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
  static PyMethodDef __pyx_mdef_13pybloomfilter_1bf_from_file = {__Pyx_NAMESTR("bf_from_file"), (PyCFunction)__pyx_pf_13pybloomfilter_1bf_from_file, METH_O, __Pyx_DOCSTR(0)};
  static PyObject *__pyx_pf_13pybloomfilter_1bf_from_file(PyObject *__pyx_self, PyObject *__pyx_v_filename) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("bf_from_file");
    __pyx_self = __pyx_self;
  
    /* "pybloomfilter.pyx":38
   * 
   * def bf_from_file(filename):
   *     return BloomFilter(ReadFile, 0.1, filename, 0)             # <<<<<<<<<<<<<<
   * 
   * class IndeterminateCountError(ValueError):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_13pybloomfilter_ReadFile);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_13pybloomfilter_ReadFile);
    __Pyx_GIVEREF(__pyx_v_13pybloomfilter_ReadFile);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_13pybloomfilter_BloomFilter)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.bf_from_file");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":52
   *     cdef int _anonymous
   * 
   *     def __cinit__(self, capacity, error_rate, filename, perm=0755):             # <<<<<<<<<<<<<<
   *         cdef char * seeds
   *         self._closed = 0
   */
  
  static int __pyx_pf_13pybloomfilter_11BloomFilter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static int __pyx_pf_13pybloomfilter_11BloomFilter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_capacity = 0;
    PyObject *__pyx_v_error_rate = 0;
    PyObject *__pyx_v_filename = 0;
    PyObject *__pyx_v_perm = 0;
    char *__pyx_v_seeds;
    PyObject *__pyx_v_mode;
    PyObject *__pyx_v_num_bits;
    PyObject *__pyx_v_num_hashes;
    PyObject *__pyx_v_hash_seeds;
    PyObject *__pyx_v_test;
    PyObject *__pyx_v_i;
    int __pyx_r;
    int __pyx_t_1;
    int __pyx_t_2;
    PyObject *__pyx_t_3 = NULL;
    PyObject *__pyx_t_4 = NULL;
    PyObject *__pyx_t_5 = NULL;
    long __pyx_t_6;
    double __pyx_t_7;
    char *__pyx_t_8;
    long __pyx_t_9;
    int __pyx_t_10;
    int __pyx_t_11;
    void *__pyx_t_12;
    PyObject *__pyx_t_13 = NULL;
    int __pyx_t_14;
    PyObject *__pyx_t_15 = NULL;
    PyObject *__pyx_t_16 = NULL;
    PyObject *__pyx_t_17 = NULL;
    PyObject *__pyx_t_18 = NULL;
    PyObject *__pyx_t_19 = NULL;
    Py_ssize_t __pyx_t_20;
    int *__pyx_t_21;
    int *__pyx_t_22;
    int __pyx_t_23;
    PyObject *__pyx_t_24;
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__capacity,&__pyx_n_s__error_rate,&__pyx_n_s__filename,&__pyx_n_s__perm,0};
    __Pyx_RefNannySetupContext("__cinit__");
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
      PyObject* values[4] = {0,0,0,0};
      values[3] = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__capacity);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__error_rate);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__perm);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_capacity = values[0];
      __pyx_v_error_rate = values[1];
      __pyx_v_filename = values[2];
      __pyx_v_perm = values[3];
    } else {
      __pyx_v_perm = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4:
        __pyx_v_perm = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3:
        __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 2);
        __pyx_v_error_rate = PyTuple_GET_ITEM(__pyx_args, 1);
        __pyx_v_capacity = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    goto __pyx_L4_argument_unpacking_done;
    __pyx_L5_argtuple_error:;
    __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_L3_error:;
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__cinit__");
    __Pyx_RefNannyFinishContext();
    return -1;
    __pyx_L4_argument_unpacking_done:;
    __Pyx_INCREF(__pyx_v_capacity);
    __pyx_v_mode = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_num_bits = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_num_hashes = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_hash_seeds = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_test = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":54
   *     def __cinit__(self, capacity, error_rate, filename, perm=0755):
   *         cdef char * seeds
   *         self._closed = 0             # <<<<<<<<<<<<<<
   *         self._anonymous = 0
   *         mode = "rw+"
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_closed = 0;
  
    /* "pybloomfilter.pyx":55
   *         cdef char * seeds
   *         self._closed = 0
   *         self._anonymous = 0             # <<<<<<<<<<<<<<
   *         mode = "rw+"
   *         if filename is NoConstruct:
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_anonymous = 0;
  
    /* "pybloomfilter.pyx":56
   *         self._closed = 0
   *         self._anonymous = 0
   *         mode = "rw+"             # <<<<<<<<<<<<<<
   *         if filename is NoConstruct:
   *             return
   */
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
    __Pyx_DECREF(__pyx_v_mode);
    __pyx_v_mode = ((PyObject *)__pyx_kp_s_6);
  
    /* "pybloomfilter.pyx":57
   *         self._anonymous = 0
   *         mode = "rw+"
   *         if filename is NoConstruct:             # <<<<<<<<<<<<<<
   *             return
   * 
   */
    __pyx_t_1 = (__pyx_v_filename == __pyx_v_13pybloomfilter_NoConstruct);
    if (__pyx_t_1) {
  
      /* "pybloomfilter.pyx":58
   *         mode = "rw+"
   *         if filename is NoConstruct:
   *             return             # <<<<<<<<<<<<<<
   * 
   *         if capacity is ReadFile:
   */
      __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  
    /* "pybloomfilter.pyx":60
   *             return
   * 
   *         if capacity is ReadFile:             # <<<<<<<<<<<<<<
   * 
   *             if not filename:
   */
    __pyx_t_1 = (__pyx_v_capacity == __pyx_v_13pybloomfilter_ReadFile);
    if (__pyx_t_1) {
  
      /* "pybloomfilter.pyx":62
   *         if capacity is ReadFile:
   * 
   *             if not filename:             # <<<<<<<<<<<<<<
   *                 raise ValueError('A filename must be provided.')
   * 
   */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":63
   * 
   *             if not filename:
   *                 raise ValueError('A filename must be provided.')             # <<<<<<<<<<<<<<
   * 
   *             mode = "rw"
   */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L8;
      }
      __pyx_L8:;
  
      /* "pybloomfilter.pyx":65
   *                 raise ValueError('A filename must be provided.')
   * 
   *             mode = "rw"             # <<<<<<<<<<<<<<
   *             capacity = 0
   *             if not os.path.exists(filename):
   */
      __Pyx_INCREF(((PyObject *)__pyx_n_s__rw));
      __Pyx_DECREF(__pyx_v_mode);
      __pyx_v_mode = ((PyObject *)__pyx_n_s__rw);
  
      /* "pybloomfilter.pyx":66
   * 
   *             mode = "rw"
   *             capacity = 0             # <<<<<<<<<<<<<<
   *             if not os.path.exists(filename):
   *                 raise OSError("File %s not found" % filename)
   */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF(__pyx_v_capacity);
      __pyx_v_capacity = __pyx_int_0;
  
      /* "pybloomfilter.pyx":67
   *             mode = "rw"
   *             capacity = 0
   *             if not os.path.exists(filename):             # <<<<<<<<<<<<<<
   *                 raise OSError("File %s not found" % filename)
   * 
   */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); 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_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__exists); 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_4); __pyx_t_4 = 0;
      __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));
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = (!__pyx_t_2);
      if (__pyx_t_1) {
  
        /* "pybloomfilter.pyx":68
   *             capacity = 0
   *             if not os.path.exists(filename):
   *                 raise OSError("File %s not found" % filename)             # <<<<<<<<<<<<<<
   * 
   *             if not os.access(filename, os.O_RDWR):
   */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
        PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L9;
      }
      __pyx_L9:;
  
      /* "pybloomfilter.pyx":70
   *                 raise OSError("File %s not found" % filename)
   * 
   *             if not os.access(filename, os.O_RDWR):             # <<<<<<<<<<<<<<
   *                 raise OSError("Insufficient permissions for file %s" % filename)
   * 
   */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__access); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__O_RDWR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
      __Pyx_GIVEREF(__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 = 70; __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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":71
   * 
   *             if not os.access(filename, os.O_RDWR):
   *                 raise OSError("Insufficient permissions for file %s" % filename)             # <<<<<<<<<<<<<<
   * 
   *         mode = construct_mode(mode)
   */
        __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __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_builtin_OSError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;
      goto __pyx_L7;
    }
    __pyx_L7:;
  
    /* "pybloomfilter.pyx":73
   *                 raise OSError("Insufficient permissions for file %s" % filename)
   * 
   *         mode = construct_mode(mode)             # <<<<<<<<<<<<<<
   * 
   *         if not mode & os.O_CREAT:
   */
    __pyx_t_3 = __pyx_f_13pybloomfilter_construct_mode(__pyx_v_mode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_mode);
    __pyx_v_mode = __pyx_t_3;
    __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":75
   *         mode = construct_mode(mode)
   * 
   *         if not mode & os.O_CREAT:             # <<<<<<<<<<<<<<
   * 
   *             if not filename:
   */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__O_CREAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_And(__pyx_v_mode, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (!__pyx_t_2);
    if (__pyx_t_1) {
  
      /* "pybloomfilter.pyx":77
   *         if not mode & os.O_CREAT:
   * 
   *             if not filename:             # <<<<<<<<<<<<<<
   *                 raise ValueError('A filename must be provided.')
   * 
   */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":78
   * 
   *             if not filename:
   *                 raise ValueError('A filename must be provided.')             # <<<<<<<<<<<<<<
   * 
   *             if os.path.exists(filename):
   */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;
  
      /* "pybloomfilter.pyx":80
   *                 raise ValueError('A filename must be provided.')
   * 
   *             if os.path.exists(filename):             # <<<<<<<<<<<<<<
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   *                                                            error_rate,
   */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":81
   * 
   *             if os.path.exists(filename):
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,             # <<<<<<<<<<<<<<
   *                                                            error_rate,
   *                                                            filename,
   */
        __pyx_t_6 = __Pyx_PyInt_AsLong(__pyx_v_capacity); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":82
   *             if os.path.exists(filename):
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   *                                                            error_rate,             # <<<<<<<<<<<<<<
   *                                                            filename,
   *                                                            0,
   */
        __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_error_rate); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":83
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   *                                                            error_rate,
   *                                                            filename,             # <<<<<<<<<<<<<<
   *                                                            0,
   *                                                            os.O_RDWR,
   */
        __pyx_t_8 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":84
   *                                                            error_rate,
   *                                                            filename,
   *                                                            0,             # <<<<<<<<<<<<<<
   *                                                            os.O_RDWR,
   *                                                            perm,
   */
        __pyx_t_9 = 0;
  
        /* "pybloomfilter.pyx":85
   *                                                            filename,
   *                                                            0,
   *                                                            os.O_RDWR,             # <<<<<<<<<<<<<<
   *                                                            perm,
   *                                                            NULL, 0)
   */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__O_RDWR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  
        /* "pybloomfilter.pyx":86
   *                                                            0,
   *                                                            os.O_RDWR,
   *                                                            perm,             # <<<<<<<<<<<<<<
   *                                                            NULL, 0)
   *                 if self._bf is NULL:
   */
        __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_perm); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":87
   *                                                            os.O_RDWR,
   *                                                            perm,
   *                                                            NULL, 0)             # <<<<<<<<<<<<<<
   *                 if self._bf is NULL:
   *                     raise ValueError("Invalid Bloomfilter file: %s" % filename)
   */
        __pyx_t_12 = NULL;
  
        /* "pybloomfilter.pyx":81
   * 
   *             if os.path.exists(filename):
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,             # <<<<<<<<<<<<<<
   *                                                            error_rate,
   *                                                            filename,
   */
        ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf = bloomfilter_Create(__pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, 0);
  
        /* "pybloomfilter.pyx":88
   *                                                            perm,
   *                                                            NULL, 0)
   *                 if self._bf is NULL:             # <<<<<<<<<<<<<<
   *                     raise ValueError("Invalid Bloomfilter file: %s" % filename)
   *             else:
   */
        __pyx_t_2 = (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf == NULL);
        if (__pyx_t_2) {
  
          /* "pybloomfilter.pyx":89
   *                                                            NULL, 0)
   *                 if self._bf is NULL:
   *                     raise ValueError("Invalid Bloomfilter file: %s" % filename)             # <<<<<<<<<<<<<<
   *             else:
   *                 raise OSError(eno.ENOENT, '%s: %s' % (os.strerror(eno.ENOENT),
   */
          __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), __pyx_v_filename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_5));
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_4));
          PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
          __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
          __pyx_t_5 = 0;
          __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
          __Pyx_Raise(__pyx_t_5, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L14;
        }
        __pyx_L14:;
        goto __pyx_L13;
      }
      /*else*/ {
  
        /* "pybloomfilter.pyx":91
   *                     raise ValueError("Invalid Bloomfilter file: %s" % filename)
   *             else:
   *                 raise OSError(eno.ENOENT, '%s: %s' % (os.strerror(eno.ENOENT),             # <<<<<<<<<<<<<<
   *                                                       filename))
   *         else:
   */
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__eno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__ENOENT); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__strerror); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__eno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__ENOENT); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  
        /* "pybloomfilter.pyx":92
   *             else:
   *                 raise OSError(eno.ENOENT, '%s: %s' % (os.strerror(eno.ENOENT),
   *                                                       filename))             # <<<<<<<<<<<<<<
   *         else:
   *             if filename and os.path.exists(filename):
   */
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        __pyx_t_13 = 0;
        __pyx_t_13 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_13));
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_13));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
        __pyx_t_4 = 0;
        __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_Call(__pyx_builtin_OSError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_13, 0, 0);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;
      goto __pyx_L11;
    }
    /*else*/ {
  
      /* "pybloomfilter.pyx":94
   *                                                       filename))
   *         else:
   *             if filename and os.path.exists(filename):             # <<<<<<<<<<<<<<
   *                 os.unlink(filename)
   *             num_bits = 5 * math.ceil((capacity * math.log(error_rate)) / math.log(1.0 /
   */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {
        __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__path); 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_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__exists); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __Pyx_INCREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        __pyx_t_4 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_5), NULL); 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_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_14 = __pyx_t_1;
      } else {
        __pyx_t_14 = __pyx_t_2;
      }
      if (__pyx_t_14) {
  
        /* "pybloomfilter.pyx":95
   *         else:
   *             if filename and os.path.exists(filename):
   *                 os.unlink(filename)             # <<<<<<<<<<<<<<
   *             num_bits = 5 * math.ceil((capacity * math.log(error_rate)) / math.log(1.0 /
   *                                                                   (math.pow(2.0,
   */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__unlink); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
        __Pyx_INCREF(__pyx_v_filename);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
        __Pyx_GIVEREF(__pyx_v_filename);
        __pyx_t_13 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L15;
      }
      __pyx_L15:;
  
      /* "pybloomfilter.pyx":96
   *             if filename and os.path.exists(filename):
   *                 os.unlink(filename)
   *             num_bits = 5 * math.ceil((capacity * math.log(error_rate)) / math.log(1.0 /             # <<<<<<<<<<<<<<
   *                                                                   (math.pow(2.0,
   *                                                                             math.log(2.0)))))
   */
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__ceil); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      __Pyx_INCREF(__pyx_v_error_rate);
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_error_rate);
      __Pyx_GIVEREF(__pyx_v_error_rate);
      __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __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_13)); __pyx_t_13 = 0;
      __pyx_t_13 = PyNumber_Multiply(__pyx_v_capacity, __pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__log); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
  
      /* "pybloomfilter.pyx":97
   *                 os.unlink(filename)
   *             num_bits = 5 * math.ceil((capacity * math.log(error_rate)) / math.log(1.0 /
   *                                                                   (math.pow(2.0,             # <<<<<<<<<<<<<<
   *                                                                             math.log(2.0)))))
   *             num_bits = cbloomfilter.next_prime(num_bits)
   */
      __pyx_t_15 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s__pow); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
  
      /* "pybloomfilter.pyx":98
   *             num_bits = 5 * math.ceil((capacity * math.log(error_rate)) / math.log(1.0 /
   *                                                                   (math.pow(2.0,
   *                                                                             math.log(2.0)))))             # <<<<<<<<<<<<<<
   *             num_bits = cbloomfilter.next_prime(num_bits)
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   */
      __pyx_t_17 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = PyObject_GetAttr(__pyx_t_17, __pyx_n_s__log); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_19));
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_18, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_19));
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_15 = 0;
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_16, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_17); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_17));
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      __pyx_t_17 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_t_19); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_19));
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_19), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
      __pyx_t_19 = PyNumber_Multiply(__pyx_int_5, __pyx_t_17); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_v_num_bits);
      __pyx_v_num_bits = __pyx_t_19;
      __pyx_t_19 = 0;
  
      /* "pybloomfilter.pyx":99
   *                                                                   (math.pow(2.0,
   *                                                                             math.log(2.0)))))
   *             num_bits = cbloomfilter.next_prime(num_bits)             # <<<<<<<<<<<<<<
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   *             hash_seeds = array.array('I')
   */
      __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_num_bits); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_19 = PyInt_FromLong(next_prime(__pyx_t_9)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_v_num_bits);
      __pyx_v_num_bits = __pyx_t_19;
      __pyx_t_19 = 0;
  
      /* "pybloomfilter.pyx":100
   *                                                                             math.log(2.0)))))
   *             num_bits = cbloomfilter.next_prime(num_bits)
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))             # <<<<<<<<<<<<<<
   *             hash_seeds = array.array('I')
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])
   */
      __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_17 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__ceil); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__log); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __pyx_t_13 = PyNumber_Multiply(__pyx_t_19, __pyx_v_num_bits); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_v_capacity); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(__pyx_t_17, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_19);
      __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_v_num_hashes);
      __pyx_v_num_hashes = __pyx_t_19;
      __pyx_t_19 = 0;
  
      /* "pybloomfilter.pyx":101
   *             num_bits = cbloomfilter.next_prime(num_bits)
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   *             hash_seeds = array.array('I')             # <<<<<<<<<<<<<<
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])
   *             test = hash_seeds.tostring()
   */
      __pyx_t_19 = __Pyx_GetName(__pyx_m, __pyx_n_s__array); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_13 = PyObject_GetAttr(__pyx_t_19, __pyx_n_s__array); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_v_hash_seeds);
      __pyx_v_hash_seeds = __pyx_t_19;
      __pyx_t_19 = 0;
  
      /* "pybloomfilter.pyx":102
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   *             hash_seeds = array.array('I')
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])             # <<<<<<<<<<<<<<
   *             test = hash_seeds.tostring()
   *             seeds = test
   */
      __pyx_t_19 = PyObject_GetAttr(__pyx_v_hash_seeds, __pyx_n_s__extend); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_17));
      __Pyx_INCREF(__pyx_v_num_hashes);
      PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_num_hashes);
      __Pyx_GIVEREF(__pyx_v_num_hashes);
      __pyx_t_4 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_20 = 0; __pyx_t_17 = __pyx_t_4; __Pyx_INCREF(__pyx_t_17);
      } else {
        __pyx_t_20 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_17);
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(PyList_CheckExact(__pyx_t_17))) {
          if (__pyx_t_20 >= PyList_GET_SIZE(__pyx_t_17)) break;
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_20); __Pyx_INCREF(__pyx_t_4); __pyx_t_20++;
        } else if (likely(PyTuple_CheckExact(__pyx_t_17))) {
          if (__pyx_t_20 >= PyTuple_GET_SIZE(__pyx_t_17)) break;
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_20); __Pyx_INCREF(__pyx_t_4); __pyx_t_20++;
        } else {
          __pyx_t_4 = PyIter_Next(__pyx_t_17);
          if (!__pyx_t_4) {
            if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_DECREF(__pyx_v_i);
        __pyx_v_i = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__random); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__getrandbits); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(PyList_Append(__pyx_t_13, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_17));
      __Pyx_INCREF(((PyObject *)__pyx_t_13));
      PyTuple_SET_ITEM(__pyx_t_17, 0, ((PyObject *)__pyx_t_13));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_Call(__pyx_t_19, ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  
      /* "pybloomfilter.pyx":103
   *             hash_seeds = array.array('I')
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])
   *             test = hash_seeds.tostring()             # <<<<<<<<<<<<<<
   *             seeds = test
   * 
   */
      __pyx_t_13 = PyObject_GetAttr(__pyx_v_hash_seeds, __pyx_n_s__tostring); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_17 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_v_test);
      __pyx_v_test = __pyx_t_17;
      __pyx_t_17 = 0;
  
      /* "pybloomfilter.pyx":104
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])
   *             test = hash_seeds.tostring()
   *             seeds = test             # <<<<<<<<<<<<<<
   * 
   *             if not filename:
   */
      __pyx_t_8 = PyBytes_AsString(__pyx_v_test); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_seeds = __pyx_t_8;
  
      /* "pybloomfilter.pyx":106
   *             seeds = test
   * 
   *             if not filename:             # <<<<<<<<<<<<<<
   *                 self._bf = cbloomfilter.bloomfilter_CreateAnonymous(capacity, error_rate, num_bits, <int*>seeds, num_hashes);
   *                 self._anonymous = 1
   */
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = (!__pyx_t_14);
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":107
   * 
   *             if not filename:
   *                 self._bf = cbloomfilter.bloomfilter_CreateAnonymous(capacity, error_rate, num_bits, <int*>seeds, num_hashes);             # <<<<<<<<<<<<<<
   *                 self._anonymous = 1
   *             else:
   */
        __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_capacity); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_error_rate); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = __Pyx_PyInt_AsLong(__pyx_v_num_bits); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_21 = ((int *)__pyx_v_seeds);
        __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_num_hashes); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf = bloomfilter_CreateAnonymous(__pyx_t_9, __pyx_t_7, __pyx_t_6, __pyx_t_21, __pyx_t_11);
  
        /* "pybloomfilter.pyx":108
   *             if not filename:
   *                 self._bf = cbloomfilter.bloomfilter_CreateAnonymous(capacity, error_rate, num_bits, <int*>seeds, num_hashes);
   *                 self._anonymous = 1             # <<<<<<<<<<<<<<
   *             else:
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   */
        ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_anonymous = 1;
        goto __pyx_L18;
      }
      /*else*/ {
  
        /* "pybloomfilter.pyx":110
   *                 self._anonymous = 1
   *             else:
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,             # <<<<<<<<<<<<<<
   *                                                            error_rate,
   *                                                            filename,
   */
        __pyx_t_6 = __Pyx_PyInt_AsLong(__pyx_v_capacity); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":111
   *             else:
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   *                                                            error_rate,             # <<<<<<<<<<<<<<
   *                                                            filename,
   *                                                            num_bits,
   */
        __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_error_rate); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":112
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,
   *                                                            error_rate,
   *                                                            filename,             # <<<<<<<<<<<<<<
   *                                                            num_bits,
   *                                                            mode,
   */
        __pyx_t_8 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":113
   *                                                            error_rate,
   *                                                            filename,
   *                                                            num_bits,             # <<<<<<<<<<<<<<
   *                                                            mode,
   *                                                            perm,
   */
        __pyx_t_9 = __Pyx_PyInt_AsLong(__pyx_v_num_bits); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":114
   *                                                            filename,
   *                                                            num_bits,
   *                                                            mode,             # <<<<<<<<<<<<<<
   *                                                            perm,
   *                                                            <int *>seeds,
   */
        __pyx_t_11 = __Pyx_PyInt_AsInt(__pyx_v_mode); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":115
   *                                                            num_bits,
   *                                                            mode,
   *                                                            perm,             # <<<<<<<<<<<<<<
   *                                                            <int *>seeds,
   *                                                            num_hashes)
   */
        __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_v_perm); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":116
   *                                                            mode,
   *                                                            perm,
   *                                                            <int *>seeds,             # <<<<<<<<<<<<<<
   *                                                            num_hashes)
   *             if self._bf is NULL:
   */
        __pyx_t_22 = ((int *)__pyx_v_seeds);
  
        /* "pybloomfilter.pyx":117
   *                                                            perm,
   *                                                            <int *>seeds,
   *                                                            num_hashes)             # <<<<<<<<<<<<<<
   *             if self._bf is NULL:
   *                 cpython.PyErr_NoMemory()
   */
        __pyx_t_23 = __Pyx_PyInt_AsInt(__pyx_v_num_hashes); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
        /* "pybloomfilter.pyx":110
   *                 self._anonymous = 1
   *             else:
   *                 self._bf = cbloomfilter.bloomfilter_Create(capacity,             # <<<<<<<<<<<<<<
   *                                                            error_rate,
   *                                                            filename,
   */
        ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf = bloomfilter_Create(__pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_11, __pyx_t_10, __pyx_t_22, __pyx_t_23);
      }
      __pyx_L18:;
  
      /* "pybloomfilter.pyx":118
   *                                                            <int *>seeds,
   *                                                            num_hashes)
   *             if self._bf is NULL:             # <<<<<<<<<<<<<<
   *                 cpython.PyErr_NoMemory()
   * 
   */
      __pyx_t_2 = (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf == NULL);
      if (__pyx_t_2) {
  
        /* "pybloomfilter.pyx":119
   *                                                            num_hashes)
   *             if self._bf is NULL:
   *                 cpython.PyErr_NoMemory()             # <<<<<<<<<<<<<<
   * 
   *     def __dealloc__(self):
   */
        __pyx_t_24 = PyErr_NoMemory(); if (unlikely(__pyx_t_24 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L19;
      }
      __pyx_L19:;
    }
    __pyx_L11:;
  
    __pyx_r = 0;
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_15);
    __Pyx_XDECREF(__pyx_t_16);
    __Pyx_XDECREF(__pyx_t_17);
    __Pyx_XDECREF(__pyx_t_18);
    __Pyx_XDECREF(__pyx_t_19);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__cinit__");
    __pyx_r = -1;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_mode);
    __Pyx_DECREF(__pyx_v_num_bits);
    __Pyx_DECREF(__pyx_v_num_hashes);
    __Pyx_DECREF(__pyx_v_hash_seeds);
    __Pyx_DECREF(__pyx_v_test);
    __Pyx_DECREF(__pyx_v_i);
    __Pyx_DECREF(__pyx_v_capacity);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":121
   *                 cpython.PyErr_NoMemory()
   * 
   *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   *         cbloomfilter.bloomfilter_Destroy(self._bf)
   *         self._bf = NULL
   */
  
  static void __pyx_pf_13pybloomfilter_11BloomFilter_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
  static void __pyx_pf_13pybloomfilter_11BloomFilter_1__dealloc__(PyObject *__pyx_v_self) {
    __Pyx_RefNannySetupContext("__dealloc__");
  
    /* "pybloomfilter.pyx":122
   * 
   *     def __dealloc__(self):
   *         cbloomfilter.bloomfilter_Destroy(self._bf)             # <<<<<<<<<<<<<<
   *         self._bf = NULL
   * 
   */
    bloomfilter_Destroy(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf);
  
    /* "pybloomfilter.pyx":123
   *     def __dealloc__(self):
   *         cbloomfilter.bloomfilter_Destroy(self._bf)
   *         self._bf = NULL             # <<<<<<<<<<<<<<
   * 
   *     property hash_seeds:
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf = NULL;
  
    __Pyx_RefNannyFinishContext();
  }
  
  /* "pybloomfilter.pyx":126
   * 
   *     property hash_seeds:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             result = array.array('I')
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10hash_seeds___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10hash_seeds___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_v_result;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    Py_ssize_t __pyx_t_4;
    __Pyx_RefNannySetupContext("__get__");
    __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":127
   *     property hash_seeds:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             result = array.array('I')
   *             result.fromstring((<char *>self._bf.hash_seeds)[:4 * self.num_hashes])
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":128
   *         def __get__(self):
   *             self._assert_open()
   *             result = array.array('I')             # <<<<<<<<<<<<<<
   *             result.fromstring((<char *>self._bf.hash_seeds)[:4 * self.num_hashes])
   *             return result
   */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":129
   *             self._assert_open()
   *             result = array.array('I')
   *             result.fromstring((<char *>self._bf.hash_seeds)[:4 * self.num_hashes])             # <<<<<<<<<<<<<<
   *             return result
   * 
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_result, __pyx_n_s__fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__num_hashes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Multiply(__pyx_int_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyBytes_FromStringAndSize(((char *)((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->hash_seeds) + 0, __pyx_t_4 - 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":130
   *             result = array.array('I')
   *             result.fromstring((<char *>self._bf.hash_seeds)[:4 * self.num_hashes])
   *             return result             # <<<<<<<<<<<<<<
   * 
   *     property capacity:
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.hash_seeds.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_result);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":133
   * 
   *     property capacity:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             return self._bf.max_num_elem
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8capacity___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8capacity___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__get__");
  
    /* "pybloomfilter.pyx":134
   *     property capacity:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             return self._bf.max_num_elem
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":135
   *         def __get__(self):
   *             self._assert_open()
   *             return self._bf.max_num_elem             # <<<<<<<<<<<<<<
   * 
   *     property error_rate:
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->max_num_elem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.capacity.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":138
   * 
   *     property error_rate:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             return self._bf.error_rate
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10error_rate___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10error_rate___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__get__");
  
    /* "pybloomfilter.pyx":139
   *     property error_rate:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             return self._bf.error_rate
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":140
   *         def __get__(self):
   *             self._assert_open()
   *             return self._bf.error_rate             # <<<<<<<<<<<<<<
   * 
   *     property num_hashes:
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyFloat_FromDouble(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->error_rate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.error_rate.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":143
   * 
   *     property num_hashes:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             return self._bf.num_hashes
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10num_hashes___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10num_hashes___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__get__");
  
    /* "pybloomfilter.pyx":144
   *     property num_hashes:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             return self._bf.num_hashes
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); 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_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":145
   *         def __get__(self):
   *             self._assert_open()
   *             return self._bf.num_hashes             # <<<<<<<<<<<<<<
   * 
   *     property num_bits:
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->num_hashes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.num_hashes.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":148
   * 
   *     property num_bits:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             return self._bf.array.bits
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8num_bits___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8num_bits___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__get__");
  
    /* "pybloomfilter.pyx":149
   *     property num_bits:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             return self._bf.array.bits
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":150
   *         def __get__(self):
   *             self._assert_open()
   *             return self._bf.array.bits             # <<<<<<<<<<<<<<
   * 
   *     property name:
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array->bits); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.num_bits.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":153
   * 
   *     property name:
   *         def __get__(self):             # <<<<<<<<<<<<<<
   *             self._assert_open()
   *             return 'anonymous' if self._anonymous else self._bf.array.filename
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_4name___get__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_4name___get__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__get__");
  
    /* "pybloomfilter.pyx":154
   *     property name:
   *         def __get__(self):
   *             self._assert_open()             # <<<<<<<<<<<<<<
   *             return 'anonymous' if self._anonymous else self._bf.array.filename
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":155
   *         def __get__(self):
   *             self._assert_open()
   *             return 'anonymous' if self._anonymous else self._bf.array.filename             # <<<<<<<<<<<<<<
   * 
   *     def fileno(self):
   */
    __Pyx_XDECREF(__pyx_r);
    if (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_anonymous) {
      __Pyx_INCREF(((PyObject *)__pyx_n_s__anonymous));
      __pyx_t_2 = __pyx_n_s__anonymous;
    } else {
      __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array->filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.name.__get__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":157
   *             return 'anonymous' if self._anonymous else self._bf.array.filename
   * 
   *     def fileno(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         return self._bf.array.fd
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_2fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_2fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("fileno");
  
    /* "pybloomfilter.pyx":158
   * 
   *     def fileno(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         return self._bf.array.fd
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":159
   *     def fileno(self):
   *         self._assert_open()
   *         return self._bf.array.fd             # <<<<<<<<<<<<<<
   * 
   *     def __repr__(self):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array->fd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.fileno");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":161
   *         return self._bf.array.fd
   * 
   *     def __repr__(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         return '<BloomFilter capacity: %d, error: %0.3f, num_hashes: %d>' % (
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_3__repr__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_3__repr__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    PyObject *__pyx_t_4 = NULL;
    __Pyx_RefNannySetupContext("__repr__");
  
    /* "pybloomfilter.pyx":162
   * 
   *     def __repr__(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         return '<BloomFilter capacity: %d, error: %0.3f, num_hashes: %d>' % (
   *             self._bf.max_num_elem, self._bf.error_rate, self._bf.num_hashes)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":163
   *     def __repr__(self):
   *         self._assert_open()
   *         return '<BloomFilter capacity: %d, error: %0.3f, num_hashes: %d>' % (             # <<<<<<<<<<<<<<
   *             self._bf.max_num_elem, self._bf.error_rate, self._bf.num_hashes)
   * 
   */
    __Pyx_XDECREF(__pyx_r);
  
    /* "pybloomfilter.pyx":164
   *         self._assert_open()
   *         return '<BloomFilter capacity: %d, error: %0.3f, num_hashes: %d>' % (
   *             self._bf.max_num_elem, self._bf.error_rate, self._bf.num_hashes)             # <<<<<<<<<<<<<<
   * 
   *     def __str__(self):
   */
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->max_num_elem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->error_rate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->num_hashes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_r = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__repr__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":166
   *             self._bf.max_num_elem, self._bf.error_rate, self._bf.num_hashes)
   * 
   *     def __str__(self):             # <<<<<<<<<<<<<<
   *         return __repr__(self)
   * 
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_4__str__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_4__str__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("__str__");
  
    /* "pybloomfilter.pyx":167
   * 
   *     def __str__(self):
   *         return __repr__(self)             # <<<<<<<<<<<<<<
   * 
   *     def sync(self):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __pyx_t_2 = PyObject_Call(__pyx_builtin___repr__, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__str__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":169
   *         return __repr__(self)
   * 
   *     def sync(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         cbloomfilter.mbarray_Sync(self._bf.array)
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_5sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_5sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("sync");
  
    /* "pybloomfilter.pyx":170
   * 
   *     def sync(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_Sync(self._bf.array)
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":171
   *     def sync(self):
   *         self._assert_open()
   *         cbloomfilter.mbarray_Sync(self._bf.array)             # <<<<<<<<<<<<<<
   * 
   *     def clear_all(self):
   */
    mbarray_Sync(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array);
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.sync");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":173
   *         cbloomfilter.mbarray_Sync(self._bf.array)
   * 
   *     def clear_all(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         cbloomfilter.mbarray_ClearAll(self._bf.array)
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_6clear_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_6clear_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("clear_all");
  
    /* "pybloomfilter.pyx":174
   * 
   *     def clear_all(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_ClearAll(self._bf.array)
   * 
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":175
   *     def clear_all(self):
   *         self._assert_open()
   *         cbloomfilter.mbarray_ClearAll(self._bf.array)             # <<<<<<<<<<<<<<
   * 
   *     def __contains__(self, item):
   */
    mbarray_ClearAll(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array);
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.clear_all");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":177
   *         cbloomfilter.mbarray_ClearAll(self._bf.array)
   * 
   *     def __contains__(self, item):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         cdef cbloomfilter.Key key
   */
  
  static int __pyx_pf_13pybloomfilter_11BloomFilter_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  static int __pyx_pf_13pybloomfilter_11BloomFilter_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    Key __pyx_v_key;
    int __pyx_r;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    int __pyx_t_3;
    char *__pyx_t_4;
    Py_ssize_t __pyx_t_5;
    long __pyx_t_6;
    __Pyx_RefNannySetupContext("__contains__");
  
    /* "pybloomfilter.pyx":178
   * 
   *     def __contains__(self, item):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":180
   *         self._assert_open()
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):             # <<<<<<<<<<<<<<
   *             key.shash = item
   *             key.nhash = len(item)
   */
    __pyx_t_2 = __pyx_v_item;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyString_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {
  
      /* "pybloomfilter.pyx":181
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):
   *             key.shash = item             # <<<<<<<<<<<<<<
   *             key.nhash = len(item)
   *         else:
   */
      __pyx_t_4 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_key.shash = __pyx_t_4;
  
      /* "pybloomfilter.pyx":182
   *         if isinstance(item, str):
   *             key.shash = item
   *             key.nhash = len(item)             # <<<<<<<<<<<<<<
   *         else:
   *             key.shash = NULL
   */
      __pyx_t_1 = __pyx_v_item;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_key.nhash = __pyx_t_5;
      goto __pyx_L5;
    }
    /*else*/ {
  
      /* "pybloomfilter.pyx":184
   *             key.nhash = len(item)
   *         else:
   *             key.shash = NULL             # <<<<<<<<<<<<<<
   *             key.nhash = hash(item)
   *         return cbloomfilter.bloomfilter_Test(self._bf, &key) == 1
   */
      __pyx_v_key.shash = NULL;
  
      /* "pybloomfilter.pyx":185
   *         else:
   *             key.shash = NULL
   *             key.nhash = hash(item)             # <<<<<<<<<<<<<<
   *         return cbloomfilter.bloomfilter_Test(self._bf, &key) == 1
   * 
   */
      __pyx_t_1 = __pyx_v_item;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_key.nhash = __pyx_t_6;
    }
    __pyx_L5:;
  
    /* "pybloomfilter.pyx":186
   *             key.shash = NULL
   *             key.nhash = hash(item)
   *         return cbloomfilter.bloomfilter_Test(self._bf, &key) == 1             # <<<<<<<<<<<<<<
   * 
   *     def copy_template(self, filename, perm=0755):
   */
    __pyx_r = (bloomfilter_Test(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf, (&__pyx_v_key)) == 1);
    goto __pyx_L0;
  
    __pyx_r = 0;
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__contains__");
    __pyx_r = -1;
    __pyx_L0:;
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":188
   *         return cbloomfilter.bloomfilter_Test(self._bf, &key) == 1
   * 
   *     def copy_template(self, filename, perm=0755):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   * 
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8copy_template(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_8copy_template(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_filename = 0;
    PyObject *__pyx_v_perm = 0;
    struct __pyx_obj_13pybloomfilter_BloomFilter *__pyx_v_copy = 0;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    int __pyx_t_4;
    BloomFilter *__pyx_t_5;
    char *__pyx_t_6;
    int __pyx_t_7;
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__perm,0};
    __Pyx_RefNannySetupContext("copy_template");
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
      PyObject* values[2] = {0,0};
      values[1] = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__perm);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "copy_template") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_filename = values[0];
      __pyx_v_perm = values[1];
    } else {
      __pyx_v_perm = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: __pyx_v_perm = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    goto __pyx_L4_argument_unpacking_done;
    __pyx_L5_argtuple_error:;
    __Pyx_RaiseArgtupleInvalid("copy_template", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_L3_error:;
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.copy_template");
    __Pyx_RefNannyFinishContext();
    return NULL;
    __pyx_L4_argument_unpacking_done:;
  
    /* "pybloomfilter.pyx":189
   * 
   *     def copy_template(self, filename, perm=0755):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   * 
   *         if self._anonymous:
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":191
   *         self._assert_open()
   * 
   *         if self._anonymous:             # <<<<<<<<<<<<<<
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')
   * 
   */
    if (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_anonymous) {
  
      /* "pybloomfilter.pyx":192
   * 
   *         if self._anonymous:
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')             # <<<<<<<<<<<<<<
   * 
   *         cdef BloomFilter copy = BloomFilter(0, 0, NoConstruct)
   */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  
    /* "pybloomfilter.pyx":194
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')
   * 
   *         cdef BloomFilter copy = BloomFilter(0, 0, NoConstruct)             # <<<<<<<<<<<<<<
   *         if os.path.exists(filename):
   *             os.unlink(filename)
   */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __Pyx_INCREF(__pyx_v_13pybloomfilter_NoConstruct);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_13pybloomfilter_NoConstruct);
    __Pyx_GIVEREF(__pyx_v_13pybloomfilter_NoConstruct);
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_13pybloomfilter_BloomFilter)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_copy = ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_t_1);
    __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":195
   * 
   *         cdef BloomFilter copy = BloomFilter(0, 0, NoConstruct)
   *         if os.path.exists(filename):             # <<<<<<<<<<<<<<
   *             os.unlink(filename)
   *         copy._bf = cbloomfilter.bloomfilter_Copy_Template(self._bf, filename, perm)
   */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_4) {
  
      /* "pybloomfilter.pyx":196
   *         cdef BloomFilter copy = BloomFilter(0, 0, NoConstruct)
   *         if os.path.exists(filename):
   *             os.unlink(filename)             # <<<<<<<<<<<<<<
   *         copy._bf = cbloomfilter.bloomfilter_Copy_Template(self._bf, filename, perm)
   *         return copy
   */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__unlink); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_INCREF(__pyx_v_filename);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename);
      __Pyx_GIVEREF(__pyx_v_filename);
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;
  
    /* "pybloomfilter.pyx":197
   *         if os.path.exists(filename):
   *             os.unlink(filename)
   *         copy._bf = cbloomfilter.bloomfilter_Copy_Template(self._bf, filename, perm)             # <<<<<<<<<<<<<<
   *         return copy
   * 
   */
    __pyx_t_5 = ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf;
    __pyx_t_6 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_perm); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_copy->_bf = bloomfilter_Copy_Template(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  
    /* "pybloomfilter.pyx":198
   *             os.unlink(filename)
   *         copy._bf = cbloomfilter.bloomfilter_Copy_Template(self._bf, filename, perm)
   *         return copy             # <<<<<<<<<<<<<<
   * 
   *     def copy(self, filename, perm=0755):
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_copy));
    __pyx_r = ((PyObject *)__pyx_v_copy);
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.copy_template");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XDECREF((PyObject *)__pyx_v_copy);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":200
   *         return copy
   * 
   *     def copy(self, filename, perm=0755):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   * 
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_9copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_9copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_filename = 0;
    PyObject *__pyx_v_perm = 0;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__perm,0};
    __Pyx_RefNannySetupContext("copy");
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
      PyObject* values[2] = {0,0};
      values[1] = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__perm);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "copy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_filename = values[0];
      __pyx_v_perm = values[1];
    } else {
      __pyx_v_perm = ((PyObject *)__pyx_int_0755);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: __pyx_v_perm = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    goto __pyx_L4_argument_unpacking_done;
    __pyx_L5_argtuple_error:;
    __Pyx_RaiseArgtupleInvalid("copy", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_L3_error:;
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.copy");
    __Pyx_RefNannyFinishContext();
    return NULL;
    __pyx_L4_argument_unpacking_done:;
  
    /* "pybloomfilter.pyx":201
   * 
   *     def copy(self, filename, perm=0755):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   * 
   *         if self._anonymous:
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":203
   *         self._assert_open()
   * 
   *         if self._anonymous:             # <<<<<<<<<<<<<<
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')
   * 
   */
    if (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_anonymous) {
  
      /* "pybloomfilter.pyx":204
   * 
   *         if self._anonymous:
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')             # <<<<<<<<<<<<<<
   * 
   *         shutil.copy(self._bf.array.filename, filename)
   */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  
    /* "pybloomfilter.pyx":206
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')
   * 
   *         shutil.copy(self._bf.array.filename, filename)             # <<<<<<<<<<<<<<
   *         return BloomFilter(self._bf.max_num_elem, self._bf.error_rate, filename, perm)
   * 
   */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__shutil); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array->filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":207
   * 
   *         shutil.copy(self._bf.array.filename, filename)
   *         return BloomFilter(self._bf.max_num_elem, self._bf.error_rate, filename, perm)             # <<<<<<<<<<<<<<
   * 
   *     def add(self, item):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->max_num_elem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->error_rate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_filename);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    __Pyx_INCREF(__pyx_v_perm);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_perm);
    __Pyx_GIVEREF(__pyx_v_perm);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_13pybloomfilter_BloomFilter)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.copy");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":209
   *         return BloomFilter(self._bf.max_num_elem, self._bf.error_rate, filename, perm)
   * 
   *     def add(self, item):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         cdef cbloomfilter.Key key
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10add(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_10add(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    Key __pyx_v_key;
    int __pyx_v_result;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    int __pyx_t_3;
    char *__pyx_t_4;
    Py_ssize_t __pyx_t_5;
    long __pyx_t_6;
    __Pyx_RefNannySetupContext("add");
  
    /* "pybloomfilter.pyx":210
   * 
   *     def add(self, item):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":212
   *         self._assert_open()
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):             # <<<<<<<<<<<<<<
   *             key.shash = item
   *             key.nhash = len(item)
   */
    __pyx_t_2 = __pyx_v_item;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyString_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_t_2, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {
  
      /* "pybloomfilter.pyx":213
   *         cdef cbloomfilter.Key key
   *         if isinstance(item, str):
   *             key.shash = item             # <<<<<<<<<<<<<<
   *             key.nhash = len(item)
   *         else:
   */
      __pyx_t_4 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_key.shash = __pyx_t_4;
  
      /* "pybloomfilter.pyx":214
   *         if isinstance(item, str):
   *             key.shash = item
   *             key.nhash = len(item)             # <<<<<<<<<<<<<<
   *         else:
   *             key.shash = NULL
   */
      __pyx_t_1 = __pyx_v_item;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_key.nhash = __pyx_t_5;
      goto __pyx_L5;
    }
    /*else*/ {
  
      /* "pybloomfilter.pyx":216
   *             key.nhash = len(item)
   *         else:
   *             key.shash = NULL             # <<<<<<<<<<<<<<
   *             key.nhash = hash(item)
   * 
   */
      __pyx_v_key.shash = NULL;
  
      /* "pybloomfilter.pyx":217
   *         else:
   *             key.shash = NULL
   *             key.nhash = hash(item)             # <<<<<<<<<<<<<<
   * 
   *         result = cbloomfilter.bloomfilter_Add(self._bf, &key)
   */
      __pyx_t_1 = __pyx_v_item;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_key.nhash = __pyx_t_6;
    }
    __pyx_L5:;
  
    /* "pybloomfilter.pyx":219
   *             key.nhash = hash(item)
   * 
   *         result = cbloomfilter.bloomfilter_Add(self._bf, &key)             # <<<<<<<<<<<<<<
   *         if result == 2:
   *             raise RuntimeError("Some problem occured while trying to add key.")
   */
    __pyx_v_result = bloomfilter_Add(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf, (&__pyx_v_key));
  
    /* "pybloomfilter.pyx":220
   * 
   *         result = cbloomfilter.bloomfilter_Add(self._bf, &key)
   *         if result == 2:             # <<<<<<<<<<<<<<
   *             raise RuntimeError("Some problem occured while trying to add key.")
   *         return bool(result)
   */
    __pyx_t_3 = (__pyx_v_result == 2);
    if (__pyx_t_3) {
  
      /* "pybloomfilter.pyx":221
   *         result = cbloomfilter.bloomfilter_Add(self._bf, &key)
   *         if result == 2:
   *             raise RuntimeError("Some problem occured while trying to add key.")             # <<<<<<<<<<<<<<
   *         return bool(result)
   * 
   */
      __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  
    /* "pybloomfilter.pyx":222
   *         if result == 2:
   *             raise RuntimeError("Some problem occured while trying to add key.")
   *         return bool(result)             # <<<<<<<<<<<<<<
   * 
   *     def update(self, iterable):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyInt_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.add");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":224
   *         return bool(result)
   * 
   *     def update(self, iterable):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         for item in iterable:
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_11update(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_11update(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable) {
    PyObject *__pyx_v_item;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    Py_ssize_t __pyx_t_3;
    PyObject *__pyx_t_4 = NULL;
    PyObject *__pyx_t_5 = NULL;
    __Pyx_RefNannySetupContext("update");
    __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":225
   * 
   *     def update(self, iterable):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         for item in iterable:
   *             self.add(item)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":226
   *     def update(self, iterable):
   *         self._assert_open()
   *         for item in iterable:             # <<<<<<<<<<<<<<
   *             self.add(item)
   * 
   */
    if (PyList_CheckExact(__pyx_v_iterable) || PyTuple_CheckExact(__pyx_v_iterable)) {
      __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_iterable; __Pyx_INCREF(__pyx_t_2);
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    }
    for (;;) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
      } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
      } else {
        __pyx_t_1 = PyIter_Next(__pyx_t_2);
        if (!__pyx_t_1) {
          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_t_1;
      __pyx_t_1 = 0;
  
      /* "pybloomfilter.pyx":227
   *         self._assert_open()
   *         for item in iterable:
   *             self.add(item)             # <<<<<<<<<<<<<<
   * 
   *     def __len__(self):
   */
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __Pyx_INCREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.update");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_item);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":229
   *             self.add(item)
   * 
   *     def __len__(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         if not self._bf.count_correct:
   */
  
  static Py_ssize_t __pyx_pf_13pybloomfilter_11BloomFilter_12__len__(PyObject *__pyx_v_self); /*proto*/
  static Py_ssize_t __pyx_pf_13pybloomfilter_11BloomFilter_12__len__(PyObject *__pyx_v_self) {
    Py_ssize_t __pyx_r;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    int __pyx_t_3;
    __Pyx_RefNannySetupContext("__len__");
  
    /* "pybloomfilter.pyx":230
   * 
   *     def __len__(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         if not self._bf.count_correct:
   *             raise IndeterminateCountError("Length of BloomFilter object is unavailable after intersection or union called.")
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":231
   *     def __len__(self):
   *         self._assert_open()
   *         if not self._bf.count_correct:             # <<<<<<<<<<<<<<
   *             raise IndeterminateCountError("Length of BloomFilter object is unavailable after intersection or union called.")
   *         return self._bf.elem_count
   */
    __pyx_t_3 = (!((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->count_correct);
    if (__pyx_t_3) {
  
      /* "pybloomfilter.pyx":232
   *         self._assert_open()
   *         if not self._bf.count_correct:
   *             raise IndeterminateCountError("Length of BloomFilter object is unavailable after intersection or union called.")             # <<<<<<<<<<<<<<
   *         return self._bf.elem_count
   * 
   */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_23); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  
    /* "pybloomfilter.pyx":233
   *         if not self._bf.count_correct:
   *             raise IndeterminateCountError("Length of BloomFilter object is unavailable after intersection or union called.")
   *         return self._bf.elem_count             # <<<<<<<<<<<<<<
   * 
   *     def close(self):
   */
    __pyx_r = ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->elem_count;
    goto __pyx_L0;
  
    __pyx_r = 0;
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__len__");
    __pyx_r = -1;
    __pyx_L0:;
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":235
   *         return self._bf.elem_count
   * 
   *     def close(self):             # <<<<<<<<<<<<<<
   *         if self._closed == 0:
   *             self._closed = 1
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_r = NULL;
    int __pyx_t_1;
    __Pyx_RefNannySetupContext("close");
  
    /* "pybloomfilter.pyx":236
   * 
   *     def close(self):
   *         if self._closed == 0:             # <<<<<<<<<<<<<<
   *             self._closed = 1
   *             cbloomfilter.bloomfilter_Destroy(self._bf)
   */
    __pyx_t_1 = (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_closed == 0);
    if (__pyx_t_1) {
  
      /* "pybloomfilter.pyx":237
   *     def close(self):
   *         if self._closed == 0:
   *             self._closed = 1             # <<<<<<<<<<<<<<
   *             cbloomfilter.bloomfilter_Destroy(self._bf)
   *             self._bf = NULL
   */
      ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_closed = 1;
  
      /* "pybloomfilter.pyx":238
   *         if self._closed == 0:
   *             self._closed = 1
   *             cbloomfilter.bloomfilter_Destroy(self._bf)             # <<<<<<<<<<<<<<
   *             self._bf = NULL
   * 
   */
      bloomfilter_Destroy(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf);
  
      /* "pybloomfilter.pyx":239
   *             self._closed = 1
   *             cbloomfilter.bloomfilter_Destroy(self._bf)
   *             self._bf = NULL             # <<<<<<<<<<<<<<
   * 
   *     def __ior__(self, BloomFilter other):
   */
      ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf = NULL;
      goto __pyx_L5;
    }
    __pyx_L5:;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":241
   *             self._bf = NULL
   * 
   *     def __ior__(self, BloomFilter other):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         self._assert_comparable(other)
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_14__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_14__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    __Pyx_RefNannySetupContext("__ior__");
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13pybloomfilter_BloomFilter, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":242
   * 
   *     def __ior__(self, BloomFilter other):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":243
   *     def __ior__(self, BloomFilter other):
   *         self._assert_open()
   *         self._assert_comparable(other)             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_comparable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":244
   *         self._assert_open()
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)             # <<<<<<<<<<<<<<
   *         self._bf.count_correct = 0
   *         return self
   */
    mbarray_Or(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array, ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_other)->_bf->array);
  
    /* "pybloomfilter.pyx":245
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0             # <<<<<<<<<<<<<<
   *         return self
   * 
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->count_correct = 0;
  
    /* "pybloomfilter.pyx":246
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   *         return self             # <<<<<<<<<<<<<<
   * 
   *     def union(self, BloomFilter other):
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__ior__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":248
   *         return self
   * 
   *     def union(self, BloomFilter other):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         other._assert_open()
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_15union(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_15union(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    __Pyx_RefNannySetupContext("union");
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13pybloomfilter_BloomFilter, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":249
   * 
   *     def union(self, BloomFilter other):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         other._assert_open()
   *         self._assert_comparable(other)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":250
   *     def union(self, BloomFilter other):
   *         self._assert_open()
   *         other._assert_open()             # <<<<<<<<<<<<<<
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":251
   *         self._assert_open()
   *         other._assert_open()
   *         self._assert_comparable(other)             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_comparable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":252
   *         other._assert_open()
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)             # <<<<<<<<<<<<<<
   *         self._bf.count_correct = 0
   *         return self
   */
    mbarray_Or(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array, ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_other)->_bf->array);
  
    /* "pybloomfilter.pyx":253
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0             # <<<<<<<<<<<<<<
   *         return self
   * 
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->count_correct = 0;
  
    /* "pybloomfilter.pyx":254
   *         cbloomfilter.mbarray_Or(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   *         return self             # <<<<<<<<<<<<<<
   * 
   *     def __iand__(self, BloomFilter other):
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.union");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":256
   *         return self
   * 
   *     def __iand__(self, BloomFilter other):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         other._assert_open()
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_16__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_16__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    __Pyx_RefNannySetupContext("__iand__");
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13pybloomfilter_BloomFilter, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":257
   * 
   *     def __iand__(self, BloomFilter other):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         other._assert_open()
   *         self._assert_comparable(other)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":258
   *     def __iand__(self, BloomFilter other):
   *         self._assert_open()
   *         other._assert_open()             # <<<<<<<<<<<<<<
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":259
   *         self._assert_open()
   *         other._assert_open()
   *         self._assert_comparable(other)             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_comparable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":260
   *         other._assert_open()
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)             # <<<<<<<<<<<<<<
   *         self._bf.count_correct = 0
   *         return self
   */
    mbarray_And(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array, ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_other)->_bf->array);
  
    /* "pybloomfilter.pyx":261
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0             # <<<<<<<<<<<<<<
   *         return self
   * 
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->count_correct = 0;
  
    /* "pybloomfilter.pyx":262
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   *         return self             # <<<<<<<<<<<<<<
   * 
   *     def intersection(self, BloomFilter other):
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.__iand__");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":264
   *         return self
   * 
   *     def intersection(self, BloomFilter other):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         other._assert_open()
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_17intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_17intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    __Pyx_RefNannySetupContext("intersection");
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13pybloomfilter_BloomFilter, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":265
   * 
   *     def intersection(self, BloomFilter other):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         other._assert_open()
   *         self._assert_comparable(other)
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":266
   *     def intersection(self, BloomFilter other):
   *         self._assert_open()
   *         other._assert_open()             # <<<<<<<<<<<<<<
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":267
   *         self._assert_open()
   *         other._assert_open()
   *         self._assert_comparable(other)             # <<<<<<<<<<<<<<
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_comparable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_other);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other);
    __Pyx_GIVEREF(__pyx_v_other);
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  
    /* "pybloomfilter.pyx":268
   *         other._assert_open()
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)             # <<<<<<<<<<<<<<
   *         self._bf.count_correct = 0
   *         return self
   */
    mbarray_And(((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array, ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_other)->_bf->array);
  
    /* "pybloomfilter.pyx":269
   *         self._assert_comparable(other)
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0             # <<<<<<<<<<<<<<
   *         return self
   * 
   */
    ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->count_correct = 0;
  
    /* "pybloomfilter.pyx":270
   *         cbloomfilter.mbarray_And(self._bf.array, other._bf.array)
   *         self._bf.count_correct = 0
   *         return self             # <<<<<<<<<<<<<<
   * 
   *     def _assert_open(self):
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.intersection");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":272
   *         return self
   * 
   *     def _assert_open(self):             # <<<<<<<<<<<<<<
   *         if self._closed != 0:
   *             raise ValueError("I/O operation on closed file")
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_18_assert_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_18_assert_open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_r = NULL;
    int __pyx_t_1;
    PyObject *__pyx_t_2 = NULL;
    __Pyx_RefNannySetupContext("_assert_open");
  
    /* "pybloomfilter.pyx":273
   * 
   *     def _assert_open(self):
   *         if self._closed != 0:             # <<<<<<<<<<<<<<
   *             raise ValueError("I/O operation on closed file")
   * 
   */
    __pyx_t_1 = (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_closed != 0);
    if (__pyx_t_1) {
  
      /* "pybloomfilter.pyx":274
   *     def _assert_open(self):
   *         if self._closed != 0:
   *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
   * 
   *     def _assert_comparable(self, BloomFilter other):
   */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter._assert_open");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":276
   *             raise ValueError("I/O operation on closed file")
   * 
   *     def _assert_comparable(self, BloomFilter other):             # <<<<<<<<<<<<<<
   *         error = ValueError("The two BloomFilter objects are not the same type (hint, use copy_template)")
   *         if self._bf.array.bits != other._bf.array.bits:
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_19_assert_comparable(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_19_assert_comparable(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
    PyObject *__pyx_v_error;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    int __pyx_t_2;
    PyObject *__pyx_t_3 = NULL;
    PyObject *__pyx_t_4 = NULL;
    __Pyx_RefNannySetupContext("_assert_comparable");
    __pyx_v_error = Py_None; __Pyx_INCREF(Py_None);
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13pybloomfilter_BloomFilter, 1, "other", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":277
   * 
   *     def _assert_comparable(self, BloomFilter other):
   *         error = ValueError("The two BloomFilter objects are not the same type (hint, use copy_template)")             # <<<<<<<<<<<<<<
   *         if self._bf.array.bits != other._bf.array.bits:
   *             raise error
   */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_error);
    __pyx_v_error = __pyx_t_1;
    __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":278
   *     def _assert_comparable(self, BloomFilter other):
   *         error = ValueError("The two BloomFilter objects are not the same type (hint, use copy_template)")
   *         if self._bf.array.bits != other._bf.array.bits:             # <<<<<<<<<<<<<<
   *             raise error
   *         if self.hash_seeds != other.hash_seeds:
   */
    __pyx_t_2 = (((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_self)->_bf->array->bits != ((struct __pyx_obj_13pybloomfilter_BloomFilter *)__pyx_v_other)->_bf->array->bits);
    if (__pyx_t_2) {
  
      /* "pybloomfilter.pyx":279
   *         error = ValueError("The two BloomFilter objects are not the same type (hint, use copy_template)")
   *         if self._bf.array.bits != other._bf.array.bits:
   *             raise error             # <<<<<<<<<<<<<<
   *         if self.hash_seeds != other.hash_seeds:
   *             raise error
   */
      __Pyx_Raise(__pyx_v_error, 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  
    /* "pybloomfilter.pyx":280
   *         if self._bf.array.bits != other._bf.array.bits:
   *             raise error
   *         if self.hash_seeds != other.hash_seeds:             # <<<<<<<<<<<<<<
   *             raise error
   *         return
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__hash_seeds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__hash_seeds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {
  
      /* "pybloomfilter.pyx":281
   *             raise error
   *         if self.hash_seeds != other.hash_seeds:
   *             raise error             # <<<<<<<<<<<<<<
   *         return
   * 
   */
      __Pyx_Raise(__pyx_v_error, 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
  
    /* "pybloomfilter.pyx":282
   *         if self.hash_seeds != other.hash_seeds:
   *             raise error
   *         return             # <<<<<<<<<<<<<<
   * 
   *     def to_base64(self):
   */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter._assert_comparable");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_error);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  /* "pybloomfilter.pyx":284
   *         return
   * 
   *     def to_base64(self):             # <<<<<<<<<<<<<<
   *         self._assert_open()
   *         bfile = open(self.name, 'r')
   */
  
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_20to_base64(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  static PyObject *__pyx_pf_13pybloomfilter_11BloomFilter_20to_base64(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
    PyObject *__pyx_v_bfile;
    PyObject *__pyx_v_result;
    PyObject *__pyx_r = NULL;
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    PyObject *__pyx_t_4 = NULL;
    __Pyx_RefNannySetupContext("to_base64");
    __pyx_v_bfile = Py_None; __Pyx_INCREF(Py_None);
    __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
  
    /* "pybloomfilter.pyx":285
   * 
   *     def to_base64(self):
   *         self._assert_open()             # <<<<<<<<<<<<<<
   *         bfile = open(self.name, 'r')
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')
   */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___assert_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":286
   *     def to_base64(self):
   *         self._assert_open()
   *         bfile = open(self.name, 'r')             # <<<<<<<<<<<<<<
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')
   *         bfile.close()
   */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__r));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_bfile);
    __pyx_v_bfile = __pyx_t_2;
    __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":287
   *         self._assert_open()
   *         bfile = open(self.name, 'r')
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')             # <<<<<<<<<<<<<<
   *         bfile.close()
   *         return result
   */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compress); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__zlib); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__compress); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_bfile, __pyx_n_s__read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_9);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_9);
    __Pyx_GIVEREF(__pyx_int_9);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_t_4;
    __pyx_t_4 = 0;
  
    /* "pybloomfilter.pyx":288
   *         bfile = open(self.name, 'r')
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')
   *         bfile.close()             # <<<<<<<<<<<<<<
   *         return result
   * 
   */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_bfile, __pyx_n_s__close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  
    /* "pybloomfilter.pyx":289
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')
   *         bfile.close()
   *         return result             # <<<<<<<<<<<<<<
   * 
   *     from_base64 = staticmethod(bf_from_base64)
   */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4);
    __Pyx_AddTraceback("pybloomfilter.BloomFilter.to_base64");
    __pyx_r = NULL;
    __pyx_L0:;
    __Pyx_DECREF(__pyx_v_bfile);
    __Pyx_DECREF(__pyx_v_result);
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    return __pyx_r;
  }
  
  static PyObject *__pyx_tp_new_13pybloomfilter_BloomFilter(PyTypeObject *t, PyObject *a, PyObject *k) {
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    if (__pyx_pf_13pybloomfilter_11BloomFilter___cinit__(o, a, k) < 0) {
      Py_DECREF(o); o = 0;
    }
    return o;
  }
  
  static void __pyx_tp_dealloc_13pybloomfilter_BloomFilter(PyObject *o) {
    {
      PyObject *etype, *eval, *etb;
      PyErr_Fetch(&etype, &eval, &etb);
      ++Py_REFCNT(o);
      __pyx_pf_13pybloomfilter_11BloomFilter_1__dealloc__(o);
      if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
      --Py_REFCNT(o);
      PyErr_Restore(etype, eval, etb);
    }
    (*Py_TYPE(o)->tp_free)(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_hash_seeds(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_10hash_seeds___get__(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_capacity(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_8capacity___get__(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_error_rate(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_10error_rate___get__(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_num_hashes(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_10num_hashes___get__(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_num_bits(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_8num_bits___get__(o);
  }
  
  static PyObject *__pyx_getprop_13pybloomfilter_11BloomFilter_name(PyObject *o, void *x) {
    return __pyx_pf_13pybloomfilter_11BloomFilter_4name___get__(o);
  }
  
  static PyMethodDef __pyx_methods_13pybloomfilter_BloomFilter[] = {
    {__Pyx_NAMESTR("fileno"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_2fileno, METH_NOARGS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("sync"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_5sync, METH_NOARGS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("clear_all"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_6clear_all, METH_NOARGS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("copy_template"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_8copy_template, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_9copy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("add"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_10add, METH_O, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_11update, METH_O, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_13close, METH_NOARGS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("union"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_15union, METH_O, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("intersection"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_17intersection, METH_O, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("_assert_open"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_18_assert_open, METH_NOARGS, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("_assert_comparable"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_19_assert_comparable, METH_O, __Pyx_DOCSTR(0)},
    {__Pyx_NAMESTR("to_base64"), (PyCFunction)__pyx_pf_13pybloomfilter_11BloomFilter_20to_base64, METH_NOARGS, __Pyx_DOCSTR(0)},
    {0, 0, 0, 0}
  };
  
  static struct PyGetSetDef __pyx_getsets_13pybloomfilter_BloomFilter[] = {
    {(char *)"hash_seeds", __pyx_getprop_13pybloomfilter_11BloomFilter_hash_seeds, 0, 0, 0},
    {(char *)"capacity", __pyx_getprop_13pybloomfilter_11BloomFilter_capacity, 0, 0, 0},
    {(char *)"error_rate", __pyx_getprop_13pybloomfilter_11BloomFilter_error_rate, 0, 0, 0},
    {(char *)"num_hashes", __pyx_getprop_13pybloomfilter_11BloomFilter_num_hashes, 0, 0, 0},
    {(char *)"num_bits", __pyx_getprop_13pybloomfilter_11BloomFilter_num_bits, 0, 0, 0},
    {(char *)"name", __pyx_getprop_13pybloomfilter_11BloomFilter_name, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };
  
  static PyNumberMethods __pyx_tp_as_number_BloomFilter = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    #if PY_MAJOR_VERSION < 3
    0, /*nb_divide*/
    #endif
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    #if PY_MAJOR_VERSION < 3
    0, /*nb_coerce*/
    #endif
    0, /*nb_int*/
    #if PY_MAJOR_VERSION < 3
    0, /*nb_long*/
    #else
    0, /*reserved*/
    #endif
    0, /*nb_float*/
    #if PY_MAJOR_VERSION < 3
    0, /*nb_oct*/
    #endif
    #if PY_MAJOR_VERSION < 3
    0, /*nb_hex*/
    #endif
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    #if PY_MAJOR_VERSION < 3
    0, /*nb_inplace_divide*/
    #endif
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    __pyx_pf_13pybloomfilter_11BloomFilter_16__iand__, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    __pyx_pf_13pybloomfilter_11BloomFilter_14__ior__, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if PY_VERSION_HEX >= 0x02050000
    0, /*nb_index*/
    #endif
  };
  
  static PySequenceMethods __pyx_tp_as_sequence_BloomFilter = {
    __pyx_pf_13pybloomfilter_11BloomFilter_12__len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    __pyx_pf_13pybloomfilter_11BloomFilter_7__contains__, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };
  
  static PyMappingMethods __pyx_tp_as_mapping_BloomFilter = {
    __pyx_pf_13pybloomfilter_11BloomFilter_12__len__, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };
  
  static PyBufferProcs __pyx_tp_as_buffer_BloomFilter = {
    #if PY_MAJOR_VERSION < 3
    0, /*bf_getreadbuffer*/
    #endif
    #if PY_MAJOR_VERSION < 3
    0, /*bf_getwritebuffer*/
    #endif
    #if PY_MAJOR_VERSION < 3
    0, /*bf_getsegcount*/
    #endif
    #if PY_MAJOR_VERSION < 3
    0, /*bf_getcharbuffer*/
    #endif
    #if PY_VERSION_HEX >= 0x02060000
    0, /*bf_getbuffer*/
    #endif
    #if PY_VERSION_HEX >= 0x02060000
    0, /*bf_releasebuffer*/
    #endif
  };
  
  static PyTypeObject __pyx_type_13pybloomfilter_BloomFilter = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("pybloomfilter.BloomFilter"), /*tp_name*/
    sizeof(struct __pyx_obj_13pybloomfilter_BloomFilter), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_13pybloomfilter_BloomFilter, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    #if PY_MAJOR_VERSION < 3
    0, /*tp_compare*/
    #else
    0, /*reserved*/
    #endif
    __pyx_pf_13pybloomfilter_11BloomFilter_3__repr__, /*tp_repr*/
    &__pyx_tp_as_number_BloomFilter, /*tp_as_number*/
    &__pyx_tp_as_sequence_BloomFilter, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_BloomFilter, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_13pybloomfilter_11BloomFilter_4__str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_BloomFilter, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
    __Pyx_DOCSTR("\n    The BloomFilter class implements a bloom filter that uses mmap'd files.\n    For more information on what a bloom filter is, please read the Wikipedia article about it.  \n    "), /*tp_doc*/
    0, /*tp_traverse*/
    0, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_13pybloomfilter_BloomFilter, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_13pybloomfilter_BloomFilter, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_13pybloomfilter_BloomFilter, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
    0, /*tp_del*/
    #if PY_VERSION_HEX >= 0x02060000
    0, /*tp_version_tag*/
    #endif
  };
  
  static PyMethodDef __pyx_methods[] = {
    {0, 0, 0, 0}
  };
  
  #if PY_MAJOR_VERSION >= 3
  static struct PyModuleDef __pyx_moduledef = {
      PyModuleDef_HEAD_INIT,
      __Pyx_NAMESTR("pybloomfilter"),
      0, /* 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_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
    {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
    {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
    {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
    {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
    {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
    {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
    {&__pyx_n_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 1},
    {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
    {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
    {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
    {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
    {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
    {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
    {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
    {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
    {&__pyx_n_s__AUTHOR, __pyx_k__AUTHOR, sizeof(__pyx_k__AUTHOR), 0, 0, 1, 1},
    {&__pyx_n_s__ENOENT, __pyx_k__ENOENT, sizeof(__pyx_k__ENOENT), 0, 0, 1, 1},
    {&__pyx_n_s__I, __pyx_k__I, sizeof(__pyx_k__I), 0, 0, 1, 1},
    {&__pyx_n_s__OSError, __pyx_k__OSError, sizeof(__pyx_k__OSError), 0, 0, 1, 1},
    {&__pyx_n_s__O_BINARY, __pyx_k__O_BINARY, sizeof(__pyx_k__O_BINARY), 0, 0, 1, 1},
    {&__pyx_n_s__O_CREAT, __pyx_k__O_CREAT, sizeof(__pyx_k__O_CREAT), 0, 0, 1, 1},
    {&__pyx_n_s__O_RDONLY, __pyx_k__O_RDONLY, sizeof(__pyx_k__O_RDONLY), 0, 0, 1, 1},
    {&__pyx_n_s__O_RDWR, __pyx_k__O_RDWR, sizeof(__pyx_k__O_RDWR), 0, 0, 1, 1},
    {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
    {&__pyx_n_s__VERSION, __pyx_k__VERSION, sizeof(__pyx_k__VERSION), 0, 0, 1, 1},
    {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
    {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
    {&__pyx_n_s____repr__, __pyx_k____repr__, sizeof(__pyx_k____repr__), 0, 0, 1, 1},
    {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
    {&__pyx_n_s___anonymous, __pyx_k___anonymous, sizeof(__pyx_k___anonymous), 0, 0, 1, 1},
    {&__pyx_n_s___assert_comparable, __pyx_k___assert_comparable, sizeof(__pyx_k___assert_comparable), 0, 0, 1, 1},
    {&__pyx_n_s___assert_open, __pyx_k___assert_open, sizeof(__pyx_k___assert_open), 0, 0, 1, 1},
    {&__pyx_n_s___bf, __pyx_k___bf, sizeof(__pyx_k___bf), 0, 0, 1, 1},
    {&__pyx_n_s___closed, __pyx_k___closed, sizeof(__pyx_k___closed), 0, 0, 1, 1},
    {&__pyx_n_s__access, __pyx_k__access, sizeof(__pyx_k__access), 0, 0, 1, 1},
    {&__pyx_n_s__add, __pyx_k__add, sizeof(__pyx_k__add), 0, 0, 1, 1},
    {&__pyx_n_s__anonymous, __pyx_k__anonymous, sizeof(__pyx_k__anonymous), 0, 0, 1, 1},
    {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
    {&__pyx_n_s__b, __pyx_k__b, sizeof(__pyx_k__b), 0, 0, 1, 1},
    {&__pyx_n_s__base64, __pyx_k__base64, sizeof(__pyx_k__base64), 0, 0, 1, 1},
    {&__pyx_n_s__bf_from_base64, __pyx_k__bf_from_base64, sizeof(__pyx_k__bf_from_base64), 0, 0, 1, 1},
    {&__pyx_n_s__bf_from_file, __pyx_k__bf_from_file, sizeof(__pyx_k__bf_from_file), 0, 0, 1, 1},
    {&__pyx_n_s__bits, __pyx_k__bits, sizeof(__pyx_k__bits), 0, 0, 1, 1},
    {&__pyx_n_s__capacity, __pyx_k__capacity, sizeof(__pyx_k__capacity), 0, 0, 1, 1},
    {&__pyx_n_s__ceil, __pyx_k__ceil, sizeof(__pyx_k__ceil), 0, 0, 1, 1},
    {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1},
    {&__pyx_n_s__compress, __pyx_k__compress, sizeof(__pyx_k__compress), 0, 0, 1, 1},
    {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
    {&__pyx_n_s__count_correct, __pyx_k__count_correct, sizeof(__pyx_k__count_correct), 0, 0, 1, 1},
    {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
    {&__pyx_n_s__decompress, __pyx_k__decompress, sizeof(__pyx_k__decompress), 0, 0, 1, 1},
    {&__pyx_n_s__elem_count, __pyx_k__elem_count, sizeof(__pyx_k__elem_count), 0, 0, 1, 1},
    {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
    {&__pyx_n_s__endswith, __pyx_k__endswith, sizeof(__pyx_k__endswith), 0, 0, 1, 1},
    {&__pyx_n_s__eno, __pyx_k__eno, sizeof(__pyx_k__eno), 0, 0, 1, 1},
    {&__pyx_n_s__errno, __pyx_k__errno, sizeof(__pyx_k__errno), 0, 0, 1, 1},
    {&__pyx_n_s__error_rate, __pyx_k__error_rate, sizeof(__pyx_k__error_rate), 0, 0, 1, 1},
    {&__pyx_n_s__exists, __pyx_k__exists, sizeof(__pyx_k__exists), 0, 0, 1, 1},
    {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
    {&__pyx_n_s__fd, __pyx_k__fd, sizeof(__pyx_k__fd), 0, 0, 1, 1},
    {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1},
    {&__pyx_n_s__from_base64, __pyx_k__from_base64, sizeof(__pyx_k__from_base64), 0, 0, 1, 1},
    {&__pyx_n_s__fromstring, __pyx_k__fromstring, sizeof(__pyx_k__fromstring), 0, 0, 1, 1},
    {&__pyx_n_s__getrandbits, __pyx_k__getrandbits, sizeof(__pyx_k__getrandbits), 0, 0, 1, 1},
    {&__pyx_n_s__hash_seeds, __pyx_k__hash_seeds, sizeof(__pyx_k__hash_seeds), 0, 0, 1, 1},
    {&__pyx_n_s__log, __pyx_k__log, sizeof(__pyx_k__log), 0, 0, 1, 1},
    {&__pyx_n_s__math, __pyx_k__math, sizeof(__pyx_k__math), 0, 0, 1, 1},
    {&__pyx_n_s__max_num_elem, __pyx_k__max_num_elem, sizeof(__pyx_k__max_num_elem), 0, 0, 1, 1},
    {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
    {&__pyx_n_s__nhash, __pyx_k__nhash, sizeof(__pyx_k__nhash), 0, 0, 1, 1},
    {&__pyx_n_s__num_hashes, __pyx_k__num_hashes, sizeof(__pyx_k__num_hashes), 0, 0, 1, 1},
    {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
    {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 0, 0, 1, 1},
    {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
    {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
    {&__pyx_n_s__perm, __pyx_k__perm, sizeof(__pyx_k__perm), 0, 0, 1, 1},
    {&__pyx_n_s__pow, __pyx_k__pow, sizeof(__pyx_k__pow), 0, 0, 1, 1},
    {&__pyx_n_s__pybloomfilter, __pyx_k__pybloomfilter, sizeof(__pyx_k__pybloomfilter), 0, 0, 1, 1},
    {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
    {&__pyx_n_s__random, __pyx_k__random, sizeof(__pyx_k__random), 0, 0, 1, 1},
    {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
    {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1},
    {&__pyx_n_s__rw, __pyx_k__rw, sizeof(__pyx_k__rw), 0, 0, 1, 1},
    {&__pyx_n_s__shash, __pyx_k__shash, sizeof(__pyx_k__shash), 0, 0, 1, 1},
    {&__pyx_n_s__shutil, __pyx_k__shutil, sizeof(__pyx_k__shutil), 0, 0, 1, 1},
    {&__pyx_n_s__staticmethod, __pyx_k__staticmethod, sizeof(__pyx_k__staticmethod), 0, 0, 1, 1},
    {&__pyx_n_s__strerror, __pyx_k__strerror, sizeof(__pyx_k__strerror), 0, 0, 1, 1},
    {&__pyx_n_s__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 0, 1, 1},
    {&__pyx_n_s__tostring, __pyx_k__tostring, sizeof(__pyx_k__tostring), 0, 0, 1, 1},
    {&__pyx_n_s__unlink, __pyx_k__unlink, sizeof(__pyx_k__unlink), 0, 0, 1, 1},
    {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1},
    {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
    {&__pyx_n_s__zlib, __pyx_k__zlib, sizeof(__pyx_k__zlib), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  static int __Pyx_InitCachedBuiltins(void) {
    __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_staticmethod = __Pyx_GetName(__pyx_b, __pyx_n_s__staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_open = __Pyx_GetName(__pyx_b, __pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin___repr__ = __Pyx_GetName(__pyx_b, __pyx_n_s____repr__); if (!__pyx_builtin___repr__) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    return 0;
    __pyx_L1_error:;
    return -1;
  }
  
  static int __Pyx_InitCachedConstants(void) {
    __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
  
    /* "pybloomfilter.pyx":24
   *     if 'b' in mode and hasattr(os, 'O_BINARY'):
   *         result |= os.O_BINARY
   *     if mode.endswith('+'):             # <<<<<<<<<<<<<<
   *         result |= os.O_CREAT
   *     return result
   */
    __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
    PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));
  
    /* "pybloomfilter.pyx":33
   * def bf_from_base64(filename, string, perm=0755):
   *     bfile = open(filename, 'w+', perm)
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))             # <<<<<<<<<<<<<<
   *     bfile.close()
   *     return BloomFilter.open(filename)
   */
    __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__base64));
    PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
    __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__base64));
    PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));
  
    /* "pybloomfilter.pyx":63
   * 
   *             if not filename:
   *                 raise ValueError('A filename must be provided.')             # <<<<<<<<<<<<<<
   * 
   *             mode = "rw"
   */
    __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
    PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
  
    /* "pybloomfilter.pyx":78
   * 
   *             if not filename:
   *                 raise ValueError('A filename must be provided.')             # <<<<<<<<<<<<<<
   * 
   *             if os.path.exists(filename):
   */
    __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_7));
    PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_7));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
  
    /* "pybloomfilter.pyx":101
   *             num_bits = cbloomfilter.next_prime(num_bits)
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   *             hash_seeds = array.array('I')             # <<<<<<<<<<<<<<
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])
   *             test = hash_seeds.tostring()
   */
    __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
    PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_n_s__I));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
  
    /* "pybloomfilter.pyx":102
   *             num_hashes = int(math.ceil(math.log(2.0) * num_bits / capacity))
   *             hash_seeds = array.array('I')
   *             hash_seeds.extend([random.getrandbits(32) for i in range(num_hashes)])             # <<<<<<<<<<<<<<
   *             test = hash_seeds.tostring()
   *             seeds = test
   */
    __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15));
    __Pyx_INCREF(__pyx_int_32);
    PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, __pyx_int_32);
    __Pyx_GIVEREF(__pyx_int_32);
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
  
    /* "pybloomfilter.pyx":128
   *         def __get__(self):
   *             self._assert_open()
   *             result = array.array('I')             # <<<<<<<<<<<<<<
   *             result.fromstring((<char *>self._bf.hash_seeds)[:4 * self.num_hashes])
   *             return result
   */
    __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_16));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__I));
    PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_n_s__I));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__I));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
  
    /* "pybloomfilter.pyx":192
   * 
   *         if self._anonymous:
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')             # <<<<<<<<<<<<<<
   * 
   *         cdef BloomFilter copy = BloomFilter(0, 0, NoConstruct)
   */
    __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
    PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
  
    /* "pybloomfilter.pyx":204
   * 
   *         if self._anonymous:
   *             raise RuntimeError('Anonymous mapped files cannot be copied.')             # <<<<<<<<<<<<<<
   * 
   *         shutil.copy(self._bf.array.filename, filename)
   */
    __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_20));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
    PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_18));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));
  
    /* "pybloomfilter.pyx":221
   *         result = cbloomfilter.bloomfilter_Add(self._bf, &key)
   *         if result == 2:
   *             raise RuntimeError("Some problem occured while trying to add key.")             # <<<<<<<<<<<<<<
   *         return bool(result)
   * 
   */
    __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_22));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_21));
    PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, ((PyObject *)__pyx_kp_s_21));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_21));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));
  
    /* "pybloomfilter.pyx":232
   *         self._assert_open()
   *         if not self._bf.count_correct:
   *             raise IndeterminateCountError("Length of BloomFilter object is unavailable after intersection or union called.")             # <<<<<<<<<<<<<<
   *         return self._bf.elem_count
   * 
   */
    __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_25));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
    PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
  
    /* "pybloomfilter.pyx":274
   *     def _assert_open(self):
   *         if self._closed != 0:
   *             raise ValueError("I/O operation on closed file")             # <<<<<<<<<<<<<<
   * 
   *     def _assert_comparable(self, BloomFilter other):
   */
    __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_27));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_26));
    PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_26));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
  
    /* "pybloomfilter.pyx":277
   * 
   *     def _assert_comparable(self, BloomFilter other):
   *         error = ValueError("The two BloomFilter objects are not the same type (hint, use copy_template)")             # <<<<<<<<<<<<<<
   *         if self._bf.array.bits != other._bf.array.bits:
   *             raise error
   */
    __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_29));
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
    PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_28));
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
  
    /* "pybloomfilter.pyx":287
   *         self._assert_open()
   *         bfile = open(self.name, 'r')
   *         result = zlib.compress(zlib.compress(bfile.read(), 9).encode('base64')).encode('base64')             # <<<<<<<<<<<<<<
   *         bfile.close()
   *         return result
   */
    __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_30));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__base64));
    PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
    __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_31));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__base64));
    PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__base64));
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
  
    /* "pybloomfilter.pyx":1
   * VERSION = (0, 2, 0)             # <<<<<<<<<<<<<<
   * AUTHOR = "Michael Axiak"
   * 
   */
    __pyx_k_tuple_32 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __Pyx_INCREF(__pyx_int_2);
    PyTuple_SET_ITEM(__pyx_k_tuple_32, 1, __pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    __Pyx_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_k_tuple_32, 2, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
    __Pyx_RefNannyFinishContext();
    return 0;
    __pyx_L1_error:;
    __Pyx_RefNannyFinishContext();
    return -1;
  }
  
  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;};
    __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __pyx_int_0755 = PyInt_FromLong(0755); if (unlikely(!__pyx_int_0755)) {__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 initpybloomfilter(void); /*proto*/
  PyMODINIT_FUNC initpybloomfilter(void)
  #else
  PyMODINIT_FUNC PyInit_pybloomfilter(void); /*proto*/
  PyMODINIT_FUNC PyInit_pybloomfilter(void)
  #endif
  {
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    PyObject *__pyx_t_3 = NULL;
    #if CYTHON_REFNANNY
    void* __pyx_refnanny = NULL;
    __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");
    }
    __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_pybloomfilter(void)", __LINE__, __FILE__);
    #endif
    __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("pybloomfilter"), __pyx_methods, 0, 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_pybloomfilter) {
      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 ---*/
    __pyx_v_13pybloomfilter_NoConstruct = Py_None; Py_INCREF(Py_None);
    __pyx_v_13pybloomfilter_ReadFile = Py_None; Py_INCREF(Py_None);
    /*--- Function export code ---*/
    /*--- Type init code ---*/
    if (PyType_Ready(&__pyx_type_13pybloomfilter_BloomFilter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__Pyx_SetAttrString(__pyx_m, "BloomFilter", (PyObject *)&__pyx_type_13pybloomfilter_BloomFilter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_ptype_13pybloomfilter_BloomFilter = &__pyx_type_13pybloomfilter_BloomFilter;
    /*--- Type import code ---*/
    __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    /*--- Function import code ---*/
    /*--- Execution code ---*/
  
    /* "pybloomfilter.pyx":1
   * VERSION = (0, 2, 0)             # <<<<<<<<<<<<<<
   * AUTHOR = "Michael Axiak"
   * 
   */
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VERSION, ((PyObject *)__pyx_k_tuple_32)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":2
   * VERSION = (0, 2, 0)
   * AUTHOR = "Michael Axiak"             # <<<<<<<<<<<<<<
   * 
   * 
   */
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__AUTHOR, ((PyObject *)__pyx_kp_s_33)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  
    /* "pybloomfilter.pyx":8
   * cimport cpython
   * 
   * import random             # <<<<<<<<<<<<<<
   * import os
   * import math
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__random), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__random, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":9
   * 
   * import random
   * import os             # <<<<<<<<<<<<<<
   * import math
   * import errno as eno
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":10
   * import random
   * import os
   * import math             # <<<<<<<<<<<<<<
   * import errno as eno
   * import array
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__math), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__math, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":11
   * import os
   * import math
   * import errno as eno             # <<<<<<<<<<<<<<
   * import array
   * import zlib
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__errno), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__eno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":12
   * import math
   * import errno as eno
   * import array             # <<<<<<<<<<<<<<
   * import zlib
   * import shutil
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__array), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":13
   * import errno as eno
   * import array
   * import zlib             # <<<<<<<<<<<<<<
   * import shutil
   * 
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__zlib), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__zlib, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":14
   * import array
   * import zlib
   * import shutil             # <<<<<<<<<<<<<<
   * 
   * global errno
   */
    __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__shutil), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__shutil, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":28
   *     return result
   * 
   * cdef NoConstruct = object()             # <<<<<<<<<<<<<<
   * cdef ReadFile = object()
   * 
   */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_object, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_13pybloomfilter_NoConstruct);
    __Pyx_DECREF(__pyx_v_13pybloomfilter_NoConstruct);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_v_13pybloomfilter_NoConstruct = __pyx_t_1;
    __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":29
   * 
   * cdef NoConstruct = object()
   * cdef ReadFile = object()             # <<<<<<<<<<<<<<
   * 
   * def bf_from_base64(filename, string, perm=0755):
   */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_object, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_13pybloomfilter_ReadFile);
    __Pyx_DECREF(__pyx_v_13pybloomfilter_ReadFile);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_v_13pybloomfilter_ReadFile = __pyx_t_1;
    __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":31
   * cdef ReadFile = object()
   * 
   * def bf_from_base64(filename, string, perm=0755):             # <<<<<<<<<<<<<<
   *     bfile = open(filename, 'w+', perm)
   *     bfile.write(zlib.decompress(zlib.decompress(string.decode('base64')).decode('base64')))
   */
    __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13pybloomfilter_bf_from_base64, NULL, __pyx_n_s__pybloomfilter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bf_from_base64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":37
   *     return BloomFilter.open(filename)
   * 
   * def bf_from_file(filename):             # <<<<<<<<<<<<<<
   *     return BloomFilter(ReadFile, 0.1, filename, 0)
   * 
   */
    __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13pybloomfilter_1bf_from_file, NULL, __pyx_n_s__pybloomfilter); 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__bf_from_file, __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;
  
    /* "pybloomfilter.pyx":40
   *     return BloomFilter(ReadFile, 0.1, filename, 0)
   * 
   * class IndeterminateCountError(ValueError):             # <<<<<<<<<<<<<<
   *     pass
   * 
   */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_builtin_ValueError);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_ValueError);
    __Pyx_GIVEREF(__pyx_builtin_ValueError);
    __pyx_t_3 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1), __pyx_n_s_23, __pyx_n_s__pybloomfilter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_23, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  
    /* "pybloomfilter.pyx":291
   *         return result
   * 
   *     from_base64 = staticmethod(bf_from_base64)             # <<<<<<<<<<<<<<
   *     open = staticmethod(bf_from_file)
   */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__bf_from_base64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_staticmethod, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (PyDict_SetItem((PyObject *)__pyx_ptype_13pybloomfilter_BloomFilter->tp_dict, __pyx_n_s__from_base64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    PyType_Modified(__pyx_ptype_13pybloomfilter_BloomFilter);
  
    /* "pybloomfilter.pyx":292
   * 
   *     from_base64 = staticmethod(bf_from_base64)
   *     open = staticmethod(bf_from_file)             # <<<<<<<<<<<<<<
   */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__bf_from_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_staticmethod, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (PyDict_SetItem((PyObject *)__pyx_ptype_13pybloomfilter_BloomFilter->tp_dict, __pyx_n_s__open, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    PyType_Modified(__pyx_ptype_13pybloomfilter_BloomFilter);
  
    /* "pybloomfilter.pyx":1
   * VERSION = (0, 2, 0)             # <<<<<<<<<<<<<<
   * AUTHOR = "Michael Axiak"
   * 
   */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  
    /* "cpython/type.pxd":2
   * 
   * cdef extern from "Python.h":             # <<<<<<<<<<<<<<
   *     # The C structure of the objects used to describe built-in types.
   * 
   */
    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    if (__pyx_m) {
      __Pyx_AddTraceback("init pybloomfilter");
      Py_DECREF(__pyx_m); __pyx_m = 0;
    } else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_ImportError, "init pybloomfilter");
    }
    __pyx_L0:;
    __Pyx_RefNannyFinishContext();
    #if PY_MAJOR_VERSION < 3
    return;
    #else
    return __pyx_m;
    #endif
  }
  
  /* Runtime support code */
  
  static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
      PyObject *result;
      result = PyObject_GetAttr(dict, name);
      if (!result)
          PyErr_SetObject(PyExc_NameError, name);
      return result;
  }
  
  static void __Pyx_RaiseArgtupleInvalid(
      const char* func_name,
      int exact,
      Py_ssize_t num_min,
      Py_ssize_t num_max,
      Py_ssize_t num_found)
  {
      Py_ssize_t num_expected;
      const char *number, *more_or_less;
  
      if (num_found < num_min) {
          num_expected = num_min;
          more_or_less = "at least";
      } else {
          num_expected = num_max;
          more_or_less = "at most";
      }
      if (exact) {
          more_or_less = "exactly";
      }
      number = (num_expected == 1) ? "" : "s";
      PyErr_Format(PyExc_TypeError,
          #if PY_VERSION_HEX < 0x02050000
              "%s() takes %s %d positional argument%s (%d given)",
          #else
              "%s() takes %s %zd positional argument%s (%zd given)",
          #endif
          func_name, more_or_less, num_expected, number, num_found);
  }
  
  static void __Pyx_RaiseDoubleKeywordsError(
      const char* func_name,
      PyObject* kw_name)
  {
      PyErr_Format(PyExc_TypeError,
          #if PY_MAJOR_VERSION >= 3
          "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
          #else
          "%s() got multiple values for keyword argument '%s'", func_name,
          PyString_AS_STRING(kw_name));
          #endif
  }
  
  static int __Pyx_ParseOptionalKeywords(
      PyObject *kwds,
      PyObject **argnames[],
      PyObject *kwds2,
      PyObject *values[],
      Py_ssize_t num_pos_args,
      const char* function_name)
  {
      PyObject *key = 0, *value = 0;
      Py_ssize_t pos = 0;
      PyObject*** name;
      PyObject*** first_kw_arg = argnames + num_pos_args;
  
      while (PyDict_Next(kwds, &pos, &key, &value)) {
          name = first_kw_arg;
          while (*name && (**name != key)) name++;
          if (*name) {
              values[name-argnames] = value;
          } else {
              #if PY_MAJOR_VERSION < 3
              if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
              #else
              if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
              #endif
                  goto invalid_keyword_type;
              } else {
                  for (name = first_kw_arg; *name; name++) {
                      #if PY_MAJOR_VERSION >= 3
                      if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                          PyUnicode_Compare(**name, key) == 0) break;
                      #else
                      if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                          _PyString_Eq(**name, key)) break;
                      #endif
                  }
                  if (*name) {
                      values[name-argnames] = value;
                  } else {
                      /* unexpected keyword found */
                      for (name=argnames; name != first_kw_arg; name++) {
                          if (**name == key) goto arg_passed_twice;
                          #if PY_MAJOR_VERSION >= 3
                          if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                              PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                          #else
                          if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                              _PyString_Eq(**name, key)) goto arg_passed_twice;
                          #endif
                      }
                      if (kwds2) {
                          if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                      } else {
                          goto invalid_keyword;
                      }
                  }
              }
          }
      }
      return 0;
  arg_passed_twice:
      __Pyx_RaiseDoubleKeywordsError(function_name, **name);
      goto bad;
  invalid_keyword_type:
      PyErr_Format(PyExc_TypeError,
          "%s() keywords must be strings", function_name);
      goto bad;
  invalid_keyword:
      PyErr_Format(PyExc_TypeError,
      #if PY_MAJOR_VERSION < 3
          "%s() got an unexpected keyword argument '%s'",
          function_name, PyString_AsString(key));
      #else
          "%s() got an unexpected keyword argument '%U'",
          function_name, key);
      #endif
  bad:
      return -1;
  }
  
  static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
      PyObject *tmp_type, *tmp_value, *tmp_tb;
      PyThreadState *tstate = PyThreadState_GET();
  
      tmp_type = tstate->curexc_type;
      tmp_value = tstate->curexc_value;
      tmp_tb = tstate->curexc_traceback;
      tstate->curexc_type = type;
      tstate->curexc_value = value;
      tstate->curexc_traceback = tb;
      Py_XDECREF(tmp_type);
      Py_XDECREF(tmp_value);
      Py_XDECREF(tmp_tb);
  }
  
  static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
      PyThreadState *tstate = PyThreadState_GET();
      *type = tstate->curexc_type;
      *value = tstate->curexc_value;
      *tb = tstate->curexc_traceback;
  
      tstate->curexc_type = 0;
      tstate->curexc_value = 0;
      tstate->curexc_traceback = 0;
  }
  
  
  #if PY_MAJOR_VERSION < 3
  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
      Py_XINCREF(type);
      Py_XINCREF(value);
      Py_XINCREF(tb);
      /* First, check the traceback argument, replacing None with NULL. */
      if (tb == Py_None) {
          Py_DECREF(tb);
          tb = 0;
      }
      else if (tb != NULL && !PyTraceBack_Check(tb)) {
          PyErr_SetString(PyExc_TypeError,
              "raise: arg 3 must be a traceback or None");
          goto raise_error;
      }
      /* Next, replace a missing value with None */
      if (value == NULL) {
          value = Py_None;
          Py_INCREF(value);
      }
      #if PY_VERSION_HEX < 0x02050000
      if (!PyClass_Check(type))
      #else
      if (!PyType_Check(type))
      #endif
      {
          /* Raising an instance.  The value should be a dummy. */
          if (value != Py_None) {
              PyErr_SetString(PyExc_TypeError,
                  "instance exception may not have a separate value");
              goto raise_error;
          }
          /* Normalize to raise <class>, <instance> */
          Py_DECREF(value);
          value = type;
          #if PY_VERSION_HEX < 0x02050000
              if (PyInstance_Check(type)) {
                  type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                  Py_INCREF(type);
              }
              else {
                  type = 0;
                  PyErr_SetString(PyExc_TypeError,
                      "raise: exception must be an old-style class or instance");
                  goto raise_error;
              }
          #else
              type = (PyObject*) Py_TYPE(type);
              Py_INCREF(type);
              if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                  PyErr_SetString(PyExc_TypeError,
                      "raise: exception class must be a subclass of BaseException");
                  goto raise_error;
              }
          #endif
      }
  
      __Pyx_ErrRestore(type, value, tb);
      return;
  raise_error:
      Py_XDECREF(value);
      Py_XDECREF(type);
      Py_XDECREF(tb);
      return;
  }
  
  #else /* Python 3+ */
  
  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
      if (tb == Py_None) {
          tb = 0;
      } else if (tb && !PyTraceBack_Check(tb)) {
          PyErr_SetString(PyExc_TypeError,
              "raise: arg 3 must be a traceback or None");
          goto bad;
      }
      if (value == Py_None)
          value = 0;
  
      if (PyExceptionInstance_Check(type)) {
          if (value) {
              PyErr_SetString(PyExc_TypeError,
                  "instance exception may not have a separate value");
              goto bad;
          }
          value = type;
          type = (PyObject*) Py_TYPE(value);
      } else if (!PyExceptionClass_Check(type)) {
          PyErr_SetString(PyExc_TypeError,
              "raise: exception class must be a subclass of BaseException");
          goto bad;
      }
  
      PyErr_SetObject(type, value);
  
      if (tb) {
          PyThreadState *tstate = PyThreadState_GET();
          PyObject* tmp_tb = tstate->curexc_traceback;
          if (tb != tmp_tb) {
              Py_INCREF(tb);
              tstate->curexc_traceback = tb;
              Py_XDECREF(tmp_tb);
          }
      }
  
  bad:
      return;
  }
  #endif
  
  static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
      const char *name, int exact)
  {
      if (!type) {
          PyErr_Format(PyExc_SystemError, "Missing type object");
          return 0;
      }
      if (none_allowed && obj == Py_None) return 1;
      else if (exact) {
          if (Py_TYPE(obj) == type) return 1;
      }
      else {
          if (PyObject_TypeCheck(obj, type)) return 1;
      }
      PyErr_Format(PyExc_TypeError,
          "Argument '%s' has incorrect type (expected %s, got %s)",
          name, type->tp_name, Py_TYPE(obj)->tp_name);
      return 0;
  }
  
  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
      PyObject *py_import = 0;
      PyObject *empty_list = 0;
      PyObject *module = 0;
      PyObject *global_dict = 0;
      PyObject *empty_dict = 0;
      PyObject *list;
      py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
      if (!py_import)
          goto bad;
      if (from_list)
          list = from_list;
      else {
          empty_list = PyList_New(0);
          if (!empty_list)
              goto bad;
          list = empty_list;
      }
      global_dict = PyModule_GetDict(__pyx_m);
      if (!global_dict)
          goto bad;
      empty_dict = PyDict_New();
      if (!empty_dict)
          goto bad;
      module = PyObject_CallFunctionObjArgs(py_import,
          name, global_dict, empty_dict, list, NULL);
  bad:
      Py_XDECREF(empty_list);
      Py_XDECREF(py_import);
      Py_XDECREF(empty_dict);
      return module;
  }
  
  static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
      PyObject *metaclass;
      /* Default metaclass */
  #if PY_MAJOR_VERSION < 3
      if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
          PyObject *base = PyTuple_GET_ITEM(bases, 0);
          metaclass = PyObject_GetAttrString(base, "__class__");
          if (!metaclass) {
              PyErr_Clear();
              metaclass = (PyObject*) Py_TYPE(base);
          }
      } else {
          metaclass = (PyObject *) &PyClass_Type;
      }
  #else
      if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
          PyObject *base = PyTuple_GET_ITEM(bases, 0);
          metaclass = (PyObject*) Py_TYPE(base);
      } else {
          metaclass = (PyObject *) &PyType_Type;
      }
  #endif
      Py_INCREF(metaclass);
      return metaclass;
  }
  
  static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                     PyObject *modname) {
      PyObject *result;
      PyObject *metaclass;
  
      if (PyDict_SetItemString(dict, "__module__", modname) < 0)
          return NULL;
  
      /* Python2 __metaclass__ */
      metaclass = PyDict_GetItemString(dict, "__metaclass__");
      if (metaclass) {
          Py_INCREF(metaclass);
      } else {
          metaclass = __Pyx_FindPy2Metaclass(bases);
      }
      result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
      Py_DECREF(metaclass);
      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 PyLong_AsUnsignedLong(x);
          } else {
              return 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 PyLong_AsUnsignedLongLong(x);
          } else {
              return 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 PyLong_AsUnsignedLong(x);
          } else {
              return 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 PyLong_AsUnsignedLongLong(x);
          } else {
              return 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 PyLong_AsUnsignedLong(x);
          } else {
              return 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 PyLong_AsUnsignedLongLong(x);
          } else {
              return 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;
      }
  }
  
  #ifndef __PYX_HAVE_RT_ImportType
  #define __PYX_HAVE_RT_ImportType
  static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
      long size, int strict)
  {
      PyObject *py_module = 0;
      PyObject *result = 0;
      PyObject *py_name = 0;
      char warning[200];
  
      py_module = __Pyx_ImportModule(module_name);
      if (!py_module)
          goto bad;
      #if PY_MAJOR_VERSION < 3
      py_name = PyString_FromString(class_name);
      #else
      py_name = PyUnicode_FromString(class_name);
      #endif
      if (!py_name)
          goto bad;
      result = PyObject_GetAttr(py_module, py_name);
      Py_DECREF(py_name);
      py_name = 0;
      Py_DECREF(py_module);
      py_module = 0;
      if (!result)
          goto bad;
      if (!PyType_Check(result)) {
          PyErr_Format(PyExc_TypeError,
              "%s.%s is not a type object",
              module_name, class_name);
          goto bad;
      }
      if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
          PyOS_snprintf(warning, sizeof(warning),
              "%s.%s size changed, may indicate binary incompatibility",
              module_name, class_name);
          #if PY_VERSION_HEX < 0x02050000
          PyErr_Warn(NULL, warning);
          #else
          PyErr_WarnEx(NULL, warning, 0);
          #endif
      }
      else if (((PyTypeObject *)result)->tp_basicsize != size) {
          PyErr_Format(PyExc_ValueError,
              "%s.%s has the wrong size, try recompiling",
              module_name, class_name);
          goto bad;
      }
      return (PyTypeObject *)result;
  bad:
      Py_XDECREF(py_module);
      Py_XDECREF(result);
      return 0;
  }
  #endif
  
  #ifndef __PYX_HAVE_RT_ImportModule
  #define __PYX_HAVE_RT_ImportModule
  static PyObject *__Pyx_ImportModule(const char *name) {
      PyObject *py_name = 0;
      PyObject *py_module = 0;
  
      #if PY_MAJOR_VERSION < 3
      py_name = PyString_FromString(name);
      #else
      py_name = PyUnicode_FromString(name);
      #endif
      if (!py_name)
          goto bad;
      py_module = PyImport_Import(py_name);
      Py_DECREF(py_name);
      return py_module;
  bad:
      Py_XDECREF(py_name);
      return 0;
  }
  #endif
  
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
  
  static void __Pyx_AddTraceback(const char *funcname) {
      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 */
  