Lines 280-286
Link Here
|
280 |
// Return the named attribute object from the named module. |
280 |
// Return the named attribute object from the named module. |
281 |
PyObject *PyCustomWidgets::getModuleAttr(const char *module, const char *attr) |
281 |
PyObject *PyCustomWidgets::getModuleAttr(const char *module, const char *attr) |
282 |
{ |
282 |
{ |
283 |
#if PY_VERSION_HEX >= 0x020500 |
283 |
#if PY_VERSION_HEX >= 0x02050000 |
284 |
PyObject *mod = PyImport_ImportModule(module); |
284 |
PyObject *mod = PyImport_ImportModule(module); |
285 |
#else |
285 |
#else |
286 |
PyObject *mod = PyImport_ImportModule(const_cast<char *>(module)); |
286 |
PyObject *mod = PyImport_ImportModule(const_cast<char *>(module)); |
Lines 292-298
Link Here
|
292 |
return 0; |
292 |
return 0; |
293 |
} |
293 |
} |
294 |
|
294 |
|
295 |
#if PY_VERSION_HEX >= 0x020500 |
295 |
#if PY_VERSION_HEX >= 0x02050000 |
296 |
PyObject *obj = PyObject_GetAttrString(mod, attr); |
296 |
PyObject *obj = PyObject_GetAttrString(mod, attr); |
297 |
#else |
297 |
#else |
298 |
PyObject *obj = PyObject_GetAttrString(mod, const_cast<char *>(attr)); |
298 |
PyObject *obj = PyObject_GetAttrString(mod, const_cast<char *>(attr)); |