perlapi.h 8.28 KB
Newer Older
1
/* -*- buffer-read-only: t -*-
2
 *
3 4
 *    perlapi.h
 *
5 6
 *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 *    2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and others
7 8 9 10 11
 *
 *    You may distribute under the terms of either the GNU General Public
 *    License or the Artistic License, as specified in the README file.
 *
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
12 13
 * This file is built by regen/embed.pl from data in embed.fnc,
 * regen/embed.pl, regen/opcodes, intrpvar.h and perlvars.h.
14 15 16 17
 * Any changes made here will be lost!
 *
 * Edit those files and run 'make regen_headers' to effect changes.
 */
18 19 20 21 22

/* declare accessor functions for Perl variables */
#ifndef __perlapi_h__
#define __perlapi_h__

23
#if defined (MULTIPLICITY) && defined (PERL_GLOBAL_STRUCT)
24 25 26 27 28 29 30

START_EXTERN_C

#undef PERLVAR
#undef PERLVARA
#undef PERLVARI
#undef PERLVARIC
31 32 33 34 35
#define PERLVAR(p,v,t)	EXTERN_C t* Perl_##p##v##_ptr(pTHX);
#define PERLVARA(p,v,n,t)	typedef t PL_##v##_t[n];		\
			EXTERN_C PL_##v##_t* Perl_##p##v##_ptr(pTHX);
#define PERLVARI(p,v,t,i)	PERLVAR(p,v,t)
#define PERLVARIC(p,v,t,i) PERLVAR(p,v, const t)
36 37 38 39 40 41 42

#include "perlvars.h"

#undef PERLVAR
#undef PERLVARA
#undef PERLVARI
#undef PERLVARIC
43

44 45 46 47
END_EXTERN_C

#if defined(PERL_CORE)

48
/* accessor functions for Perl "global" variables */
49 50 51 52 53 54 55 56 57

/* these need to be mentioned here, or most linkers won't put them in
   the perl executable */

#ifndef PERL_NO_FORCE_LINK

START_EXTERN_C

#ifndef DOINIT
58
EXTCONST void * const PL_force_link_funcs[];
59
#else
60
EXTCONST void * const PL_force_link_funcs[] = {
61 62 63 64
#undef PERLVAR
#undef PERLVARA
#undef PERLVARI
#undef PERLVARIC
65 66 67 68
#define PERLVAR(p,v,t)		(void*)Perl_##p##v##_ptr,
#define PERLVARA(p,v,n,t)	PERLVAR(p,v,t)
#define PERLVARI(p,v,t,i)	PERLVAR(p,v,t)
#define PERLVARIC(p,v,t,i)	PERLVAR(p,v,t)
69

70 71 72 73 74 75 76 77 78 79 80 81 82
/* In Tru64 (__DEC && __osf__) the cc option -std1 causes that one
 * cannot cast between void pointers and function pointers without
 * info level warnings.  The PL_force_link_funcs[] would cause a few
 * hundred of those warnings.  In code one can circumnavigate this by using
 * unions that overlay the different pointers, but in declarations one
 * cannot use this trick.  Therefore we just disable the warning here
 * for the duration of the PL_force_link_funcs[] declaration. */

#if defined(__DECC) && defined(__osf__)
#pragma message save
#pragma message disable (nonstandcast)
#endif

83 84
#include "perlvars.h"

85 86 87 88
#if defined(__DECC) && defined(__osf__)
#pragma message restore
#endif

89 90 91 92 93 94 95
#undef PERLVAR
#undef PERLVARA
#undef PERLVARI
#undef PERLVARIC
};
#endif	/* DOINIT */

96
END_EXTERN_C
97 98 99 100 101

#endif	/* PERL_NO_FORCE_LINK */

#else	/* !PERL_CORE */

102 103 104 105
#undef  PL_AboveLatin1
#define PL_AboveLatin1		(*Perl_GAboveLatin1_ptr(NULL))
#undef  PL_Assigned_invlist
#define PL_Assigned_invlist	(*Perl_GAssigned_invlist_ptr(NULL))
106 107
#undef  PL_C_locale_obj
#define PL_C_locale_obj		(*Perl_GC_locale_obj_ptr(NULL))
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
#undef  PL_GCB_invlist
#define PL_GCB_invlist		(*Perl_GGCB_invlist_ptr(NULL))
#undef  PL_HasMultiCharFold
#define PL_HasMultiCharFold	(*Perl_GHasMultiCharFold_ptr(NULL))
#undef  PL_LB_invlist
#define PL_LB_invlist		(*Perl_GLB_invlist_ptr(NULL))
#undef  PL_Latin1
#define PL_Latin1		(*Perl_GLatin1_ptr(NULL))
#undef  PL_NonL1NonFinalFold
#define PL_NonL1NonFinalFold	(*Perl_GNonL1NonFinalFold_ptr(NULL))
#undef  PL_SB_invlist
#define PL_SB_invlist		(*Perl_GSB_invlist_ptr(NULL))
#undef  PL_SCX_invlist
#define PL_SCX_invlist		(*Perl_GSCX_invlist_ptr(NULL))
#undef  PL_UpperLatin1
#define PL_UpperLatin1		(*Perl_GUpperLatin1_ptr(NULL))
#undef  PL_WB_invlist
#define PL_WB_invlist		(*Perl_GWB_invlist_ptr(NULL))
#undef  PL_XPosix_ptrs
#define PL_XPosix_ptrs		(*Perl_GXPosix_ptrs_ptr(NULL))
128 129 130 131
#undef  PL_appctx
#define PL_appctx		(*Perl_Gappctx_ptr(NULL))
#undef  PL_check
#define PL_check		(*Perl_Gcheck_ptr(NULL))
132 133
#undef  PL_check_mutex
#define PL_check_mutex		(*Perl_Gcheck_mutex_ptr(NULL))
134 135
#undef  PL_csighandlerp
#define PL_csighandlerp		(*Perl_Gcsighandlerp_ptr(NULL))
136 137 138 139
#undef  PL_curinterp
#define PL_curinterp		(*Perl_Gcurinterp_ptr(NULL))
#undef  PL_do_undump
#define PL_do_undump		(*Perl_Gdo_undump_ptr(NULL))
140 141
#undef  PL_dollarzero_mutex
#define PL_dollarzero_mutex	(*Perl_Gdollarzero_mutex_ptr(NULL))
142 143
#undef  PL_fold_locale
#define PL_fold_locale		(*Perl_Gfold_locale_ptr(NULL))
144 145
#undef  PL_hash_chars
#define PL_hash_chars		(*Perl_Ghash_chars_ptr(NULL))
146 147 148 149
#undef  PL_hash_seed
#define PL_hash_seed		(*Perl_Ghash_seed_ptr(NULL))
#undef  PL_hash_seed_set
#define PL_hash_seed_set	(*Perl_Ghash_seed_set_ptr(NULL))
150 151
#undef  PL_hash_state
#define PL_hash_state		(*Perl_Ghash_state_ptr(NULL))
152 153
#undef  PL_hints_mutex
#define PL_hints_mutex		(*Perl_Ghints_mutex_ptr(NULL))
154 155
#undef  PL_keyword_plugin
#define PL_keyword_plugin	(*Perl_Gkeyword_plugin_ptr(NULL))
156 157 158 159
#undef  PL_keyword_plugin_mutex
#define PL_keyword_plugin_mutex	(*Perl_Gkeyword_plugin_mutex_ptr(NULL))
#undef  PL_lc_numeric_mutex
#define PL_lc_numeric_mutex	(*Perl_Glc_numeric_mutex_ptr(NULL))
160 161
#undef  PL_locale_mutex
#define PL_locale_mutex		(*Perl_Glocale_mutex_ptr(NULL))
162 163
#undef  PL_malloc_mutex
#define PL_malloc_mutex		(*Perl_Gmalloc_mutex_ptr(NULL))
164 165 166 167 168 169
#undef  PL_mmap_page_size
#define PL_mmap_page_size	(*Perl_Gmmap_page_size_ptr(NULL))
#undef  PL_my_ctx_mutex
#define PL_my_ctx_mutex		(*Perl_Gmy_ctx_mutex_ptr(NULL))
#undef  PL_my_cxt_index
#define PL_my_cxt_index		(*Perl_Gmy_cxt_index_ptr(NULL))
170 171
#undef  PL_op_mutex
#define PL_op_mutex		(*Perl_Gop_mutex_ptr(NULL))
172 173 174 175 176 177 178 179 180 181 182 183
#undef  PL_op_seq
#define PL_op_seq		(*Perl_Gop_seq_ptr(NULL))
#undef  PL_op_sequence
#define PL_op_sequence		(*Perl_Gop_sequence_ptr(NULL))
#undef  PL_perlio_debug_fd
#define PL_perlio_debug_fd	(*Perl_Gperlio_debug_fd_ptr(NULL))
#undef  PL_perlio_fd_refcnt
#define PL_perlio_fd_refcnt	(*Perl_Gperlio_fd_refcnt_ptr(NULL))
#undef  PL_perlio_fd_refcnt_size
#define PL_perlio_fd_refcnt_size	(*Perl_Gperlio_fd_refcnt_size_ptr(NULL))
#undef  PL_perlio_mutex
#define PL_perlio_mutex		(*Perl_Gperlio_mutex_ptr(NULL))
184 185
#undef  PL_perllib_sep
#define PL_perllib_sep		(*Perl_Gperllib_sep_ptr(NULL))
186 187
#undef  PL_ppaddr
#define PL_ppaddr		(*Perl_Gppaddr_ptr(NULL))
188 189
#undef  PL_sh_path
#define PL_sh_path		(*Perl_Gsh_path_ptr(NULL))
190 191 192 193 194 195 196 197
#undef  PL_sig_defaulting
#define PL_sig_defaulting	(*Perl_Gsig_defaulting_ptr(NULL))
#undef  PL_sig_handlers_initted
#define PL_sig_handlers_initted	(*Perl_Gsig_handlers_initted_ptr(NULL))
#undef  PL_sig_ignoring
#define PL_sig_ignoring		(*Perl_Gsig_ignoring_ptr(NULL))
#undef  PL_sig_trapped
#define PL_sig_trapped		(*Perl_Gsig_trapped_ptr(NULL))
198 199 200 201
#undef  PL_sigfpe_saved
#define PL_sigfpe_saved		(*Perl_Gsigfpe_saved_ptr(NULL))
#undef  PL_sv_placeholder
#define PL_sv_placeholder	(*Perl_Gsv_placeholder_ptr(NULL))
202 203
#undef  PL_thr_key
#define PL_thr_key		(*Perl_Gthr_key_ptr(NULL))
204 205
#undef  PL_timesbase
#define PL_timesbase		(*Perl_Gtimesbase_ptr(NULL))
206 207
#undef  PL_use_safe_putenv
#define PL_use_safe_putenv	(*Perl_Guse_safe_putenv_ptr(NULL))
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
#undef  PL_utf8_charname_begin
#define PL_utf8_charname_begin	(*Perl_Gutf8_charname_begin_ptr(NULL))
#undef  PL_utf8_charname_continue
#define PL_utf8_charname_continue	(*Perl_Gutf8_charname_continue_ptr(NULL))
#undef  PL_utf8_foldable
#define PL_utf8_foldable	(*Perl_Gutf8_foldable_ptr(NULL))
#undef  PL_utf8_foldclosures
#define PL_utf8_foldclosures	(*Perl_Gutf8_foldclosures_ptr(NULL))
#undef  PL_utf8_idcont
#define PL_utf8_idcont		(*Perl_Gutf8_idcont_ptr(NULL))
#undef  PL_utf8_idstart
#define PL_utf8_idstart		(*Perl_Gutf8_idstart_ptr(NULL))
#undef  PL_utf8_perl_idcont
#define PL_utf8_perl_idcont	(*Perl_Gutf8_perl_idcont_ptr(NULL))
#undef  PL_utf8_perl_idstart
#define PL_utf8_perl_idstart	(*Perl_Gutf8_perl_idstart_ptr(NULL))
#undef  PL_utf8_tofold
#define PL_utf8_tofold		(*Perl_Gutf8_tofold_ptr(NULL))
#undef  PL_utf8_tolower
#define PL_utf8_tolower		(*Perl_Gutf8_tolower_ptr(NULL))
#undef  PL_utf8_tosimplefold
#define PL_utf8_tosimplefold	(*Perl_Gutf8_tosimplefold_ptr(NULL))
#undef  PL_utf8_totitle
#define PL_utf8_totitle		(*Perl_Gutf8_totitle_ptr(NULL))
#undef  PL_utf8_toupper
#define PL_utf8_toupper		(*Perl_Gutf8_toupper_ptr(NULL))
#undef  PL_utf8_xidcont
#define PL_utf8_xidcont		(*Perl_Gutf8_xidcont_ptr(NULL))
#undef  PL_utf8_xidstart
#define PL_utf8_xidstart	(*Perl_Gutf8_xidstart_ptr(NULL))
238 239 240 241
#undef  PL_veto_cleanup
#define PL_veto_cleanup		(*Perl_Gveto_cleanup_ptr(NULL))
#undef  PL_watch_pvx
#define PL_watch_pvx		(*Perl_Gwatch_pvx_ptr(NULL))
242 243

#endif /* !PERL_CORE */
244
#endif /* MULTIPLICITY && PERL_GLOBAL_STRUCT */
245 246 247

#endif /* __perlapi_h__ */

248
/* ex: set ro: */