Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12393 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9adb494558
commit
ef865e06d5
15 changed files with 194 additions and 37 deletions
24
Examples/test-suite/java/char_binary_runme.java
Normal file
24
Examples/test-suite/java/char_binary_runme.java
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import char_binary.*;
|
||||
|
||||
public class char_binary_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("char_binary");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
Test t = new Test();
|
||||
byte[] hile = "hile".getBytes();
|
||||
byte[] hil0 = "hil\0".getBytes();
|
||||
if (t.strlen(hile) != 4)
|
||||
throw new RuntimeException("bad multi-arg typemap");
|
||||
|
||||
if (t.strlen(hil0) != 4)
|
||||
throw new RuntimeException("bad multi-arg typemap");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue