This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gstreamer-java don't work with GCJ
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- Cc: Frank GroÃmann <Frank dot Grossmann at gmx dot de>, java at gcc dot gnu dot org
- Date: Tue, 14 Aug 2007 00:33:49 -0600
- Subject: Re: gstreamer-java don't work with GCJ
- References: <1187005834.25609.25.camel@fragro-laptop> <18112.19312.783210.763594@zebedee.pink>
- Reply-to: tromey at redhat dot com
Andrew> The javadoc for Class.getFields() says "The elements in the array
Andrew> returned are not sorted and are not in any particular order", but JNA
Andrew> needs them to be in the order in which they were declared.
We do store the fields in order. The bug here is that in
Class.internalGetFields we put them into a Set and then later turn
that set into an array.
I think the simplest fix is to use a LinkedHashSet (or TreeSet I
suppose) instead of a HashSet here. internalGetFields looks quite
inefficient. It could be improved in other ways.
Andrew> JNA looks like great technology, and it would be very cool to get it
Andrew> working on gcj. I'm not sure how to fix his problem, though. Paging
Andrew> Tom Tromey...
Yeah, this does look cool. It is similar to what I was attempting
with GDirect, except actually complete. :-)
Tom