CYCLUS
Loading...
Searching...
No Matches
pyinfile.cc_api.h
Go to the documentation of this file.
1/* Generated by Cython 3.0.11 */
2
3#ifndef __PYX_HAVE_API__pyinfile
4#define __PYX_HAVE_API__pyinfile
5#ifdef __MINGW64__
6#define MS_WIN64
7#endif
8#include "Python.h"
9#include "pyinfile.cc.h"
10
11static std::string (*__pyx_api_f_8pyinfile_py_to_json)(std::string) = 0;
12#define py_to_json __pyx_api_f_8pyinfile_py_to_json
13static std::string (*__pyx_api_f_8pyinfile_json_to_py)(std::string) = 0;
14#define json_to_py __pyx_api_f_8pyinfile_json_to_py
15#ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
16#define __PYX_HAVE_RT_ImportFunction_3_0_11
17static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
18 PyObject *d = 0;
19 PyObject *cobj = 0;
20 union {
21 void (*fp)(void);
22 void *p;
23 } tmp;
24 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
25 if (!d)
26 goto bad;
27 cobj = PyDict_GetItemString(d, funcname);
28 if (!cobj) {
29 PyErr_Format(PyExc_ImportError,
30 "%.200s does not export expected C function %.200s",
31 PyModule_GetName(module), funcname);
32 goto bad;
33 }
34 if (!PyCapsule_IsValid(cobj, sig)) {
35 PyErr_Format(PyExc_TypeError,
36 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
37 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
38 goto bad;
39 }
40 tmp.p = PyCapsule_GetPointer(cobj, sig);
41 *f = tmp.fp;
42 if (!(*f))
43 goto bad;
44 Py_DECREF(d);
45 return 0;
46bad:
47 Py_XDECREF(d);
48 return -1;
49}
50#endif
51
52
53static int import_pyinfile(void) {
54 PyObject *module = 0;
55 module = PyImport_ImportModule("pyinfile");
56 if (!module) goto bad;
57 if (__Pyx_ImportFunction_3_0_11(module, "py_to_json", (void (**)(void))&__pyx_api_f_8pyinfile_py_to_json, "std::string (std::string)") < 0) goto bad;
58 if (__Pyx_ImportFunction_3_0_11(module, "json_to_py", (void (**)(void))&__pyx_api_f_8pyinfile_json_to_py, "std::string (std::string)") < 0) goto bad;
59 Py_DECREF(module); module = 0;
60 return 0;
61 bad:
62 Py_XDECREF(module);
63 return -1;
64}
65
66#endif /* !__PYX_HAVE_API__pyinfile */
static std::string(* __pyx_api_f_8pyinfile_json_to_py)(std::string)=0
static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void(**f)(void), const char *sig)
static int import_pyinfile(void)
static std::string(* __pyx_api_f_8pyinfile_py_to_json)(std::string)=0