This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
-Wformat
[perl5.git] / perlapi.c
CommitLineData
d6376244
JH
1/*
2 * perlapi.c
3 *
2419183b
RGS
4 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
5 * 2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others
d6376244
JH
6 *
7 * You may distribute under the terms of either the GNU General Public
8 * License or the Artistic License, as specified in the README file.
9 *
d6376244 10 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
f5e3445d
RGS
11 * This file is built by embed.pl from data in embed.fnc, embed.pl,
12 * pp.sym, intrpvar.h, perlvars.h and thrdvar.h.
13 * Any changes made here will be lost!
14 *
15 * Edit those files and run 'make regen_headers' to effect changes.
6296ff16
JH
16 *
17 *
18 * Up to the threshold of the door there mounted a flight of twenty-seven
19 * broad stairs, hewn by some unknown art of the same black stone. This
20 * was the only entrance to the tower.
21 *
d6376244 22 */
51371543
GS
23
24#include "EXTERN.h"
25#include "perl.h"
26#include "perlapi.h"
27
acfe0abc 28#if defined (MULTIPLICITY)
51371543
GS
29
30/* accessor functions for Perl variables (provides binary compatibility) */
31START_EXTERN_C
32
33#undef PERLVAR
34#undef PERLVARA
35#undef PERLVARI
36#undef PERLVARIC
6f4183fe 37
6f4183fe
GS
38#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
39 { return &(aTHX->v); }
40#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
41 { return &(aTHX->v); }
6f4183fe 42
51371543 43#define PERLVARI(v,t,i) PERLVAR(v,t)
c5be433b 44#define PERLVARIC(v,t,i) PERLVAR(v, const t)
51371543
GS
45
46#include "thrdvar.h"
47#include "intrpvar.h"
c5be433b
GS
48
49#undef PERLVAR
50#undef PERLVARA
acfe0abc 51#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
c5be433b 52 { return &(PL_##v); }
acfe0abc 53#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
c5be433b 54 { return &(PL_##v); }
34f7a5fe 55#undef PERLVARIC
acfe0abc 56#define PERLVARIC(v,t,i) const t* Perl_##v##_ptr(pTHX) \
34f7a5fe 57 { return (const t *)&(PL_##v); }
51371543
GS
58#include "perlvars.h"
59
60#undef PERLVAR
61#undef PERLVARA
62#undef PERLVARI
63#undef PERLVARIC
64
51371543
GS
65END_EXTERN_C
66
acfe0abc 67#endif /* MULTIPLICITY */