aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/CMethodBindingEmitter.java
diff options
context:
space:
mode:
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); */
}