summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-10-31 01:43:49 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-10-31 01:43:49 +0000
commit8ac853655d9b744749adcb9687c13d99cdd6e9fb (patch)
treec32146679d3473063e5fce6090b93706d7602ad6 /pp_hot.c
parent27332437a2ed19419cce5a4de680085fd4d13c8d (diff)
downloadperl-8ac853655d9b744749adcb9687c13d99cdd6e9fb.tar.gz
Convert miniperl sources to ANSI C. Several passes of
GNU C's 'protoize' plus a few hand edits. Will compile miniperl with gcc -x c++ (i.e. treat .c a C++ files) Does not link seems gcc's C++ does not define a symbol for const char foo[] = "...."; i.e. with empty []. p4raw-id: //depot/ansiperl@194
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/pp_hot.c b/pp_hot.c
index f4741a1d68..df9798a349 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -18,12 +18,15 @@
#include "EXTERN.h"
#include "perl.h"
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+
/* Hot code. */
#ifdef USE_THREADS
static void
-unset_cvowner(cvarg)
-void *cvarg;
+unset_cvowner(void *cvarg)
{
register CV* cv = (CV *) cvarg;
#ifdef DEBUGGING
@@ -947,7 +950,7 @@ ret_no:
}
OP *
-do_readline()
+do_readline(void)
{
dTHR;
dSP; dTARGETSTACKED;
@@ -1370,7 +1373,7 @@ PP(pp_iter)
}
LvTARG(lv) = SvREFCNT_inc(av);
LvTARGOFF(lv) = cx->blk_loop.iterix;
- LvTARGLEN(lv) = -1;
+ LvTARGLEN(lv) = (UV) -1;
sv = (SV*)lv;
}
@@ -1713,9 +1716,7 @@ PP(pp_leavesub)
}
static CV *
-get_db_sub(svp, cv)
-SV **svp;
-CV *cv;
+get_db_sub(SV **svp, CV *cv)
{
dTHR;
SV *oldsv = *svp;
@@ -2144,8 +2145,7 @@ PP(pp_entersub)
}
void
-sub_crush_depth(cv)
-CV* cv;
+sub_crush_depth(CV *cv)
{
if (CvANON(cv))
warn("Deep recursion on anonymous subroutine");
@@ -2195,9 +2195,7 @@ PP(pp_aelem)
}
void
-vivify_ref(sv, to_what)
-SV* sv;
-U32 to_what;
+vivify_ref(SV *sv, U32 to_what)
{
if (SvGMAGICAL(sv))
mg_get(sv);