fix [#29635] Attempts to import the site module are met with a TypeError exception.

This commit is contained in:
2011-12-16 00:06:01 +00:00
parent 0dbd9ea73f
commit dbebf4ff53
2 changed files with 2 additions and 0 deletions

View File

@@ -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();

View File

@@ -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) {