summaryrefslogtreecommitdiffstats
path: root/make/config/jogl
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-17 12:44:40 +0000
committerKenneth Russel <[email protected]>2009-06-17 12:44:40 +0000
commit802288f8964affbda3460eea52df3d241ae3036a (patch)
treef336a36f4ed3f67b90dfa8f55f6cf1275174020f /make/config/jogl
parent6f6d6510a3d72c9c736c69331e89004f685567b1 (diff)
Fixed more non-C syntax causing breakage with Solaris compiler
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1975 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/config/jogl')
-rwxr-xr-xmake/config/jogl/glx-CustomCCode.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/make/config/jogl/glx-CustomCCode.c b/make/config/jogl/glx-CustomCCode.c
index 93347a174..a075c4852 100755
--- a/make/config/jogl/glx-CustomCCode.c
+++ b/make/config/jogl/glx-CustomCCode.c
@@ -24,9 +24,11 @@ static jmethodID cstrInternalBufferUtil = NULL;
static jclass clazzByteBuffer = NULL;
static void _initClazzAccess(JNIEnv *env) {
+ jclass c;
+
if(NULL!=cstrInternalBufferUtil) return ;
- jclass c = (*env)->FindClass(env, clazzNameInternalBufferUtil);
+ c = (*env)->FindClass(env, clazzNameInternalBufferUtil);
if(NULL==c) {
fprintf(stderr, "FatalError: Java_com_sun_opengl_impl_x11_glx_GLX: can't find %s\n", clazzNameInternalBufferUtil);
(*env)->FatalError(env, clazzNameInternalBufferUtil);
@@ -65,14 +67,16 @@ static void _initClazzAccess(JNIEnv *env) {
JNIEXPORT jobject JNICALL
Java_com_sun_opengl_impl_x11_glx_GLX_glXGetVisualFromFBConfigCopied0__JJ(JNIEnv *env, jclass _unused, jlong dpy, jlong config) {
XVisualInfo * _res;
+ jobject jbyteSource;
+ jobject jbyteCopy;
_res = glXGetVisualFromFBConfig((Display *) (intptr_t) dpy, (GLXFBConfig) (intptr_t) config);
if (_res == NULL) return NULL;
_initClazzAccess(env);
- jobject jbyteSource = (*env)->NewDirectByteBuffer(env, _res, sizeof(XVisualInfo));
- jobject jbyteCopy = (*env)->CallStaticObjectMethod(env,
- clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
+ jbyteSource = (*env)->NewDirectByteBuffer(env, _res, sizeof(XVisualInfo));
+ jbyteCopy = (*env)->CallStaticObjectMethod(env,
+ clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
// FIXME: remove reference/gc jbyteSource ??
XFree(_res);
@@ -91,6 +95,8 @@ Java_com_sun_opengl_impl_x11_glx_GLX_glXChooseFBConfigCopied1__JILjava_lang_Obje
int * _ptr3 = NULL;
GLXFBConfig * _res;
int count;
+ jobject jbyteSource;
+ jobject jbyteCopy;
if (attribList != NULL) {
_ptr2 = (int *) (((char*) (*env)->GetPrimitiveArrayCritical(env, attribList, NULL)) + attribList_byte_offset);
}
@@ -109,9 +115,9 @@ Java_com_sun_opengl_impl_x11_glx_GLX_glXChooseFBConfigCopied1__JILjava_lang_Obje
_initClazzAccess(env);
- jobject jbyteSource = (*env)->NewDirectByteBuffer(env, _res, count * sizeof(GLXFBConfig));
- jobject jbyteCopy = (*env)->CallStaticObjectMethod(env,
- clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
+ jbyteSource = (*env)->NewDirectByteBuffer(env, _res, count * sizeof(GLXFBConfig));
+ jbyteCopy = (*env)->CallStaticObjectMethod(env,
+ clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
// FIXME: remove reference/gc jbyteSource ??
XFree(_res);
@@ -128,6 +134,8 @@ JNIEXPORT jobject JNICALL
Java_com_sun_opengl_impl_x11_glx_GLX_glXChooseVisualCopied1__JILjava_lang_Object_2I(JNIEnv *env, jclass _unused, jlong dpy, jint screen, jobject attribList, jint attribList_byte_offset) {
int * _ptr2 = NULL;
XVisualInfo * _res;
+ jobject jbyteSource;
+ jobject jbyteCopy;
if (attribList != NULL) {
_ptr2 = (int *) (((char*) (*env)->GetPrimitiveArrayCritical(env, attribList, NULL)) + attribList_byte_offset);
}
@@ -139,9 +147,9 @@ Java_com_sun_opengl_impl_x11_glx_GLX_glXChooseVisualCopied1__JILjava_lang_Object
_initClazzAccess(env);
- jobject jbyteSource = (*env)->NewDirectByteBuffer(env, _res, sizeof(XVisualInfo));
- jobject jbyteCopy = (*env)->CallStaticObjectMethod(env,
- clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
+ jbyteSource = (*env)->NewDirectByteBuffer(env, _res, sizeof(XVisualInfo));
+ jbyteCopy = (*env)->CallStaticObjectMethod(env,
+ clazzInternalBufferUtil, cstrInternalBufferUtil, jbyteSource);
// FIXME: remove reference/gc jbyteSource ??
XFree(_res);