CYCLUS
Loading...
Searching...
No Matches
pymodule.cc_api.h
Go to the documentation of this file.
1/* Generated by Cython 3.0.11 */
2
3#ifndef __PYX_HAVE_API__pymodule
4#define __PYX_HAVE_API__pymodule
5#ifdef __MINGW64__
6#define MS_WIN64
7#endif
8#include "Python.h"
9#include "pymodule.cc.h"
10
11static std::string (*__pyx_api_f_8pymodule_py_find_module)(std::string) = 0;
12#define py_find_module __pyx_api_f_8pymodule_py_find_module
13static cyclus::Agent *(*__pyx_api_f_8pymodule_make_py_agent)(std::string, std::string, void *) = 0;
14#define make_py_agent __pyx_api_f_8pymodule_make_py_agent
16#define init_from_py_agent __pyx_api_f_8pymodule_init_from_py_agent
18#define clear_pyagent_refs __pyx_api_f_8pymodule_clear_pyagent_refs
19static void (*__pyx_api_f_8pymodule_py_del_agent)(int) = 0;
20#define py_del_agent __pyx_api_f_8pymodule_py_del_agent
21static void (*__pyx_api_f_8pymodule_py_call_listeners)(std::string, cyclus::Agent *, void *, int, boost::spirit::hold_any) = 0;
22#define py_call_listeners __pyx_api_f_8pymodule_py_call_listeners
23#ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
24#define __PYX_HAVE_RT_ImportFunction_3_0_11
25static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
26 PyObject *d = 0;
27 PyObject *cobj = 0;
28 union {
29 void (*fp)(void);
30 void *p;
31 } tmp;
32 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
33 if (!d)
34 goto bad;
35 cobj = PyDict_GetItemString(d, funcname);
36 if (!cobj) {
37 PyErr_Format(PyExc_ImportError,
38 "%.200s does not export expected C function %.200s",
39 PyModule_GetName(module), funcname);
40 goto bad;
41 }
42 if (!PyCapsule_IsValid(cobj, sig)) {
43 PyErr_Format(PyExc_TypeError,
44 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
45 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
46 goto bad;
47 }
48 tmp.p = PyCapsule_GetPointer(cobj, sig);
49 *f = tmp.fp;
50 if (!(*f))
51 goto bad;
52 Py_DECREF(d);
53 return 0;
54bad:
55 Py_XDECREF(d);
56 return -1;
57}
58#endif
59
60
61static int import_pymodule(void) {
62 PyObject *module = 0;
63 module = PyImport_ImportModule("pymodule");
64 if (!module) goto bad;
65 if (__Pyx_ImportFunction_3_0_11(module, "py_find_module", (void (**)(void))&__pyx_api_f_8pymodule_py_find_module, "std::string (std::string)") < 0) goto bad;
66 if (__Pyx_ImportFunction_3_0_11(module, "make_py_agent", (void (**)(void))&__pyx_api_f_8pymodule_make_py_agent, "cyclus::Agent *(std::string, std::string, void *)") < 0) goto bad;
67 if (__Pyx_ImportFunction_3_0_11(module, "init_from_py_agent", (void (**)(void))&__pyx_api_f_8pymodule_init_from_py_agent, "void (cyclus::Agent *, cyclus::Agent *, void *)") < 0) goto bad;
68 if (__Pyx_ImportFunction_3_0_11(module, "clear_pyagent_refs", (void (**)(void))&__pyx_api_f_8pymodule_clear_pyagent_refs, "void (void)") < 0) goto bad;
69 if (__Pyx_ImportFunction_3_0_11(module, "py_del_agent", (void (**)(void))&__pyx_api_f_8pymodule_py_del_agent, "void (int)") < 0) goto bad;
70 if (__Pyx_ImportFunction_3_0_11(module, "py_call_listeners", (void (**)(void))&__pyx_api_f_8pymodule_py_call_listeners, "void (std::string, cyclus::Agent *, void *, int, boost::spirit::hold_any)") < 0) goto bad;
71 Py_DECREF(module); module = 0;
72 return 0;
73 bad:
74 Py_XDECREF(module);
75 return -1;
76}
77
78#endif /* !__PYX_HAVE_API__pymodule */
The abstract base class used by all types of agents that live and interact in a simulation.
Definition agent.h:49
basic_hold_any< char > hold_any
Definition any.hpp:414
static void(* __pyx_api_f_8pymodule_clear_pyagent_refs)(void)=0
static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void(**f)(void), const char *sig)
static void(* __pyx_api_f_8pymodule_py_del_agent)(int)=0
static int import_pymodule(void)
static std::string(* __pyx_api_f_8pymodule_py_find_module)(std::string)=0
static cyclus::Agent *(* __pyx_api_f_8pymodule_make_py_agent)(std::string, std::string, void *)=0
static void(* __pyx_api_f_8pymodule_py_call_listeners)(std::string, cyclus::Agent *, void *, int, boost::spirit::hold_any)=0
static void(* __pyx_api_f_8pymodule_init_from_py_agent)(cyclus::Agent *, cyclus::Agent *, void *)=0