diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-11 09:34:13 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-11 09:34:13 +0000 |
commit | a6c403648ecd5cc72235fdb1e7535523a8ff2ac9 (patch) | |
tree | ae379cb0349ea1800627a86bc0ddf04fea4403ec /perl.c | |
parent | 312caa8e97f1c7ee342a9895c2f0e749625b4929 (diff) | |
download | perl-a6c403648ecd5cc72235fdb1e7535523a8ff2ac9.tar.gz |
various fixes for clean build and test on win32; configpm broken,
needed to open myconfig.SH rather than myconfig; sundry adjustments
to bytecode stuff; tweaks to DYNAMIC_ENV_FETCH code to make it
work under win32; getenv_sv() changed to getenv_len() since SVs
aren't visible in the lower echelons; remove bogus exports from
config.sym; PERL_OBJECT-ness for C++ exception support; null out
IoDIRP in filter_del() or sv_free() will attempt to close it
p4raw-id: //depot/perl@3387
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -630,11 +630,17 @@ perl_atexit(void (*fn) (void *), void *ptr) ++PL_exitlistlen; } +#ifdef PERL_OBJECT + typedef void (*xs_init_t)(CPerlObj*); +#else + typedef void (*xs_init_t)(void); +#endif + int #ifdef PERL_OBJECT -perl_parse(void (*xsinit) (CPerlObj*), int argc, char **argv, char **env) +perl_parse(xs_init_t xsinit, int argc, char **argv, char **env) #else -perl_parse(PerlInterpreter *sv_interp, void (*xsinit) (void), int argc, char **argv, char **env) +perl_parse(PerlInterpreter *sv_interp, xs_init_t xsinit, int argc, char **argv, char **env) #endif { dTHR; @@ -690,11 +696,7 @@ setuid perl scripts securely.\n"); oldscope = PL_scopestack_ix; PL_dowarn = G_WARN_OFF; - CALLPROTECT(&ret, perl_parse_body, env -#ifndef PERL_OBJECT - , xsinit -#endif - ); + CALLPROTECT(&ret, FUNC_NAME_TO_PTR(perl_parse_body), env, xsinit); switch (ret) { case 0: return 0; @@ -714,6 +716,7 @@ setuid perl scripts securely.\n"); PerlIO_printf(PerlIO_stderr(), "panic: top_env\n"); return 1; } + return 0; } STATIC void * @@ -731,10 +734,7 @@ perl_parse_body(va_list args) register SV *sv; register char *s; -#ifndef PERL_OBJECT - typedef void (*xs_init_t)(void); xs_init_t xsinit = va_arg(args, xs_init_t); -#endif sv_setpvn(PL_linestr,"",0); sv = newSVpvn("",0); /* first used for -I flags */ @@ -1071,7 +1071,7 @@ perl_run(PerlInterpreter *sv_interp) oldscope = PL_scopestack_ix; redo_body: - CALLPROTECT(&ret, perl_run_body, oldscope); + CALLPROTECT(&ret, FUNC_NAME_TO_PTR(perl_run_body), oldscope); switch (ret) { case 1: cxstack_ix = -1; /* start context stack again */ @@ -1321,7 +1321,7 @@ perl_call_sv(SV *sv, I32 flags) PL_markstack_ptr++; redo_body: - CALLPROTECT(&ret, perl_call_body, (OP*)&myop, FALSE); + CALLPROTECT(&ret, FUNC_NAME_TO_PTR(perl_call_body), (OP*)&myop, FALSE); switch (ret) { case 0: retval = PL_stack_sp - (PL_stack_base + oldmark); @@ -1443,7 +1443,7 @@ perl_eval_sv(SV *sv, I32 flags) myop.op_flags |= OPf_SPECIAL; redo_body: - CALLPROTECT(&ret, perl_call_body, (OP*)&myop, TRUE); + CALLPROTECT(&ret, FUNC_NAME_TO_PTR(perl_call_body), (OP*)&myop, TRUE); switch (ret) { case 0: retval = PL_stack_sp - (PL_stack_base + oldmark); @@ -3005,7 +3005,7 @@ call_list(I32 oldscope, AV *paramList) while (AvFILL(paramList) >= 0) { cv = (CV*)av_shift(paramList); SAVEFREESV(cv); - CALLPROTECT(&ret, call_list_body, cv); + CALLPROTECT(&ret, FUNC_NAME_TO_PTR(call_list_body), cv); switch (ret) { case 0: (void)SvPV(atsv, len); |