OP_name(o)
B::OP o
CODE:
- ST(0) = sv_newmortal();
- sv_setpv(ST(0), PL_op_name[o->op_type]);
+ RETVAL = PL_op_name[o->op_type];
+ OUTPUT:
+ RETVAL
-char *
+void
OP_ppaddr(o)
B::OP o
PREINIT:
OP * kid = NO_INIT
int i = NO_INIT
CODE:
- ST(0) = sv_newmortal();
i = 0;
for (kid = o->op_first; kid; kid = kid->op_sibling)
i++;
- sv_setiv(ST(0), i);
+ RETVAL = i;
+ OUTPUT:
+ RETVAL
#define PMOP_pmreplroot(o) o->op_pmreplroot
#define PMOP_pmreplstart(o) o->op_pmreplstart
I32 len;
(void)hv_iterinit(hv);
EXTEND(sp, HvKEYS(hv) * 2);
- while (sv = hv_iternextsv(hv, &key, &len)) {
+ while ((sv = hv_iternextsv(hv, &key, &len))) {
PUSHs(newSVpvn(key, len));
PUSHs(make_sv_object(aTHX_ sv_newmortal(), sv));
}
if ((svp = av_fetch(namesav, i, TRUE)))
sv_setsv(name, *svp);
else
- SvOK_off(name);
+ (void)SvOK_off(name);
if (SvOK(name)) {
if ((SvPVX(name))[0] == '*') {
{
struct tms t;
clock_t realtime, rdelta, udelta, sdelta;
- char *name, *pv;
- char *hvname;
- STRLEN len;
- SV *sv;
U32 id;
SV *Sub = GvSV(PL_DBsub); /* name of current sub */
/* Now that we know the runtimes, fill them in at the recorded
location -JH */
- clock_t r, u, s;
-
if (g_SAVE_STACK) {
prof_dump_until(aTHX_ g_profstack_ix);
}
prof_mark(aTHX_ OP_ENTERSUB);
PUSHMARK(ORIGMARK);
perl_call_sv(INT2PTR(SV*,SvIV(Sub)), GIMME | G_NODEBUG);
+ PL_curstash = oldstash;
prof_mark(aTHX_ OP_LEAVESUB);
g_depth--;
}
}
}
else if (SvTYPE(pad[j]) >= SVt_PV && SvLEN(pad[j])) {
- int db_len = SvLEN(pad[j]);
- SV *db_sv = pad[j];
levels++;
levelm += SvLEN(pad[j])/SvREFCNT(pad[j]);
/* Dump(pad[j],4); */
# PPCODE needed since by default it is void
-SV *
+void
SvREFCNT_dec(sv)
SV * sv
PPCODE:
--AD October 16, 1995
*/
-static int
-not_here(char *s)
-{
- croak("%s not implemented on this architecture", s);
- return -1;
-}
-
static IV
constant(char *name)
{
#include "bsd_glob.h"
+/* XXX: need some thread awareness */
static int GLOB_ERROR = 0;
-static int
-not_here(char *s)
-{
- croak("%s not implemented on this architecture", s);
- return -1;
-}
-
-
static double
constant(char *name, int arg)
{
while (1) {
/* anything left from last time */
- if (n = SvCUR(my_sv)) {
+ if ((n = SvCUR(my_sv))) {
out_ptr = SvPVX(my_sv) + BUF_OFFSET(my_sv) ;
}
else {
/* want lines */
- if (p = ninstr(out_ptr, out_ptr + n - 1, nl, nl)) {
+ if ((p = ninstr(out_ptr, out_ptr + n - 1, nl, nl))) {
sv_catpvn(buf_sv, out_ptr, p - out_ptr + 1);
typedef void (*FATALFUNC)();
+#ifndef GDBM_FAST
static int
not_here(char *s)
{
croak("GDBM_File::%s not implemented on this architecture", s);
return -1;
}
+#endif
/* GDBM allocates the datum with system malloc() and expects the user
* to free() it. So we either have to free() it immediately, or have
GDBM_FILE dbp ;
RETVAL = NULL ;
- if (dbp = gdbm_open(name, GDBM_BLOCKSIZE, read_write, mode, fatal_func)) {
+ if ((dbp = gdbm_open(name, GDBM_BLOCKSIZE, read_write, mode, fatal_func))) {
RETVAL = (GDBM_File)safemalloc(sizeof(GDBM_File_type)) ;
Zero(RETVAL, 1, GDBM_File_type) ;
RETVAL->dbp = dbp ;
MODULE = IO PACKAGE = IO::Seekable PREFIX = f
-SV *
+void
fgetpos(handle)
InputStream handle
CODE:
MODULE = IO PACKAGE = IO::File PREFIX = f
-SV *
+void
new_tmpfile(packname = "IO::File")
char * packname
PREINIT:
MODULE=IPC::SysV PACKAGE=IPC::SysV
-int
+void
ftok(path, id)
char * path
int id
DIE(aTHX_ PL_no_func, "ftok");
#endif
-int
+void
SHMLBA()
CODE:
#ifdef SHMLBA
char *name;
int i;
- for(i = 0 ; name = IPC__SysV__const[i].n ; i++) {
+ for(i = 0 ; (name = IPC__SysV__const[i].n) ; i++) {
newCONSTSUB(stash,name, newSViv(IPC__SysV__const[i].v));
}
}
void
opset(...)
CODE:
- int i, j;
+ int i;
SV *bitspec, *opset;
char *bitmap;
STRLEN len, on;
#ifdef HAS_LOCALECONV
struct lconv *lcbuf;
RETVAL = newHV();
- if (lcbuf = localeconv()) {
+ if ((lcbuf = localeconv())) {
/* the strings */
if (lcbuf->decimal_point && *lcbuf->decimal_point)
hv_store(RETVAL, "decimal_point", 13,
nice(incr)
int incr
-int
+void
pipe()
PPCODE:
int fds[2];
int fd
pid_t pgrp_id
-int
+void
uname()
PPCODE:
#ifdef HAS_UNAME
PUSHs(&PL_sv_undef);
}
-SV *
+void
strxfrm(src)
SV * src
CODE:
OUTPUT:
RETVAL
-char *
+#XXX: if $xsubpp::WantOptimize is always the default
+# sv_setpv(TARG, ...) could be used rather than
+# ST(0) = sv_2mortal(newSVpv(...))
+void
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
char * fmt
int sec
DBM * dbp ;
RETVAL = NULL ;
- if (dbp = sdbm_open(filename,flags,mode) ) {
+ if ((dbp = sdbm_open(filename,flags,mode))) {
RETVAL = (SDBM_File)safemalloc(sizeof(SDBM_File_type)) ;
Zero(RETVAL, 1, SDBM_File_type) ;
RETVAL->dbp = dbp ;