38 PyObject *atexit_mod = PyImport_ImportModuleLevel(
"atexit",
NULL,
NULL,
NULL, 0);
39 PyObject *atexit_func = PyObject_GetAttrString(atexit_mod, func_name);
40 PyObject *args = PyTuple_New(1);
43 PyTuple_SET_ITEM(args, 0, atexit_func_arg);
44 Py_INCREF(atexit_func_arg);
46 ret = PyObject_CallObject(atexit_func, args);
48 Py_DECREF(atexit_mod);
49 Py_DECREF(atexit_func);
struct bContext * BPY_context_get(void)
static PyObject * func_bpy_atregister
void BPY_atexit_register(void)
static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
static PyObject * bpy_atexit(PyObject *UNUSED(self), PyObject *UNUSED(args), PyObject *UNUSED(kw))
void BPY_atexit_unregister(void)
static PyMethodDef meth_bpy_atexit
void WM_exit_ex(bContext *C, const bool do_python)