8 #define NEED_newRV_noinc
9 #define NEED_sv_2pv_flags
10 #define NEED_sv_2pv_nolen
13 #define MOP_CALL_BOOT(name) mop_call_xs(aTHX_ name, cv, mark);
16 #define XSPROTO(name) XS(name)
19 void mop_call_xs (pTHX_ XSPROTO(subaddr), CV *cv, SV **mark);
26 KEY_package_cache_flag,
31 } mop_prehashed_key_t;
33 #define KEY_FOR(name) mop_prehashed_key_for(KEY_ ##name)
34 #define HASH_FOR(name) mop_prehashed_hash_for(KEY_ ##name)
36 void mop_prehash_keys (void);
37 SV *mop_prehashed_key_for (mop_prehashed_key_t key);
38 U32 mop_prehashed_hash_for (mop_prehashed_key_t key);
40 #define INSTALL_SIMPLE_READER(klass, name) INSTALL_SIMPLE_READER_WITH_KEY(klass, name, name)
41 #define INSTALL_SIMPLE_READER_WITH_KEY(klass, name, key) \
43 CV *cv = newXS("Class::MOP::" #klass "::" #name, mop_xs_simple_reader, __FILE__); \
44 CvXSUBANY(cv).any_i32 = KEY_ ##key; \
47 XS(mop_xs_simple_reader);
49 extern SV *mop_method_metaclass;
50 extern SV *mop_associated_metaclass;
53 UV mop_check_package_cache_flag(pTHX_ HV *stash);
54 int mop_get_code_info (SV *coderef, char **pkg, char **name);
55 SV *mop_call0(pTHX_ SV *const self, SV *const method);
66 typedef bool (*get_package_symbols_cb_t) (const char *, STRLEN, SV *, void *);
68 void mop_get_package_symbols(HV *stash, type_filter_t filter, get_package_symbols_cb_t cb, void *ud);
69 HV *mop_get_all_package_symbols (HV *stash, type_filter_t filter);