2011-12-02 16:40:11 +01:00
|
|
|
//------------------------------------------------------------------------
|
|
|
|
//<inline(py_name)>
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
PyObject *py_get_debug_names(ea_t ea1, ea_t ea2)
|
|
|
|
{
|
|
|
|
// Get debug names
|
|
|
|
ea_name_vec_t names;
|
2013-12-30 02:34:23 +01:00
|
|
|
PYW_GIL_CHECK_LOCKED_SCOPE();
|
|
|
|
Py_BEGIN_ALLOW_THREADS;
|
2011-12-02 16:40:11 +01:00
|
|
|
get_debug_names(ea1, ea2, names);
|
2013-12-30 02:34:23 +01:00
|
|
|
Py_END_ALLOW_THREADS;
|
2011-12-02 16:40:11 +01:00
|
|
|
PyObject *dict = Py_BuildValue("{}");
|
2013-12-30 02:34:23 +01:00
|
|
|
if (dict != NULL)
|
2011-12-02 16:40:11 +01:00
|
|
|
{
|
2013-12-30 02:34:23 +01:00
|
|
|
for (ea_name_vec_t::iterator it=names.begin();it!=names.end();++it)
|
|
|
|
{
|
|
|
|
PyDict_SetItem(dict,
|
|
|
|
Py_BuildValue(PY_FMT64, it->ea),
|
|
|
|
PyString_FromString(it->name.c_str()));
|
|
|
|
}
|
2011-12-02 16:40:11 +01:00
|
|
|
}
|
|
|
|
return dict;
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
//</inline(py_name)>
|
|
|
|
//------------------------------------------------------------------------
|