This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / perlapi.c
CommitLineData
d8294a4d
NC
1/* -*- buffer-read-only: t -*-
2 *
d6376244
JH
3 * perlapi.c
4 *
31ab2e0d 5 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
978b5c81 6 * 2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
d6376244
JH
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 !!!!!!!
a354a119
JH
12 * This file is built by embed.pl from data in embed.fnc, embed.pl,
13 * pp.sym, intrpvar.h, perlvars.h and thrdvar.h.
14 * Any changes made here will be lost!
15 *
16 * Edit those files and run 'make regen_headers' to effect changes.
0dbcf736
JH
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
GS
24
25#include "EXTERN.h"
26#include "perl.h"
27#include "perlapi.h"
28
acfe0abc 29#if defined (MULTIPLICITY)
51371543
GS
30
31/* accessor functions for Perl variables (provides binary compatibility) */
32START_EXTERN_C
33
34#undef PERLVAR
35#undef PERLVARA
36#undef PERLVARI
37#undef PERLVARIC
6f4183fe 38
6f4183fe
GS
39#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
40 { return &(aTHX->v); }
41#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
42 { return &(aTHX->v); }
6f4183fe 43
51371543 44#define PERLVARI(v,t,i) PERLVAR(v,t)
c5be433b 45#define PERLVARIC(v,t,i) PERLVAR(v, const t)
51371543
GS
46
47#include "thrdvar.h"
48#include "intrpvar.h"
c5be433b
GS
49
50#undef PERLVAR
51#undef PERLVARA
acfe0abc 52#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
c5be433b 53 { return &(PL_##v); }
acfe0abc 54#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
c5be433b 55 { return &(PL_##v); }
34f7a5fe 56#undef PERLVARIC
acfe0abc 57#define PERLVARIC(v,t,i) const t* Perl_##v##_ptr(pTHX) \
34f7a5fe 58 { return (const t *)&(PL_##v); }
51371543
GS
59#include "perlvars.h"
60
61#undef PERLVAR
62#undef PERLVARA
63#undef PERLVARI
64#undef PERLVARIC
65
51371543
GS
66END_EXTERN_C
67
acfe0abc 68#endif /* MULTIPLICITY */
d8294a4d
NC
69
70/* ex: set ro: */