fix [#29635] Attempts to import the site module are met with a TypeError exception.
This commit is contained in:
@@ -260,6 +260,7 @@ PyObject *BPY_app_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppType.tp_init= NULL;
|
||||
BlenderAppType.tp_new= NULL;
|
||||
BlenderAppType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* kindof a hack ontop of PyStructSequence */
|
||||
py_struct_seq_getset_init();
|
||||
|
@@ -210,6 +210,7 @@ PyObject *BPY_app_handlers_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppCbType.tp_init= NULL;
|
||||
BlenderAppCbType.tp_new= NULL;
|
||||
BlenderAppCbType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* assign the C callbacks */
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user