/* Generated by Cython 3.2.2 */

#ifndef __PYX_HAVE_API__CyRK__cy__pysolver_cyhook
#define __PYX_HAVE_API__CyRK__cy__pysolver_cyhook
#ifdef __MINGW64__
#define MS_WIN64
#endif
#include "Python.h"
#include "pysolver_cyhook.h"

static void (*__pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_diffeq_from_cython)(PyObject *, DiffeqMethod) = 0;
#define call_diffeq_from_cython __pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_diffeq_from_cython
static double (*__pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_pyevent_from_cython)(PyObject *, PyEventMethod, size_t, double, double *) = 0;
#define call_pyevent_from_cython __pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_pyevent_from_cython
static int __Pyx_ImportFunction_3_2_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_2
#define __PYX_HAVE_RT_ImportFromPxd_3_2_2
static int __Pyx_ImportFromPxd_3_2_2(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

#ifndef __PYX_HAVE_RT_ImportFunction_3_2_2
#define __PYX_HAVE_RT_ImportFunction_3_2_2
static int __Pyx_ImportFunction_3_2_2(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_2(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#endif


static int import_CyRK__cy__pysolver_cyhook(void) {
  PyObject *module = 0;
  module = PyImport_ImportModule("CyRK.cy.pysolver_cyhook");
  if (!module) goto bad;
  if (__Pyx_ImportFunction_3_2_2(module, "call_diffeq_from_cython", (void (**)(void))&__pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_diffeq_from_cython, "void (PyObject *, DiffeqMethod)") < 0) goto bad;
  if (__Pyx_ImportFunction_3_2_2(module, "call_pyevent_from_cython", (void (**)(void))&__pyx_api_f_4CyRK_2cy_15pysolver_cyhook_call_pyevent_from_cython, "double (PyObject *, PyEventMethod, size_t, double, double *)") < 0) goto bad;
  Py_DECREF(module); module = 0;
  return 0;
  bad:
  Py_XDECREF(module);
  return -1;
}

#endif /* !__PYX_HAVE_API__CyRK__cy__pysolver_cyhook */
