From f1e08a23facb2d718276b3fbf59b0df2b54fceb9 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 27 May 2008 10:06:20 +0000 Subject: 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 --- src/java/com/sun/gluegen/JavaConfiguration.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java') 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/**/ returnsString = new HashSet(); private Map/**/ 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/*>*/ argumentsAreString = new HashMap(); @@ -1065,8 +1065,8 @@ public class JavaConfiguration { * * */ - 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"); } -- cgit v1.2.3