summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-15 13:54:19 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 10:39:59 +0200
commite0a73de458fc6a8b96ea80ab0485ce7bdabb4c8b (patch)
tree975adf1ca5ede1fafbda518f0c25887da53a7775 /perl.h
parent6f83ef0e5a45c465f83de3304c5818ba44492250 (diff)
downloadperl-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 6b688b6ff6..def6d1d96b 100644
--- a/perl.h
+++ b/perl.h
@@ -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