|
|
@ -962,7 +962,7 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) {
|
|
|
|
|
|
|
|
|
|
|
|
// Call the factory function. Set up the args.
|
|
|
|
// Call the factory function. Set up the args.
|
|
|
|
PyObject *pyParent = PyLong_FromVoidPtr(parent);
|
|
|
|
PyObject *pyParent = PyLong_FromVoidPtr(parent);
|
|
|
|
PyObject *pyName = PyString_FromString(MODULE_NAME);
|
|
|
|
PyObject *pyName = PyBytes_FromString(MODULE_NAME);
|
|
|
|
// Using NN here is effect gives our references to the arguement away.
|
|
|
|
// Using NN here is effect gives our references to the arguement away.
|
|
|
|
PyObject *args = Py_BuildValue ("NN", pyParent, pyName);
|
|
|
|
PyObject *args = Py_BuildValue ("NN", pyParent, pyName);
|
|
|
|
if(pyName && pyParent && args) {
|
|
|
|
if(pyName && pyParent && args) {
|
|
|
@ -1858,7 +1858,7 @@ extern "C" {
|
|
|
|
PyRun_SimpleString("import sys\n");
|
|
|
|
PyRun_SimpleString("import sys\n");
|
|
|
|
PyRun_SimpleString("sys.path.append('"MODULE_DIR"')\n");
|
|
|
|
PyRun_SimpleString("sys.path.append('"MODULE_DIR"')\n");
|
|
|
|
|
|
|
|
|
|
|
|
pName = PyString_FromString(modname);
|
|
|
|
pName = PyBytes_FromString(modname);
|
|
|
|
pModule = PyImport_Import(pName);
|
|
|
|
pModule = PyImport_Import(pName);
|
|
|
|
|
|
|
|
|
|
|
|
Py_XDECREF(pName);
|
|
|
|
Py_XDECREF(pName);
|
|
|
@ -1881,8 +1881,8 @@ extern "C" {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
pArgs = PyTuple_New(2);
|
|
|
|
pArgs = PyTuple_New(2);
|
|
|
|
|
|
|
|
|
|
|
|
pArg1 = PyString_FromString(argv[2]);
|
|
|
|
pArg1 = PyBytes_FromString(argv[2]);
|
|
|
|
pArg2 = PyString_FromString(argv[3]);
|
|
|
|
pArg2 = PyBytes_FromString(argv[3]);
|
|
|
|
|
|
|
|
|
|
|
|
PyTuple_SetItem(pArgs, 0, pArg1);
|
|
|
|
PyTuple_SetItem(pArgs, 0, pArg1);
|
|
|
|
PyTuple_SetItem(pArgs, 1, pArg2);
|
|
|
|
PyTuple_SetItem(pArgs, 1, pArg2);
|
|
|
|