[Kde-bindings] playground/bindings/kimono
Arno Rehn
kde at arnorehn.de
Tue Mar 20 17:14:26 UTC 2007
SVN commit 644665 by arnorehn:
* Allow 'zero' return types for methods and for args of methods being called
from C++
CCMAIL: kde-bindings at kde.org
M +5 -0 ChangeLog
M +17 -9 SmokeInvocation.cs
--- trunk/playground/bindings/kimono/ChangeLog #644664:644665
@@ -1,3 +1,8 @@
+2007-03-20 Arno Rehn <arno at arnorehn.de>
+
+ * Allow 'zero' return types for methods and for args of methods being called
+ from C++
+
2007-03-18 Richard Dale <rdale at foton.es>
* Instead of setting and getting properties via QObject.SetProperty() and
--- trunk/playground/bindings/kimono/SmokeInvocation.cs #644664:644665
@@ -192,9 +192,11 @@
} else if (parameters[i].ParameterType == typeof(double)) {
args[i] = stackPtr[i].s_double;
} else if (parameters[i].ParameterType == typeof(string)) {
- args[i] = (string) ((GCHandle) stackPtr[i].s_class).Target;
+ if (stackPtr[0].s_class != IntPtr.Zero)
+ args[i] = (string) ((GCHandle) stackPtr[i].s_class).Target;
} else {
- args[i] = ((GCHandle) stackPtr[i].s_class).Target;
+ if (stackPtr[0].s_class != IntPtr.Zero)
+ args[i] = ((GCHandle) stackPtr[i].s_class).Target;
}
}
@@ -289,9 +291,11 @@
} else if (parameters[i].ParameterType == typeof(double)) {
args[i] = stackPtr[i].s_double;
} else if (parameters[i].ParameterType == typeof(string)) {
- args[i] = (string) ((GCHandle) stackPtr[i].s_class).Target;
+ if (stackPtr[0].s_class != IntPtr.Zero)
+ args[i] = (string) ((GCHandle) stackPtr[i].s_class).Target;
} else {
- args[i] = ((GCHandle) stackPtr[i].s_class).Target;
+ if (stackPtr[0].s_class != IntPtr.Zero)
+ args[i] = ((GCHandle) stackPtr[i].s_class).Target;
}
}
}
@@ -325,7 +329,7 @@
retval[0].s_float = (float) returnValue;
} else if (returnType == typeof(double)) {
retval[0].s_double = (double) returnValue;
- } else if (returnType == typeof(string)) {
+ } else if (returnType == typeof(string)) {
retval[0].s_class = (IntPtr) GCHandle.Alloc(returnValue);
} else {
retval[0].s_class = (IntPtr) GCHandle.Alloc(returnValue);
@@ -468,9 +472,11 @@
} else if (returnType == typeof(double)) {
returnValue.ReturnValue = stack[0].s_double;
} else if (returnType == typeof(string)) {
- returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
+ if (stack[0].s_class != IntPtr.Zero)
+ returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
} else {
- returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
+ if (stack[0].s_class != IntPtr.Zero)
+ returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
}
}
}
@@ -596,9 +602,11 @@
} else if (returnType == typeof(double)) {
returnValue.ReturnValue = stack[0].s_double;
} else if (returnType == typeof(string)) {
- returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
+ if (stack[0].s_class != IntPtr.Zero)
+ returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
} else {
- returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
+ if (stack[0].s_class != IntPtr.Zero)
+ returnValue.ReturnValue = ((GCHandle) stack[0].s_class).Target;
}
}
}
More information about the Kde-bindings
mailing list