Lines 2501-2507
public class JavaEmitter implements GlueEmitter {
Link Here
|
2501 |
if (getConfig().emitImpl()) { |
2501 |
if (getConfig().emitImpl()) { |
2502 |
cWriter.println("#include <assert.h>"); |
2502 |
cWriter.println("#include <assert.h>"); |
2503 |
cWriter.println(); |
2503 |
cWriter.println(); |
2504 |
cWriter.println("static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jlong capacity); /* forward decl. */"); |
2504 |
cWriter.println("static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jint capacity); /* forward decl. */"); |
2505 |
cWriter.println(); |
2505 |
cWriter.println(); |
2506 |
} |
2506 |
} |
2507 |
for (final String code : cfg.customCCode()) { |
2507 |
for (final String code : cfg.customCCode()) { |
Lines 2549-2555
public class JavaEmitter implements GlueEmitter {
Link Here
|
2549 |
" return JNI_TRUE;\n"+ |
2549 |
" return JNI_TRUE;\n"+ |
2550 |
"}\n"+ |
2550 |
"}\n"+ |
2551 |
"\n"+ |
2551 |
"\n"+ |
2552 |
"static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jlong capacity) {\n"+ |
2552 |
"static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jint capacity) {\n"+ |
2553 |
" jobject jbyteBuffer;\n"+ |
2553 |
" jobject jbyteBuffer;\n"+ |
2554 |
" void * byteBufferPtr;\n"+ |
2554 |
" void * byteBufferPtr;\n"+ |
2555 |
"\n"+ |
2555 |
"\n"+ |