[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Mar 24 19:18:28 UTC 2008
SVN commit 789636 by rdale:
* Attempt to improve the marshalling of WIds and assume they are
either signed ints (Mac OS) or signed longs.
CCMAIL: kde-bindings at kde.org
M +5 -0 ChangeLog
M +10 -3 src/marshall_primitives.h
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #789635:789636
@@ -1,3 +1,8 @@
+2008-03-24 Richard Dale <richard.j.dale at gmail.com>
+
+ * Attempt to improve the marshalling of WIds and assume they are
+ either signed ints (Mac OS) or signed longs.
+
2008-03-14 Richard Dale <richard.j.dale at gmail.com>
* Fixed a bug in constructing Qt::Variants with custom types such
--- trunk/KDE/kdebindings/ruby/qtruby/src/marshall_primitives.h #789635:789636
@@ -223,14 +223,21 @@
{
if(v == Qnil)
return 0;
-
- return (WId) NUM2ULONG(v);
+#ifdef Q_WS_MAC32
+ return (WId) NUM2INT(v);
+#else
+ return (WId) NUM2LONG(v);
+#endif
}
template <>
static VALUE primitive_to_ruby<WId>(WId sv)
{
- return ULONG2NUM((unsigned long) sv);
+#ifdef Q_WS_MAC32
+ return INT2NUM((unsigned long) sv);
+#else
+ return LONG2NUM((unsigned long) sv);
+#endif
}
template <>
More information about the Kde-bindings
mailing list