_sv = new_version(_sv); \
if ( vcmp(_sv,xssv) ) \
Perl_croak(aTHX_ "%s object version %"SVf" does not match %s%s%s%s %"SVf,\
- module, (void*)vstringify(xssv), \
+ module, SVfARG(vstringify(xssv)), \
vn ? "$" : "", vn ? module : "", vn ? "::" : "", \
- vn ? vn : "bootstrap parameter", (void*)vstringify(_sv));\
+ vn ? vn : "bootstrap parameter", SVfARG(vstringify(_sv)));\
} \
} STMT_END
#else
if (ckWARN_d(WARN_INPLACE))
Perl_warner(aTHX_ packWARN(WARN_INPLACE),
"Can't do inplace edit: %"SVf" would not be unique",
- (void*)sv);
+ SVfARG(sv));
do_close(gv,FALSE);
continue;
}
if (ckWARN_d(WARN_INPLACE))
Perl_warner(aTHX_ packWARN(WARN_INPLACE),
"Can't rename %s to %"SVf": %s, skipping file",
- PL_oldname, (void*)sv, Strerror(errno));
+ PL_oldname, SVfARG(sv), Strerror(errno));
do_close(gv,FALSE);
continue;
}
if (ckWARN_d(WARN_INPLACE))
Perl_warner(aTHX_ packWARN(WARN_INPLACE),
"Can't rename %s to %"SVf": %s, skipping file",
- PL_oldname, (void*)sv, Strerror(errno) );
+ PL_oldname, SVfARG(sv), Strerror(errno) );
do_close(gv,FALSE);
continue;
}
if (!basestash) {
if (ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %"SVf" for @%s::ISA",
- (void*)sv, hvname);
+ SVfARG(sv), hvname);
continue;
}
gv = gv_fetchmeth(basestash, name, len,
if (amtp && amtp->fallback >= AMGfallYES) {
DEBUG_o( Perl_deb(aTHX_ "%s", SvPVX_const(msg)) );
} else {
- Perl_croak(aTHX_ "%"SVf, (void*)msg);
+ Perl_croak(aTHX_ "%"SVf, SVfARG(msg));
}
return NULL;
}
if (flags & HVhek_UTF8) {
SvUTF8_on(sv);
}
- Perl_croak(aTHX_ msg, (void*)sv);
+ Perl_croak(aTHX_ msg, SVfARG(sv));
}
/* (klen == HEf_SVKEY) is special for MAGICAL hv entries, meaning key slot
if (he)
value = HeVAL(he);
if (!value || value == &PL_sv_undef)
- Perl_croak(aTHX_ PL_no_helem_sv, (void*)mg->mg_obj);
+ Perl_croak(aTHX_ PL_no_helem_sv, SVfARG(mg->mg_obj));
}
else {
AV* const av = (AV*)LvTARG(sv);
return; /* various ok barewords are hidden in extra OP_NULL */
qerror(Perl_mess(aTHX_
"Bareword \"%"SVf"\" not allowed while \"strict subs\" in use",
- (void*)cSVOPo_sv));
+ SVfARG(cSVOPo_sv)));
}
/* "register" allocation */
gv_efullname3(name = sv_newmortal(), gv, NULL);
sv_setpv(msg, "Prototype mismatch:");
if (name)
- Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, (void*)name);
+ Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, SVfARG(name));
if (SvPOK(cv))
- Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (void*)cv);
+ Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", SVfARG(cv));
else
sv_catpvs(msg, ": none");
sv_catpvs(msg, " vs ");
Perl_sv_catpvf(aTHX_ msg, "(%.*s)", (int) len, p);
else
sv_catpvs(msg, "none");
- Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%"SVf, (void*)msg);
+ Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%"SVf, SVfARG(msg));
}
}
else {
/* force display of errors found but not reported */
sv_catpv(ERRSV, not_safe);
- Perl_croak(aTHX_ "%"SVf, (void*)ERRSV);
+ Perl_croak(aTHX_ "%"SVf, SVfARG(ERRSV));
}
}
}
CopLINE_set(PL_curcop, PL_copline);
Perl_warner(aTHX_ packWARN(WARN_REDEFINE),
o ? "Format %"SVf" redefined"
- : "Format STDOUT redefined", (void*)cSVOPo->op_sv);
+ : "Format STDOUT redefined", SVfARG(cSVOPo->op_sv));
CopLINE_set(PL_curcop, oldline);
}
SvREFCNT_dec(cv);
if (badthing)
Perl_croak(aTHX_
"Can't use bareword (\"%"SVf"\") as %s ref while \"strict refs\" in use",
- (void*)kidsv, badthing);
+ SVfARG(kidsv), badthing);
}
/*
* This is a little tricky. We only want to add the symbol if we
if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX))
Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
"Array @%"SVf" missing the @ in argument %"IVdf" of %s()",
- (void*)((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]);
+ SVfARG(((SVOP*)kid)->op_sv), (IV)numargs, PL_op_desc[type]);
#ifdef PERL_MAD
op_getmad(kid,newop,'K');
#else
if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX))
Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
"Hash %%%"SVf" missing the %% in argument %"IVdf" of %s()",
- (void*)((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]);
+ SVfARG(((SVOP*)kid)->op_sv), (IV)numargs, PL_op_desc[type]);
#ifdef PERL_MAD
op_getmad(kid,newop,'K');
#else
default:
oops:
Perl_croak(aTHX_ "Malformed prototype for %s: %"SVf,
- gv_ename(namegv), (void*)cv);
+ gv_ename(namegv), SVfARG(cv));
}
}
else
gv_efullname3(sv, gv, NULL);
Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE),
"%"SVf"() called too early to check prototype",
- (void*)sv);
+ SVfARG(sv));
}
}
else if (o->op_next->op_type == OP_READLINE
&& !SvFAKE(sv) && ckWARN_d(WARN_INTERNAL))
Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
"%"SVf" never introduced",
- (void*)sv);
+ SVfARG(sv));
}
}
/* "Deintroduce" my variables that are leaving with this scope. */
" DEVEL" STRINGIFY(PERL_PATCHNUM)
#endif
" built for %s",
- (void*)vstringify(PL_patchlevel),
+ SVfARG(vstringify(PL_patchlevel)),
ARCHNAME));
#else /* DGUX */
/* Adjust verbose output as in the perl that ships with the DG/UX OS from EMC */
PerlIO_printf(PerlIO_stdout(),
Perl_form(aTHX_ "\nThis is perl, %"SVf"\n",
- (void*)vstringify(PL_patchlevel)));
+ SVfARG(vstringify(PL_patchlevel))));
PerlIO_printf(PerlIO_stdout(),
Perl_form(aTHX_ " built under %s at %s %s\n",
OSNAME, __DATE__, __TIME__));
Perl_sv_setpvf(aTHX_ cmd, "\
%s -ne%s%s%s %s | %"SVf" %s %"SVf" %s",
- perl, quote, code, quote, scriptname, (void*)cpp,
- cpp_discard_flag, (void*)sv, CPPMINUS);
+ perl, quote, code, quote, scriptname, SVfARG(cpp),
+ cpp_discard_flag, SVfARG(sv), CPPMINUS);
PL_doextract = FALSE;
#endif
/* .../version/archname if -d .../version/archname */
Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH PERL_ARCH_FMT,
- (void*)libdir,
+ SVfARG(libdir),
(int)PERL_REVISION, (int)PERL_VERSION,
(int)PERL_SUBVERSION, ARCHNAME);
subdir = S_incpush_if_exists(aTHX_ subdir);
/* .../version if -d .../version */
Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH,
- (void*)libdir,
+ SVfARG(libdir),
(int)PERL_REVISION, (int)PERL_VERSION,
(int)PERL_SUBVERSION);
subdir = S_incpush_if_exists(aTHX_ subdir);
/* .../archname if -d .../archname */
Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT,
- (void*)libdir, ARCHNAME);
+ SVfARG(libdir), ARCHNAME);
subdir = S_incpush_if_exists(aTHX_ subdir);
}
if (addoldvers) {
for (incver = incverlist; *incver; incver++) {
/* .../xxx if -d .../xxx */
- Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT, (void *)libdir, *incver);
+ Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT,
+ SVfARG(libdir), *incver);
subdir = S_incpush_if_exists(aTHX_ subdir);
}
}
while (PL_scopestack_ix > oldscope)
LEAVE;
JMPENV_POP;
- Perl_croak(aTHX_ "%"SVf"", (void*)atsv);
+ Perl_croak(aTHX_ "%"SVf"", SVfARG(atsv));
}
break;
case 1:
# define SVf256 SVf_(256)
#endif
+#define SVfARG(p) ((void*)(p))
+
#ifndef vdNUMBER
# define vdNUMBER 1
#endif
IO * const io = GvIOn((GV *) SvRV(sv));
PerlIO * const ifp = IoIFP(io);
PerlIO * const ofp = IoOFP(io);
- Perl_warn(aTHX_ "set %" SVf " %p %p %p", (void*)sv, (void*)io, (void*)ifp, (void*)ofp);
+ Perl_warn(aTHX_ "set %" SVf " %p %p %p",
+ SVfARG(sv), (void*)io, (void*)ifp, (void*)ofp);
}
return 0;
}
IO * const io = GvIOn((GV *) SvRV(sv));
PerlIO * const ifp = IoIFP(io);
PerlIO * const ofp = IoOFP(io);
- Perl_warn(aTHX_ "get %" SVf " %p %p %p", (void*)sv, (void*)io, (void*)ifp, (void*)ofp);
+ Perl_warn(aTHX_ "get %" SVf " %p %p %p",
+ SVfARG(sv), (void*)io, (void*)ifp, (void*)ofp);
}
return 0;
}
static int
perlio_mg_clear(pTHX_ SV *sv, MAGIC *mg)
{
- Perl_warn(aTHX_ "clear %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "clear %" SVf, SVfARG(sv));
return 0;
}
static int
perlio_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
- Perl_warn(aTHX_ "free %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "free %" SVf, SVfARG(sv));
return 0;
}
mg = mg_find(sv, PERL_MAGIC_ext);
mg->mg_virtual = &perlio_vtab;
mg_magical(sv);
- Perl_warn(aTHX_ "attrib %" SVf, (void*)sv);
+ Perl_warn(aTHX_ "attrib %" SVf, SVfARG(sv));
for (i = 2; i < items; i++) {
STRLEN len;
const char * const name = SvPV_const(ST(i), len);
if (lval) {
if (!svp || *svp == &PL_sv_undef) {
- DIE(aTHX_ PL_no_helem_sv, (void*)keysv);
+ DIE(aTHX_ PL_no_helem_sv, SVfARG(keysv));
}
if (localizing) {
if (HvNAME_get(hv) && isGV(*svp))
else if (PL_errors)
sv_catsv(PL_errors, err);
else
- Perl_warn(aTHX_ "%"SVf, (void*)err);
+ Perl_warn(aTHX_ "%"SVf, SVfARG(err));
++PL_error_count;
}
/* Unassume the success we assumed earlier. */
SV * const nsv = cx->blk_eval.old_namesv;
(void)hv_delete(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv), G_DISCARD);
- DIE(aTHX_ "%"SVf" did not return a true value", (void*)nsv);
+ DIE(aTHX_ "%"SVf" did not return a true value", SVfARG(nsv));
}
break;
case CXt_FORMAT:
goto retry;
tmpstr = sv_newmortal();
gv_efullname3(tmpstr, gv, NULL);
- DIE(aTHX_ "Goto undefined subroutine &%"SVf"",(void*)tmpstr);
+ DIE(aTHX_ "Goto undefined subroutine &%"SVf"", SVfARG(tmpstr));
}
DIE(aTHX_ "Goto undefined subroutine");
}
if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) {
if ( vcmp(sv,PL_patchlevel) <= 0 )
DIE(aTHX_ "Perls since %"SVf" too modern--this is %"SVf", stopped",
- (void*)vnormal(sv), (void*)vnormal(PL_patchlevel));
+ SVfARG(vnormal(sv)), SVfARG(vnormal(PL_patchlevel)));
}
else {
if ( vcmp(sv,PL_patchlevel) > 0 )
DIE(aTHX_ "Perl %"SVf" required--this is only %"SVf", stopped",
- (void*)vnormal(sv), (void*)vnormal(PL_patchlevel));
+ SVfARG(vnormal(sv)), SVfARG(vnormal(PL_patchlevel)));
}
RETPUSHYES;
/* Unassume the success we assumed earlier. */
SV * const nsv = cx->blk_eval.old_namesv;
(void)hv_delete(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv), G_DISCARD);
- retop = Perl_die(aTHX_ "%"SVf" did not return a true value", (void*)nsv);
+ retop = Perl_die(aTHX_ "%"SVf" did not return a true value", SVfARG(nsv));
/* die_where() did LEAVE, or we won't be here */
}
else {
SV* lv;
SV* key2;
if (!defer) {
- DIE(aTHX_ PL_no_helem_sv, (void*)keysv);
+ DIE(aTHX_ PL_no_helem_sv, SVfARG(keysv));
}
lv = sv_newmortal();
sv_upgrade(lv, SVt_PVLV);
else {
sub_name = sv_newmortal();
gv_efullname3(sub_name, gv, NULL);
- DIE(aTHX_ "Undefined subroutine &%"SVf" called", (void*)sub_name);
+ DIE(aTHX_ "Undefined subroutine &%"SVf" called", SVfARG(sub_name));
}
}
if (!cv)
SV* const tmpstr = sv_newmortal();
gv_efullname3(tmpstr, CvGV(cv), NULL);
Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%"SVf"\"",
- (void*)tmpstr);
+ SVfARG(tmpstr));
}
}
if (SvROK(elemsv) && !SvGAMAGIC(elemsv) && ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_MISC),
"Use of reference \"%"SVf"\" as array index",
- (void*)elemsv);
+ SVfARG(elemsv));
if (elem > 0)
elem -= CopARYBASE_get(PL_curcop);
if (SvTYPE(av) != SVt_PVAV)
SV *tmpstr = sv_newmortal();
gv_efullname3(tmpstr, gv, NULL);
DIE(aTHX_ "Undefined sort subroutine \"%"SVf"\" called",
- (void*)tmpstr);
+ SVfARG(tmpstr));
}
else {
DIE(aTHX_ "Undefined subroutine in sort");
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvs("Warning: something's wrong"));
- Perl_warn(aTHX_ "%"SVf, (void*)tmpsv);
+ Perl_warn(aTHX_ "%"SVf, SVfARG(tmpsv));
RETSETYES;
}
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvs("Died"));
- DIE(aTHX_ "%"SVf, (void*)tmpsv);
+ DIE(aTHX_ "%"SVf, SVfARG(tmpsv));
}
/* I/O. */
stash = gv_stashsv(*MARK, FALSE);
if (!stash || !(gv = gv_fetchmethod(stash, methname))) {
DIE(aTHX_ "Can't locate object method \"%s\" via package \"%"SVf"\"",
- methname, (void*)*MARK);
+ methname, SVfARG(*MARK));
}
ENTER;
PUSHSTACKi(PERLSI_MAGIC);
AV *list= (AV *)progi->data->data[progi->name_list_idx];
SV **name= av_fetch(list, ARG(o), 0 );
if (name)
- Perl_sv_catpvf(aTHX_ sv, " '%"SVf"'", (void*)*name);
+ Perl_sv_catpvf(aTHX_ sv, " '%"SVf"'", SVfARG(*name));
}
} else if (k == NREF) {
if ( prog->paren_names ) {
Perl_sv_catpvf(aTHX_ sv, "%s%"IVdf,
(n ? "," : ""), (IV)nums[n]);
}
- Perl_sv_catpvf(aTHX_ sv, " '%"SVf"'", (void*)*name );
+ Perl_sv_catpvf(aTHX_ sv, " '%"SVf"'", SVfARG(*name));
}
}
} else if (k == GOSUB)
else if (k == VERB) {
if (!o->flags)
Perl_sv_catpvf(aTHX_ sv, ":%"SVf,
- (void*)(SV*)progi->data->data[ ARG( o ) ]);
+ SVfARG((SV*)progi->data->data[ ARG( o ) ]));
} else if (k == LOGICAL)
Perl_sv_catpvf(aTHX_ sv, "[%d]", o->flags); /* 2: embedded, otherwise 1 */
else if (k == ANYOF) {
PerlIO_printf(Perl_debug_log,
"%*s %ssetting cutpoint to mark:%"SVf"...%s\n",
REPORT_CODE_OFF+depth*2, "",
- PL_colors[4], (void*)sv_commit, PL_colors[5]);
+ PL_colors[4], SVfARG(sv_commit), PL_colors[5]);
});
}
mark_state = ST.prev_mark;
if (SvIS_FREED(dstr)) {
Perl_croak(aTHX_ "panic: attempt to copy value %" SVf
- " to a freed scalar %p", (void*)sstr, (void*)dstr);
+ " to a freed scalar %p", SVfARG(sstr), (void *)dstr);
}
SV_CHECK_THINKFIRST_COW_DROP(dstr);
if (!sstr)
PL_utf8cache = 0;
Perl_croak(aTHX_ "panic: sv_len_utf8 cache %"UVuf
" real %"UVuf" for %"SVf,
- (UV) ulen, (UV) real, (void*)sv);
+ (UV) ulen, (UV) real, SVfARG(sv));
}
}
}
PL_utf8cache = 0;
Perl_croak(aTHX_ "panic: sv_pos_u2b_cache cache %"UVuf
" real %"UVuf" for %"SVf,
- (UV) boffset, (UV) real_boffset, (void*)sv);
+ (UV) boffset, (UV) real_boffset, SVfARG(sv));
}
}
boffset = real_boffset;
SAVEI8(PL_utf8cache);
PL_utf8cache = 0;
Perl_croak(aTHX_ "panic: utf8_mg_pos_cache_update cache %"UVuf
- " real %"UVuf" for %"SVf, (UV) utf8, (UV) realutf8, (void*)sv);
+ " real %"UVuf" for %"SVf, (UV) utf8, (UV) realutf8, SVfARG(sv));
}
}
PL_utf8cache = 0;
Perl_croak(aTHX_ "panic: sv_pos_b2u cache %"UVuf
" real %"UVuf" for %"SVf,
- (UV) len, (UV) real_len, (void*)sv);
+ (UV) len, (UV) real_len, SVfARG(sv));
}
}
len = real_len;
else
io = 0;
if (!io)
- Perl_croak(aTHX_ "Bad filehandle: %"SVf, (void*)sv);
+ Perl_croak(aTHX_ "Bad filehandle: %"SVf, SVfARG(sv));
break;
}
return io;
LEAVE;
if (!GvCVu(gv))
Perl_croak(aTHX_ "Unable to create sub named \"%"SVf"\"",
- (void*)sv);
+ SVfARG(sv));
}
return GvCVu(gv);
}
(UV)c & 0xFF);
} else
sv_catpvs(msg, "end of string");
- Perl_warner(aTHX_ packWARN(WARN_PRINTF), "%"SVf, (void*)msg); /* yes, this is reentrant */
+ Perl_warner(aTHX_ packWARN(WARN_PRINTF), "%"SVf, SVfARG(msg)); /* yes, this is reentrant */
}
/* output mangled stuff ... */
PUTBACK;
PerlIO_apply_layers(aTHX_ PL_rsfp, NULL,
Perl_form(aTHX_ ":encoding(%"SVf")",
- (void*)name));
+ SVfARG(name)));
FREETMPS;
LEAVE;
}
if (bad_proto)
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"Illegal character in prototype for %"SVf" : %s",
- (void*)PL_subname, d);
+ SVfARG(PL_subname), d);
SvCUR_set(PL_lex_stuff, tmp);
have_proto = TRUE;
if (!have_name)
Perl_croak(aTHX_ "Illegal declaration of anonymous subroutine");
else if (*s != ';')
- Perl_croak(aTHX_ "Illegal declaration of subroutine %"SVf, (void*)PL_subname);
+ Perl_croak(aTHX_ "Illegal declaration of subroutine %"SVf, SVfARG(PL_subname));
}
#ifdef PERL_MAD
PL_multi_end = 0;
}
if (PL_in_eval & EVAL_WARNONLY && ckWARN_d(WARN_SYNTAX))
- Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%"SVf, (void*)msg);
+ Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%"SVf, SVfARG(msg));
else
qerror(msg);
if (PL_error_count >= 10) {
if (PL_in_eval && SvCUR(ERRSV))
Perl_croak(aTHX_ "%"SVf"%s has too many errors.\n",
- (void*)ERRSV, OutCopFILE(PL_curcop));
+ SVfARG(ERRSV), OutCopFILE(PL_curcop));
else
Perl_croak(aTHX_ "%s has too many errors.\n",
OutCopFILE(PL_curcop));
if (ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"Can't locate package %"SVf" for @%s::ISA",
- (void*)sv, hvname);
+ SVfARG(sv), hvname);
continue;
}
if (isa_lookup(basestash, name, name_stash, len, level + 1)) {
if ( vcmp( req, sv ) > 0 )
Perl_croak(aTHX_ "%s version %"SVf" (%"SVf") required--"
"this is only version %"SVf" (%"SVf")", HvNAME_get(pkg),
- (void*)vnumify(req),
- (void*)vnormal(req),
- (void*)vnumify(sv),
- (void*)vnormal(sv));
+ SVfARG(vnumify(req)),
+ SVfARG(vnormal(req)),
+ SVfARG(vnumify(sv)),
+ SVfARG(vnormal(sv)));
}
if ( SvOK(sv) && sv_derived_from(sv, "version") ) {
else {
if (namok && argok)
XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf"(%"SVf")",
- (void*)*namsvp,
- (void*)*argsvp));
+ SVfARG(*namsvp),
+ SVfARG(*argsvp)));
else if (namok)
XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf,
- (void*)*namsvp));
+ SVfARG(*namsvp)));
else
XPUSHs(&PL_sv_undef);
nitem++;
if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
if (SvPOK(retval))
Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"",
- (void*)retval);
+ SVfARG(retval));
Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
}
return retval;