diff options
author | Kenneth Russel <[email protected]> | 2008-05-27 10:06:20 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-05-27 10:06:20 +0000 |
commit | f1e08a23facb2d718276b3fbf59b0df2b54fceb9 (patch) | |
tree | b7f5b37c2187d39e90681400206685293d758aaa /src/java/com/sun/gluegen/JavaConfiguration.java | |
parent | 0ce0a36ec694da77a0ef02ed46c2b152a17d5c80 (diff) |
Changed implementation of ArgumentIsString to work with wide-character
null-terminated strings on Windows. Changed Windows dynamic linker to
use LoadLibraryW which is the only variant available on Windows CE.
Changed GetProcAddress to explicitly named GetProcAddressA; this is
implicitly the only variant available on Windows XP. Tested by
compiling gluegen-rt.dll for both Windows XP and Windows CE. Also
brought dynlink-unix-CustomJavaCode.java in line with modifications
that were apparently hand made to the UnixDynamicLinkerImpl and
MacOSXDynamicLinkerImpl classes.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@79 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java')
-rw-r--r-- | src/java/com/sun/gluegen/JavaConfiguration.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java index 7f6efa9..a452183 100644 --- a/src/java/com/sun/gluegen/JavaConfiguration.java +++ b/src/java/com/sun/gluegen/JavaConfiguration.java @@ -105,7 +105,7 @@ public class JavaConfiguration { private Set/*<String>*/ returnsString = new HashSet(); private Map/*<String, String>*/ returnedArrayLengths = new HashMap(); /** - * Key is function that has some byte[] arguments that should be + * Key is function that has some byte[] or short[] arguments that should be * converted to String args; value is List of Integer argument indices */ private Map/*<String,List<Integer>>*/ argumentsAreString = new HashMap(); @@ -1065,8 +1065,8 @@ public class JavaConfiguration { * </pre> * */ - protected void readArgumentIsString(StringTokenizer tok, String filename, int lineNo) { - try { + protected void readArgumentIsString(StringTokenizer tok, String filename, int lineNo) { + try { String methodName = tok.nextToken(); ArrayList argIndices = new ArrayList(2); while (tok.hasMoreTokens()) { @@ -1074,10 +1074,9 @@ public class JavaConfiguration { argIndices.add(idx); } - if(argIndices.size() > 0) { + if (argIndices.size() > 0) { argumentsAreString.put(methodName, argIndices); - } - else { + } else { throw new RuntimeException("ERROR: Error parsing \"ArgumentIsString\" command at line " + lineNo + " in file \"" + filename + "\": directive requires specification of at least 1 index"); } |