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 /perl.h | |
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 'perl.h')
-rw-r--r-- | perl.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5071,6 +5071,11 @@ START_EXTERN_C # define EXT_MGVTBL EXT MGVTBL #endif +#define PERL_MAGIC_VALUE_MAGIC 0x80 +#define PERL_MAGIC_VTABLE_MASK 0x3F +#define PERL_MAGIC_TYPE_IS_VALUE_MAGIC(t) \ + (PL_magic_data[(U8)(t)] & PERL_MAGIC_VALUE_MAGIC) + #include "mg_vtable.h" #ifdef DOINIT |