<rdar://problem/13759177>

Allowing LLDB to resolve names of Python functions when they are located in classes
This allows things like *bound* classmethods to be used for formatters, commands, ...

llvm-svn: 183772
This commit is contained in:
Enrico Granata 2013-06-11 19:04:32 +00:00
parent d45b9f15f9
commit 8d6e5ec292
1 changed files with 7 additions and 1 deletions

View File

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