At 6:04 PM +0200 4/19/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 5:35 PM +0200 4/16/04, Leopold Toetsch wrote:
This vtable currently copies the string.

 Yeah, and we've the same issue with set_pmc -- some of the versions
 make a copy and some just use the passed in PMC. (the
 get_[string|pmc] vtable methods have a similar issue--should they
 return the real thing or a copy?)

assign Px, Sy $1->vtable->assign_string_native # copy string set Px, Sy $1->vtable->set_string_native # refer to string

 assign Px, Py   $1->vtable->assign_pmc
 set    Px, Py   $1->vtable->set_pmc

I'm not sure if we need the two different get vtable methods though. At
least there isn't any usage for these ;)

Well, think of aggregates (where it's most likely to be used) where you'd want to either get a copy of an element (because you don't want to modify what was in the aggregate) or the actual element itself (because you do, and don't want to re-store the value in the aggregate. That's where I can see this being really useful.
--
Dan


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

Reply via email to