diff options
author | Sven Gothel <[email protected]> | 2023-07-01 19:23:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-01 19:23:14 +0200 |
commit | df0895828e957d97f38510da36eade7a60691d96 (patch) | |
tree | 061d73226f0e4bfc204ab200001931a544696fed /src/junit/com/jogamp/gluegen/test | |
parent | 8766fcfdce4dd864fe6764b063a0f9a4b17327c1 (diff) |
GlueGen JavaCallback: Use `SetCallback-KeyClass` if manually specified, even if no keys are defined!
Diffstat (limited to 'src/junit/com/jogamp/gluegen/test')
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/Test4JavaCallback.java | 25 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test4JavaCallback.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test4JavaCallback.java index badd299..54a8c59 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test4JavaCallback.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test4JavaCallback.java @@ -772,6 +772,31 @@ public class Test4JavaCallback extends BaseClass { return "CustomALKey[this "+toHexString(System.identityHashCode(this))+", buffer "+buffer+"]"; } } + + public static class CustomMessageCallback11Key { + public CustomMessageCallback11Key() { + } + @Override + public boolean equals(final Object o) { + if( this == o ) { + return true; + } + if( !(o instanceof CustomAlBufferCallback1Key) ) { + return false; + } + final CustomAlBufferCallback1Key o2 = (CustomAlBufferCallback1Key)o; + return true; + } + @Override + public int hashCode() { + return 0; + } + @Override + public String toString() { + return "CustomMessageCallback11Key[this "+toHexString(System.identityHashCode(this))+"]"; + } + } + static private String toHexString(final int v) { return "0x"+Integer.toHexString(v); } public static void main(final String args[]) throws IOException { diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg index 812676e..472471c 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg @@ -162,7 +162,7 @@ JavaCallbackKey alBufferCallback1 0 # void MessageCallback11(T2_CallbackFunc11 cbFunc, const T2_Callback11UserType* usrParam); # void InjectMessageCallback11(size_t id, const char* msg); ArgumentIsString InjectMessageCallback11 1 -JavaCallbackDef MessageCallback11 T2_CallbackFunc11 0 +JavaCallbackDef MessageCallback11 T2_CallbackFunc11 0 com.jogamp.gluegen.test.junit.generation.Test4JavaCallback.CustomMessageCallback11Key # # End JavaCallback |