aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-11 15:33:45 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-13 09:32:28 +0200
commit91b4b4abe4b4caa475a876c27a7d897c0fe301a4 (patch)
tree2f8fb7a008dee50eae57f93cdc5431c54c2da922 /sources
parente87645fba5e15d29cb8b913f2a00afaba1bf5f8e (diff)
libshiboken: Remove deprecated API
Remove deprecated functions. Task-number: PYSIDE-904 Change-Id: If787a451c6ef6408861dd5a5dba51342065e8d7f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.cpp34
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.h11
-rw-r--r--sources/shiboken2/libshiboken/bindingmanager.cpp5
-rw-r--r--sources/shiboken2/libshiboken/bindingmanager.h6
4 files changed, 0 insertions, 56 deletions
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index 29ee1b185..6a63c9053 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -666,35 +666,6 @@ bool walkThroughClassHierarchy(PyTypeObject *currentType, HierarchyVisitor *visi
return result;
}
-bool importModule(const char *moduleName, PyTypeObject *** cppApiPtr)
-{
- PyObject *sysModules = PyImport_GetModuleDict();
- PyObject *module = PyDict_GetItemString(sysModules, moduleName);
- if (!module) {
- module = PyImport_ImportModule(moduleName);
- if (!module)
- return false;
- } else {
- Py_INCREF(module);
- }
-
- Shiboken::AutoDecRef cppApi(PyObject_GetAttrString(module, "_Cpp_Api"));
- Py_DECREF(module);
-
- if (cppApi.isNull())
- return false;
-
-#ifdef IS_PY3K
- if (PyCapsule_CheckExact(cppApi))
- *cppApiPtr = reinterpret_cast<PyTypeObject **>(PyCapsule_GetPointer(cppApi, nullptr));
-#else
- // Python 2.6 doesn't have PyCapsule API, so let's keep usign PyCObject on all Python 2.x
- if (PyCObject_Check(cppApi))
- *cppApiPtr = reinterpret_cast<PyTypeObject **>(PyCObject_AsVoidPtr(cppApi));
-#endif
- return true;
-}
-
// Wrapper metatype and base type ----------------------------------------------------------
HierarchyVisitor::HierarchyVisitor() = default;
@@ -1402,11 +1373,6 @@ PyObject *newObject(SbkObjectType *instanceType,
return reinterpret_cast<PyObject *>(self);
}
-void destroy(SbkObject *self)
-{
- destroy(self, nullptr);
-}
-
void destroy(SbkObject *self, void *cppData)
{
// Skip if this is called with NULL pointer this can happen in derived classes
diff --git a/sources/shiboken2/libshiboken/basewrapper.h b/sources/shiboken2/libshiboken/basewrapper.h
index 813870dac..29550dce1 100644
--- a/sources/shiboken2/libshiboken/basewrapper.h
+++ b/sources/shiboken2/libshiboken/basewrapper.h
@@ -86,9 +86,6 @@ typedef void *(*SpecialCastFunction)(void *, SbkObjectType *);
typedef SbkObjectType *(*TypeDiscoveryFunc)(void *, SbkObjectType *);
typedef void *(*TypeDiscoveryFuncV2)(void *, SbkObjectType *);
-typedef void *(*ExtendedToCppFunc)(PyObject *); // DEPRECATED.
-typedef bool (*ExtendedIsConvertibleFunc)(PyObject *); // DEPRECATED.
-
// Used in userdata dealloc function
typedef void (*DeleteUserDataFunc)(void *);
@@ -140,11 +137,6 @@ void callCppDestructor(void *cptr)
delete reinterpret_cast<T *>(cptr);
}
-/**
- * Shiboken::importModule is DEPRECATED. Use Shiboken::Module::import() instead.
- */
-SBK_DEPRECATED(LIBSHIBOKEN_API bool importModule(const char *moduleName, PyTypeObject *** cppApiPtr));
-
// setErrorAboutWrongArguments now gets overload info from the signature module.
LIBSHIBOKEN_API void setErrorAboutWrongArguments(PyObject *args, const char *funcName);
@@ -422,9 +414,6 @@ LIBSHIBOKEN_API void invalidate(PyObject *pyobj);
*/
LIBSHIBOKEN_API void makeValid(SbkObject *self);
-/// \deprecated Use destroy(SbkObject *, void *)
-SBK_DEPRECATED(LIBSHIBOKEN_API void destroy(SbkObject *self));
-
/**
* Destroy any data in Shiboken structure and c++ pointer if the pyboject has the ownership
*/
diff --git a/sources/shiboken2/libshiboken/bindingmanager.cpp b/sources/shiboken2/libshiboken/bindingmanager.cpp
index 1f18ed60a..1ab8dd089 100644
--- a/sources/shiboken2/libshiboken/bindingmanager.cpp
+++ b/sources/shiboken2/libshiboken/bindingmanager.cpp
@@ -318,11 +318,6 @@ void BindingManager::addClassInheritance(SbkObjectType *parent, SbkObjectType *c
m_d->classHierarchy.addEdge(parent, child);
}
-SbkObjectType *BindingManager::resolveType(void *cptr, SbkObjectType *type)
-{
- return resolveType(&cptr, type);
-}
-
SbkObjectType *BindingManager::resolveType(void **cptr, SbkObjectType *type)
{
SbkObjectType *identifiedType = m_d->classHierarchy.identifyType(cptr, type, type);
diff --git a/sources/shiboken2/libshiboken/bindingmanager.h b/sources/shiboken2/libshiboken/bindingmanager.h
index bfcbdc79b..ba5535347 100644
--- a/sources/shiboken2/libshiboken/bindingmanager.h
+++ b/sources/shiboken2/libshiboken/bindingmanager.h
@@ -77,12 +77,6 @@ public:
void addClassInheritance(SbkObjectType *parent, SbkObjectType *child);
/**
- * \deprecated Use \fn resolveType(void **, SbkObjectType *), this version is broken when used with multiple inheritance
- * because the \p cptr pointer of the discovered type may be different of the given \p cptr in case
- * of multiple inheritance
- */
- SBK_DEPRECATED(SbkObjectType *resolveType(void *cptr, SbkObjectType *type));
- /**
* Try to find the correct type of *cptr knowing that it's at least of type \p type.
* In case of multiple inheritance this function may change the contents of cptr.
* \param cptr a pointer to a pointer to the instance of type \p type