From: gfx Date: Sat, 21 Nov 2009 05:45:25 +0000 (+0900) Subject: Rename XS funcs which generate XSUBs X-Git-Tag: 0.40_08~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a17f63138ec09db5e362700f2ac72da67f104786;p=gitmo%2FMouse.git Rename XS funcs which generate XSUBs --- diff --git a/mouse.h b/mouse.h index e6b8218..6ddd634 100644 --- a/mouse.h +++ b/mouse.h @@ -143,26 +143,26 @@ void mouse_instance_weaken_slot(pTHX_ SV* const instance, SV* const slot); /* mouse_simle_accessor.xs */ #define INSTALL_SIMPLE_ACCESSOR_WITH_DEFAULTSV(klass, name, dsv) \ - (void)mouse_install_simple_accessor(aTHX_ "Mouse::Meta::" #klass "::" #name, #name, sizeof(#name)-1, XS_Mouse_simple_accessor, (dsv), HEf_SVKEY) + (void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #name, sizeof(#name)-1, XS_Mouse_simple_accessor, (dsv), HEf_SVKEY) #define INSTALL_SIMPLE_ACCESSOR_WITH_DEFAULTS(klass, name, ds) \ INSTALL_SIMPLE_ACCESSOR_WITH_DEFAULTSV(klass, name, newSVpvs(ds)) #define INSTALL_SIMPLE_READER(klass, name) \ INSTALL_SIMPLE_READER_WITH_KEY(klass, name, name) #define INSTALL_SIMPLE_READER_WITH_KEY(klass, name, key) \ - (void)mouse_install_simple_accessor(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_reader, NULL, 0) + (void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_reader, NULL, 0) #define INSTALL_SIMPLE_WRITER(klass, name) \ NSTALL_SIMPLE_WRITER_WITH_KEY(klass, name, name) #define INSTALL_SIMPLE_WRITER_WITH_KEY(klass, name, key) \ - (void)mouse_install_simple_accessor(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_writer, NULL, 0) + (void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_writer, NULL, 0) #define INSTALL_SIMPLE_PREDICATE(klass, name) \ INSTALL_SIMPLE_PREDICATE_WITH_KEY(klass, name, name) #define INSTALL_SIMPLE_PREDICATE_WITH_KEY(klass, name, key) \ - (void)mouse_install_simple_accessor(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_predicate, NULL, 0) + (void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_predicate, NULL, 0) -CV* mouse_install_simple_accessor(pTHX_ const char* const fq_name, const char* const key, I32 const keylen, XSUBADDR_t const accessor_impl, void* const dptr, I32 const dlen); +CV* mouse_simple_accessor_generate(pTHX_ const char* const fq_name, const char* const key, I32 const keylen, XSUBADDR_t const accessor_impl, void* const dptr, I32 const dlen); XS(XS_Mouse_simple_accessor); XS(XS_Mouse_simple_reader); @@ -170,7 +170,7 @@ XS(XS_Mouse_simple_writer); XS(XS_Mouse_simple_clearer); XS(XS_Mouse_simple_predicate); -CV* mouse_instantiate_xs_accessor(pTHX_ SV* const attr, XSUBADDR_t const accessor_impl); +CV* mouse_accessor_generate(pTHX_ SV* const attr, XSUBADDR_t const accessor_impl); XS(XS_Mouse_accessor); XS(XS_Mouse_reader); diff --git a/xs-src/MouseAccessor.xs b/xs-src/MouseAccessor.xs index ddd6333..f93d25f 100644 --- a/xs-src/MouseAccessor.xs +++ b/xs-src/MouseAccessor.xs @@ -28,7 +28,7 @@ mouse_accessor_get_self(pTHX_ I32 const ax, I32 const items, CV* const cv) { CV* -mouse_instantiate_xs_accessor(pTHX_ SV* const attr, XSUBADDR_t const accessor_impl){ +mouse_accessor_generate(pTHX_ SV* const attr, XSUBADDR_t const accessor_impl){ AV* const xa = mouse_get_xa(aTHX_ attr); CV* xsub; MAGIC* mg; @@ -221,7 +221,7 @@ mouse_accessor_get_mg(pTHX_ CV* const xsub){ */ CV* -mouse_install_simple_accessor(pTHX_ const char* const fq_name, const char* const key, I32 const keylen, XSUBADDR_t const accessor_impl, void* const dptr, I32 const dlen){ +mouse_simple_accessor_generate(pTHX_ const char* const fq_name, const char* const key, I32 const keylen, XSUBADDR_t const accessor_impl, void* const dptr, I32 const dlen){ CV* const xsub = newXS((char*)fq_name, accessor_impl, __FILE__); SV* const slot = newSVpvn_share(key, keylen, 0U); MAGIC* mg; @@ -417,7 +417,7 @@ CV* _generate_accessor(klass, SV* attr, metaclass) CODE: { - RETVAL = mouse_instantiate_xs_accessor(aTHX_ attr, XS_Mouse_accessor); + RETVAL = mouse_accessor_generate(aTHX_ attr, XS_Mouse_accessor); } OUTPUT: RETVAL @@ -426,7 +426,7 @@ CV* _generate_reader(klass, SV* attr, metaclass) CODE: { - RETVAL = mouse_instantiate_xs_accessor(aTHX_ attr, XS_Mouse_reader); + RETVAL = mouse_accessor_generate(aTHX_ attr, XS_Mouse_reader); } OUTPUT: RETVAL @@ -435,7 +435,7 @@ CV* _generate_writer(klass, SV* attr, metaclass) CODE: { - RETVAL = mouse_instantiate_xs_accessor(aTHX_ attr, XS_Mouse_writer); + RETVAL = mouse_accessor_generate(aTHX_ attr, XS_Mouse_writer); } OUTPUT: RETVAL @@ -447,7 +447,7 @@ CODE: SV* const slot = mcall0s(attr, "name"); STRLEN len; const char* const pv = SvPV_const(slot, len); - RETVAL = mouse_install_simple_accessor(aTHX_ NULL, pv, len, XS_Mouse_simple_clearer, NULL, 0); + RETVAL = mouse_simple_accessor_generate(aTHX_ NULL, pv, len, XS_Mouse_simple_clearer, NULL, 0); } OUTPUT: RETVAL @@ -459,7 +459,7 @@ CODE: SV* const slot = mcall0s(attr, "name"); STRLEN len; const char* const pv = SvPV_const(slot, len); - RETVAL = mouse_install_simple_accessor(aTHX_ NULL, pv, len, XS_Mouse_simple_predicate, NULL, 0); + RETVAL = mouse_simple_accessor_generate(aTHX_ NULL, pv, len, XS_Mouse_simple_predicate, NULL, 0); } OUTPUT: RETVAL