From: Yuval Kogman Date: Thu, 5 Jun 2008 17:22:26 +0000 (+0000) Subject: fix MOP.xs for 5.8 X-Git-Tag: 0_64~34 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4f4221a7b19f6cbbcf65ca46817422e38334aca;p=gitmo%2FClass-MOP.git fix MOP.xs for 5.8 --- diff --git a/MOP.xs b/MOP.xs index 1144e1c..f1071dd 100644 --- a/MOP.xs +++ b/MOP.xs @@ -28,13 +28,17 @@ get_code_info(coderef) we hit it without the guard, we segfault. The slightly odd return value strikes me as an improvement (mst) */ - //if (isGV_with_GP(CvGV(coderef))) { +#ifdef isGV_with_GP + if ( isGV_with_GP(CvGV(coderef))) { +#endif pkg = HvNAME( GvSTASH(CvGV(coderef)) ); name = GvNAME( CvGV(coderef) ); - //} else { - // pkg = "__UNKNOWN__"; - // name = "__ANON__"; - //} +#ifdef isGV_with_GP + } else { + pkg = "__UNKNOWN__"; + name = "__ANON__"; + } +#endif EXTEND(SP, 2); PUSHs(newSVpvn(pkg, strlen(pkg)));