diff options
author | Sven Gothel <[email protected]> | 2023-07-05 10:21:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-05 10:21:48 +0200 |
commit | 5ceca8550b82591a6a2661a26d3e0d5e6e3e15ff (patch) | |
tree | 95768138afdb5ee4c6d3b705e803ad497241f756 /src/junit/com/jogamp/gluegen/test | |
parent | ae4c2c3e59ed92caa6f0e18360b7236e50899bf6 (diff) |
GlueGen: Add 'PascalString' string semantics (length + value-ptr), added prelim code for JavaCallback use-case emitBodyMapCToJNIType()
It is common in toolkit APIs that a string might not be passed as a 'nul' terminated (EOS) C string,
but as a Pascal string with a given length argument.
A C string is specied as
ArgumentIsString alEventCallbackInject 3
while allowing multiple indices ..
A Pascal string can be specified as
ArgumentIsPascalString ALEVENTPROCSOFT 3 4
while allowing multiple indice-tuples for length and value ..
The tuple consist of the length agrument-index first (usually an int)
followed by the value argument-index (usually a 'char*').
+++
CMethodBindingEmitter.emitBodyMapCToJNIType(), where PascalString is implemented,
is currently being used for
- JNI return statement (no PascalString impact possible)
- JavaCallback C type -> JNI type, PascalString impacting
Diffstat (limited to 'src/junit/com/jogamp/gluegen/test')
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg | 2 |
1 files changed, 1 insertions, 1 deletions
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 83045cb..08194e6 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg @@ -76,7 +76,7 @@ JavaCallbackDef MessageCallback01 T2_CallbackFunc01 2 # typedef void ( * ALEVENTPROCSOFT)(int eventType, int object, int param, int length, const char *message, void *userParam); # void alEventCallback(ALEVENTPROCSOFT callback, void *userParam /* identity-key */); # void alEventCallbackInject(int eventType, int object, int param, const char* msg); -ArgumentIsString ALEVENTPROCSOFT 4 +ArgumentIsPascalString ALEVENTPROCSOFT 3 4 ArgumentIsString alEventCallbackInject 3 # Define a JavaCallback (OpenAL AL_SOFT_events) |