At 2:32 PM -0500 12/31/02, David Robins wrote:
On Tue, 31 Dec 2002, Dan Sugalski wrote:

At 1:29 PM -0500 12/31/02, David Robins wrote:
>Maybe I missed it in the original thread, but what was the resolution on how
>to create and return a new PMC in PMC ops that take a "PMC* dest" param?

If the op defines the destination as getting a brand-new PMC, then
just stuff the pointer to it in the destination and let the GC pick
up the original if necessary.
I don't think any ops do that presently (that would take a PMC** param).
Oh, sure, lots do. Remember the ops get a pointer to the PMC register, which is itself a pointer. Whatever you stuff in there is what the register is set to.

PMC vtable functions, on the other hand, are given a destination to assign into,and they have to respect the assignment function of the destination. There's no real choice there, by design. (Still open for debate)

 > If the op defines that it will assign a value in the destination,
 then call the set_value vtable method and let the destination PMC
 deal with the incoming value as it needs to.
How do I set the dest to false (remembering that in Ruby, 0 is not false)?
Get a new RubyFalse PMC and stuff it in. If we don't have any good utility functions to get new PMCs by class name or class number then we need to fix that.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk

Reply via email to