Revision history for Perl extension Class-MOP.
+Next
+ * mop.c
+ - Applied an MS VC++ compilation fix from Taro Nishino. RT #48072
+
0.92_01 Thu, Sep 10, 2009
* Class::MOP::Package
- Backwards compatibility tweaks to XS for 5.8.1. (Goro Fuji)
int
mop_get_code_info (SV *coderef, char **pkg, char **name)
{
+ GV *gv;
+
if (!SvOK(coderef) || !SvROK(coderef) || SvTYPE(SvRV(coderef)) != SVt_PVCV) {
return 0;
}
*/
if ( isGV_with_GP(CvGV(coderef)) ) {
- GV *gv = CvGV(coderef);
- *pkg = HvNAME( GvSTASH(gv) ? GvSTASH(gv) : CvSTASH(coderef) );
- *name = GvNAME( CvGV(coderef) );
+ gv = CvGV(coderef);
+ *pkg = HvNAME( GvSTASH(gv) ? GvSTASH(gv) : CvSTASH(coderef) );
+ *name = GvNAME( CvGV(coderef) );
} else {
- *pkg = "__UNKNOWN__";
- *name = "__ANON__";
+ *pkg = "__UNKNOWN__";
+ *name = "__ANON__";
}
return 1;