From: Jesse Luehrs Date: Sat, 10 Dec 2011 04:46:36 +0000 (-0600) Subject: use the right glob name here X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a78ba151689b41ba5da384d4a5f525044489dd4;p=gitmo%2FPackage-Stash-XS.git use the right glob name here --- diff --git a/XS.xs b/XS.xs index 87802d8..bfc23a2 100644 --- a/XS.xs +++ b/XS.xs @@ -582,8 +582,11 @@ add_symbol(self, variable, initial=NULL, ...) glob = (GV*)HeVAL(entry); } else { + char *varname_pv; + STRLEN varname_len; glob = (GV*)newSV(0); - gv_init(glob, namespace, "ANON", 4, 1); + varname_pv = SvPV(variable.name, varname_len); + gv_init(glob, namespace, varname_pv, varname_len, 1); if (!hv_store_ent(namespace, variable.name, (SV*)glob, 0)) { croak("hv_store failed"); }