1 /* -----------------------------------------------------------------------------
4 * Python configuration module.
5 * ----------------------------------------------------------------------------- */
7 /* Python.h has to appear first */
13 %insert(runtime) "precommon.swg";
14 %insert(runtime) "common.swg"; /* Common type-checking code */
15 %insert(runtime) "pyrun.swg"; /* Python run-time code */
17 /* Special directive for shadow code */
19 #define %shadow %insert("shadow")
20 #define %pythoncode %insert("python")
22 %include "pymacros.swg"
25 /* -----------------------------------------------------------------------------
27 * ----------------------------------------------------------------------------- */
29 %include "pyswigtype.swg"
32 /* -----------------------------------------------------------------------------
33 * Check for local fragment defintions
34 * ----------------------------------------------------------------------------- */
36 %include "my_fragments.i"
39 /* -----------------------------------------------------------------------------
40 * Typemap specializations
41 * ----------------------------------------------------------------------------- */
43 %include "pyinout.swg"
45 %include "pyobject.swg"
46 %include "pystrbase.swg"
47 %include "pystrings.swg"
48 %include "pyvaltypes.swg"
49 %include "pyptrtypes.swg"
50 %include "pyprimtypes.swg"
51 %include "pymisctypes.swg"
54 /* ------------------------------------------------------------
55 * Overloaded operator support
56 * ------------------------------------------------------------ */
57 %include "pyopers.swg"
59 /* ------------------------------------------------------------
60 * Warnings for Python keywords
61 * ------------------------------------------------------------ */
62 %include "pythonkw.swg"
64 /* ------------------------------------------------------------
65 * The start of the Python initialization function
66 * ------------------------------------------------------------ */
72 SWIGEXPORT(void) SWIG_init(void) {
73 static PyObject *SWIG_globals = 0;
74 static int typeinit = 0;
77 if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
78 m = Py_InitModule((char *) SWIG_name, SwigMethods);
79 d = PyModule_GetDict(m);
82 for (i = 0; swig_types_initial[i]; i++) {
83 swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
87 SWIG_InstallConstants(d,swig_const_table);