Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT on 64-bit platforms

Tom, there is no plan in place to port SWT to 64-bits.  There are other
places in the code where we are not 64-bit clean.

We have thought about possible solutions:
      - 2 streams, one using "long" and one using "int"
      - abandon "int" and use an object that contains either an "int" or
"long" (like TCHAR on Windows that hides UNICODE vs. DBCS)
      - use "SWT_int" (bad name) and run a preprocessor that produces
either "int" or "long"
      - use "long" everywhere and be careful to do the correct
casting/pointer math on 32-bit systems

At the very least, we plan to begin marking places in the code where we
have made this assumption.

Steve



                                                                                                                                           
                      Tom Tromey                                                                                                           
                      <tromey@xxxxxxxxxx>             To:      platform-swt-dev <platform-swt-dev@xxxxxxxxxxx>                             
                      Sent by:                        cc:                                                                                  
                      platform-swt-dev-admin@         Subject: [platform-swt-dev] SWT on 64-bit platforms                                  
                      eclipse.org                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      09/09/02 07:21 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           



I'd like to know if there is a plan to make SWT (in particular the Gtk
port) work on 64-bit platforms.

Right now the Gtk code uses `int' to represent handles, e.g.:

 [OS.java]
    public static final native int gtk_fixed_new();

and:

  [swt.c]
    return (jint)gtk_fixed_new();

These int values are 32-bits (per the Java spec), but are cast back
and forth to pointers in the native code.  That means the code isn't
64-bit clean.

One fix would be to s/int/long/ in all places where the handle
represents a pointer.

Tom
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev






Back to the top