Add *int64 and GLsync types and related functions
Return values are declared with the C return type, but the JNI
function returns the JNI return type. In the case of GLsync/jlong as
in glFenceSync(), this causes a compile error. So the generator now
explicitly casts the return value to the JNI return type.
Bug: 8566953
Change-Id: I814befe2e4cce745434cbc4e1c8639fc3ce8aeae
diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java
index ffe3767..ba1152a 100644
--- a/opengl/tools/glgen/src/JniCodeEmitter.java
+++ b/opengl/tools/glgen/src/JniCodeEmitter.java
@@ -1421,7 +1421,8 @@
"return toEGLHandle(_env, " + baseType + "Class, " +
baseType + "Constructor, _returnValue);");
} else {
- out.println(indent + "return _returnValue;");
+ out.println(indent + "return (" +
+ getJniType(jfunc.getType()) + ")_returnValue;");
}
}