Commit | Line | Data |
37442d52 |
1 | /* -*- buffer-read-only: t -*- |
2 | * |
d6376244 |
3 | * perlapi.c |
4 | * |
2419183b |
5 | * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
7272f7c1 |
6 | * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, by Larry Wall and others |
d6376244 |
7 | * |
8 | * You may distribute under the terms of either the GNU General Public |
9 | * License or the Artistic License, as specified in the README file. |
10 | * |
d6376244 |
11 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
f5e3445d |
12 | * This file is built by embed.pl from data in embed.fnc, embed.pl, |
907b3e23 |
13 | * pp.sym, intrpvar.h, and perlvars.h. |
f5e3445d |
14 | * Any changes made here will be lost! |
15 | * |
16 | * Edit those files and run 'make regen_headers' to effect changes. |
6296ff16 |
17 | * |
18 | * |
19 | * Up to the threshold of the door there mounted a flight of twenty-seven |
20 | * broad stairs, hewn by some unknown art of the same black stone. This |
21 | * was the only entrance to the tower. |
22 | * |
d6376244 |
23 | */ |
51371543 |
24 | |
25 | #include "EXTERN.h" |
26 | #include "perl.h" |
27 | #include "perlapi.h" |
28 | |
acfe0abc |
29 | #if defined (MULTIPLICITY) |
51371543 |
30 | |
31 | /* accessor functions for Perl variables (provides binary compatibility) */ |
32 | START_EXTERN_C |
33 | |
34 | #undef PERLVAR |
35 | #undef PERLVARA |
36 | #undef PERLVARI |
37 | #undef PERLVARIC |
27da23d5 |
38 | #undef PERLVARISC |
6f4183fe |
39 | |
6f4183fe |
40 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
41 | { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); } |
6f4183fe |
42 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
43 | { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); } |
6f4183fe |
44 | |
51371543 |
45 | #define PERLVARI(v,t,i) PERLVAR(v,t) |
c5be433b |
46 | #define PERLVARIC(v,t,i) PERLVAR(v, const t) |
27da23d5 |
47 | #define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
48 | { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); } |
51371543 |
49 | |
51371543 |
50 | #include "intrpvar.h" |
c5be433b |
51 | |
52 | #undef PERLVAR |
53 | #undef PERLVARA |
acfe0abc |
54 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
55 | { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); } |
acfe0abc |
56 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
57 | { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); } |
34f7a5fe |
58 | #undef PERLVARIC |
27da23d5 |
59 | #undef PERLVARISC |
60 | #define PERLVARIC(v,t,i) \ |
61 | const t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
62 | { PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); } |
27da23d5 |
63 | #define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
96a5add6 |
64 | { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); } |
51371543 |
65 | #include "perlvars.h" |
66 | |
67 | #undef PERLVAR |
68 | #undef PERLVARA |
69 | #undef PERLVARI |
70 | #undef PERLVARIC |
27da23d5 |
71 | #undef PERLVARISC |
72 | |
73 | #ifndef PERL_GLOBAL_STRUCT |
74 | /* A few evil special cases. Could probably macrofy this. */ |
75 | #undef PL_ppaddr |
76 | #undef PL_check |
77 | #undef PL_fold_locale |
78 | Perl_ppaddr_t** Perl_Gppaddr_ptr(pTHX) { |
88e01c9d |
79 | static Perl_ppaddr_t* const ppaddr_ptr = PL_ppaddr; |
96a5add6 |
80 | PERL_UNUSED_CONTEXT; |
27da23d5 |
81 | return (Perl_ppaddr_t**)&ppaddr_ptr; |
82 | } |
83 | Perl_check_t** Perl_Gcheck_ptr(pTHX) { |
88e01c9d |
84 | static Perl_check_t* const check_ptr = PL_check; |
96a5add6 |
85 | PERL_UNUSED_CONTEXT; |
27da23d5 |
86 | return (Perl_check_t**)&check_ptr; |
87 | } |
88 | unsigned char** Perl_Gfold_locale_ptr(pTHX) { |
88e01c9d |
89 | static unsigned char* const fold_locale_ptr = PL_fold_locale; |
96a5add6 |
90 | PERL_UNUSED_CONTEXT; |
27da23d5 |
91 | return (unsigned char**)&fold_locale_ptr; |
92 | } |
93 | #endif |
51371543 |
94 | |
51371543 |
95 | END_EXTERN_C |
96 | |
acfe0abc |
97 | #endif /* MULTIPLICITY */ |
37442d52 |
98 | |
99 | /* ex: set ro: */ |