Fixes custom code for QtCore's HWND on win32.

This commit is contained in:
Marcelo Lira 2011-12-09 20:01:53 -03:00 • committed by Hugo Parente Lima
commit ebeae9d084
3 changed files with 15 additions and 8 deletions

View file

@ -43,6 +43,9 @@
</target-to-native> </target-to-native>
</conversion-rule> </conversion-rule>
</primitive-type> </primitive-type>
<inject-code class="native" position="beginning">
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
</inject-code>
<value-type name="POINT"> <value-type name="POINT">
<include file-name="wtypes.h" location="global"/> <include file-name="wtypes.h" location="global"/>
</value-type> </value-type>

View file

@ -43,14 +43,7 @@
</conversion-rule> </conversion-rule>
</primitive-type> </primitive-type>
<inject-code class="native" position="beginning"> <inject-code class="native" position="beginning">
static bool checkPyCapsuleOrPyCObject(PyObject* pyObj) <insert-template name="checkPyCapsuleOrPyCObject_func"/>
{
#ifdef IS_PY3K
return PyCapsule_CheckExact(pyObj);
#else
return PyCObject_Check(pyObj);
#endif
}
</inject-code> </inject-code>
<enum-type name="QPixmap::HBitmapFormat" /> <enum-type name="QPixmap::HBitmapFormat" />
</typesystem> </typesystem>

View file

@ -414,4 +414,15 @@
} }
</template> </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> </typesystem>