File: sip5_api.patch

package info (click to toggle)
python-poppler-qt5 0.75.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 292 kB
  • sloc: python: 380; makefile: 11
file content (71 lines) | stat: -rw-r--r-- 2,624 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From: woodlandhunter <woodlandhunter@users.noreply.github.com>
Date: Thu, 2 Jan 2020 20:54:56 -0600
Subject: Replace deprecated C API calls with their updated counterparts

These replaced functions have been deprecated since v4.8.x and are removed in sip5

(cherry picked from commit 6cc4d83b172ffb2d206e696ce508e508cd46b7c3)
---
 types.sip | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/types.sip b/types.sip
index e027b77..239b8c9 100644
--- a/types.sip
+++ b/types.sip
@@ -182,7 +182,7 @@ template <TYPE>
   if ((l = PyList_New(sipCpp->size())) == NULL)
     return NULL;
 
-  const sipMappedType* qlinkedlist_type = sipFindMappedType("QLinkedList<TYPE>");
+  const sipTypeDef* qlinkedlist_type = sipFindType("QLinkedList<TYPE>");
 
   // Set the list elements.
   for (int i = 0; i < sipCpp->size(); ++i)
@@ -190,7 +190,7 @@ template <TYPE>
     QLinkedList<TYPE>* t = new QLinkedList<TYPE>(sipCpp->at(i));
     PyObject *tobj;
 
-    if ((tobj = sipConvertFromMappedType(t, qlinkedlist_type, sipTransferObj)) == NULL)
+    if ((tobj = sipConvertFromType(t, qlinkedlist_type, sipTransferObj)) == NULL)
     {
       Py_DECREF(l);
       delete t;
@@ -203,7 +203,7 @@ template <TYPE>
 %End
 
 %ConvertToTypeCode
-  const sipMappedType* qlinkedlist_type = sipFindMappedType("QLinkedList<TYPE>");
+  const sipTypeDef* qlinkedlist_type = sipFindType("QLinkedList<TYPE>");
 
   // Check the type if that is all that is required.
   if (sipIsErr == NULL)
@@ -212,7 +212,7 @@ template <TYPE>
       return 0;
 
     for (int i = 0; i < PySequence_Size(sipPy); ++i)
-      if (!sipCanConvertToMappedType(PySequence_ITEM(sipPy, i), qlinkedlist_type, SIP_NOT_NONE))
+      if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, SIP_NOT_NONE))
         return 0;
 
     return 1;
@@ -224,16 +224,16 @@ template <TYPE>
   for (int i = 0; i < PySequence_Size(sipPy); ++i)
   {
     int state;
-    QLinkedList<TYPE> * t = reinterpret_cast< QLinkedList<TYPE> * >(sipConvertToMappedType(PySequence_ITEM(sipPy, i), qlinkedlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+    QLinkedList<TYPE> * t = reinterpret_cast< QLinkedList<TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
 
     if (*sipIsErr)
     {
-      sipReleaseInstance(t, sipClass_TYPE, state);
+      sipReleaseType(t, qlinkedlist_type, state);
       delete ql;
       return 0;
     }
     ql->append(*t);
-    sipReleaseInstance(t, sipClass_TYPE, state);
+    sipReleaseType(t, qlinkedlist_type, state);
   }
 
   *sipCppPtr = ql;