From: Dave Rolsky Date: Tue, 15 Sep 2009 04:20:06 +0000 (-0500) Subject: Revert "MS VC++ compilation fix" X-Git-Tag: 0.93~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa798f12b1bdb2b170de39dbce352cc586d03f4a;p=gitmo%2FClass-MOP.git Revert "MS VC++ compilation fix" This reverts commit ca2126106133419088523aefe7cf5d0c91524086. Conflicts: Changes --- diff --git a/Changes b/Changes index 2c5f1f5..fb5757e 100644 --- a/Changes +++ b/Changes @@ -1,9 +1,6 @@ Revision history for Perl extension Class-MOP. 0.93 - * mop.c - - Applied an MS VC++ compilation fix from Taro Nishino. RT #48072 - * Class::MOP - The load_class function just returns true, since it's return value was confusing (either a metaclass object or a class name). It either loads diff --git a/mop.c b/mop.c index aafaef7..0d170be 100644 --- a/mop.c +++ b/mop.c @@ -78,8 +78,6 @@ mop_call0 (pTHX_ SV *const self, SV *const method) 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; } @@ -97,12 +95,12 @@ mop_get_code_info (SV *coderef, char **pkg, char **name) */ if ( isGV_with_GP(CvGV(coderef)) ) { - gv = CvGV(coderef); - *pkg = HvNAME( GvSTASH(gv) ? GvSTASH(gv) : CvSTASH(coderef) ); - *name = GvNAME( CvGV(coderef) ); + GV *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;