diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-05-15 13:54:19 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-11 10:39:59 +0200 |
commit | e0a73de458fc6a8b96ea80ab0485ce7bdabb4c8b (patch) | |
tree | 975adf1ca5ede1fafbda518f0c25887da53a7775 /sv.c | |
parent | 6f83ef0e5a45c465f83de3304c5818ba44492250 (diff) | |
download | perl-e0a73de458fc6a8b96ea80ab0485ce7bdabb4c8b.tar.gz |
Store a flag for container/value magic in PL_magic_data.
Use this to replace S_is_container_magic() in mg.c with a direct lookup.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5281,7 +5281,8 @@ Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how, } if (how < 0 || how > C_ARRAY_LENGTH(PL_magic_data) - || (vtable_index = PL_magic_data[how]) > magic_vtable_max) + || ((vtable_index = PL_magic_data[how] & PERL_MAGIC_VTABLE_MASK) + > magic_vtable_max)) Perl_croak(aTHX_ "Don't know how to handle magic of type \\%o", how); /* PERL_MAGIC_ext is reserved for use by extensions not perl internals. |