summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/CMethodBindingEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-31 23:32:39 +0200
committerSven Gothel <[email protected]>2010-03-31 23:32:39 +0200
commite37c383c4a09432fff009e81d572c8a92b42eef6 (patch)
tree9ebb8bacc940a3460be1639ad771f8e5d98ad012 /src/java/com/sun/gluegen/CMethodBindingEmitter.java
parent73829c38665c57052bf703ae58a2bd1dc7dc4625 (diff)
parent22262166e07de99ae0d4557e4f87e3bd1c5cd6dd (diff)
Merged with latest of mbien
Diffstat (limited to 'src/java/com/sun/gluegen/CMethodBindingEmitter.java')
-rw-r--r--src/java/com/sun/gluegen/CMethodBindingEmitter.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/java/com/sun/gluegen/CMethodBindingEmitter.java b/src/java/com/sun/gluegen/CMethodBindingEmitter.java
index 022df39..ef5d0e9 100644
--- a/src/java/com/sun/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/CMethodBindingEmitter.java
@@ -44,12 +44,15 @@ import java.io.*;
import java.text.MessageFormat;
import com.sun.gluegen.cgram.types.*;
+import java.util.logging.Logger;
+
+import static java.util.logging.Level.*;
/** Emits the C-side component of the Java<->C JNI binding. */
-public class CMethodBindingEmitter extends FunctionEmitter
-{
- protected static final CommentEmitter defaultCommentEmitter =
- new DefaultCommentEmitter();
+public class CMethodBindingEmitter extends FunctionEmitter {
+
+ protected static final Logger LOG = Logger.getLogger(CMethodBindingEmitter.class.getPackage().getName());
+ protected static final CommentEmitter defaultCommentEmitter = new DefaultCommentEmitter();
protected static final String arrayResLength = "_array_res_length";
protected static final String arrayRes = "_array_res";
@@ -1006,13 +1009,13 @@ public class CMethodBindingEmitter extends FunctionEmitter
}
}
writer.print("sizeof(" + cReturnType.getName() + ")");
- System.err.println(
- "WARNING: No capacity specified for java.nio.Buffer return " +
+ LOG.warning(
+ "No capacity specified for java.nio.Buffer return " +
"value for function \"" + binding + "\";" +
" assuming size of equivalent C return type (sizeof(" + cReturnType.getName() + ")): " + binding);
/**
throw new RuntimeException(
- "WARNING: No capacity specified for java.nio.Buffer return " +
+ "No capacity specified for java.nio.Buffer return " +
"value for function \"" + binding + "\";" +
" C return type is " + cReturnType.getName() + ": " + binding); */
}