From 34a2c36e577f1752b4bb635dc1cfb12d3d5a1fd5 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 25 Jan 2010 12:46:57 +0000 Subject: Bindings java: cast return value of special constructors * bindings/java/lang.py: in the JAVA API special constructors are made to return their real type, but usual GObject constructors return their base type (here LassoNode) so we have to cast it. --- bindings/java/lang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bindings/java') diff --git a/bindings/java/lang.py b/bindings/java/lang.py index 7d413ab5..8c60e7bc 100644 --- a/bindings/java/lang.py +++ b/bindings/java/lang.py @@ -783,7 +783,7 @@ protected static native void destroy(long cptr); for m in cons: name = method_name(m,class_name) print >> fd, ' static public %s %s(%s) {' % (class_name, name, generate_arg_list(self,m.args)) - print >> fd, ' return LassoJNI.%s(%s);' % (self.JNI_function_name(m),generate_arg_list2(m.args)) + print >> fd, ' return (%s) LassoJNI.%s(%s);' % (class_name, self.JNI_function_name(m),generate_arg_list2(m.args)) print >> fd, ' }' print >> fd, ' /* Setters and getters */' for m in c.members: -- cgit