This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure regen to pick up the new installation directories
[perl5.git] / run.c
diff --git a/run.c b/run.c
index 514cd16..decf040 100644 (file)
--- a/run.c
+++ b/run.c
@@ -8,6 +8,7 @@
  */
 
 #include "EXTERN.h"
+#define PERL_IN_RUN_C
 #include "perl.h"
 
 /*
  * know.  Run now!  Hope is in speed!"  --Gandalf
  */
 
-#ifdef PERL_OBJECT
-#define CALLOP this->*PL_op
-#else
-#define CALLOP *PL_op
-#endif
-
 int
-runops_standard(void)
+Perl_runops_standard(pTHX)
 {
     dTHR;
 
-    while ( PL_op = (CALLOP->op_ppaddr)(ARGS) ) ;
+    while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) ) ;
 
     TAINT_NOT;
     return 0;
 }
 
-#ifdef DEBUGGING
-#ifndef PERL_OBJECT
-static void debprof (OP*o);
-#endif
-
-#endif /* DEBUGGING */
-
 int
-runops_debug(void)
+Perl_runops_debug(pTHX)
 {
 #ifdef DEBUGGING
     dTHR;
     if (!PL_op) {
-       warn("NULL OP IN RUN");
+       if (ckWARN_d(WARN_DEBUGGING))
+           Perl_warner(aTHX_ WARN_DEBUGGING, "NULL OP IN RUN");
        return 0;
     }
 
@@ -59,7 +48,7 @@ runops_debug(void)
            DEBUG_t(debop(PL_op));
            DEBUG_P(debprof(PL_op));
        }
-    } while ( PL_op = (CALLOP->op_ppaddr)(ARGS) );
+    } while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) );
 
     TAINT_NOT;
     return 0;
@@ -69,12 +58,12 @@ runops_debug(void)
 }
 
 I32
-debop(OP *o)
+Perl_debop(pTHX_ OP *o)
 {
 #ifdef DEBUGGING
     SV *sv;
     STRLEN n_a;
-    deb("%s", PL_op_name[o->op_type]);
+    Perl_deb(aTHX_ "%s", PL_op_name[o->op_type]);
     switch (o->op_type) {
     case OP_CONST:
        PerlIO_printf(Perl_debug_log, "(%s)", SvPEEK(cSVOPo->op_sv));
@@ -99,7 +88,7 @@ debop(OP *o)
 }
 
 void
-watch(char **addr)
+Perl_watch(pTHX_ char **addr)
 {
 #ifdef DEBUGGING
     dTHR;
@@ -111,7 +100,7 @@ watch(char **addr)
 }
 
 STATIC void
-debprof(OP *o)
+S_debprof(pTHX_ OP *o)
 {
 #ifdef DEBUGGING
     if (!PL_profiledata)
@@ -121,7 +110,7 @@ debprof(OP *o)
 }
 
 void
-debprofdump(void)
+Perl_debprofdump(pTHX)
 {
 #ifdef DEBUGGING
     unsigned i;