diff options
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/python-wrapper.swig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 4723a9cce89..55a5910184c 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -45,7 +45,13 @@ ResolvePythonName(const char* name, return NULL; } - if (!PyDict_Check(pmodule)) + if (PyType_Check(pmodule)) + { + main_dict = ((PyTypeObject*)pmodule)->tp_dict; + if (!main_dict) + return NULL; + } + else if (!PyDict_Check(pmodule)) { main_dict = PyModule_GetDict (pmodule); if (!main_dict) |