2005/9/14, Billy Biggs <[EMAIL PROTECTED]>: > 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
I'm building the Debian package from the source distribution src.zip in swt-3.1-gtk-linux-x86.zip. This build.xml does not contain a replace.32.to.64 target, and neither does swt-3.1-gtk-linux-x86_64.zip. There is no org/eclipse/swt/tools directory either. Where can I find a source distribution that contains these utilities? Cheers, Shaun