Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations] Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations] Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
This commit is contained in:
@@ -850,7 +850,11 @@ void UrlLabel::mouseReleaseEvent (QMouseEvent *)
|
||||
PyObject* func = PyDict_GetItemString(dict, "open");
|
||||
if (func) {
|
||||
PyObject* args = Py_BuildValue("(s)", (const char*)this->_url.toLatin1());
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
PyObject* result = PyEval_CallObject(func,args);
|
||||
#else
|
||||
PyObject* result = PyObject_CallObject(func,args);
|
||||
#endif
|
||||
// decrement the args and module reference
|
||||
Py_XDECREF(result);
|
||||
Py_DECREF(args);
|
||||
|
||||
Reference in New Issue
Block a user