On Fri, 15 Aug 2003 19:17:14 +0900
ts <decoux / moulon.inra.fr> wrote:

> >>>>> "n" == nobu nokada <nobu.nokada / softhome.net> writes:
> 
> n> BUILTIN_TYPE 63 is T_NODE, which must not appear in Ruby.  Try
> n> with changing the patched line as following.
> 
>  I find this strange and I see only 2 possibilities :
>     * he make something strange in his module
>     * he has a bug
> 
>  Can I see the complete source of his module ?

The only modules I'm using (in addition to anything builtin) are MySQL
and StrongTyping, neither of which deal with T_NODE afaik.

This isn't so strange.  If T_NODE are kept in the same pool as
everything else, then it's entirely possible to get one by accident,
given IDs are basically pointers.  I have checks in place to validate
objects (make sure the one I get back from the weakref is the original I
was looking for), it's just T_NODE and the other internal ones don't
work right from ruby (I'm guessing they're not "real" ruby objects).

Anyway, the original caching code I posted is nearly identical to what's
going on.  I just have enough code and data passing through the system
that eventually I get a T_NODE reference, I guess.

(Actually the cache code I posted has a minor bug, in that it doesn't
validate the object it gets back, you just need to add

    return nil unless o._oid == oid

right after the _id2ref line.)


-- 
Ryan Pavlik <rpav / users.sf.net>

"Oh for the love of evil, not this again." - 8BT