source: trunk/essentials/dev-lang/perl/embed.fnc@ 3210

Last change on this file since 3210 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 62.2 KB
Line 
1: Lines are of the form:
2: flags|return_type|function_name|arg1|arg2|...|argN
3:
4: A line may be continued on another by ending it with a backslash.
5: Leading and trailing whitespace will be ignored in each component.
6:
7: flags are single letters with following meanings:
8: A member of public API
9: m Implemented as a macro - no export, no
10: proto, no #define
11: d function has documentation with its source
12: s static function, should have an S_ prefix in
13: source file; for macros (m), suffix the usage
14: example with a semicolon
15: n has no implicit interpreter/thread context argument
16: p function has a Perl_ prefix
17: f function takes printf style format string, varargs
18: r function never returns
19: o has no compatibility macro (#define foo Perl_foo)
20: x not exported
21: X explicitly exported
22: M may change
23: E visible to extensions included in the Perl core
24: b binary backward compatibility; function is a macro
25: but has also Perl_ implementation (which is exported)
26: U suppress usage example in autogenerated documentation
27: a allocates memory a la malloc/calloc. Is also "R".
28: R Return value must not be ignored.
29: P pure function: no effects except the return value;
30: return value depends only on parms and/or globals
31: (see also L<perlguts/Internal Functions> for those flags.)
32:
33: Pointer parameters that must not be passed NULLs should be prefixed with NN.
34:
35: Pointer parameters that may be NULL should be prefixed with NULLOK. This has
36: no effect on output yet. It's a notation for the maintainers to know "I have
37: defined whether NULL is OK or not" rather than having neither NULL or NULLOK,
38: which is ambiguous.
39:
40: Individual flags may be separated by whitespace.
41:
42: New global functions should be added at the end for binary compatibility
43: in some configurations.
44
45START_EXTERN_C
46
47#if defined(PERL_IMPLICIT_SYS)
48Ano |PerlInterpreter*|perl_alloc_using \
49 |NN struct IPerlMem* m|NN struct IPerlMem* ms \
50 |NN struct IPerlMem* mp|NN struct IPerlEnv* e \
51 |NN struct IPerlStdIO* io|NN struct IPerlLIO* lio \
52 |NN struct IPerlDir* d|NN struct IPerlSock* s \
53 |NN struct IPerlProc* p
54#endif
55Anod |PerlInterpreter* |perl_alloc
56Anod |void |perl_construct |NN PerlInterpreter* interp
57Anod |int |perl_destruct |NN PerlInterpreter* interp
58Anod |void |perl_free |NN PerlInterpreter* interp
59Anod |int |perl_run |NN PerlInterpreter* interp
60Anod |int |perl_parse |NN PerlInterpreter* interp|XSINIT_t xsinit \
61 |int argc|NULLOK char** argv|NULLOK char** env
62AnpR |bool |doing_taint |int argc|NULLOK char** argv|NULLOK char** env
63#if defined(USE_ITHREADS)
64Anod |PerlInterpreter*|perl_clone|NN PerlInterpreter* interp|UV flags
65# if defined(PERL_IMPLICIT_SYS)
66Ano |PerlInterpreter*|perl_clone_using \
67 |NN PerlInterpreter *interp|UV flags \
68 |NN struct IPerlMem* m|NN struct IPerlMem* ms \
69 |NN struct IPerlMem* mp|NN struct IPerlEnv* e \
70 |NN struct IPerlStdIO* io|NN struct IPerlLIO* lio \
71 |NN struct IPerlDir* d|NN struct IPerlSock* s \
72 |NN struct IPerlProc* p
73# endif
74#endif
75
76Aanop |Malloc_t|malloc |MEM_SIZE nbytes
77Aanop |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size
78Aanop |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes
79Anop |Free_t |mfree |Malloc_t where
80#if defined(MYMALLOC)
81npR |MEM_SIZE|malloced_size |NN void *p
82#endif
83
84AnpR |void* |get_context
85Anp |void |set_context |NN void *thx
86
87END_EXTERN_C
88
89/* functions with flag 'n' should come before here */
90START_EXTERN_C
91# include "pp_proto.h"
92Ap |SV* |amagic_call |NN SV* left|NN SV* right|int method|int dir
93Ap |bool |Gv_AMupdate |NN HV* stash
94ApR |CV* |gv_handler |NULLOK HV* stash|I32 id
95p |OP* |append_elem |I32 optype|NULLOK OP* first|NULLOK OP* last
96p |OP* |append_list |I32 optype|NULLOK LISTOP* first|NULLOK LISTOP* last
97p |I32 |apply |I32 type|NN SV** mark|NN SV** sp
98ApM |void |apply_attrs_string|NN char *stashpv|NN CV *cv|NN char *attrstr|STRLEN len
99Ap |SV* |avhv_delete_ent|NULLOK AV *ar|NN SV* keysv|I32 flags|U32 hash
100Ap |bool |avhv_exists_ent|NULLOK AV *ar|NN SV* keysv|U32 hash
101Ap |SV** |avhv_fetch_ent |NULLOK AV *ar|NN SV* keysv|I32 lval|U32 hash
102Ap |SV** |avhv_store_ent |NULLOK AV *ar|NN SV* keysv|NULLOK SV* val\
103 |U32 hash
104Ap |HE* |avhv_iternext |NULLOK AV *ar
105Ap |SV* |avhv_iterval |NULLOK AV *ar|NN HE* entry
106Ap |HV* |avhv_keys |NULLOK AV *ar
107Apd |void |av_clear |NULLOK AV* ar
108Apd |SV* |av_delete |NULLOK AV* ar|I32 key|I32 flags
109ApdR |bool |av_exists |NULLOK AV* ar|I32 key
110Apd |void |av_extend |NN AV* ar|I32 key
111pR |AV* |av_fake |I32 size|NN SV** svp
112ApdR |SV** |av_fetch |NULLOK AV* ar|I32 key|I32 lval
113Apd |void |av_fill |NN AV* ar|I32 fill
114ApdR |I32 |av_len |NN AV* ar
115ApdR |AV* |av_make |I32 size|NN SV** svp
116Apd |SV* |av_pop |NULLOK AV* ar
117Apd |void |av_push |NULLOK AV* ar|NN SV* val
118p |void |av_reify |NN AV* ar
119ApdR |SV* |av_shift |NULLOK AV* ar
120Apd |SV** |av_store |NULLOK AV* ar|I32 key|NULLOK SV* val
121Apd |void |av_undef |NULLOK AV* ar
122Apd |void |av_unshift |NULLOK AV* ar|I32 num
123pR |OP* |bind_match |I32 type|NN OP* left|NN OP* pat
124pR |OP* |block_end |I32 floor|NULLOK OP* seq
125ApR |I32 |block_gimme
126pR |int |block_start |int full
127p |void |boot_core_UNIVERSAL
128p |void |boot_core_PerlIO
129Ap |void |call_list |I32 oldscope|NN AV* av_list
130pR |bool |cando |Mode_t mode|Uid_t effective|NN Stat_t* statbufp
131ApR |U32 |cast_ulong |NV f
132ApR |I32 |cast_i32 |NV f
133ApR |IV |cast_iv |NV f
134ApR |UV |cast_uv |NV f
135#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
136ApR |I32 |my_chsize |int fd|Off_t length
137#endif
138#if defined(USE_5005THREADS)
139Ap |MAGIC* |condpair_magic |NN SV *sv
140#endif
141pR |OP* |convert |I32 optype|I32 flags|NULLOK OP* o
142: croak()'s first parm can be NULL. Otherwise, mod_perl breaks.
143Afprd |void |croak |NULLOK const char* pat|...
144Apr |void |vcroak |NN const char* pat|NULLOK va_list* args
145#if defined(PERL_IMPLICIT_CONTEXT)
146Afnrp |void |croak_nocontext|NN const char* pat|...
147Afnp |OP* |die_nocontext |NN const char* pat|...
148Afnp |void |deb_nocontext |NN const char* pat|...
149Afnp |char* |form_nocontext |NN const char* pat|...
150Anp |void |load_module_nocontext|U32 flags|NN SV* name|NN SV* ver|...
151Afnp |SV* |mess_nocontext |NN const char* pat|...
152Afnp |void |warn_nocontext |NN const char* pat|...
153Afnp |void |warner_nocontext|U32 err|NN const char* pat|...
154Afnp |SV* |newSVpvf_nocontext|NN const char* pat|...
155Afnp |void |sv_catpvf_nocontext|NN SV* sv|NN const char* pat|...
156Afnp |void |sv_setpvf_nocontext|NN SV* sv|NN const char* pat|...
157Afnp |void |sv_catpvf_mg_nocontext|NN SV* sv|NN const char* pat|...
158Afnp |void |sv_setpvf_mg_nocontext|NN SV* sv|NN const char* pat|...
159Afnp |int |fprintf_nocontext|NN PerlIO* stream|NN const char* fmt|...
160Afnp |int |printf_nocontext|NN const char* fmt|...
161#endif
162p |void |cv_ckproto |NN CV* cv|NULLOK GV* gv|NULLOK char* p
163pd |CV* |cv_clone |NN CV* proto
164ApdR |SV* |cv_const_sv |NULLOK CV* cv
165pR |SV* |op_const_sv |NULLOK OP* o|NULLOK CV* cv
166Apd |void |cv_undef |NN CV* cv
167Ap |void |cx_dump |NN PERL_CONTEXT* cx
168Ap |SV* |filter_add |NULLOK filter_t funcp|NULLOK SV* datasv
169Ap |void |filter_del |NN filter_t funcp
170ApR |I32 |filter_read |int idx|NN SV* buffer|int maxlen
171ApPR |char** |get_op_descs
172ApPR |char** |get_op_names
173pPR |char* |get_no_modify
174pPR |U32* |get_opargs
175ApPR |PPADDR_t*|get_ppaddr
176EpR |I32 |cxinc
177Afp |void |deb |NN const char* pat|...
178Ap |void |vdeb |NN const char* pat|NULLOK va_list* args
179Ap |void |debprofdump
180Ap |I32 |debop |NN OP* o
181Ap |I32 |debstack
182Ap |I32 |debstackptrs
183Ap |char* |delimcpy |NN char* to|NN char* toend|NN char* from \
184 |NN char* fromend|int delim|NN I32* retlen
185p |void |deprecate |NN char* s
186p |void |deprecate_old |NN char* s
187Afp |OP* |die |NULLOK const char* pat|...
188p |OP* |vdie |NULLOK const char* pat|NULLOK va_list* args
189p |OP* |die_where |NULLOK char* message|STRLEN msglen
190Ap |void |dounwind |I32 cxix
191p |bool |do_aexec |NULLOK SV* really|NN SV** mark|NN SV** sp
192p |bool |do_aexec5 |NULLOK SV* really|NN SV** mark|NN SV** sp|int fd|int flag
193Ap |int |do_binmode |NN PerlIO *fp|int iotype|int mode
194p |void |do_chop |NN SV* asv|NN SV* sv
195Ap |bool |do_close |NN GV* gv|bool not_implicit
196p |bool |do_eof |NN GV* gv
197p |bool |do_exec |NN char* cmd
198#if defined(WIN32)
199Ap |int |do_aspawn |NN SV* really|NN SV** mark|NN SV** sp
200Ap |int |do_spawn |NN char* cmd
201Ap |int |do_spawn_nowait|NN char* cmd
202#endif
203#if !defined(WIN32)
204p |bool |do_exec3 |NN char* cmd|int fd|int flag
205#endif
206p |void |do_execfree
207#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
208p |I32 |do_ipcctl |I32 optype|NN SV** mark|NN SV** sp
209p |I32 |do_ipcget |I32 optype|NN SV** mark|NN SV** sp
210p |I32 |do_msgrcv |NN SV** mark|NN SV** sp
211p |I32 |do_msgsnd |NN SV** mark|NN SV** sp
212p |I32 |do_semop |NN SV** mark|NN SV** sp
213p |I32 |do_shmio |I32 optype|NN SV** mark|NN SV** sp
214#endif
215Ap |void |do_join |NN SV* sv|NN SV* del|NN SV** mark|NN SV** sp
216p |OP* |do_kv
217Ap |bool |do_open |NN GV* gv|NN char* name|I32 len|int as_raw \
218 |int rawmode|int rawperm|NULLOK PerlIO* supplied_fp
219Ap |bool |do_open9 |NN GV *gv|NN char *name|I32 len|int as_raw \
220 |int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \
221 |NN SV *svs|I32 num
222Ap |bool |do_openn |NN GV *gv|NN char *name|I32 len|int as_raw \
223 |int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \
224 |NULLOK SV **svp|I32 num
225p |void |do_pipe |NN SV* sv|NULLOK GV* rgv|NULLOK GV* wgv
226p |bool |do_print |NULLOK SV* sv|NN PerlIO* fp
227pR |OP* |do_readline
228p |I32 |do_chomp |NN SV* sv
229p |bool |do_seek |NULLOK GV* gv|Off_t pos|int whence
230Ap |void |do_sprintf |NN SV* sv|I32 len|NN SV** sarg
231p |Off_t |do_sysseek |NN GV* gv|Off_t pos|int whence
232pR |Off_t |do_tell |NN GV* gv
233p |I32 |do_trans |NN SV* sv
234p |UV |do_vecget |NN SV* sv|I32 offset|I32 size
235p |void |do_vecset |NN SV* sv
236p |void |do_vop |I32 optype|NN SV* sv|NN SV* left|NN SV* right
237p |OP* |dofile |NN OP* term
238ApR |I32 |dowantarray
239Ap |void |dump_all
240Ap |void |dump_eval
241#if defined(DUMP_FDS)
242Ap |void |dump_fds |NN char* s
243#endif
244Ap |void |dump_form |NN GV* gv
245Ap |void |gv_dump |NN GV* gv
246Ap |void |op_dump |NN OP* arg
247Ap |void |pmop_dump |NULLOK PMOP* pm
248Ap |void |dump_packsubs |NN HV* stash
249Ap |void |dump_sub |NN GV* gv
250Apd |void |fbm_compile |NN SV* sv|U32 flags
251ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \
252 |NN SV* littlesv|U32 flags
253p |char* |find_script |NN char *scriptname|bool dosearch \
254 |NULLOK char **search_ext|I32 flags
255#if defined(USE_5005THREADS)
256p |PADOFFSET|find_threadsv|NN const char *name
257#endif
258p |OP* |force_list |NULLOK OP* arg
259p |OP* |fold_constants |NN OP* arg
260Afpd |char* |form |NN const char* pat|...
261Ap |char* |vform |NN const char* pat|NULLOK va_list* args
262Ap |void |free_tmps
263p |OP* |gen_constant_list|NULLOK OP* o
264#if !defined(HAS_GETENV_LEN)
265p |char* |getenv_len |NN const char* key|NN unsigned long *len
266#endif
267Ap |void |gp_free |NULLOK GV* gv
268Ap |GP* |gp_ref |NULLOK GP* gp
269Ap |GV* |gv_AVadd |NN GV* gv
270Ap |GV* |gv_HVadd |NN GV* gv
271Ap |GV* |gv_IOadd |NN GV* gv
272ApR |GV* |gv_autoload4 |NULLOK HV* stash|NN const char* name|STRLEN len|I32 method
273Ap |void |gv_check |NN HV* stash
274Ap |void |gv_efullname |NN SV* sv|NN GV* gv
275Apmb |void |gv_efullname3 |NN SV* sv|NN GV* gv|NULLOK const char* prefix
276Ap |void |gv_efullname4 |NN SV* sv|NN GV* gv|NULLOK const char* prefix|bool keepmain
277Ap |GV* |gv_fetchfile |NN const char* name
278Apd |GV* |gv_fetchmeth |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level
279Apd |GV* |gv_fetchmeth_autoload |NULLOK HV* stash|NN const char* name|STRLEN len|I32 level
280Apd |GV* |gv_fetchmethod |NULLOK HV* stash|NN const char* name
281Apd |GV* |gv_fetchmethod_autoload|NULLOK HV* stash|NN const char* name|I32 autoload
282Ap |GV* |gv_fetchpv |NN const char* name|I32 add|I32 sv_type
283Ap |void |gv_fullname |NN SV* sv|NN GV* gv
284Apmb |void |gv_fullname3 |NN SV* sv|NN GV* gv|NULLOK const char* prefix
285Ap |void |gv_fullname4 |NN SV* sv|NN GV* gv|NULLOK const char* prefix|bool keepmain
286Ap |void |gv_init |NN GV* gv|NULLOK HV* stash|NN const char* name|STRLEN len|int multi
287Apd |HV* |gv_stashpv |NN const char* name|I32 create
288Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 create
289Apd |HV* |gv_stashsv |NULLOK SV* sv|I32 create
290Apd |void |hv_clear |NULLOK HV* tb
291Ap |void |hv_delayfree_ent|NN HV* hv|NULLOK HE* entry
292Apd |SV* |hv_delete |NULLOK HV* tb|NN const char* key|I32 klen|I32 flags
293Apd |SV* |hv_delete_ent |NULLOK HV* tb|NN SV* key|I32 flags|U32 hash
294ApdR |bool |hv_exists |NULLOK HV* tb|NN const char* key|I32 klen
295ApdR |bool |hv_exists_ent |NULLOK HV* tb|NN SV* key|U32 hash
296Apd |SV** |hv_fetch |NULLOK HV* tb|NN const char* key|I32 klen|I32 lval
297Apd |HE* |hv_fetch_ent |NULLOK HV* tb|NN SV* key|I32 lval|U32 hash
298Ap |void |hv_free_ent |NN HV* hv|NULLOK HE* entryK
299Apd |I32 |hv_iterinit |NN HV* tb
300ApdR |char* |hv_iterkey |NN HE* entry|NN I32* retlen
301ApdR |SV* |hv_iterkeysv |NN HE* entry
302ApdR |HE* |hv_iternext |NN HV* tb
303ApdR |SV* |hv_iternextsv |NN HV* hv|NN char** key|NN I32* retlen
304ApMdR |HE* |hv_iternext_flags|NN HV* tb|I32 flags
305ApdR |SV* |hv_iterval |NN HV* tb|NN HE* entry
306Ap |void |hv_ksplit |NN HV* hv|IV newmax
307Apd |void |hv_magic |NN HV* hv|NULLOK GV* gv|int how
308Apd |SV** |hv_store |NULLOK HV* tb|NULLOK const char* key|I32 klen|NULLOK SV* val \
309 |U32 hash
310Apd |HE* |hv_store_ent |NULLOK HV* tb|NULLOK SV* key|NULLOK SV* val|U32 hash
311ApM |SV** |hv_store_flags |NULLOK HV* tb|NULLOK const char* key|I32 klen|NULLOK SV* val \
312 |U32 hash|int flags
313Apd |void |hv_undef |NULLOK HV* tb
314ApP |I32 |ibcmp |NN const char* a|NN const char* b|I32 len
315ApP |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len
316Apd |I32 |ibcmp_utf8 |NN const char* a|NULLOK char **pe1|UV l1|bool u1 \
317 |NN const char* b|NULLOK char **pe2|UV l2|bool u2
318pR |bool |ingroup |Gid_t testgid|Uid_t effective
319p |void |init_argv_symbols|int argc|NN char **argv
320p |void |init_debugger
321Ap |void |init_stacks
322Ap |void |init_tm |NN struct tm *ptm
323pd |U32 |intro_my
324ApPR |char* |instr |NN const char* big|NN const char* little
325pR |bool |io_close |NN IO* io|bool not_implicit
326pR |OP* |invert |NULLOK OP* cmd
327dpR |bool |is_gv_magical |NN char *name|STRLEN len|U32 flags
328ApR |I32 |is_lvalue_sub
329ApPR |U32 |to_uni_upper_lc|U32 c
330ApPR |U32 |to_uni_title_lc|U32 c
331ApPR |U32 |to_uni_lower_lc|U32 c
332ApPR |bool |is_uni_alnum |UV c
333ApPR |bool |is_uni_alnumc |UV c
334ApPR |bool |is_uni_idfirst |UV c
335ApPR |bool |is_uni_alpha |UV c
336ApPR |bool |is_uni_ascii |UV c
337ApPR |bool |is_uni_space |UV c
338ApPR |bool |is_uni_cntrl |UV c
339ApPR |bool |is_uni_graph |UV c
340ApPR |bool |is_uni_digit |UV c
341ApPR |bool |is_uni_upper |UV c
342ApPR |bool |is_uni_lower |UV c
343ApPR |bool |is_uni_print |UV c
344ApPR |bool |is_uni_punct |UV c
345ApPR |bool |is_uni_xdigit |UV c
346Ap |UV |to_uni_upper |UV c|NN U8 *p|NN STRLEN *lenp
347Ap |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp
348Ap |UV |to_uni_lower |UV c|NN U8 *p|NN STRLEN *lenp
349Ap |UV |to_uni_fold |UV c|NN U8 *p|NN STRLEN *lenp
350ApPR |bool |is_uni_alnum_lc|UV c
351ApPR |bool |is_uni_alnumc_lc|UV c
352ApPR |bool |is_uni_idfirst_lc|UV c
353ApPR |bool |is_uni_alpha_lc|UV c
354ApPR |bool |is_uni_ascii_lc|UV c
355ApPR |bool |is_uni_space_lc|UV c
356ApPR |bool |is_uni_cntrl_lc|UV c
357ApPR |bool |is_uni_graph_lc|UV c
358ApPR |bool |is_uni_digit_lc|UV c
359ApPR |bool |is_uni_upper_lc|UV c
360ApPR |bool |is_uni_lower_lc|UV c
361ApPR |bool |is_uni_print_lc|UV c
362ApPR |bool |is_uni_punct_lc|UV c
363ApPR |bool |is_uni_xdigit_lc|UV c
364Apd |STRLEN |is_utf8_char |NN U8 *p
365Apd |bool |is_utf8_string_loc|NN U8 *s|STRLEN len|NULLOK U8 **p
366Apd |bool |is_utf8_string |NN U8 *s|STRLEN len
367ApR |bool |is_utf8_alnum |NN U8 *p
368ApR |bool |is_utf8_alnumc |NN U8 *p
369ApR |bool |is_utf8_idfirst|NN U8 *p
370ApR |bool |is_utf8_idcont |NN U8 *p
371ApR |bool |is_utf8_alpha |NN U8 *p
372ApR |bool |is_utf8_ascii |NN U8 *p
373ApR |bool |is_utf8_space |NN U8 *p
374ApR |bool |is_utf8_cntrl |NN U8 *p
375ApR |bool |is_utf8_digit |NN U8 *p