From 6f83ef0e5a45c465f83de3304c5818ba44492250 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 15 May 2011 13:21:09 +0100 Subject: Create a lookup table for magic vtables from magic type, PL_magic_data. Use it to eliminate the large switch statement in Perl_sv_magic(). As the table needs to be keyed on magic type, which is expressed as C character constants, the order depends on the compiler's character set. Frustratingly, EBCDIC variants don't agree on the code points for '~' and ']', which we use here. Instead of having (at least) 4 tables, get the local runtime to sort the table for us. Hence the regen script writes out the (unsorted) mg_raw.h, which generate_uudmap sorts to generate mg_data.h --- globvar.sym | 1 + 1 file changed, 1 insertion(+) (limited to 'globvar.sym') diff --git a/globvar.sym b/globvar.sym index 49c2abf9a7..9bec86189b 100644 --- a/globvar.sym +++ b/globvar.sym @@ -13,6 +13,7 @@ fold_latin1 fold_locale freq keyword_plugin +magic_data magic_vtables magic_vtable_names memory_wrap -- cgit v1.2.1