diff options
author | Jesse Hall <jessehall@google.com> | 2013-04-10 01:01:00 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2013-04-10 22:00:17 -0700 |
commit | 68fc8bbced285a8a2b716e5fe1900968ad8ba7d3 (patch) | |
tree | 8ad6d699de0b4eb66ddbab1f88fd11a53cb5d885 /opengl/tools/glgen/src/JniCodeEmitter.java | |
parent | 2d9faafa2318c05f8991beff9cc683d72cbabd07 (diff) | |
download | frameworks_native-68fc8bbced285a8a2b716e5fe1900968ad8ba7d3.zip frameworks_native-68fc8bbced285a8a2b716e5fe1900968ad8ba7d3.tar.gz frameworks_native-68fc8bbced285a8a2b716e5fe1900968ad8ba7d3.tar.bz2 |
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
Diffstat (limited to 'opengl/tools/glgen/src/JniCodeEmitter.java')
-rw-r--r-- | opengl/tools/glgen/src/JniCodeEmitter.java | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ public class JniCodeEmitter { "return toEGLHandle(_env, " + baseType + "Class, " + baseType + "Constructor, _returnValue);"); } else { - out.println(indent + "return _returnValue;"); + out.println(indent + "return (" + + getJniType(jfunc.getType()) + ")_returnValue;"); } } |