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 | * |
9 | * |
10 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
11 | * This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h, |
12 | * perlvars.h and thrdvar.h. Any changes made here will be lost! |
13 | */ |
51371543 |
14 | |
15 | #include "EXTERN.h" |
16 | #include "perl.h" |
17 | #include "perlapi.h" |
18 | |
acfe0abc |
19 | #if defined (MULTIPLICITY) |
51371543 |
20 | |
21 | /* accessor functions for Perl variables (provides binary compatibility) */ |
22 | START_EXTERN_C |
23 | |
24 | #undef PERLVAR |
25 | #undef PERLVARA |
26 | #undef PERLVARI |
27 | #undef PERLVARIC |
6f4183fe |
28 | |
6f4183fe |
29 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
30 | { return &(aTHX->v); } |
31 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
32 | { return &(aTHX->v); } |
6f4183fe |
33 | |
51371543 |
34 | #define PERLVARI(v,t,i) PERLVAR(v,t) |
c5be433b |
35 | #define PERLVARIC(v,t,i) PERLVAR(v, const t) |
51371543 |
36 | |
37 | #include "thrdvar.h" |
38 | #include "intrpvar.h" |
c5be433b |
39 | |
40 | #undef PERLVAR |
41 | #undef PERLVARA |
acfe0abc |
42 | #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \ |
c5be433b |
43 | { return &(PL_##v); } |
acfe0abc |
44 | #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ |
c5be433b |
45 | { return &(PL_##v); } |
34f7a5fe |
46 | #undef PERLVARIC |
acfe0abc |
47 | #define PERLVARIC(v,t,i) const t* Perl_##v##_ptr(pTHX) \ |
34f7a5fe |
48 | { return (const t *)&(PL_##v); } |
51371543 |
49 | #include "perlvars.h" |
50 | |
51 | #undef PERLVAR |
52 | #undef PERLVARA |
53 | #undef PERLVARI |
54 | #undef PERLVARIC |
55 | |
51371543 |
56 | END_EXTERN_C |
57 | |
acfe0abc |
58 | #endif /* MULTIPLICITY */ |