summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-05-25 14:18:49 +0000
committerSlávek Banko <slavek.banko@axis.cz>2022-05-30 18:52:49 +0200
commit9149eaf253a79656c13d4614c7d03c37af949415 (patch)
tree43236d46d996d90215f2cf68314985a8048a597a
parent1eb067b439c19d9336c44e438721decdbd1ea20e (diff)
downloadsip4-tqt-r14.0.13.tar.gz
sip4-tqt-r14.0.13.zip
Make sip_api_get_address a public API functionr14.0.13r14.0.x
The sipGetAddress function has been renamed as sip_api_get_address and made available as part of the public API. Signed-off-by: aneejit1 <aneejit1@gmail.com> (cherry picked from commit b92a3b0a4eb3cf0790904121c803717ebbbabd55)
-rw-r--r--siplib/qtlib.c4
-rw-r--r--siplib/sip.h1
-rw-r--r--siplib/sipint.h3
-rw-r--r--siplib/siplib.c13
4 files changed, 11 insertions, 10 deletions
diff --git a/siplib/qtlib.c b/siplib/qtlib.c
index 9bf065a..3e9b03f 100644
--- a/siplib/qtlib.c
+++ b/siplib/qtlib.c
@@ -143,7 +143,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
* longer exists.
*/
if (PyObject_TypeCheck(self, (PyTypeObject *)&sipSimpleWrapper_Type) &&
- sipGetAddress(self) == NULL)
+ sip_api_get_address(self) == NULL)
{
Py_XDECREF(sref);
@@ -371,7 +371,7 @@ void *sipGetRx(sipSimpleWrapper *txSelf, const char *sigargs, PyObject *rxObj,
* The slot was either a Python callable or PyTQt3 Python signal so there
* should be a universal slot.
*/
- return sipTQtSupport->qt_find_slot(sipGetAddress(txSelf), sigargs, rxObj, slot, memberp);
+ return sipTQtSupport->qt_find_slot(sip_api_get_address(txSelf), sigargs, rxObj, slot, memberp);
}
diff --git a/siplib/sip.h b/siplib/sip.h
index 2f036bd..ae05b36 100644
--- a/siplib/sip.h
+++ b/siplib/sip.h
@@ -1295,6 +1295,7 @@ typedef struct _sipAPIDef {
sipAttrGetterFunc getter);
int (*api_is_api_enabled)(const char *name, int from, int to);
sipErrorState (*api_bad_callable_arg)(int arg_nr, PyObject *arg);
+ void *(*api_get_address)(sipSimpleWrapper *w);
/*
* The following are deprecated parts of the public API.
diff --git a/siplib/sipint.h b/siplib/sipint.h
index 3758b36..0527c3f 100644
--- a/siplib/sipint.h
+++ b/siplib/sipint.h
@@ -118,6 +118,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs);
void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs,
PyObject *rxObj, const char *slot, const char **memberp, int flags);
int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot);
+void *sip_api_get_address(sipSimpleWrapper *w);
/*
@@ -139,8 +140,6 @@ int sipOMRemoveObject(sipObjectMap *om, sipSimpleWrapper *val);
void sipSetBool(void *ptr,int val);
-void *sipGetAddress(sipSimpleWrapper *w);
-
#ifdef __cplusplus
}
diff --git a/siplib/siplib.c b/siplib/siplib.c
index 2e0a5d5..1c460c4 100644
--- a/siplib/siplib.c
+++ b/siplib/siplib.c
@@ -307,6 +307,7 @@ static const sipAPIDef sip_api = {
sip_api_register_attribute_getter,
sip_api_is_api_enabled,
sip_api_bad_callable_arg,
+ sip_api_get_address,
/*
* The following are deprecated parts of the public API.
*/
@@ -901,7 +902,7 @@ static PyObject *dumpWrapper(PyObject *self, PyObject *args)
#else
printf(" Reference count: %d\n", Py_REFCNT(sw));
#endif
- printf(" Address of wrapped object: %p\n", sipGetAddress(sw));
+ printf(" Address of wrapped object: %p\n", sip_api_get_address(sw));
printf(" To be destroyed by: %s\n", (sipIsPyOwned(sw) ? "Python" : "C/C++"));
printf(" Derived class?: %s\n", (sipIsDerived(sw) ? "yes" : "no"));
@@ -1071,7 +1072,7 @@ static PyObject *isDeleted(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O!:isdeleted", &sipSimpleWrapper_Type, &sw))
return NULL;
- res = (sipGetAddress(sw) == NULL ? Py_True : Py_False);
+ res = (sip_api_get_address(sw) == NULL ? Py_True : Py_False);
Py_INCREF(res);
return res;
@@ -7369,7 +7370,7 @@ static PyObject *sip_api_get_pyobject(void *cppPtr, const sipTypeDef *td)
/*
* Return the C/C++ pointer from a wrapper without any checks.
*/
-void *sipGetAddress(sipSimpleWrapper *sw)
+void *sip_api_get_address(sipSimpleWrapper *sw)
{
if (sipIsAccessFunc(sw))
return (*sw->u.afPtr)();
@@ -7416,7 +7417,7 @@ static void *getComplexCppPtr(sipSimpleWrapper *sw, const sipTypeDef *td)
*/
void *sip_api_get_cpp_ptr(sipSimpleWrapper *sw, const sipTypeDef *td)
{
- void *ptr = sipGetAddress(sw);
+ void *ptr = sip_api_get_address(sw);
if (checkPointer(ptr, sw) < 0)
return NULL;
@@ -9213,7 +9214,7 @@ static int sipWrapper_clear(sipWrapper *self)
/* Remove any slots connected via a proxy. */
if (sipTQtSupport != NULL && sipPossibleProxy(sw))
{
- void *tx = sipGetAddress(sw);
+ void *tx = sip_api_get_address(sw);
if (tx != NULL)
{
@@ -9281,7 +9282,7 @@ static int sipWrapper_traverse(sipWrapper *self, visitproc visit, void *arg)
/* This should be handwritten code in PyTQt. */
if (sipTQtSupport != NULL)
{
- void *tx = sipGetAddress(sw);
+ void *tx = sip_api_get_address(sw);
if (tx != NULL)
{