Cython: _finalizer.pyx

Generated by Cython 0.29.30

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: _finalizer.c

     01: from libc.stdlib cimport free

     02:

     03: cdef class _finalizer:

     04:     cdef void *_obj

     05:

    +06:     def __cinit__(void * obj):

    /* Python wrapper */
    static int __pyx_pw_7develia_7cytools_10_finalizer_10_finalizer_1__cinit__(PyObject *__pyx_v_obj, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7develia_7cytools_10_finalizer_10_finalizer_1__cinit__(PyObject *__pyx_v_obj, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
      if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
        __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
      if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
      __pyx_r = __pyx_pf_7develia_7cytools_10_finalizer_10_finalizer___cinit__(((struct __pyx_obj_7develia_7cytools_10_finalizer__finalizer *)__pyx_v_obj));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7develia_7cytools_10_finalizer_10_finalizer___cinit__(struct __pyx_obj_7develia_7cytools_10_finalizer__finalizer *__pyx_v_obj) {
      CYTHON_UNUSED struct __pyx_obj_7develia_7cytools_10_finalizer__finalizer *__pyx_v__obj = NULL;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__cinit__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_XDECREF((PyObject *)__pyx_v__obj);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +07:         _obj = obj

      __Pyx_INCREF(((PyObject *)__pyx_v_obj));
      __pyx_v__obj = __pyx_v_obj;

     08:

    +09:     def __dealloc__(self):

    /* Python wrapper */
    static void __pyx_pw_7develia_7cytools_10_finalizer_10_finalizer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
    static void __pyx_pw_7develia_7cytools_10_finalizer_10_finalizer_3__dealloc__(PyObject *__pyx_v_self) {
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
      __pyx_pf_7develia_7cytools_10_finalizer_10_finalizer_2__dealloc__(((struct __pyx_obj_7develia_7cytools_10_finalizer__finalizer *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    static void __pyx_pf_7develia_7cytools_10_finalizer_10_finalizer_2__dealloc__(struct __pyx_obj_7develia_7cytools_10_finalizer__finalizer *__pyx_v_self) {
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__", 0);
    /* … */
      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    +10:         if self._obj is not NULL:

      __pyx_t_1 = ((__pyx_v_self->_obj != NULL) != 0);
      if (__pyx_t_1) {
    /* … */
      }

    +11:             free(self._obj)

        free(__pyx_v_self->_obj);