From: Jesse Luehrs Date: Fri, 12 Nov 2010 22:59:47 +0000 (-0600) Subject: fix a bug with @ISA that cmop triggers X-Git-Tag: 0.14~47 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b55c97c24c906e671bb6c7b50bec64889b80f155;p=gitmo%2FPackage-Stash-XS.git fix a bug with @ISA that cmop triggers --- diff --git a/Stash.xs b/Stash.xs index ce062ba..76c7eed 100644 --- a/Stash.xs +++ b/Stash.xs @@ -209,16 +209,14 @@ SV *_get_package_symbol(SV *self, varspec_t *variable, int vivify) glob = (GV*)(*entry); if (!isGV(glob)) { SV *namesv; - char *name; - STRLEN len; namesv = newSVsv(_get_name(self)); sv_catpvs(namesv, "::"); sv_catpv(namesv, variable->name); - name = SvPV(namesv, len); - - gv_init(glob, namespace, name, len, 1); + /* can't use gv_init here, because it screws up @ISA in a way that I + * can't reproduce, but that CMOP triggers */ + gv_fetchsv(namesv, GV_ADD, vartype_to_svtype(variable->type)); } if (vivify) {