#define INSTALL_SIMPLE_READER_WITH_KEY(klass, name, key) \
(void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #key, sizeof(#key)-1, XS_Mouse_simple_reader, NULL, 0)
-#define INSTALL_SIMPLE_READER_WITH_DEFAULTSV(klass, name, dsv) \
+#define INSTALL_CLASS_HOLDER_SV(klass, name, dsv) \
(void)mouse_simple_accessor_generate(aTHX_ "Mouse::Meta::" #klass "::" #name, #name, sizeof(#name)-1, XS_Mouse_simple_reader, (dsv), HEf_SVKEY)
-#define INSTALL_SIMPLE_READER_WITH_DEFAULTS(klass, name, ds) \
- INSTALL_SIMPLE_READER_WITH_DEFAULTSV(klass, name, newSVpvs(ds))
+#define INSTALL_CLASS_HOLDER(klass, name, ds) \
+ INSTALL_CLASS_HOLDER_SV(klass, name, newSVpvs(ds))
#define INSTALL_SIMPLE_WRITER(klass, name) \
NSTALL_SIMPLE_WRITER_WITH_KEY(klass, name, name)
INSTALL_SIMPLE_READER(Class, roles);
INSTALL_SIMPLE_PREDICATE_WITH_KEY(Class, is_anon_class, anon_serial_id);
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Class, method_metaclass, "Mouse::Meta::Method");
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Class, attribute_metaclass, "Mouse::Meta::Attribute");
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Class, constructor_class, "Mouse::Meta::Method::Constructor::XS");
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Class, destructor_class, "Mouse::Meta::Method::Destructor::XS");
+ INSTALL_CLASS_HOLDER(Class, method_metaclass, "Mouse::Meta::Method");
+ INSTALL_CLASS_HOLDER(Class, attribute_metaclass, "Mouse::Meta::Attribute");
+ INSTALL_CLASS_HOLDER(Class, constructor_class, "Mouse::Meta::Method::Constructor::XS");
+ INSTALL_CLASS_HOLDER(Class, destructor_class, "Mouse::Meta::Method::Destructor::XS");
newCONSTSUB(gv_stashpvs("Mouse::Meta::Method::Constructor::XS", TRUE), "_generate_constructor",
newRV_inc((SV*)get_cvs("Mouse::Object::new", TRUE)));
INSTALL_SIMPLE_READER_WITH_KEY(Role, get_roles, roles);
INSTALL_SIMPLE_PREDICATE_WITH_KEY(Role, is_anon_role, anon_serial_id);
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Role, method_metaclass, "Mouse::Meta::Role::Method");
+ INSTALL_CLASS_HOLDER(Role, method_metaclass, "Mouse::Meta::Role::Method");
MODULE = Mouse PACKAGE = Mouse::Object
INSTALL_SIMPLE_PREDICATE_WITH_KEY(Attribute, has_builder, builder);
INSTALL_SIMPLE_PREDICATE_WITH_KEY(Attribute, has_documentation, documentation);
- INSTALL_SIMPLE_READER_WITH_DEFAULTS(Attribute, accessor_metaclass, "Mouse::Meta::Method::Accessor::XS");
+ INSTALL_CLASS_HOLDER(Attribute, accessor_metaclass, "Mouse::Meta::Method::Accessor::XS");