summaryrefslogtreecommitdiff
path: root/mg_raw.h
Commit message (Collapse)AuthorAgeFilesLines
* Split out study magic from pos magic.Nicholas Clark2011-07-011-1/+3
| | | | | | study uses magic to call SvSCREAM_off() if the scalar is modified. Allocate it its own magic type ('G' for now - pos magic is 'g'). Share the same "set" routine and vtable as regexp/bm/fm (setregxp and vtbl_regexp).
* [perl #92906] perl -d has non-functional b commandFather Chrysostomos2011-06-151-2/+2
| | | | | | | | | This fixes a regression introduced after 5.14.0. Commit 6f83ef0e5a4 got dbfile and dbline magic mixed up and ended up apply set-magic to the hash (dbfile), not to the element (dbline). The result was that debugger breakpoints simply did not work at all.
* Sort magic and magic vtable names in files generated by mg_vtable.plNicholas Clark2011-06-111-18/+18
| | | | | Magic is sorted case insensitively, with upper case before lower case. vtable names are all lowercase letters.
* In PL_magic_data flag whether magic can be added to a readonly value.Nicholas Clark2011-06-111-5/+5
| | | | | | | | | | | | | | | Use this to simplify the logic in Perl_sv_magic(). This introduces a small change of behaviour for error cases involving unknown magic types. Previously, if Perl_sv_magic() was passed a magic type unknown to it, it would 1: Croak "Modification of a read-only value attempted" if read only 2: Return without error if the SV happened to already have this magic 3: otherwise croak "Don't know how to handle magic of type \\%o" Now it will always croak "Don't know how to handle magic of type \\%o", even on read only values, or SVs which already have the unknown magic type.
* Store a flag for container/value magic in PL_magic_data.Nicholas Clark2011-06-111-20/+20
| | | | Use this to replace S_is_container_magic() in mg.c with a direct lookup.
* Create a lookup table for magic vtables from magic type, PL_magic_data.Nicholas Clark2011-06-111-0/+90
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