diff options
Diffstat (limited to 'perlapi.c')
-rwxr-xr-x | perlapi.c | 258 |
1 files changed, 183 insertions, 75 deletions
@@ -17,9 +17,9 @@ START_EXTERN_C #undef PERLVARI #undef PERLVARIC #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHXo) \ - { return &(aTHXo->PL_##v); } + { return &(aTHXo->interp.v); } #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHXo) \ - { return &(aTHXo->PL_##v); } + { return &(aTHXo->interp.v); } #define PERLVARI(v,t,i) PERLVAR(v,t) #define PERLVARIC(v,t,i) PERLVAR(v, const t) @@ -39,7 +39,21 @@ START_EXTERN_C #undef PERLVARI #undef PERLVARIC +#if defined(PERL_IMPLICIT_SYS) +#else +#endif +#if defined(USE_ITHREADS) +# if defined(PERL_IMPLICIT_SYS) +# endif +#endif +#if defined(MYMALLOC) +#endif +#if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif +#endif #if defined(PERL_OBJECT) +#else #endif #undef Perl_amagic_call @@ -77,6 +91,13 @@ Perl_apply(pTHXo_ I32 type, SV** mark, SV** sp) return ((CPerlObj*)pPerl)->Perl_apply(type, mark, sp); } +#undef Perl_avhv_delete_ent +SV* +Perl_avhv_delete_ent(pTHXo_ AV *ar, SV* keysv, I32 flags, U32 hash) +{ + return ((CPerlObj*)pPerl)->Perl_avhv_delete_ent(ar, keysv, flags, hash); +} + #undef Perl_avhv_exists_ent bool Perl_avhv_exists_ent(pTHXo_ AV *ar, SV* keysv, U32 hash) @@ -119,6 +140,20 @@ Perl_av_clear(pTHXo_ AV* ar) ((CPerlObj*)pPerl)->Perl_av_clear(ar); } +#undef Perl_av_delete +SV* +Perl_av_delete(pTHXo_ AV* ar, I32 key, I32 flags) +{ + return ((CPerlObj*)pPerl)->Perl_av_delete(ar, key, flags); +} + +#undef Perl_av_exists +bool +Perl_av_exists(pTHXo_ AV* ar, I32 key) +{ + return ((CPerlObj*)pPerl)->Perl_av_exists(ar, key); +} + #undef Perl_av_extend void Perl_av_extend(pTHXo_ AV* ar, I32 key) @@ -2150,16 +2185,6 @@ Perl_magicname(pTHXo_ char* sym, char* name, I32 namlen) { ((CPerlObj*)pPerl)->Perl_magicname(sym, name, namlen); } -#if defined(MYMALLOC) - -#undef Perl_malloced_size -MEM_SIZE -Perl_malloced_size(void *p) -{ - dTHXo; - return ((CPerlObj*)pPerl)->Perl_malloced_size(p); -} -#endif #undef Perl_markstack_grow void @@ -2298,8 +2323,9 @@ Perl_my_atof(pTHXo_ const char *s) #undef Perl_my_bcopy char* -Perl_my_bcopy(pTHXo_ const char* from, char* to, I32 len) +Perl_my_bcopy(const char* from, char* to, I32 len) { + dTHXo; return ((CPerlObj*)pPerl)->Perl_my_bcopy(from, to, len); } #endif @@ -2307,8 +2333,9 @@ Perl_my_bcopy(pTHXo_ const char* from, char* to, I32 len) #undef Perl_my_bzero char* -Perl_my_bzero(pTHXo_ char* loc, I32 len) +Perl_my_bzero(char* loc, I32 len) { + dTHXo; return ((CPerlObj*)pPerl)->Perl_my_bzero(loc, len); } #endif @@ -2344,8 +2371,9 @@ Perl_my_lstat(pTHXo) #undef Perl_my_memcmp I32 -Perl_my_memcmp(pTHXo_ const char* s1, const char* s2, I32 len) +Perl_my_memcmp(const char* s1, const char* s2, I32 len) { + dTHXo; return ((CPerlObj*)pPerl)->Perl_my_memcmp(s1, s2, len); } #endif @@ -2353,8 +2381,9 @@ Perl_my_memcmp(pTHXo_ const char* s1, const char* s2, I32 len) #undef Perl_my_memset void* -Perl_my_memset(pTHXo_ char* loc, I32 ch, I32 len) +Perl_my_memset(char* loc, I32 ch, I32 len) { + dTHXo; return ((CPerlObj*)pPerl)->Perl_my_memset(loc, ch, len); } #endif @@ -2887,15 +2916,42 @@ Perl_peep(pTHXo_ OP* o) ((CPerlObj*)pPerl)->Perl_peep(o); } #if defined(PERL_OBJECT) -#else -#undef perl_alloc -PerlInterpreter* -perl_alloc() +#undef Perl_construct +void +Perl_construct(pTHXo) { - dTHXo; - return ((CPerlObj*)pPerl)->perl_alloc(); + ((CPerlObj*)pPerl)->Perl_construct(); } + +#undef Perl_destruct +void +Perl_destruct(pTHXo) +{ + ((CPerlObj*)pPerl)->Perl_destruct(); +} + +#undef Perl_free +void +Perl_free(pTHXo) +{ + ((CPerlObj*)pPerl)->Perl_free(); +} + +#undef Perl_run +int +Perl_run(pTHXo) +{ + return ((CPerlObj*)pPerl)->Perl_run(); +} + +#undef Perl_parse +int +Perl_parse(pTHXo_ XSINIT_t xsinit, int argc, char** argv, char** env) +{ + return ((CPerlObj*)pPerl)->Perl_parse(xsinit, argc, argv, env); +} +#endif #if defined(USE_THREADS) #undef Perl_new_struct_thread @@ -2905,7 +2961,6 @@ Perl_new_struct_thread(pTHXo_ struct perl_thread *t) return ((CPerlObj*)pPerl)->Perl_new_struct_thread(t); } #endif -#endif #undef Perl_call_atexit void @@ -3413,6 +3468,13 @@ Perl_save_I32(pTHXo_ I32* intp) ((CPerlObj*)pPerl)->Perl_save_I32(intp); } +#undef Perl_save_I8 +void +Perl_save_I8(pTHXo_ I8* bytep) +{ + ((CPerlObj*)pPerl)->Perl_save_I8(bytep); +} + #undef Perl_save_int void Perl_save_int(pTHXo_ int* intp) @@ -3476,6 +3538,13 @@ Perl_save_pptr(pTHXo_ char** pptr) ((CPerlObj*)pPerl)->Perl_save_pptr(pptr); } +#undef Perl_save_vptr +void +Perl_save_vptr(pTHXo_ void* pptr) +{ + ((CPerlObj*)pPerl)->Perl_save_vptr(pptr); +} + #undef Perl_save_re_context void Perl_save_re_context(pTHXo) @@ -3689,6 +3758,20 @@ Perl_sv_2pv(pTHXo_ SV* sv, STRLEN* lp) return ((CPerlObj*)pPerl)->Perl_sv_2pv(sv, lp); } +#undef Perl_sv_2pvutf8 +char* +Perl_sv_2pvutf8(pTHXo_ SV* sv, STRLEN* lp) +{ + return ((CPerlObj*)pPerl)->Perl_sv_2pvutf8(sv, lp); +} + +#undef Perl_sv_2pvbyte +char* +Perl_sv_2pvbyte(pTHXo_ SV* sv, STRLEN* lp) +{ + return ((CPerlObj*)pPerl)->Perl_sv_2pvbyte(sv, lp); +} + #undef Perl_sv_2uv UV Perl_sv_2uv(pTHXo_ SV* sv) @@ -3724,6 +3807,20 @@ Perl_sv_pvn(pTHXo_ SV *sv, STRLEN *len) return ((CPerlObj*)pPerl)->Perl_sv_pvn(sv, len); } +#undef Perl_sv_pvutf8n +char* +Perl_sv_pvutf8n(pTHXo_ SV *sv, STRLEN *len) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvutf8n(sv, len); +} + +#undef Perl_sv_pvbyten +char* +Perl_sv_pvbyten(pTHXo_ SV *sv, STRLEN *len) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvbyten(sv, len); +} + #undef Perl_sv_true I32 Perl_sv_true(pTHXo_ SV *sv) @@ -4002,6 +4099,20 @@ Perl_sv_pvn_force(pTHXo_ SV* sv, STRLEN* lp) return ((CPerlObj*)pPerl)->Perl_sv_pvn_force(sv, lp); } +#undef Perl_sv_pvutf8n_force +char* +Perl_sv_pvutf8n_force(pTHXo_ SV* sv, STRLEN* lp) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvutf8n_force(sv, lp); +} + +#undef Perl_sv_pvbyten_force +char* +Perl_sv_pvbyten_force(pTHXo_ SV* sv, STRLEN* lp) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvbyten_force(sv, lp); +} + #undef Perl_sv_reftype char* Perl_sv_reftype(pTHXo_ SV* sv, int ob) @@ -4338,6 +4449,13 @@ Perl_wait4pid(pTHXo_ Pid_t pid, int* statusp, int flags) return ((CPerlObj*)pPerl)->Perl_wait4pid(pid, statusp, flags); } +#undef Perl_report_uninit +void +Perl_report_uninit(pTHXo) +{ + ((CPerlObj*)pPerl)->Perl_report_uninit(); +} + #undef Perl_warn void Perl_warn(pTHXo_ const char* pat, ...) @@ -4431,38 +4549,6 @@ Perl_dump_mstats(pTHXo_ char* s) { ((CPerlObj*)pPerl)->Perl_dump_mstats(s); } - -#undef Perl_malloc -Malloc_t -Perl_malloc(MEM_SIZE nbytes) -{ - dTHXo; - return ((CPerlObj*)pPerl)->Perl_malloc(nbytes); -} - -#undef Perl_calloc -Malloc_t -Perl_calloc(MEM_SIZE elements, MEM_SIZE size) -{ - dTHXo; - return ((CPerlObj*)pPerl)->Perl_calloc(elements, size); -} - -#undef Perl_realloc -Malloc_t -Perl_realloc(Malloc_t where, MEM_SIZE nbytes) -{ - dTHXo; - return ((CPerlObj*)pPerl)->Perl_realloc(where, nbytes); -} - -#undef Perl_mfree -Free_t -Perl_mfree(Malloc_t where) -{ - dTHXo; - ((CPerlObj*)pPerl)->Perl_mfree(where); -} #endif #undef Perl_safesysmalloc @@ -4786,6 +4872,20 @@ Perl_sv_2pv_nolen(pTHXo_ SV* sv) return ((CPerlObj*)pPerl)->Perl_sv_2pv_nolen(sv); } +#undef Perl_sv_2pvutf8_nolen +char* +Perl_sv_2pvutf8_nolen(pTHXo_ SV* sv) +{ + return ((CPerlObj*)pPerl)->Perl_sv_2pvutf8_nolen(sv); +} + +#undef Perl_sv_2pvbyte_nolen +char* +Perl_sv_2pvbyte_nolen(pTHXo_ SV* sv) +{ + return ((CPerlObj*)pPerl)->Perl_sv_2pvbyte_nolen(sv); +} + #undef Perl_sv_pv char* Perl_sv_pv(pTHXo_ SV *sv) @@ -4793,6 +4893,20 @@ Perl_sv_pv(pTHXo_ SV *sv) return ((CPerlObj*)pPerl)->Perl_sv_pv(sv); } +#undef Perl_sv_pvutf8 +char* +Perl_sv_pvutf8(pTHXo_ SV *sv) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvutf8(sv); +} + +#undef Perl_sv_pvbyte +char* +Perl_sv_pvbyte(pTHXo_ SV *sv) +{ + return ((CPerlObj*)pPerl)->Perl_sv_pvbyte(sv); +} + #undef Perl_sv_force_normal void Perl_sv_force_normal(pTHXo_ SV *sv) @@ -4873,9 +4987,16 @@ Perl_si_dup(pTHXo_ PERL_SI* si) #undef Perl_ss_dup ANY* -Perl_ss_dup(pTHXo_ ANY* ss, I32 ix, I32 max) +Perl_ss_dup(pTHXo_ PerlInterpreter* proto_perl) { - return ((CPerlObj*)pPerl)->Perl_ss_dup(ss, ix, max); + return ((CPerlObj*)pPerl)->Perl_ss_dup(proto_perl); +} + +#undef Perl_any_dup +void* +Perl_any_dup(pTHXo_ void* v, PerlInterpreter* proto_perl) +{ + return ((CPerlObj*)pPerl)->Perl_any_dup(v, proto_perl); } #undef Perl_he_dup @@ -4963,24 +5084,9 @@ Perl_ptr_table_split(pTHXo_ PTR_TBL_t *tbl) { ((CPerlObj*)pPerl)->Perl_ptr_table_split(tbl); } - -#undef perl_clone -PerlInterpreter* -perl_clone(PerlInterpreter* interp, UV flags) -{ - dTHXo; - return ((CPerlObj*)pPerl)->perl_clone(flags); -} - -#undef perl_clone_using -PerlInterpreter* -perl_clone_using(PerlInterpreter *interp, UV flags, struct IPerlMem* m, struct IPerlEnv* e, struct IPerlStdIO* io, struct IPerlLIO* lio, struct IPerlDir* d, struct IPerlSock* s, struct IPerlProc* p) -{ - dTHXo; - return ((CPerlObj*)pPerl)->perl_clone_using(interp, flags, m, e, io, lio, d, s, p); -} #endif #if defined(PERL_OBJECT) +#else #endif #if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT) #endif @@ -5030,7 +5136,7 @@ perl_clone_using(PerlInterpreter *interp, UV flags, struct IPerlMem* m, struct I #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) # if defined(CRIPPLED_CC) # endif -# if defined(WIN32) +# if defined(PERL_CR_FILTER) # endif #endif #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT) @@ -5039,6 +5145,8 @@ perl_clone_using(PerlInterpreter *interp, UV flags, struct IPerlMem* m, struct I # if defined(LEAKTEST) # endif #endif +#if defined(PERL_OBJECT) +#endif #undef Perl_ck_anoncode OP * @@ -7728,7 +7836,7 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) dTHXo; va_list(arglist); va_start(arglist, format); - return (*pPerl->PL_StdIO->pVprintf)(pPerl->PL_StdIO, stream, format, arglist); + return (*PL_StdIO->pVprintf)(PL_StdIO, stream, format, arglist); } END_EXTERN_C |