From: Florian Ragwitz Date: Wed, 11 Mar 2009 05:19:04 +0000 (+0100) Subject: Implement INSTALL_SIMPLE_READER in terms of INSTALL_SIMPLE_READER_WITH_KEY. X-Git-Tag: 0.78_01~60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0253cbf387ba9ac12da25d9e7a7cabc25dd27ded;p=gitmo%2FClass-MOP.git Implement INSTALL_SIMPLE_READER in terms of INSTALL_SIMPLE_READER_WITH_KEY. --- diff --git a/mop.h b/mop.h index e3b5b91..f14dea6 100644 --- a/mop.h +++ b/mop.h @@ -37,12 +37,7 @@ void mop_prehash_keys (void); inline SV *mop_prehashed_key_for (mop_prehashed_key_t key); inline U32 mop_prehashed_hash_for (mop_prehashed_key_t key); -#define INSTALL_SIMPLE_READER(klass, name) \ - { \ - CV *cv = newXS("Class::MOP::" #klass "::" #name, mop_xs_simple_reader, __FILE__); \ - CvXSUBANY(cv).any_i32 = KEY_ ##name; \ - } - +#define INSTALL_SIMPLE_READER(klass, name) INSTALL_SIMPLE_READER_WITH_KEY(klass, name, name) #define INSTALL_SIMPLE_READER_WITH_KEY(klass, name, key) \ { \ CV *cv = newXS("Class::MOP::" #klass "::" #name, mop_xs_simple_reader, __FILE__); \