X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xs-src%2FMouse.xs;h=27f871c8d32831f1c970ccaa9195176127c18b95;hb=cc7cd81f082a9aaa3dd17ca07dbb91da28bd0b69;hp=627eabd51e68c51d7713074291cf4185ffcfa7ca;hpb=a5c683f611022dcabb13169162fa2f57ba72b200;p=gitmo%2FMouse.git diff --git a/xs-src/Mouse.xs b/xs-src/Mouse.xs index 627eabd..27f871c 100644 --- a/xs-src/Mouse.xs +++ b/xs-src/Mouse.xs @@ -150,7 +150,7 @@ mouse_class_update_xc(pTHX_ SV* const metaclass PERL_UNUSED_DECL, HV* const stas sv_setuv(MOUSE_xc_gen(xc), mro_get_pkg_gen(stash)); } -AV* +static AV* mouse_get_xc(pTHX_ SV* const metaclass) { AV* xc; SV* gen; @@ -202,7 +202,7 @@ mouse_get_xc(pTHX_ SV* const metaclass) { return xc; } -HV* +static HV* mouse_buildargs(pTHX_ SV* metaclass, SV* const klass, I32 ax, I32 items) { HV* args; @@ -237,7 +237,7 @@ mouse_buildargs(pTHX_ SV* metaclass, SV* const klass, I32 ax, I32 items) { return args; } -void +static void mouse_class_initialize_object(pTHX_ SV* const meta, SV* const object, HV* const args, bool const ignore_triggers) { AV* const xc = mouse_get_xc(aTHX_ meta); AV* const attrs = MOUSE_xc_attrall(xc); @@ -419,14 +419,16 @@ CODE: set_slot(methods, name, code); /* $self->{methods}{$name} = $code */ - /* TODO: name the CODE ref if it's anonymous */ - //code_entity = (CV*)SvRV(code_ref); - //if(CvANON(code_entity) - // && CvGV(code_entity) /* a cv under construction has no gv */ ){ + /* name the CODE ref if it's anonymous */ + { + CV* const code_entity = (CV*)SvRV(code_ref); + if(CvANON(code_entity) + && CvGV(code_entity) /* a cv under construction has no gv */ ){ - // CvGV(code_entity) = gv; - // CvANON_off(code_entity); - //} + CvGV(code_entity) = gv; + CvANON_off(code_entity); + } + } } MODULE = Mouse PACKAGE = Mouse::Meta::Class