From: Fuji, Goro Date: Mon, 21 Feb 2011 01:15:13 +0000 (+0900) Subject: Use GvCV_set() for bleadperl X-Git-Tag: 0.90~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=952a7aee6593ddddfbcbcc9c9ccd0be318ef998c;p=gitmo%2FMouse.git Use GvCV_set() for bleadperl --- diff --git a/mouse.h b/mouse.h index 7207eeb..d53c704 100644 --- a/mouse.h +++ b/mouse.h @@ -18,6 +18,10 @@ AV* mouse_mro_get_linear_isa(pTHX_ HV* const stash); #endif /* !no_mro_get_linear_isa */ #endif /* mro_get_package_gen */ +#ifndef GvCV_set +#define GvCV_set(gv, cv) (GvCV(gv) = (cv)) +#endif + extern SV* mouse_package; extern SV* mouse_methods; extern SV* mouse_name; diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index 8d0c51a..3ec7d8c 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -323,7 +323,7 @@ mouse_install_sub(pTHX_ GV* const gv, SV* const code_ref) { if(GvCVu(gv)){ /* delete *slot{gv} to work around "redefine" warning */ SvREFCNT_dec(GvCV(gv)); - GvCV(gv) = NULL; + GvCV_set(gv, NULL); } sv_setsv_mg((SV*)gv, code_ref); /* *gv = $code_ref */