summaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 47615ad..2903ae4 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>