8 #define NEED_newRV_noinc
9 #define NEED_sv_2pv_flags
10 #define NEED_sv_2pv_nolen
13 #define MOP_CALL_BOOT(name) \
16 mop_call_xs(aTHX_ name, cv, mark); \
19 void mop_call_xs (pTHX_ void (*subaddr) (pTHX_ CV *), CV *cv, SV **mark);
21 #define DECLARE_KEY(name) SV *key_##name; U32 hash_##name;
22 #define NEEDS_KEY(name) extern SV *key_##name; extern U32 hash_##name;
24 #define PREHASH_KEY_WITH_VALUE(name, value) do { \
25 key_##name = newSVpvs(value); \
26 PERL_HASH(hash_##name, value, sizeof(value) - 1); \
29 /* this is basically the same as the above macro, except that the value will be
30 * the stringified name. However, we can't just implement this in terms of
31 * PREHASH_KEY_WITH_VALUE as that'd cause macro expansion on the value of
32 * 'name' when it's being passed to the other macro. suggestions on how to make
33 * this more elegant would be much appreciated */
35 #define PREHASH_KEY(name) do { \
36 key_##name = newSVpvs(#name); \
37 PERL_HASH(hash_##name, #name, sizeof(#name) - 1); \
40 extern SV *mop_method_metaclass;
41 extern SV *mop_associated_metaclass;
44 UV mop_check_package_cache_flag(pTHX_ HV *stash);
45 int mop_get_code_info (SV *coderef, char **pkg, char **name);
46 SV *mop_call0(pTHX_ SV *const self, SV *const method);
57 typedef bool (*get_package_symbols_cb_t) (const char *, STRLEN, SV *, void *);
59 void mop_get_package_symbols(HV *stash, type_filter_t filter, get_package_symbols_cb_t cb, void *ud);
60 HV *mop_get_all_package_symbols (HV *stash, type_filter_t filter);