diff options
author | Slávek Banko <[email protected]> | 2023-01-19 19:31:48 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2023-01-20 02:47:24 +0100 |
commit | cc5852b1e42939827b4f13e4413543c779ce53ea (patch) | |
tree | 3079fe8cffba323bd3f0f42736d25aea873fb939 | |
parent | 6ffb11c0e197b7190d395bdea420ccfaceff5375 (diff) | |
download | pytdeextensions-cc5852b1e42939827b4f13e4413543c779ce53ea.tar.gz pytdeextensions-cc5852b1e42939827b4f13e4413543c779ce53ea.zip |
Drop python2 support in code generated from tdedistutils.py.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | src/tdedistutils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tdedistutils.py b/src/tdedistutils.py index 00a5ced..6dad91d 100644 --- a/src/tdedistutils.py +++ b/src/tdedistutils.py @@ -962,7 +962,7 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) { // Call the factory function. Set up the args. 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. PyObject *args = Py_BuildValue ("NN", pyParent, pyName); if(pyName && pyParent && args) { @@ -1858,7 +1858,7 @@ extern "C" { PyRun_SimpleString("import sys\n"); PyRun_SimpleString("sys.path.append('"MODULE_DIR"')\n"); - pName = PyString_FromString(modname); + pName = PyBytes_FromString(modname); pModule = PyImport_Import(pName); Py_XDECREF(pName); @@ -1881,8 +1881,8 @@ extern "C" { } else { pArgs = PyTuple_New(2); - pArg1 = PyString_FromString(argv[2]); - pArg2 = PyString_FromString(argv[3]); + pArg1 = PyBytes_FromString(argv[2]); + pArg2 = PyBytes_FromString(argv[3]); PyTuple_SetItem(pArgs, 0, pArg1); PyTuple_SetItem(pArgs, 1, pArg2); |