nv = -nv;
if (nv < UV_MAX) {
nv += 0.5;
- uv = nv;
+ uv = (UV)nv;
if (uv & 1 && uv == nv)
uv--; /* Round to even */
do {
pp = pat + 2;
while (*pp >= '0' && *pp <= '9')
digits = 10 * digits + (*pp++ - '0');
- if (pp - pat == patlen - 1) {
+ if (pp - pat == (int)patlen - 1) {
NV nv;
if (args)
case 'V': uv = va_arg(*args, UV); break;
default: uv = va_arg(*args, unsigned); break;
#ifdef HAS_QUAD
- case 'q': uv = va_arg(*args, Quad_t); break;
+ case 'q': uv = va_arg(*args, Uquad_t); break;
#endif
}
}
SvREFCNT_inc(nmg->mg_obj = (SV*)newAV());
svp = AvARRAY(av);
for (i = AvFILLp(av); i >= 0; i--) {
- if (!svp[i] || SvREFCNT(svp[i]) < 2) continue;
+ if (!svp[i]) continue;
av_push((AV*)nmg->mg_obj,sv_dup(svp[i],param));
}
}
GvHV(gv) = (HV*)sv;
}
else {
- SvREADONLY_on(GvAV(gv));
+ SvREADONLY_on(GvHV(gv));
}
return sstr; /* he_dup() will SvREFCNT_inc() */
SvREFCNT_inc(CvXSUBANY(sstr).any_ptr) :
sv_dup_inc(CvXSUBANY(sstr).any_ptr, param);
}
- CvGV(dstr) = gv_dup(CvGV(sstr), param);
+ /* don't dup if copying back - CvGV isn't refcounted, so the
+ * duped GV may never be freed. A bit of a hack! DAPM */
+ CvGV(dstr) = (param->flags & CLONEf_JOIN_IN) ?
+ Nullgv : gv_dup(CvGV(sstr), param) ;
if (param->flags & CLONEf_COPY_STACKS) {
CvDEPTH(dstr) = CvDEPTH(sstr);
} else {