Generated by Cython 0.29.28

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: quad_tree_ext.c

+01: #cython: wraparound=False, boundscheck=False, cdivision=True, profile=False, nonecheck=False, overflowcheck=False, cdivision_warnings=False, unraisable_tracebacks=False
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 02: import cython
 03: from libc.stdlib cimport malloc, free
 04: from cpython.pycapsule cimport *
 05: # import both numpy and the Cython declarations for numpy
+06: import numpy as np
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 07: cimport numpy as np
 08: # declare the interface to the C code
 09: cdef extern from "quad_tree.c":
 10: 	ctypedef struct quad_tree:
 11: 		pass
 12: 	void delete_quad_tree(quad_tree* quadtree)
 13: 
+14: cdef delete_quad_tree_cap(object cap):
static PyObject *__pyx_f_5anuga_9utilities_13quad_tree_ext_delete_quad_tree_cap(PyObject *__pyx_v_cap) {
  quad_tree *__pyx_v_kill;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete_quad_tree_cap", 0);
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("anuga.utilities.quad_tree_ext.delete_quad_tree_cap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+15: 	kill = <quad_tree* > PyCapsule_GetPointer(cap, "quad tree")
  __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_cap, ((char const *)"quad tree")); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 15, __pyx_L1_error)
  __pyx_v_kill = ((quad_tree *)__pyx_t_1);
+16: 	if kill != NULL:
  __pyx_t_2 = ((__pyx_v_kill != NULL) != 0);
  if (__pyx_t_2) {
/* … */
  }
+17: 		delete_quad_tree(kill)
    delete_quad_tree(__pyx_v_kill);