This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove full stop in the 'try' feature heading
[perl5.git] / mg_vtable.h
1 /* -*- buffer-read-only: t -*-
2  *
3  *    mg_vtable.h
4  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
5  * This file is built by regen/mg_vtable.pl.
6  * Any changes made here will be lost!
7  */
8
9 /* These constants should be used in preference to raw characters
10  * when using magic. Note that some perl guts still assume
11  * certain character properties of these constants, namely that
12  * isUPPER() and toLOWER() may do useful mappings.
13  */
14
15 #define PERL_MAGIC_sv             '\0' /* Special scalar variable */
16 #define PERL_MAGIC_arylen         '#' /* Array length ($#ary) */
17 #define PERL_MAGIC_rhash          '%' /* Extra data for restricted hashes */
18 #define PERL_MAGIC_debugvar       '*' /* $DB::single, signal, trace vars */
19 #define PERL_MAGIC_pos            '.' /* pos() lvalue */
20 #define PERL_MAGIC_symtab         ':' /* Extra data for symbol tables */
21 #define PERL_MAGIC_backref        '<' /* For weak ref data */
22 #define PERL_MAGIC_arylen_p       '@' /* To move arylen out of XPVAV */
23 #define PERL_MAGIC_bm             'B' /* Boyer-Moore (fast string search) */
24 #define PERL_MAGIC_overload_table 'c' /* Holds overload table (AMT) on stash */
25 #define PERL_MAGIC_regdata        'D' /* Regex match position data
26                                          (@+ and @- vars) */
27 #define PERL_MAGIC_regdatum       'd' /* Regex match position data element */
28 #define PERL_MAGIC_env            'E' /* %ENV hash */
29 #define PERL_MAGIC_envelem        'e' /* %ENV hash element */
30 #define PERL_MAGIC_fm             'f' /* Formline ('compiled' format) */
31 #define PERL_MAGIC_regex_global   'g' /* m//g target */
32 #define PERL_MAGIC_hints          'H' /* %^H hash */
33 #define PERL_MAGIC_hintselem      'h' /* %^H hash element */
34 #define PERL_MAGIC_isa            'I' /* @ISA array */
35 #define PERL_MAGIC_isaelem        'i' /* @ISA array element */
36 #define PERL_MAGIC_nkeys          'k' /* scalar(keys()) lvalue */
37 #define PERL_MAGIC_dbfile         'L' /* Debugger %_<filename */
38 #define PERL_MAGIC_dbline         'l' /* Debugger %_<filename element */
39 #define PERL_MAGIC_shared         'N' /* Shared between threads */
40 #define PERL_MAGIC_shared_scalar  'n' /* Shared between threads */
41 #define PERL_MAGIC_collxfrm       'o' /* Locale transformation */
42 #define PERL_MAGIC_tied           'P' /* Tied array or hash */
43 #define PERL_MAGIC_tiedelem       'p' /* Tied array or hash element */
44 #define PERL_MAGIC_tiedscalar     'q' /* Tied scalar or handle */
45 #define PERL_MAGIC_qr             'r' /* Precompiled qr// regex */
46 #define PERL_MAGIC_sig            'S' /* %SIG hash */
47 #define PERL_MAGIC_sigelem        's' /* %SIG hash element */
48 #define PERL_MAGIC_taint          't' /* Taintedness */
49 #define PERL_MAGIC_uvar           'U' /* Available for use by extensions */
50 #define PERL_MAGIC_uvar_elem      'u' /* Reserved for use by extensions */
51 #define PERL_MAGIC_vstring        'V' /* SV was vstring literal */
52 #define PERL_MAGIC_vec            'v' /* vec() lvalue */
53 #define PERL_MAGIC_utf8           'w' /* Cached UTF-8 information */
54 #define PERL_MAGIC_substr         'x' /* substr() lvalue */
55 #define PERL_MAGIC_nonelem        'Y' /* Array element that does not exist */
56 #define PERL_MAGIC_defelem        'y' /* Shadow "foreach" iterator variable /
57                                          smart parameter vivification */
58 #define PERL_MAGIC_lvref          '\\' /* Lvalue reference constructor */
59 #define PERL_MAGIC_checkcall      ']' /* Inlining/mutation of call to this CV */
60 #define PERL_MAGIC_extvalue       '^' /* Value magic available for use by extensions */
61 #define PERL_MAGIC_ext            '~' /* Variable magic available for use by extensions */
62
63 enum {          /* pass one of these to get_vtbl */
64     want_vtbl_arylen,
65     want_vtbl_arylen_p,
66     want_vtbl_backref,
67     want_vtbl_checkcall,
68     want_vtbl_collxfrm,
69     want_vtbl_dbline,
70     want_vtbl_debugvar,
71     want_vtbl_defelem,
72     want_vtbl_env,
73     want_vtbl_envelem,
74     want_vtbl_hints,
75     want_vtbl_hintselem,
76     want_vtbl_isa,
77     want_vtbl_isaelem,
78     want_vtbl_lvref,
79     want_vtbl_mglob,
80     want_vtbl_nkeys,
81     want_vtbl_nonelem,
82     want_vtbl_ovrld,
83     want_vtbl_pack,
84     want_vtbl_packelem,
85     want_vtbl_pos,
86     want_vtbl_regdata,
87     want_vtbl_regdatum,
88     want_vtbl_regexp,
89     want_vtbl_sig,
90     want_vtbl_sigelem,
91     want_vtbl_substr,
92     want_vtbl_sv,
93     want_vtbl_taint,
94     want_vtbl_utf8,
95     want_vtbl_uvar,
96     want_vtbl_vec,
97     magic_vtable_max
98 };
99
100 #ifdef DOINIT
101 EXTCONST char * const PL_magic_vtable_names[magic_vtable_max] = {
102     "arylen",
103     "arylen_p",
104     "backref",
105     "checkcall",
106     "collxfrm",
107     "dbline",
108     "debugvar",
109     "defelem",
110     "env",
111     "envelem",
112     "hints",
113     "hintselem",
114     "isa",
115     "isaelem",
116     "lvref",
117     "mglob",
118     "nkeys",
119     "nonelem",
120     "ovrld",
121     "pack",
122     "packelem",
123     "pos",
124     "regdata",
125     "regdatum",
126     "regexp",
127     "sig",
128     "sigelem",
129     "substr",
130     "sv",
131     "taint",
132     "utf8",
133     "uvar",
134     "vec"
135 };
136 #else
137 EXTCONST char * const PL_magic_vtable_names[magic_vtable_max];
138 #endif
139
140 /* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
141  * pointer to data, whereas we're assigning pointers to functions, which are
142  * not the same beast. ANSI doesn't allow the assignment from one to the other.
143  * (although most, but not all, compilers are prepared to do it)
144  */
145
146 /* order is:
147     get
148     set
149     len
150     clear
151     free
152     copy
153     dup
154     local
155 */
156
157 #ifdef DOINIT
158 EXT_MGVTBL PL_magic_vtables[magic_vtable_max] = {
159   { (int (*)(pTHX_ SV *, MAGIC *))Perl_magic_getarylen, Perl_magic_setarylen, 0, 0, 0, 0, 0, 0 },
160   { 0, 0, 0, Perl_magic_cleararylen_p, Perl_magic_freearylen_p, 0, 0, 0 },
161   { 0, 0, 0, 0, Perl_magic_killbackrefs, 0, 0, 0 },
162   { 0, 0, 0, 0, 0, Perl_magic_copycallchecker, 0, 0 },
163 #ifdef USE_LOCALE_COLLATE
164   { 0, Perl_magic_setcollxfrm, 0, 0, Perl_magic_freecollxfrm, 0, 0, 0 },
165 #else
166   { 0, 0, 0, 0, 0, 0, 0, 0 },
167 #endif
168   { 0, Perl_magic_setdbline, 0, 0, 0, 0, 0, 0 },
169   { Perl_magic_getdebugvar, Perl_magic_setdebugvar, 0, 0, 0, 0, 0, 0 },
170   { Perl_magic_getdefelem, Perl_magic_setdefelem, 0, 0, 0, 0, 0, 0 },
171   { 0, Perl_magic_set_all_env, 0, Perl_magic_clear_all_env, 0, 0, 0, 0 },
172   { 0, Perl_magic_setenv, 0, Perl_magic_clearenv, 0, 0, 0, 0 },
173   { 0, 0, 0, Perl_magic_clearhints, 0, 0, 0, 0 },
174   { 0, Perl_magic_sethint, 0, Perl_magic_clearhint, 0, 0, 0, 0 },
175   { 0, Perl_magic_setisa, 0, Perl_magic_clearisa, 0, 0, 0, 0 },
176   { 0, Perl_magic_setisa, 0, 0, 0, 0, 0, 0 },
177   { 0, Perl_magic_setlvref, 0, 0, 0, 0, 0, 0 },
178   { 0, Perl_magic_setmglob, 0, 0, Perl_magic_freemglob, 0, 0, 0 },
179   { Perl_magic_getnkeys, Perl_magic_setnkeys, 0, 0, 0, 0, 0, 0 },
180   { 0, Perl_magic_setnonelem, 0, 0, 0, 0, 0, 0 },
181   { 0, 0, 0, 0, Perl_magic_freeovrld, 0, 0, 0 },
182   { 0, 0, Perl_magic_sizepack, Perl_magic_wipepack, 0, 0, 0, 0 },
183   { Perl_magic_getpack, Perl_magic_setpack, 0, Perl_magic_clearpack, 0, 0, 0, 0 },
184   { Perl_magic_getpos, Perl_magic_setpos, 0, 0, 0, 0, 0, 0 },
185   { 0, 0, Perl_magic_regdata_cnt, 0, 0, 0, 0, 0 },
186   { Perl_magic_regdatum_get, Perl_magic_regdatum_set, 0, 0, 0, 0, 0, 0 },
187   { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 },
188   { 0, Perl_magic_setsigall, 0, 0, 0, 0, 0, 0 },
189 #ifndef PERL_MICRO
190   { Perl_magic_getsig, Perl_magic_setsig, 0, Perl_magic_clearsig, 0, 0, 0, 0 },
191 #else
192   { 0, 0, 0, 0, 0, 0, 0, 0 },
193 #endif
194   { Perl_magic_getsubstr, Perl_magic_setsubstr, 0, 0, 0, 0, 0, 0 },
195   { Perl_magic_get, Perl_magic_set, 0, 0, 0, 0, 0, 0 },
196   { Perl_magic_gettaint, Perl_magic_settaint, 0, 0, 0, 0, 0, 0 },
197   { 0, Perl_magic_setutf8, 0, 0, Perl_magic_freeutf8, 0, 0, 0 },
198   { Perl_magic_getuvar, Perl_magic_setuvar, 0, 0, 0, 0, 0, 0 },
199   { Perl_magic_getvec, Perl_magic_setvec, 0, 0, 0, 0, 0, 0 }
200 };
201 #else
202 EXT_MGVTBL PL_magic_vtables[magic_vtable_max];
203 #endif
204
205 #define want_vtbl_bm want_vtbl_regexp
206 #define want_vtbl_fm want_vtbl_regexp
207
208 #define PL_vtbl_arylen PL_magic_vtables[want_vtbl_arylen]
209 #define PL_vtbl_arylen_p PL_magic_vtables[want_vtbl_arylen_p]
210 #define PL_vtbl_backref PL_magic_vtables[want_vtbl_backref]
211 #define PL_vtbl_bm PL_magic_vtables[want_vtbl_bm]
212 #define PL_vtbl_checkcall PL_magic_vtables[want_vtbl_checkcall]
213 #define PL_vtbl_collxfrm PL_magic_vtables[want_vtbl_collxfrm]
214 #define PL_vtbl_dbline PL_magic_vtables[want_vtbl_dbline]
215 #define PL_vtbl_debugvar PL_magic_vtables[want_vtbl_debugvar]
216 #define PL_vtbl_defelem PL_magic_vtables[want_vtbl_defelem]
217 #define PL_vtbl_env PL_magic_vtables[want_vtbl_env]
218 #define PL_vtbl_envelem PL_magic_vtables[want_vtbl_envelem]
219 #define PL_vtbl_fm PL_magic_vtables[want_vtbl_fm]
220 #define PL_vtbl_hints PL_magic_vtables[want_vtbl_hints]
221 #define PL_vtbl_hintselem PL_magic_vtables[want_vtbl_hintselem]
222 #define PL_vtbl_isa PL_magic_vtables[want_vtbl_isa]
223 #define PL_vtbl_isaelem PL_magic_vtables[want_vtbl_isaelem]
224 #define PL_vtbl_lvref PL_magic_vtables[want_vtbl_lvref]
225 #define PL_vtbl_mglob PL_magic_vtables[want_vtbl_mglob]
226 #define PL_vtbl_nkeys PL_magic_vtables[want_vtbl_nkeys]
227 #define PL_vtbl_nonelem PL_magic_vtables[want_vtbl_nonelem]
228 #define PL_vtbl_ovrld PL_magic_vtables[want_vtbl_ovrld]
229 #define PL_vtbl_pack PL_magic_vtables[want_vtbl_pack]
230 #define PL_vtbl_packelem PL_magic_vtables[want_vtbl_packelem]
231 #define PL_vtbl_pos PL_magic_vtables[want_vtbl_pos]
232 #define PL_vtbl_regdata PL_magic_vtables[want_vtbl_regdata]
233 #define PL_vtbl_regdatum PL_magic_vtables[want_vtbl_regdatum]
234 #define PL_vtbl_regexp PL_magic_vtables[want_vtbl_regexp]
235 #define PL_vtbl_sig PL_magic_vtables[want_vtbl_sig]
236 #define PL_vtbl_sigelem PL_magic_vtables[want_vtbl_sigelem]
237 #define PL_vtbl_substr PL_magic_vtables[want_vtbl_substr]
238 #define PL_vtbl_sv PL_magic_vtables[want_vtbl_sv]
239 #define PL_vtbl_taint PL_magic_vtables[want_vtbl_taint]
240 #define PL_vtbl_utf8 PL_magic_vtables[want_vtbl_utf8]
241 #define PL_vtbl_uvar PL_magic_vtables[want_vtbl_uvar]
242 #define PL_vtbl_vec PL_magic_vtables[want_vtbl_vec]
243
244 /* ex: set ro: */