Minor clean-up.

This commit is contained in:
Ioannis Tsakpinis 2010-10-04 17:04:46 +00:00
parent f6006e567d
commit 60bd1c00ac
5 changed files with 2 additions and 31 deletions

View File

@ -38,8 +38,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.sun.mirror.apt.*;
import com.sun.mirror.declaration.AnnotationTypeDeclaration;

View File

@ -110,10 +110,6 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
NativeType native_type_annotation = NativeTypeTranslator.getAnnotation(annotation, NativeType.class);
if (native_type_annotation != null) {
Class<? extends Annotation> annotation_type = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType());
/*System.out.println("\nYO:");
System.out.println("annotation = " + annotation);
System.out.println("native_type_annotation = " + native_type_annotation);
System.out.println("annotation_type = " + annotation_type);*/
Class type = Utils.getJavaType(type_mirror);
if (Buffer.class.equals(type))
continue;
@ -229,10 +225,8 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
native_writer.println("#include <jni.h>");
type_map.printNativeIncludes(native_writer);
native_writer.println();
//if ( d.getAnnotation(NoTypeDefs.class) == null ) {
TypedefsGenerator.generateNativeTypedefs(type_map, native_writer, d.getMethods());
native_writer.println();
//}
if (!context_specific) {
generateMethodsNativePointers(native_writer, d.getMethods());
native_writer.println();

View File

@ -134,7 +134,7 @@ public class JavaMethodsGenerator {
first_parameter = false;
if ( printTypes )
writer.print("boolean ");
writer.print( TypeInfo.UNSIGNED_PARAMETER_NAME);
writer.print(TypeInfo.UNSIGNED_PARAMETER_NAME);
}
}
} else if (

View File

@ -74,27 +74,6 @@ public class JavaTypeTranslator implements TypeVisitor {
throw new RuntimeException(e);
}
}
/*
final String className = t.getComponentType().toString();
if ( "java.lang.CharSequence".equals(className) )
type = CharSequence[].class;
else if ( "java.nio.ByteBuffer".equals(className) )
type = ByteBuffer[].class;
else if ( "org.lwjgl.opencl.CLMem".equals(className) )
type = CLMem[].class;
else
throw new RuntimeException(t + " is not allowed");
//*/
/*
try {
System.out.println("t = " + t);
System.out.println("t.getClass() = " + t.getClass());
System.out.println("t.getComponentType() = " + t.getComponentType());
type = Class.forName(t.toString());
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}*/
}
public static Class getPrimitiveClassFromKind(PrimitiveType.Kind kind) {

View File

@ -144,7 +144,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getBuildProgramCallba
static void CL_USER_FUNC_CALLBACK nativeKernelCallback(void *args) {
JNIEnv *env = attachCurrentThread();
jobject user_func = (jobject)*(intptr_t *)args;
jobject user_func = (jobject)(intptr_t)*(jlong *)args;
jint num_mem_objects = *(jint *)((char *)args + 8);
jobjectArray memobjs = NULL;
jobject buffer;