> From: Petter Reinholdtsen [mailto:[EMAIL PROTECTED]]
>
>
> [John Keiser]
> > What reasons can you see to add this sort of extra check? The only
> > one I can see is to avoid allowing Joe Schmoe's code to set Class,
> > Thread, and reflect.* native state (or, more generally, to avoid
> > having two different distributions try to modify the same native
> > state pointer). I think people should just write in the docs what
> > native state pointers they're using, and that should warn others not
> > to set those pointers.
>
> I was not thinking about any extra code, just a textfile to note which
> pointers is used to store native state, to avoid using the same
> pointer type for different thinks.
>
> Almost like Linux magic number registration.
I see. Basically a "voluntary lock" on the native state pointer.
I was thinking of a similar scheme, but for the purpose of saving memory ...
a registry that tells Japhar which classes are going to *use* the native
state pointers and which aren't so that Japhar can just not bother to
allocate that native state memory for every object. Could add up to a heap
of savings, methinks.
--John