This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: two bugs and a buggy patch


Marco Vezzoli <marco.vezzoli@st.com> writes:

> maybe a one-way mangling is enough for applications...
> The record mangles all field names when accessed, then it compares with
> the actual slot names.

Yes, and this breaks under JDK1.2.  At least the 1-argument form of
record-constructor does not work reliably, because the array of fields
returned by getDeclaredFields() may be in a different order than
the order created by make-record-type.

I think the solution is that we need to have make-record-type create
a static array or a string containing the actual field names.  This can
be accessed using reflection by record-type-field-names and record-constructor.

> My problem arose when I tried to use an rb-tree implementation in the
> SLib; I would like to preserve the original source as much as possible.

I agree that is desirable.  My main comment is was about freshly
written code.

When it concerns Slib, my preferred approach is to import useful SLib
modules into gnu.kawa.slib.  This means we can tweak the code so it
works betters with Kawa.  What I do is I first check in to cvs the
original unmodified version, and then I check in my kawa-modified
version.  That gives us a cvs record of the changes we made.  So
if you're using Slib rb-tree implementation, perhaps we should
add it to gnu.kawa.slib.  Which Slib module is that?
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]