This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add Perl_magic_methcall
authorDavid Mitchell <davem@iabyn.com>
Sat, 24 Apr 2010 23:56:32 +0000 (00:56 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 24 Apr 2010 23:56:32 +0000 (00:56 +0100)
commitefaf36747029c85b4d8825318cb4d485a0bb350e
tree661fdb2a9c147bd9de3544d4e322e00e59d0b292
parentbc354c7012685d70ce64e7f10221b03ea279af01
add Perl_magic_methcall

Add a new function that wraps the setup needed to call a magic method like
FETCH (the existing S_magic_methcall function has been renamed
S_magic_methcall1).

There is one functional change, done mainly to allow for a single clean
wrapper function, and that is that the method calls are no longer wrapped
with SAVETMPS/FREETMPS. Previously only about half of them had this, so
some relied on the caller to free, some didn't. At least we're consistent
now. Doing it this way is necessary because otherwise magic_methcall()
can't return an SV (eg for POP) because it'll be a temp and get freed by
FREETMPS before it gets returned. So you'd have to copy everything, which
would slow things down.
av.c
embed.fnc
embed.h
mg.c
proto.h