This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Generate the enum for want_vtbl_* with regen/mg_vtable.pl
[perl5.git] / mg_vtable.h
CommitLineData
8b09643d
NC
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
ca298f7d
NC
9enum { /* pass one of these to get_vtbl */
10 want_vtbl_sv,
11 want_vtbl_env,
12 want_vtbl_envelem,
13 want_vtbl_sigelem,
14 want_vtbl_pack,
15 want_vtbl_packelem,
16 want_vtbl_dbline,
17 want_vtbl_isa,
18 want_vtbl_isaelem,
19 want_vtbl_arylen,
20 want_vtbl_arylen_p,
21 want_vtbl_mglob,
22 want_vtbl_nkeys,
23 want_vtbl_taint,
24 want_vtbl_substr,
25 want_vtbl_vec,
26 want_vtbl_pos,
27 want_vtbl_bm,
28 want_vtbl_fm,
29 want_vtbl_uvar,
30 want_vtbl_defelem,
31 want_vtbl_regexp,
32 want_vtbl_regdata,
33 want_vtbl_regdatum,
34 want_vtbl_amagic,
35 want_vtbl_amagicelem,
36 want_vtbl_backref,
37 want_vtbl_ovrld,
38 want_vtbl_utf8,
39 want_vtbl_collxfrm,
40 want_vtbl_hintselem,
41 want_vtbl_hints
42};
43
8b09643d
NC
44/* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
45 * pointer to data, whereas we're assigning pointers to functions, which are
46 * not the same beast. ANSI doesn't allow the assignment from one to the other.
47 * (although most, but not all, compilers are prepared to do it)
48 */
49
0ffb5b03 50/* order is:
8b09643d
NC
51 get
52 set
53 len
54 clear
55 free
56 copy
57 dup
58 local
59*/
60
0ffb5b03
NC
61#ifdef DOINIT
62EXT_MGVTBL PL_vtbl_sv
63 = { Perl_magic_get, Perl_magic_set, Perl_magic_len, 0, 0, 0, 0, 0 };
64#else
65EXT_MGVTBL PL_vtbl_sv;
66#endif
67
68#ifdef DOINIT
69EXT_MGVTBL PL_vtbl_env
70 = { 0, Perl_magic_set_all_env, 0, Perl_magic_clear_all_env, 0, 0, 0, 0 };
71#else
72EXT_MGVTBL PL_vtbl_env;
73#endif
74
75#ifdef DOINIT
76EXT_MGVTBL PL_vtbl_envelem
77 = { 0, Perl_magic_setenv, 0, Perl_magic_clearenv, 0, 0, 0, 0 };
78#else
79EXT_MGVTBL PL_vtbl_envelem;
80#endif
8b09643d
NC
81
82#ifndef PERL_MICRO
0ffb5b03
NC
83#ifdef DOINIT
84EXT_MGVTBL PL_vtbl_sigelem
85 = { Perl_magic_getsig, Perl_magic_setsig, 0, Perl_magic_clearsig, 0, 0, 0, 0 };
86#else
87EXT_MGVTBL PL_vtbl_sigelem;
88#endif
89#endif
90
91#ifdef DOINIT
92EXT_MGVTBL PL_vtbl_pack
93 = { 0, 0, Perl_magic_sizepack, Perl_magic_wipepack, 0, 0, 0, 0 };
94#else
95EXT_MGVTBL PL_vtbl_pack;
96#endif
97
98#ifdef DOINIT
99EXT_MGVTBL PL_vtbl_packelem
100 = { Perl_magic_getpack, Perl_magic_setpack, 0, Perl_magic_clearpack, 0, 0, 0, 0 };
101#else
102EXT_MGVTBL PL_vtbl_packelem;
103#endif
104
105#ifdef DOINIT
106EXT_MGVTBL PL_vtbl_dbline
107 = { 0, Perl_magic_setdbline, 0, 0, 0, 0, 0, 0 };
108#else
109EXT_MGVTBL PL_vtbl_dbline;
110#endif
111
112#ifdef DOINIT
113EXT_MGVTBL PL_vtbl_isa
114 = { 0, Perl_magic_setisa, 0, Perl_magic_clearisa, 0, 0, 0, 0 };
115#else
116EXT_MGVTBL PL_vtbl_isa;
117#endif
118
119#ifdef DOINIT
120EXT_MGVTBL PL_vtbl_isaelem
121 = { 0, Perl_magic_setisa, 0, 0, 0, 0, 0, 0 };
122#else
123EXT_MGVTBL PL_vtbl_isaelem;
124#endif
125
126#ifdef DOINIT
127EXT_MGVTBL PL_vtbl_arylen
128 = { (int (*)(pTHX_ SV *, MAGIC *))Perl_magic_getarylen, Perl_magic_setarylen, 0, 0, 0, 0, 0, 0 };
129#else
130EXT_MGVTBL PL_vtbl_arylen;
131#endif
132
133#ifdef DOINIT
134EXT_MGVTBL PL_vtbl_arylen_p
135 = { 0, 0, 0, 0, Perl_magic_freearylen_p, 0, 0, 0 };
136#else
137EXT_MGVTBL PL_vtbl_arylen_p;
138#endif
139
140#ifdef DOINIT
141EXT_MGVTBL PL_vtbl_mglob
142 = { 0, Perl_magic_setmglob, 0, 0, 0, 0, 0, 0 };
143#else
144EXT_MGVTBL PL_vtbl_mglob;
145#endif
146
147#ifdef DOINIT
148EXT_MGVTBL PL_vtbl_nkeys
149 = { Perl_magic_getnkeys, Perl_magic_setnkeys, 0, 0, 0, 0, 0, 0 };
150#else
151EXT_MGVTBL PL_vtbl_nkeys;
152#endif
153
154#ifdef DOINIT
155EXT_MGVTBL PL_vtbl_taint
156 = { Perl_magic_gettaint, Perl_magic_settaint, 0, 0, 0, 0, 0, 0 };
157#else
158EXT_MGVTBL PL_vtbl_taint;
159#endif
160
161#ifdef DOINIT
162EXT_MGVTBL PL_vtbl_substr
163 = { Perl_magic_getsubstr, Perl_magic_setsubstr, 0, 0, 0, 0, 0, 0 };
164#else
165EXT_MGVTBL PL_vtbl_substr;
166#endif
167
168#ifdef DOINIT
169EXT_MGVTBL PL_vtbl_vec
170 = { Perl_magic_getvec, Perl_magic_setvec, 0, 0, 0, 0, 0, 0 };
171#else
172EXT_MGVTBL PL_vtbl_vec;
173#endif
174
175#ifdef DOINIT
176EXT_MGVTBL PL_vtbl_pos
177 = { Perl_magic_getpos, Perl_magic_setpos, 0, 0, 0, 0, 0, 0 };
178#else
179EXT_MGVTBL PL_vtbl_pos;
180#endif
181
182#ifdef DOINIT
183EXT_MGVTBL PL_vtbl_bm
184 = { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 };
185#else
186EXT_MGVTBL PL_vtbl_bm;
187#endif
188
189#ifdef DOINIT
190EXT_MGVTBL PL_vtbl_fm
191 = { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 };
192#else
193EXT_MGVTBL PL_vtbl_fm;
194#endif
195
196#ifdef DOINIT
197EXT_MGVTBL PL_vtbl_uvar
198 = { Perl_magic_getuvar, Perl_magic_setuvar, 0, 0, 0, 0, 0, 0 };
199#else
200EXT_MGVTBL PL_vtbl_uvar;
201#endif
202
203#ifdef DOINIT
204EXT_MGVTBL PL_vtbl_defelem
205 = { Perl_magic_getdefelem, Perl_magic_setdefelem, 0, 0, 0, 0, 0, 0 };
206#else
207EXT_MGVTBL PL_vtbl_defelem;
208#endif
209
210#ifdef DOINIT
211EXT_MGVTBL PL_vtbl_regexp
212 = { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 };
213#else
214EXT_MGVTBL PL_vtbl_regexp;
215#endif
216
217#ifdef DOINIT
218EXT_MGVTBL PL_vtbl_regdata
219 = { 0, 0, Perl_magic_regdata_cnt, 0, 0, 0, 0, 0 };
220#else
221EXT_MGVTBL PL_vtbl_regdata;
222#endif
223
224#ifdef DOINIT
225EXT_MGVTBL PL_vtbl_regdatum
226 = { Perl_magic_regdatum_get, Perl_magic_regdatum_set, 0, 0, 0, 0, 0, 0 };
227#else
228EXT_MGVTBL PL_vtbl_regdatum;
229#endif
230
231#ifdef DOINIT
232EXT_MGVTBL PL_vtbl_amagic
233 = { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 };
234#else
235EXT_MGVTBL PL_vtbl_amagic;
236#endif
237
238#ifdef DOINIT
239EXT_MGVTBL PL_vtbl_amagicelem
240 = { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 };
241#else
242EXT_MGVTBL PL_vtbl_amagicelem;
243#endif
244
245#ifdef DOINIT
246EXT_MGVTBL PL_vtbl_backref
247 = { 0, 0, 0, 0, Perl_magic_killbackrefs, 0, 0, 0 };
248#else
249EXT_MGVTBL PL_vtbl_backref;
250#endif
251
252#ifdef DOINIT
253EXT_MGVTBL PL_vtbl_ovrld
254 = { 0, 0, 0, 0, Perl_magic_freeovrld, 0, 0, 0 };
255#else
256EXT_MGVTBL PL_vtbl_ovrld;
257#endif
258
259#ifdef DOINIT
260EXT_MGVTBL PL_vtbl_utf8
261 = { 0, Perl_magic_setutf8, 0, 0, 0, 0, 0, 0 };
262#else
263EXT_MGVTBL PL_vtbl_utf8;
264#endif
8b09643d
NC
265
266#ifdef USE_LOCALE_COLLATE
0ffb5b03
NC
267#ifdef DOINIT
268EXT_MGVTBL PL_vtbl_collxfrm
269 = { 0, Perl_magic_setcollxfrm, 0, 0, 0, 0, 0, 0 };
270#else
271EXT_MGVTBL PL_vtbl_collxfrm;
272#endif
273#endif
274
275#ifdef DOINIT
276EXT_MGVTBL PL_vtbl_hintselem
277 = { 0, Perl_magic_sethint, 0, Perl_magic_clearhint, 0, 0, 0, 0 };
278#else
279EXT_MGVTBL PL_vtbl_hintselem;
280#endif
281
282#ifdef DOINIT
283EXT_MGVTBL PL_vtbl_hints
284 = { 0, 0, 0, Perl_magic_clearhints, 0, 0, 0, 0 };
285#else
286EXT_MGVTBL PL_vtbl_hints;
287#endif
8b09643d
NC
288
289
290/* ex: set ro: */