53 PyObject *atexit_mod = PyImport_ImportModuleLevel(
"atexit",
NULL,
NULL,
NULL, 0);
54 PyObject *atexit_func = PyObject_GetAttrString(atexit_mod, func_name);
55 PyObject *args = PyTuple_New(1);
58 PyTuple_SET_ITEM(args, 0, atexit_func_arg);
59 Py_INCREF(atexit_func_arg);
61 ret = PyObject_CallObject(atexit_func, args);
63 Py_DECREF(atexit_mod);
64 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)