This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / perlapi.c
... / ...
CommitLineData
1/* -*- buffer-read-only: t -*-
2 *
3 * perlapi.c
4 *
5 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
6 * 2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
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 *
11 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
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.
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 *
23 */
24
25#include "EXTERN.h"
26#include "perl.h"
27#include "perlapi.h"
28
29#if defined (MULTIPLICITY)
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
38
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); }
43
44#define PERLVARI(v,t,i) PERLVAR(v,t)
45#define PERLVARIC(v,t,i) PERLVAR(v, const t)
46
47#include "thrdvar.h"
48#include "intrpvar.h"
49
50#undef PERLVAR
51#undef PERLVARA
52#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
53 { return &(PL_##v); }
54#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
55 { return &(PL_##v); }
56#undef PERLVARIC
57#define PERLVARIC(v,t,i) const t* Perl_##v##_ptr(pTHX) \
58 { return (const t *)&(PL_##v); }
59#include "perlvars.h"
60
61#undef PERLVAR
62#undef PERLVARA
63#undef PERLVARI
64#undef PERLVARIC
65
66END_EXTERN_C
67
68#endif /* MULTIPLICITY */
69
70/* ex: set ro: */