summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-12-30 16:29:12 +0000
committerDavid Mitchell <davem@iabyn.com>2010-12-31 12:01:48 +0000
commit31d632c315ee363ec7894471fe0f73dc96f5c042 (patch)
treedbfeaf1f0c28237ece34455e1c08645b62f2e1cc /pp.c
parentada6eeb82df60fbe63c781f1a102393fd56d104b (diff)
downloadperl-31d632c315ee363ec7894471fe0f73dc96f5c042.tar.gz
standardise amagic method naming
Some amagic-related macros take the full method enumeration name, (e.g. "add_amg"); while others "helpfully" allow you to pass a shortened version, ("add"), and do a CAT2(meth,_amg) behind the scenes. Standardise on passing the full name; this makes it less confusing and allows you to grep for the enumeration name in the source. It updates two macros to accept full enumeration names: tryAMAGICunTARGET (which isn't used outside the core apparently), and AMG_CALLun, which is replaced by a new AMG_CALLunary (since AMG_CALLun is used outside the core).
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 0713ec6786..1f4ef25e2a 100644
--- a/pp.c
+++ b/pp.c
@@ -4835,8 +4835,8 @@ PP(pp_rkeys)
SvGETMAGIC(sv);
if (SvAMAGIC(sv)) {
/* N.B.: AMG macros return sv if no overloading is found */
- SV *maybe_hv = AMG_CALLun(sv,to_hv);
- SV *maybe_av = AMG_CALLun(sv,to_av);
+ SV *maybe_hv = AMG_CALLunary(sv, to_hv_amg);
+ SV *maybe_av = AMG_CALLunary(sv, to_av_amg);
if ( maybe_hv != sv && maybe_av != sv ) {
Perl_ck_warner(aTHX_ packWARN(WARN_AMBIGUOUS), "%s",
Perl_form(aTHX_ "Ambiguous overloaded argument to %s resolved as %%{}",