summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-10-13 16:18:16 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-10-14 10:52:37 -0300
commit89baf69998a4fcc3cd4eb3710f652c452224e2fa (patch)
treeef7f652ef03169f068ae8c58305f4fe8aaf915cb
parent81a4cb22766a8bc7ff4a48122e63caad5500ae69 (diff)
downloadpyside-89baf69998a4fcc3cd4eb3710f652c452224e2fa.tar.gz
pyside-89baf69998a4fcc3cd4eb3710f652c452224e2fa.tar.xz
pyside-89baf69998a4fcc3cd4eb3710f652c452224e2fa.zip
Fixes win32's HWND converter.
Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--PySide/QtCore/glue/hwnd_conversions.h10
-rw-r--r--PySide/QtCore/typesystem_core_win.xml2
-rw-r--r--PySide/QtGui/glue/wid_conversions.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/PySide/QtCore/glue/hwnd_conversions.h b/PySide/QtCore/glue/hwnd_conversions.h
index bf2de4d..65b95e2 100644
--- a/PySide/QtCore/glue/hwnd_conversions.h
+++ b/PySide/QtCore/glue/hwnd_conversions.h
@@ -1,6 +1,6 @@
namespace Shiboken {
template <>
-struct Converter<HWND__>
+struct Converter<HWND>
{
static bool checkType(PyObject* pyObj)
{
@@ -19,14 +19,14 @@ struct Converter<HWND__>
return 0;
}
- static PyObject* toPython(HWND__ cppobj)
+ static PyObject* toPython(HWND cppobj)
{
- return PyCObject_FromVoidPtr(&cppobj, 0);
+ return PyCObject_FromVoidPtr(cppobj, 0);
}
- static HWND__ toCpp(PyObject* pyobj)
+ static HWND toCpp(PyObject* pyobj)
{
- return *((HWND__*) PyCObject_AsVoidPtr(pyobj));
+ return (HWND)PyCObject_AsVoidPtr(pyobj);
}
};
}
diff --git a/PySide/QtCore/typesystem_core_win.xml b/PySide/QtCore/typesystem_core_win.xml
index c4150cd..8832b25 100644
--- a/PySide/QtCore/typesystem_core_win.xml
+++ b/PySide/QtCore/typesystem_core_win.xml
@@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<typesystem package="PySide.QtCore">
- <primitive-type name="HWND__">
+ <primitive-type name="HWND">
<conversion-rule file="glue/hwnd_conversions.h"/>
</primitive-type>
<value-type name="POINT">
diff --git a/PySide/QtGui/glue/wid_conversions.h b/PySide/QtGui/glue/wid_conversions.h
index 9901218..1abb5f2 100644
--- a/PySide/QtGui/glue/wid_conversions.h
+++ b/PySide/QtGui/glue/wid_conversions.h
@@ -1,3 +1,4 @@
+#ifndef Q_WS_WIN
namespace Shiboken {
template <>
struct Converter<WId>
@@ -30,3 +31,4 @@ struct Converter<WId>
}
};
}
+#endif