tweak MANIFEST, add Dev_t to POSIX/typemap
[p5sagit/p5-mst-13.2.git] / perlvars.h
CommitLineData
49f531da 1/* This file describes the "global" variables used by perl */
2/* This used to be in perl.h directly but we want to */
3/* abstract out which are per-thread per-interpreter really */
4/* global and how initialized into one file */
5
6/****************/
7/* Truly global */
8/****************/
9
10/* global state */
22239a37 11PERLVAR(Gcurinterp, PerlInterpreter *) /* currently running interpreter */
49f531da 12#ifdef USE_THREADS
22239a37 13PERLVAR(Gthr_key, perl_key) /* For per-thread struct perl_thread* */
14PERLVAR(Gsv_mutex, perl_mutex) /* Mutex for allocating SVs in sv.c */
15PERLVAR(Gmalloc_mutex, perl_mutex) /* Mutex for malloc */
16PERLVAR(Geval_mutex, perl_mutex) /* Mutex for doeval */
17PERLVAR(Geval_cond, perl_cond) /* Condition variable for doeval */
18PERLVAR(Geval_owner, struct perl_thread *) /* Owner thread for doeval */
19PERLVAR(Gnthreads, int) /* Number of threads currently */
20PERLVAR(Gthreads_mutex, perl_mutex) /* Mutex for nthreads and thread list */
21PERLVAR(Gnthreads_cond, perl_cond) /* Condition variable for nthreads */
dce16143 22PERLVAR(Gsvref_mutex, perl_mutex) /* Mutex for SvREFCNT_{inc,dec} */
22239a37 23PERLVARI(Gthreadsv_names, char *, THREADSV_NAMES)
49f531da 24#ifdef FAKE_THREADS
22239a37 25PERLVAR(Gcurthr, struct perl_thread *) /* Currently executing (fake) thread */
49f531da 26#endif
27#endif /* USE_THREADS */
28
22239a37 29PERLVAR(Guid, int) /* current real user id */
30PERLVAR(Geuid, int) /* current effective user id */
31PERLVAR(Ggid, int) /* current real group id */
32PERLVAR(Gegid, int) /* current effective group id */
33PERLVAR(Gnomemok, bool) /* let malloc context handle nomem */
34PERLVAR(Gan, U32) /* malloc sequence number */
35PERLVAR(Gcop_seqmax, U32) /* statement sequence number */
36PERLVAR(Gop_seqmax, U16) /* op sequence number */
37PERLVAR(Gevalseq, U32) /* eval sequence number */
38PERLVAR(Gsub_generation, U32) /* inc to force methods to be looked up again */
39PERLVAR(Gorigenviron, char **)
40PERLVAR(Gorigalen, U32)
41PERLVAR(Gpidstatus, HV *) /* pid-to-status mappings for waitpid */
42PERLVAR(Gprofiledata, U32 *)
43PERLVARI(Gmaxo, int, MAXO) /* Number of ops */
44PERLVAR(Gosname, char *) /* operating system */
45PERLVARI(Gsh_path, char *, SH_PATH) /* full path of shell */
46PERLVAR(Gsighandlerp, Sighandler_t)
47
48PERLVAR(Gxiv_arenaroot, XPV*) /* list of allocated xiv areas */
49PERLVAR(Gxiv_root, IV **) /* free xiv list--shared by interpreters */
50PERLVAR(Gxnv_root, double *) /* free xnv list--shared by interpreters */
51PERLVAR(Gxrv_root, XRV *) /* free xrv list--shared by interpreters */
52PERLVAR(Gxpv_root, XPV *) /* free xpv list--shared by interpreters */
53PERLVAR(Ghe_root, HE *) /* free he list--shared by interpreters */
54PERLVAR(Gnice_chunk, char *) /* a nice chunk of memory to reuse */
55PERLVAR(Gnice_chunk_size, U32) /* how nice the chunk of memory is */
56
76e3520e 57#ifdef PERL_OBJECT
873ef191 58PERLVARI(Grunops, runops_proc_t, FUNC_NAME_TO_PTR(RUNOPS_DEFAULT))
76e3520e 59#else
22239a37 60PERLVARI(Grunops, runops_proc_t *, RUNOPS_DEFAULT)
76e3520e 61#endif
22239a37 62
63PERLVAR(Gtokenbuf[256], char)
64PERLVAR(Gna, STRLEN) /* for use in SvPV when length is Not Applicable */
65
66PERLVAR(Gsv_undef, SV)
67PERLVAR(Gsv_no, SV)
68PERLVAR(Gsv_yes, SV)
49f531da 69#ifdef CSH
22239a37 70PERLVARI(Gcshname, char *, CSH)
71PERLVAR(Gcshlen, I32)
49f531da 72#endif
73
22239a37 74PERLVAR(Glex_state, U32) /* next token is determined */
75PERLVAR(Glex_defer, U32) /* state after determined token */
76PERLVAR(Glex_expect, expectation) /* expect after determined token */
77PERLVAR(Glex_brackets, I32) /* bracket count */
78PERLVAR(Glex_formbrack, I32) /* bracket count at outer format level */
79PERLVAR(Glex_fakebrack, I32) /* outer bracket is mere delimiter */
80PERLVAR(Glex_casemods, I32) /* casemod count */
81PERLVAR(Glex_dojoin, I32) /* doing an array interpolation */
82PERLVAR(Glex_starts, I32) /* how many interps done on level */
83PERLVAR(Glex_stuff, SV *) /* runtime pattern from m// or s/// */
84PERLVAR(Glex_repl, SV *) /* runtime replacement from s/// */
85PERLVAR(Glex_op, OP *) /* extra info to pass back on op */
86PERLVAR(Glex_inpat, OP *) /* in pattern $) and $| are special */
87PERLVAR(Glex_inwhat, I32) /* what kind of quoting are we in */
88PERLVAR(Glex_brackstack, char *) /* what kind of brackets to pop */
89PERLVAR(Glex_casestack, char *) /* what kind of case mods in effect */
49f531da 90
91/* What we know when we're in LEX_KNOWNEXT state. */
22239a37 92PERLVAR(Gnextval[5], YYSTYPE) /* value of next token, if any */
93PERLVAR(Gnexttype[5], I32) /* type of next token */
94PERLVAR(Gnexttoke, I32)
95
96PERLVARI(Grsfp, PerlIO * VOL, Nullfp)
97PERLVAR(Glinestr, SV *)
98PERLVAR(Gbufptr, char *)
99PERLVAR(Goldbufptr, char *)
100PERLVAR(Goldoldbufptr, char *)
101PERLVAR(Gbufend, char *)
102PERLVARI(Gexpect, expectation, XSTATE) /* how to interpret ambiguous tokens */
103PERLVAR(Grsfp_filters, AV *)
104
105PERLVAR(Gmulti_start, I32) /* 1st line of multi-line string */
106PERLVAR(Gmulti_end, I32) /* last line of multi-line string */
107PERLVAR(Gmulti_open, I32) /* delimiter of said string */
108PERLVAR(Gmulti_close, I32) /* delimiter of said string */
109
22239a37 110PERLVAR(Gerror_count, I32) /* how many errors so far, max 10 */
111PERLVAR(Gsubline, I32) /* line this subroutine began on */
112PERLVAR(Gsubname, SV *) /* name of current subroutine */
113
114PERLVAR(Gcompcv, CV *) /* currently compiling subroutine */
115PERLVAR(Gcomppad, AV *) /* storage for lexically scoped temporaries */
116PERLVAR(Gcomppad_name, AV *) /* variable names for "my" variables */
117PERLVAR(Gcomppad_name_fill, I32) /* last "introduced" variable offset */
118PERLVAR(Gcomppad_name_floor, I32) /* start of vars in innermost block */
119PERLVAR(Gmin_intro_pending, I32) /* start of vars to introduce */
120PERLVAR(Gmax_intro_pending, I32) /* end of vars to introduce */
121PERLVAR(Gpadix, I32) /* max used index in current "register" pad */
122PERLVAR(Gpadix_floor, I32) /* how low may inner block reset padix */
123PERLVAR(Gpad_reset_pending, I32) /* reset pad on next attempted alloc */
124PERLVAR(Gcompiling, COP)
125
126PERLVAR(Gthisexpr, I32) /* name id for nothing_in_common() */
127PERLVAR(Glast_uni, char *) /* position of last named-unary operator */
128PERLVAR(Glast_lop, char *) /* position of last list operator */
129PERLVAR(Glast_lop_op, OPCODE) /* last list operator */
130PERLVAR(Gin_my, bool) /* we're compiling a "my" declaration */
131PERLVAR(Gin_my_stash, HV *) /* declared class of this "my" declaration */
49f531da 132#ifdef FCRYPT
22239a37 133PERLVAR(Gcryptseen, I32) /* has fast crypt() been initialized? */
49f531da 134#endif
135
22239a37 136PERLVAR(Ghints, U32) /* various compilation flags */
49f531da 137
22239a37 138PERLVAR(Gdo_undump, bool) /* -u or dump seen? */
139PERLVAR(Gdebug, VOL U32)
49f531da 140
141
142#ifdef OVERLOAD
143
22239a37 144PERLVAR(Gamagic_generation, long)
49f531da 145
146#endif
147
148#ifdef USE_LOCALE_COLLATE
22239a37 149PERLVAR(Gcollation_ix, U32) /* Collation generation index */
150PERLVAR(Gcollation_name, char *) /* Name of current collation */
151PERLVARI(Gcollation_standard, bool, TRUE) /* Assume simple collation */
152PERLVAR(Gcollxfrm_base, Size_t) /* Basic overhead in *xfrm() */
153PERLVARI(Gcollxfrm_mult, Size_t, 2) /* Expansion factor in *xfrm() */
49f531da 154#endif /* USE_LOCALE_COLLATE */
155
156#ifdef USE_LOCALE_NUMERIC
157
22239a37 158PERLVAR(Gnumeric_name, char *) /* Name of current numeric locale */
159PERLVARI(Gnumeric_standard, bool, TRUE) /* Assume simple numerics */
160PERLVARI(Gnumeric_local, bool, TRUE) /* Assume local numerics */
49f531da 161
162#endif /* !USE_LOCALE_NUMERIC */
163
3fe35a81 164/* constants (these are not literals to facilitate pointer comparisons) */
3fe6f2dc 165PERLVARIC(GYes, char *, "1")
166PERLVARIC(GNo, char *, "")
167PERLVARIC(Ghexdigit, char *, "0123456789abcdef0123456789ABCDEFx")
168PERLVARIC(Gpatleave, char *, "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}")
3fe35a81 169
e2d46a1d 170PERLVAR(Gspecialsv_list[4], SV *) /* from byterun.h */
171