Hi, I just got pointed at this bug, I am a developer on the SWT
project.

  The issue here is that in Java memory we need to store pointers to C
objects.  jint is 32 bits, jlong is 64 bits, by the Java spec.  To keep
memory use down, we decided to have the Java and C code for 64-bit GTK+
ports be generated by a preprocessing stage.

  Here's how it's done.  In the SWT sources, whenever we have a pointer,
we add some markup like this:

   int /*long*/ selection = OS.gtk_tree_view_get_selection (tree);

  The ant target "replace.32.to.64" in the build.xml for the GTK+ 64 bit
port does this search and replace on all of the SWT sources.

  The C source code must then be changed to match.  All of the C source
code in SWT is auto-generated by the JNIGeneratorApp from
org.eclipse.swt.tools.  The target "build.cfiles" in the build.xml runs
this to generate the C code.

  Please don't use hacky patches.  We've done the work to do the real
64-bit port, and I can help out if you're having trouble.  If you just
patch the C files and not the Java source code, you're just going to get
weird crashes when some pointers turn out to be invalid.

  -Billy



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to