From 4761c936ab5e09fe7ae19522bacf3889fc300fc9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 18 Jun 2023 03:39:24 +0200 Subject: GlueGen Struct [9b]: Add unit test for fixed 'void*' regression commit eec3f21c3597ff9bf9760a06e00dd341214ea90d See impact to T2_InitializeOptions struct fields: - 'void* Reserved1' shall be ignored (*this is the regression fix*) - 'void* Reserved2' will be taked due to config 'Opaque long T2_InitializeOptions.Reserved2' - 'T2_CustomFunc CustomFunc2' will produce a member function call as previously --- src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg | 6 ++++-- src/junit/com/jogamp/gluegen/test/junit/generation/test2.h | 6 +++++- 2 files changed, 9 insertions(+), 3 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 3b68598..b55e1d6 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.cfg @@ -30,8 +30,10 @@ EmitStruct T2_InitializeOptions StructPackage T2_InitializeOptions com.jogamp.gluegen.test.junit.generation ReturnsStringOnly T2_InitializeOptions.ProductName ReturnsStringOnly T2_InitializeOptions.ProductVersion -Opaque long T2_InitializeOptions.Reserved -ImmutableAccess long T2_InitializeOptions.Reserved + +Opaque long T2_InitializeOptions.Reserved2 +# ImmutableAccess long T2_InitializeOptions.Reserved + # ReturnedArrayLength T2_InitializeOptions.OverrideThreadAffinity 1 MaxOneElement T2_InitializeOptions.OverrideThreadAffinity diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.h b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.h index e27e9aa..58b5c8f 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test2.h +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test2.h @@ -8,6 +8,8 @@ typedef void* ( * T2_ReallocateMemoryFunc)(void* Pointer, size_t SizeInBytes, si typedef void ( * T2_ReleaseMemoryFunc)(void* Pointer); +typedef void ( * T2_CustomFunc)(void* Pointer); + typedef struct { int32_t ApiVersion; uint64_t NetworkWork; @@ -28,7 +30,9 @@ typedef struct { const char* ProductVersion; - void* Reserved; + void* Reserved1; + void* Reserved2; + T2_CustomFunc CustomFunc2; T2_ThreadAffinity* OverrideThreadAffinity; } T2_InitializeOptions; -- cgit v1.2.3