Tim Bunce wrote:
Umm,
        post_clone_reconstruct()

sounds pretty intuitive to me. Thanks Tim.


But rather than use plain SvIV's in the application why not use
SV's with '~' magic where the mg_ptr (if memory serves) is a pointer
to an SV.  Perl knows it's a pointer to an SV so when the interpreter
is cloned the clone gets it's own copy of the pointed-to SV as well.

Or am I missing something?

what difference does it make? Perl still doesn't know how to create a new C struct. Magic or IV they just contain a pointer to a C struct. If Magical SVs had a special optional CLONE method that'd be a whole lot different.


In any case SvIV is probably faster than '~' magic, if you have to go back and force between perl and C all the time, it also saves an SV per object. And at the end you still need to stash that pointer somewhere...

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to