This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace references to PL_vtbl_{bm,fm} in the code with PL_vtbl_regexp.
[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,
ca298f7d
NC
27 want_vtbl_uvar,
28 want_vtbl_defelem,
29 want_vtbl_regexp,
30 want_vtbl_regdata,
31 want_vtbl_regdatum,
32 want_vtbl_amagic,
33 want_vtbl_amagicelem,
34 want_vtbl_backref,
35 want_vtbl_ovrld,
36 want_vtbl_utf8,
37 want_vtbl_collxfrm,
38 want_vtbl_hintselem,
c7fdacb9
NC
39 want_vtbl_hints,
40 magic_vtable_max
ca298f7d
NC
41};
42
8b09643d
NC
43/* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
44 * pointer to data, whereas we're assigning pointers to functions, which are
45 * not the same beast. ANSI doesn't allow the assignment from one to the other.
46 * (although most, but not all, compilers are prepared to do it)
47 */
48
0ffb5b03 49/* order is:
8b09643d
NC
50 get
51 set
52 len
53 clear
54 free
55 copy
56 dup
57 local
58*/
59
0ffb5b03 60#ifdef DOINIT
c7fdacb9 61EXT_MGVTBL PL_magic_vtables[magic_vtable_max] = {
b7b5e578
NC
62 { Perl_magic_get, Perl_magic_set, Perl_magic_len, 0, 0, 0, 0, 0 },
63 { 0, Perl_magic_set_all_env, 0, Perl_magic_clear_all_env, 0, 0, 0, 0 },
64 { 0, Perl_magic_setenv, 0, Perl_magic_clearenv, 0, 0, 0, 0 },
8b09643d 65#ifndef PERL_MICRO
b7b5e578
NC
66 { Perl_magic_getsig, Perl_magic_setsig, 0, Perl_magic_clearsig, 0, 0, 0, 0 },
67#else
68 { 0, 0, 0, 0, 0, 0, 0, 0 },
69#endif
70 { 0, 0, Perl_magic_sizepack, Perl_magic_wipepack, 0, 0, 0, 0 },
71 { Perl_magic_getpack, Perl_magic_setpack, 0, Perl_magic_clearpack, 0, 0, 0, 0 },
72 { 0, Perl_magic_setdbline, 0, 0, 0, 0, 0, 0 },
73 { 0, Perl_magic_setisa, 0, Perl_magic_clearisa, 0, 0, 0, 0 },
74 { 0, Perl_magic_setisa, 0, 0, 0, 0, 0, 0 },
75 { (int (*)(pTHX_ SV *, MAGIC *))Perl_magic_getarylen, Perl_magic_setarylen, 0, 0, 0, 0, 0, 0 },
76 { 0, 0, 0, 0, Perl_magic_freearylen_p, 0, 0, 0 },
77 { 0, Perl_magic_setmglob, 0, 0, 0, 0, 0, 0 },
78 { Perl_magic_getnkeys, Perl_magic_setnkeys, 0, 0, 0, 0, 0, 0 },
79 { Perl_magic_gettaint, Perl_magic_settaint, 0, 0, 0, 0, 0, 0 },
80 { Perl_magic_getsubstr, Perl_magic_setsubstr, 0, 0, 0, 0, 0, 0 },
81 { Perl_magic_getvec, Perl_magic_setvec, 0, 0, 0, 0, 0, 0 },
82 { Perl_magic_getpos, Perl_magic_setpos, 0, 0, 0, 0, 0, 0 },
b7b5e578
NC
83 { Perl_magic_getuvar, Perl_magic_setuvar, 0, 0, 0, 0, 0, 0 },
84 { Perl_magic_getdefelem, Perl_magic_setdefelem, 0, 0, 0, 0, 0, 0 },
85 { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 },
86 { 0, 0, Perl_magic_regdata_cnt, 0, 0, 0, 0, 0 },
87 { Perl_magic_regdatum_get, Perl_magic_regdatum_set, 0, 0, 0, 0, 0, 0 },
88 { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 },
89 { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 },
90 { 0, 0, 0, 0, Perl_magic_killbackrefs, 0, 0, 0 },
91 { 0, 0, 0, 0, Perl_magic_freeovrld, 0, 0, 0 },
92 { 0, Perl_magic_setutf8, 0, 0, 0, 0, 0, 0 },
8b09643d 93#ifdef USE_LOCALE_COLLATE
b7b5e578 94 { 0, Perl_magic_setcollxfrm, 0, 0, 0, 0, 0, 0 },
0ffb5b03 95#else
b7b5e578 96 { 0, 0, 0, 0, 0, 0, 0, 0 },
0ffb5b03 97#endif
b7b5e578
NC
98 { 0, Perl_magic_sethint, 0, Perl_magic_clearhint, 0, 0, 0, 0 },
99 { 0, 0, 0, Perl_magic_clearhints, 0, 0, 0, 0 }
100};
0ffb5b03 101#else
c7fdacb9 102EXT_MGVTBL PL_magic_vtables[magic_vtable_max];
b7b5e578
NC
103#endif
104
b2e9fc6f
NC
105#define want_vtbl_bm want_vtbl_regexp
106#define want_vtbl_fm want_vtbl_regexp
107
b7b5e578
NC
108#define PL_vtbl_amagic PL_magic_vtables[want_vtbl_amagic]
109#define PL_vtbl_amagicelem PL_magic_vtables[want_vtbl_amagicelem]
110#define PL_vtbl_arylen PL_magic_vtables[want_vtbl_arylen]
111#define PL_vtbl_arylen_p PL_magic_vtables[want_vtbl_arylen_p]
112#define PL_vtbl_backref PL_magic_vtables[want_vtbl_backref]
113#define PL_vtbl_bm PL_magic_vtables[want_vtbl_bm]
114#define PL_vtbl_collxfrm PL_magic_vtables[want_vtbl_collxfrm]
115#define PL_vtbl_dbline PL_magic_vtables[want_vtbl_dbline]
116#define PL_vtbl_defelem PL_magic_vtables[want_vtbl_defelem]
117#define PL_vtbl_env PL_magic_vtables[want_vtbl_env]
118#define PL_vtbl_envelem PL_magic_vtables[want_vtbl_envelem]
119#define PL_vtbl_fm PL_magic_vtables[want_vtbl_fm]
120#define PL_vtbl_hints PL_magic_vtables[want_vtbl_hints]
121#define PL_vtbl_hintselem PL_magic_vtables[want_vtbl_hintselem]
122#define PL_vtbl_isa PL_magic_vtables[want_vtbl_isa]
123#define PL_vtbl_isaelem PL_magic_vtables[want_vtbl_isaelem]
124#define PL_vtbl_mglob PL_magic_vtables[want_vtbl_mglob]
125#define PL_vtbl_nkeys PL_magic_vtables[want_vtbl_nkeys]
126#define PL_vtbl_ovrld PL_magic_vtables[want_vtbl_ovrld]
127#define PL_vtbl_pack PL_magic_vtables[want_vtbl_pack]
128#define PL_vtbl_packelem PL_magic_vtables[want_vtbl_packelem]
129#define PL_vtbl_pos PL_magic_vtables[want_vtbl_pos]
130#define PL_vtbl_regdata PL_magic_vtables[want_vtbl_regdata]
131#define PL_vtbl_regdatum PL_magic_vtables[want_vtbl_regdatum]
132#define PL_vtbl_regexp PL_magic_vtables[want_vtbl_regexp]
133#define PL_vtbl_sigelem PL_magic_vtables[want_vtbl_sigelem]
134#define PL_vtbl_substr PL_magic_vtables[want_vtbl_substr]
135#define PL_vtbl_sv PL_magic_vtables[want_vtbl_sv]
136#define PL_vtbl_taint PL_magic_vtables[want_vtbl_taint]
137#define PL_vtbl_utf8 PL_magic_vtables[want_vtbl_utf8]
138#define PL_vtbl_uvar PL_magic_vtables[want_vtbl_uvar]
139#define PL_vtbl_vec PL_magic_vtables[want_vtbl_vec]
8b09643d
NC
140
141/* ex: set ro: */