vtkpythonmodules.h
Go to the documentation of this file.
1 #ifndef vtkpythonmodules_h
2 #define vtkpythonmodules_h
3 #define PY_APPEND_INIT(module) PyImport_AppendInittab("." #module, PyInit_ ## module)
4 #define PY_IMPORT(module) { \
5  PyObject* var_ ## module = PyInit_ ## module(); \
6  PyDict_SetItemString(PyImport_GetModuleDict(), "." #module,var_ ## module); \
7  Py_DECREF(var_ ## module); }
8 
9 #define PY_APPEND_INIT_OR_IMPORT(module, do_import) \
10  if (do_import) { PY_IMPORT(module); } else { PY_APPEND_INIT(module); }
11 
12 static void vtkpythonmodules_load() {
13 }
14 #undef PY_APPEND_INIT
15 #undef PY_IMPORT
16 #undef PY_APPEND_INIT_OR_IMPORT
17 #endif
static void vtkpythonmodules_load()