This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update perldelta for if change
[perl5.git] / perlapi.h
CommitLineData
37442d52
RGS
1/* -*- buffer-read-only: t -*-
2 *
eb1102fc
NIS
3 * perlapi.h
4 *
2419183b 5 * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
83706693 6 * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, by Larry Wall and others
eb1102fc
NIS
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 *
eb1102fc 11 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
f5e3445d 12 * This file is built by embed.pl from data in embed.fnc, embed.pl,
907b3e23 13 * pp.sym, intrpvar.h, and perlvars.h.
f5e3445d
RGS
14 * Any changes made here will be lost!
15 *
16 * Edit those files and run 'make regen_headers' to effect changes.
eb1102fc 17 */
51371543 18
51371543 19/* declare accessor functions for Perl variables */
6f4183fe
GS
20#ifndef __perlapi_h__
21#define __perlapi_h__
51371543 22
87b9e160 23#if defined (MULTIPLICITY) && defined (PERL_GLOBAL_STRUCT)
c5be433b 24
51371543
GS
25START_EXTERN_C
26
27#undef PERLVAR
28#undef PERLVARA
29#undef PERLVARI
30#undef PERLVARIC
27da23d5 31#undef PERLVARISC
acfe0abc 32#define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(pTHX);
51371543 33#define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \
acfe0abc 34 EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX);
51371543 35#define PERLVARI(v,t,i) PERLVAR(v,t)
c5be433b 36#define PERLVARIC(v,t,i) PERLVAR(v, const t)
27da23d5
JH
37#define PERLVARISC(v,i) typedef const char PL_##v##_t[sizeof(i)]; \
38 EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX);
51371543 39
51371543
GS
40#include "perlvars.h"
41
42#undef PERLVAR
43#undef PERLVARA
44#undef PERLVARI
45#undef PERLVARIC
27da23d5
JH
46#undef PERLVARISC
47
51371543
GS
48END_EXTERN_C
49
682fc664 50#if defined(PERL_CORE)
6f4183fe 51
87b9e160 52/* accessor functions for Perl "global" variables */
682fc664
GS
53
54/* these need to be mentioned here, or most linkers won't put them in
55 the perl executable */
56
57#ifndef PERL_NO_FORCE_LINK
58
59START_EXTERN_C
60
61#ifndef DOINIT
27da23d5 62EXTCONST void * const PL_force_link_funcs[];
682fc664 63#else
27da23d5 64EXTCONST void * const PL_force_link_funcs[] = {
682fc664
GS
65#undef PERLVAR
66#undef PERLVARA
67#undef PERLVARI
68#undef PERLVARIC
ea1f607c 69#define PERLVAR(v,t) (void*)Perl_##v##_ptr,
682fc664
GS
70#define PERLVARA(v,n,t) PERLVAR(v,t)
71#define PERLVARI(v,t,i) PERLVAR(v,t)
72#define PERLVARIC(v,t,i) PERLVAR(v,t)
27da23d5 73#define PERLVARISC(v,i) PERLVAR(v,char)
682fc664 74
b6f9b097
MB
75/* In Tru64 (__DEC && __osf__) the cc option -std1 causes that one
76 * cannot cast between void pointers and function pointers without
77 * info level warnings. The PL_force_link_funcs[] would cause a few
78 * hundred of those warnings. In code one can circumnavigate this by using
79 * unions that overlay the different pointers, but in declarations one
80 * cannot use this trick. Therefore we just disable the warning here
81 * for the duration of the PL_force_link_funcs[] declaration. */
82
83#if defined(__DECC) && defined(__osf__)
84#pragma message save
85#pragma message disable (nonstandcast)
86#endif
87
682fc664
GS
88#include "perlvars.h"
89
b6f9b097
MB
90#if defined(__DECC) && defined(__osf__)
91#pragma message restore
92#endif
93
682fc664
GS
94#undef PERLVAR
95#undef PERLVARA
96#undef PERLVARI
97#undef PERLVARIC
27da23d5 98#undef PERLVARISC
682fc664
GS
99};
100#endif /* DOINIT */
101
acfe0abc 102END_EXTERN_C
682fc664
GS
103
104#endif /* PERL_NO_FORCE_LINK */
105
106#else /* !PERL_CORE */
6f4183fe 107
6f4183fe
GS
108#undef PL_No
109#define PL_No (*Perl_GNo_ptr(NULL))
110#undef PL_Yes
111#define PL_Yes (*Perl_GYes_ptr(NULL))
27da23d5
JH
112#undef PL_appctx
113#define PL_appctx (*Perl_Gappctx_ptr(NULL))
114#undef PL_check
115#define PL_check (*Perl_Gcheck_ptr(NULL))
5c1546dc
JH
116#undef PL_csighandlerp
117#define PL_csighandlerp (*Perl_Gcsighandlerp_ptr(NULL))
6f4183fe
GS
118#undef PL_curinterp
119#define PL_curinterp (*Perl_Gcurinterp_ptr(NULL))
120#undef PL_do_undump
121#define PL_do_undump (*Perl_Gdo_undump_ptr(NULL))
d90a703e
JH
122#undef PL_dollarzero_mutex
123#define PL_dollarzero_mutex (*Perl_Gdollarzero_mutex_ptr(NULL))
27da23d5
JH
124#undef PL_fold_locale
125#define PL_fold_locale (*Perl_Gfold_locale_ptr(NULL))
ffee3ff6
NC
126#undef PL_global_struct_size
127#define PL_global_struct_size (*Perl_Gglobal_struct_size_ptr(NULL))
6f4183fe
GS
128#undef PL_hexdigit
129#define PL_hexdigit (*Perl_Ghexdigit_ptr(NULL))
71ad1b0c
NC
130#undef PL_hints_mutex
131#define PL_hints_mutex (*Perl_Ghints_mutex_ptr(NULL))
01523419
CB
132#undef PL_interp_size
133#define PL_interp_size (*Perl_Ginterp_size_ptr(NULL))
134#undef PL_interp_size_5_10_0
135#define PL_interp_size_5_10_0 (*Perl_Ginterp_size_5_10_0_ptr(NULL))
4098b6bb
JV
136#undef PL_keyword_plugin
137#define PL_keyword_plugin (*Perl_Gkeyword_plugin_ptr(NULL))
6f4183fe
GS
138#undef PL_malloc_mutex
139#define PL_malloc_mutex (*Perl_Gmalloc_mutex_ptr(NULL))
27da23d5
JH
140#undef PL_mmap_page_size
141#define PL_mmap_page_size (*Perl_Gmmap_page_size_ptr(NULL))
f16dd614
DM
142#undef PL_my_ctx_mutex
143#define PL_my_ctx_mutex (*Perl_Gmy_ctx_mutex_ptr(NULL))
144#undef PL_my_cxt_index
145#define PL_my_cxt_index (*Perl_Gmy_cxt_index_ptr(NULL))
534825c4
GS
146#undef PL_op_mutex
147#define PL_op_mutex (*Perl_Gop_mutex_ptr(NULL))
27da23d5
JH
148#undef PL_op_seq
149#define PL_op_seq (*Perl_Gop_seq_ptr(NULL))
150#undef PL_op_sequence
151#define PL_op_sequence (*Perl_Gop_sequence_ptr(NULL))
6f4183fe
GS
152#undef PL_patleave
153#define PL_patleave (*Perl_Gpatleave_ptr(NULL))
27da23d5
JH
154#undef PL_perlio_debug_fd
155#define PL_perlio_debug_fd (*Perl_Gperlio_debug_fd_ptr(NULL))
156#undef PL_perlio_fd_refcnt
157#define PL_perlio_fd_refcnt (*Perl_Gperlio_fd_refcnt_ptr(NULL))
22c96fc1
NC
158#undef PL_perlio_fd_refcnt_size
159#define PL_perlio_fd_refcnt_size (*Perl_Gperlio_fd_refcnt_size_ptr(NULL))
fa36c1f0
RGS
160#undef PL_perlio_mutex
161#define PL_perlio_mutex (*Perl_Gperlio_mutex_ptr(NULL))
27da23d5
JH
162#undef PL_ppaddr
163#define PL_ppaddr (*Perl_Gppaddr_ptr(NULL))
ffee3ff6
NC
164#undef PL_revision
165#define PL_revision (*Perl_Grevision_ptr(NULL))
4b8f2e61
DM
166#undef PL_runops_dbg
167#define PL_runops_dbg (*Perl_Grunops_dbg_ptr(NULL))
168#undef PL_runops_std
169#define PL_runops_std (*Perl_Grunops_std_ptr(NULL))
5c728af0
IZ
170#undef PL_sh_path
171#define PL_sh_path (*Perl_Gsh_path_ptr(NULL))
27da23d5
JH
172#undef PL_sig_defaulting
173#define PL_sig_defaulting (*Perl_Gsig_defaulting_ptr(NULL))
174#undef PL_sig_handlers_initted
175#define PL_sig_handlers_initted (*Perl_Gsig_handlers_initted_ptr(NULL))
176#undef PL_sig_ignoring
177#define PL_sig_ignoring (*Perl_Gsig_ignoring_ptr(NULL))
178#undef PL_sig_sv
179#define PL_sig_sv (*Perl_Gsig_sv_ptr(NULL))
180#undef PL_sig_trapped
181#define PL_sig_trapped (*Perl_Gsig_trapped_ptr(NULL))
b35112e7
CS
182#undef PL_sigfpe_saved
183#define PL_sigfpe_saved (*Perl_Gsigfpe_saved_ptr(NULL))
ffee3ff6
NC
184#undef PL_subversion
185#define PL_subversion (*Perl_Gsubversion_ptr(NULL))
643157af
JH
186#undef PL_sv_placeholder
187#define PL_sv_placeholder (*Perl_Gsv_placeholder_ptr(NULL))
ba869deb
GS
188#undef PL_thr_key
189#define PL_thr_key (*Perl_Gthr_key_ptr(NULL))
27da23d5
JH
190#undef PL_timesbase
191#define PL_timesbase (*Perl_Gtimesbase_ptr(NULL))
50acdf95
MS
192#undef PL_use_safe_putenv
193#define PL_use_safe_putenv (*Perl_Guse_safe_putenv_ptr(NULL))
ffee3ff6
NC
194#undef PL_version
195#define PL_version (*Perl_Gversion_ptr(NULL))
c301d606
DM
196#undef PL_veto_cleanup
197#define PL_veto_cleanup (*Perl_Gveto_cleanup_ptr(NULL))
27da23d5
JH
198#undef PL_watch_pvx
199#define PL_watch_pvx (*Perl_Gwatch_pvx_ptr(NULL))
6f4183fe
GS
200
201#endif /* !PERL_CORE */
87b9e160 202#endif /* MULTIPLICITY && PERL_GLOBAL_STRUCT */
6f4183fe
GS
203
204#endif /* __perlapi_h__ */
51371543 205
37442d52 206/* ex: set ro: */