SV * const sref = SvREFCNT_inc(SvRV(sstr));
SV *dref = NULL;
const int intro = GvINTRO(dstr);
+ SV **location;
#ifdef GV_UNIQUE_CHECK
if (GvUNIQUE((GV*)dstr)) {
}
break;
case SVt_PVIO:
- if (intro)
- SAVEGENERICSV(GvIOp(dstr));
- else
- dref = (SV*)GvIOp(dstr);
- GvIOp(dstr) = (IO*)sref;
- break;
+ location = (SV **) &GvIOp(dstr);
+ goto common;
case SVt_PVFM:
+ location = (SV **) &GvFORM(dstr);
+ common:
if (intro)
- SAVEGENERICSV(GvFORM(dstr));
+ SAVEGENERICSV(*location);
else
- dref = (SV*)GvFORM(dstr);
- GvFORM(dstr) = (CV*)sref;
+ dref = *location;
+ *location = sref;
break;
default:
if (intro)