This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tests for Perl_get_vtbl()
[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 61#ifdef DOINIT
b7b5e578
NC
62EXT_MGVTBL PL_magic_vtables[] = {
63 { Perl_magic_get, Perl_magic_set, Perl_magic_len, 0, 0, 0, 0, 0 },
64 { 0, Perl_magic_set_all_env, 0, Perl_magic_clear_all_env, 0, 0, 0, 0 },
65 { 0, Perl_magic_setenv, 0, Perl_magic_clearenv, 0, 0, 0, 0 },
8b09643d 66#ifndef PERL_MICRO
b7b5e578
NC
67 { Perl_magic_getsig, Perl_magic_setsig, 0, Perl_magic_clearsig, 0, 0, 0, 0 },
68#else
69 { 0, 0, 0, 0, 0, 0, 0, 0 },
70#endif
71 { 0, 0, Perl_magic_sizepack, Perl_magic_wipepack, 0, 0, 0, 0 },
72 { Perl_magic_getpack, Perl_magic_setpack, 0, Perl_magic_clearpack, 0, 0, 0, 0 },
73 { 0, Perl_magic_setdbline, 0, 0, 0, 0, 0, 0 },
74 { 0, Perl_magic_setisa, 0, Perl_magic_clearisa, 0, 0, 0, 0 },
75 { 0, Perl_magic_setisa, 0, 0, 0, 0, 0, 0 },
76 { (int (*)(pTHX_ SV *, MAGIC *))Perl_magic_getarylen, Perl_magic_setarylen, 0, 0, 0, 0, 0, 0 },
77 { 0, 0, 0, 0, Perl_magic_freearylen_p, 0, 0, 0 },
78 { 0, Perl_magic_setmglob, 0, 0, 0, 0, 0, 0 },
79 { Perl_magic_getnkeys, Perl_magic_setnkeys, 0, 0, 0, 0, 0, 0 },
80 { Perl_magic_gettaint, Perl_magic_settaint, 0, 0, 0, 0, 0, 0 },
81 { Perl_magic_getsubstr, Perl_magic_setsubstr, 0, 0, 0, 0, 0, 0 },
82 { Perl_magic_getvec, Perl_magic_setvec, 0, 0, 0, 0, 0, 0 },
83 { Perl_magic_getpos, Perl_magic_setpos, 0, 0, 0, 0, 0, 0 },
84 { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 },
85 { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 },
86 { Perl_magic_getuvar, Perl_magic_setuvar, 0, 0, 0, 0, 0, 0 },
87 { Perl_magic_getdefelem, Perl_magic_setdefelem, 0, 0, 0, 0, 0, 0 },
88 { 0, Perl_magic_setregexp, 0, 0, 0, 0, 0, 0 },
89 { 0, 0, Perl_magic_regdata_cnt, 0, 0, 0, 0, 0 },
90 { Perl_magic_regdatum_get, Perl_magic_regdatum_set, 0, 0, 0, 0, 0, 0 },
91 { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 },
92 { 0, Perl_magic_setamagic, 0, 0, Perl_magic_setamagic, 0, 0, 0 },
93 { 0, 0, 0, 0, Perl_magic_killbackrefs, 0, 0, 0 },
94 { 0, 0, 0, 0, Perl_magic_freeovrld, 0, 0, 0 },
95 { 0, Perl_magic_setutf8, 0, 0, 0, 0, 0, 0 },
8b09643d 96#ifdef USE_LOCALE_COLLATE
b7b5e578 97 { 0, Perl_magic_setcollxfrm, 0, 0, 0, 0, 0, 0 },
0ffb5b03 98#else
b7b5e578 99 { 0, 0, 0, 0, 0, 0, 0, 0 },
0ffb5b03 100#endif
b7b5e578
NC
101 { 0, Perl_magic_sethint, 0, Perl_magic_clearhint, 0, 0, 0, 0 },
102 { 0, 0, 0, Perl_magic_clearhints, 0, 0, 0, 0 }
103};
0ffb5b03 104#else
b7b5e578
NC
105EXT_MGVTBL PL_magic_vtables[];
106#endif
107
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: */