forked from nativelibs4java/nativelibs4java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JNAerator: started cleanup of function pointers
- Loading branch information
Showing
5 changed files
with
33 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
tmp | ||
.DS_Store | ||
build_out | ||
_jnaerator.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -952,6 +952,7 @@ public enum ConvType { | |
|
||
Enum, | ||
Pointer, | ||
FunctionSignature, | ||
Primitive, | ||
Struct, | ||
NativeLong, | ||
|
23 changes: 23 additions & 0 deletions
23
...naerator/jnaerator/src/test/resources/com/ochafik/lang/jnaerator/tests/fake pointers.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,31 @@ | ||
typedef struct sdk_private sdk_private; | ||
typedef sdk_private *sdk_t; | ||
void sdk_new(sdk_t *sdk, const char* msg); | ||
void sdk_free(sdk_t sdk); | ||
|
||
typedef struct _cl_event * cl_event; | ||
void f(cl_event, cl_event*); | ||
|
||
-- | ||
#runtime(JNAerator) | ||
|
||
import test.*; | ||
import static test.TestLibrary.*; | ||
|
||
sdk_new((PointerByReference)null, (String)null); | ||
sdk_new((Pointer)null, (Pointer)null); | ||
sdk_free((sdk_t)null); | ||
|
||
f((Pointer)null, (Pointer)null); | ||
f((cl_event)null, (PointerByReference)null); | ||
|
||
-- | ||
#runtime(BridJ) | ||
|
||
import test.*; | ||
import static test.TestLibrary.*; | ||
|
||
sdk_new((Pointer<sdk_t>)null, (Pointer<Byte>)null); | ||
sdk_free((sdk_t)null); | ||
|
||
f((cl_event)null, (Pointer<cl_event>)null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters