#define LINKLIST(o) ((o)->op_next ? (o)->op_next : linklist((OP*)o))
-OP *
+static OP *
S_linklist(pTHX_ OP *o)
{
OP *first;
return o->op_next;
}
-OP *
+static OP *
S_scalarkids(pTHX_ OP *o)
{
if (o && o->op_flags & OPf_KIDS) {
return scalar(o);
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_scalar(pTHX_ OP *o)
{
return o;
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_scalarvoid(pTHX_ OP *o)
{
return o;
}
-OP *
+static OP *
S_listkids(pTHX_ OP *o)
{
if (o && o->op_flags & OPf_KIDS) {
return o;
}
-/* This is used in S_doeval in pp_ctl.c */
OP *
Perl_list(pTHX_ OP *o)
{
return o;
}
-OP *
+static OP *
S_scalarseq(pTHX_ OP *o)
{
dVAR;
}
}
-OP *
-Perl_refkids(pTHX_ OP *o, I32 type)
+static OP *
+S_refkids(pTHX_ OP *o, I32 type)
{
if (o && o->op_flags & OPf_KIDS) {
OP *kid;
return o;
}
-/* This is used in perly.y */
OP *
Perl_sawparens(pTHX_ OP *o)
{
/* Register with debugger */
if (PERLDB_INTER) {
- CV * const cv
- = Perl_get_cvn_flags(aTHX_ STR_WITH_LEN("DB::postponed"), 0);
+ CV * const cv = get_cvs("DB::postponed", 0);
if (cv) {
dSP;
PUSHMARK(SP);
return o;
}
-OP *
+static OP *
S_fold_constants(pTHX_ register OP *o)
{
dVAR;
return o;
}
-OP *
+static OP *
S_gen_constant_list(pTHX_ register OP *o)
{
dVAR;
return newOP(OP_STUB, 0);
}
-OP *
+static OP *
S_force_list(pTHX_ OP *o)
{
if (!o || o->op_type != OP_LIST)
return 0;
}
-OP *
-Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
+static OP *
+S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
{
dVAR;
SV * const tstr = ((SVOP*)expr)->op_sv;
dVAR;
CV* cv;
#ifdef USE_ITHREADS
- const char *const temp_p = CopFILE(PL_curcop);
- const STRLEN len = temp_p ? strlen(temp_p) : 0;
+ const char *const file = CopFILE(PL_curcop);
#else
SV *const temp_sv = CopFILESV(PL_curcop);
- STRLEN len;
- const char *const temp_p = temp_sv ? SvPV_const(temp_sv, len) : NULL;
+ const char *const file = temp_sv ? SvPV_nolen_const(temp_sv) : NULL;
#endif
- char *const file = savepvn(temp_p, temp_p ? len : 0);
ENTER;
and so doesn't get free()d. (It's expected to be from the C pre-
processor __FILE__ directive). But we need a dynamically allocated one,
and we need it to get freed. */
- cv = newXS_flags(name, const_sv_xsub, file, "", XS_DYNAMIC_FILENAME);
+ cv = newXS_flags(name, const_sv_xsub, file ? file : "", "",
+ XS_DYNAMIC_FILENAME);
CvXSUBANY(cv).any_ptr = sv;
CvCONST_on(cv);
- Safefree(file);
#ifdef USE_ITHREADS
if (stash)