Commit | Line | Data |
d6376244 |
1 | /* |
2 | * perlapi.c |
3 | * |
4 | * Copyright (c) 1997-2002, Larry Wall |
5 | * |
6 | * You may distribute under the terms of either the GNU General Public |
7 | * License or the Artistic License, as specified in the README file. |
8 | * |
d6376244 |
9 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
f5e3445d |
10 | * This file is built by embed.pl from data in embed.fnc, embed.pl, |
11 | * pp.sym, intrpvar.h, perlvars.h and thrdvar.h. |
12 | * Any changes made here will be lost! |
13 | * |
14 | * Edit those files and run 'make regen_headers' to effect changes. |
d6376244 |
15 | */ |
51371543 |
16 | |
17 | #include "EXTERN.h" |
18 | #include "perl.h" |
19 | #include "perlapi.h" |
20 | |
acfe0abc |
21 | #if defined (MULTIPLICITY) |
51371543 |
22 | |
23 | /* accessor functions for Perl variables (provides binary compatibility) */ |
24 | START_EXTERN_C |
25 | |
26 | #undef PERLVAR |
27 | #undef PERLVARA |
28 | #undef PERLVARI |
29 | #undef PERLVARIC |
6f4183fe |
30 | |
6f4183fe |
31 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
32 | { return &(aTHX->v); } |
33 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
34 | { return &(aTHX->v); } |
6f4183fe |
35 | |
51371543 |
36 | #define PERLVARI(v,t,i) PERLVAR(v,t) |
c5be433b |
37 | #define PERLVARIC(v,t,i) PERLVAR(v, const t) |
51371543 |
38 | |
39 | #include "thrdvar.h" |
40 | #include "intrpvar.h" |
c5be433b |
41 | |
42 | #undef PERLVAR |
43 | #undef PERLVARA |
acfe0abc |
44 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
c5be433b |
45 | { return &(PL_##v); } |
acfe0abc |
46 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
c5be433b |
47 | { return &(PL_##v); } |
34f7a5fe |
48 | #undef PERLVARIC |
acfe0abc |
49 | #define PERLVARIC(v,t,i) const t* Perl_##v##_ptr(pTHX) \ |
34f7a5fe |
50 | { return (const t *)&(PL_##v); } |
51371543 |
51 | #include "perlvars.h" |
52 | |
53 | #undef PERLVAR |
54 | #undef PERLVARA |
55 | #undef PERLVARI |
56 | #undef PERLVARIC |
57 | |
51371543 |
58 | END_EXTERN_C |
59 | |
acfe0abc |
60 | #endif /* MULTIPLICITY */ |