aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-07 04:11:51 +0000
committerKenneth Russel <[email protected]>2006-02-07 04:11:51 +0000
commite5a1add3d6bc24eb554185bfd9b787c9e553c271 (patch)
treea4f76e9218650f0d1ff90b8e15523ab32d5fd380
parenta302c87258a1a17dc0eef5ae112cb0d4357be238 (diff)
Fixed build breakage on X11 platforms after change to GlueGen's
argument name substitution to include offset arguments for arrays git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@586 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r--make/glx-x11.cfg13
1 files changed, 5 insertions, 8 deletions
diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg
index 801c035ee..5680a419a 100644
--- a/make/glx-x11.cfg
+++ b/make/glx-x11.cfg
@@ -27,14 +27,11 @@ CustomJavaCode GLX public static native long RootWindow(long display, int screen
TemporaryCVariableDeclaration XGetVisualInfo int count;
TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0];
ReturnValueCapacity XGetVisualInfo count * sizeof(XVisualInfo)
-# FIXME: this is terrible but currently needed because we have two
-# overloadings for the third argument (IntBuffer and int[]) and can't
-# specify different glue code for different overloadings
-#
-# The NoNio directive which was present in an earlier version of
-# GlueGen, which resolved this more cleanly, is also not yet available
-# in this version.
-ReturnedArrayLength XGetVisualInfo ((((Object) {3}) instanceof Buffer) ? ((IntBuffer) ((Object) {3})).get(0) : ((int[]) ((Object) {3}))[0])
+
+# Helper routine to make the ReturnedArrayLength expression below work correctly
+CustomJavaCode GLX private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); }
+CustomJavaCode GLX private static int getFirstElement(int[] arr, int offset) { return arr[offset]; }
+ReturnedArrayLength XGetVisualInfo getFirstElement({3})
ReturnValueCapacity glXChooseVisual sizeof(XVisualInfo)
ReturnValueCapacity glXGetVisualFromFBConfig sizeof(XVisualInfo)
ReturnValueCapacity glXGetVisualFromFBConfigSGIX sizeof(XVisualInfo)