aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:01:53 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:21 -0300
commitebeae9d084fc6093d34408a353f2979a654550cb (patch)
treec120065c2a29c7d5408d49632bd36879ebf6d899
parent31804c2adcf5b6939c8c5e133d3ae1f378e67bc5 (diff)
Fixes custom code for QtCore's HWND on win32.
-rw-r--r--PySide/QtCore/typesystem_core_win.xml3
-rw-r--r--PySide/QtGui/typesystem_gui_win.xml9
-rw-r--r--PySide/typesystem_templates.xml11
3 files changed, 15 insertions, 8 deletions
diff --git a/PySide/QtCore/typesystem_core_win.xml b/PySide/QtCore/typesystem_core_win.xml
index a9663c9b8..f4b8cab24 100644
--- a/PySide/QtCore/typesystem_core_win.xml
+++ b/PySide/QtCore/typesystem_core_win.xml
@@ -43,6 +43,9 @@
</target-to-native>
</conversion-rule>
</primitive-type>
+ <inject-code class="native" position="beginning">
+ <insert-template name="checkPyCapsuleOrPyCObject_func"/>
+ </inject-code>
<value-type name="POINT">
<include file-name="wtypes.h" location="global"/>
</value-type>
diff --git a/PySide/QtGui/typesystem_gui_win.xml b/PySide/QtGui/typesystem_gui_win.xml
index 416c5e5ba..93d422a22 100644
--- a/PySide/QtGui/typesystem_gui_win.xml
+++ b/PySide/QtGui/typesystem_gui_win.xml
@@ -43,14 +43,7 @@
</conversion-rule>
</primitive-type>
<inject-code class="native" position="beginning">
- static bool checkPyCapsuleOrPyCObject(PyObject* pyObj)
- {
- #ifdef IS_PY3K
- return PyCapsule_CheckExact(pyObj);
- #else
- return PyCObject_Check(pyObj);
- #endif
- }
+ <insert-template name="checkPyCapsuleOrPyCObject_func"/>
</inject-code>
<enum-type name="QPixmap::HBitmapFormat" />
</typesystem>
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 47615ad02..2903ae408 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -414,4 +414,15 @@
}
</template>
+ <template name="checkPyCapsuleOrPyCObject_func">
+ static bool checkPyCapsuleOrPyCObject(PyObject* pyObj)
+ {
+ #ifdef IS_PY3K
+ return PyCapsule_CheckExact(pyObj);
+ #else
+ return PyCObject_Check(pyObj);
+ #endif
+ }
+ </template>
+
</typesystem>