From: Jesse Luehrs Date: Sun, 14 Nov 2010 02:20:58 +0000 (-0600) Subject: add some compatibility shims X-Git-Tag: 0.14~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13f8a7b7b39875f66ff01549bc0e16dbba4db144;p=gitmo%2FPackage-Stash-XS.git add some compatibility shims --- diff --git a/Stash.xs b/Stash.xs index 7078b95..c2a4229 100644 --- a/Stash.xs +++ b/Stash.xs @@ -6,6 +6,24 @@ #define NEED_sv_2pv_flags #include "ppport.h" +#ifndef gv_fetchsv +#define gv_fetchsv(n,f,t) gv_fetchpv(SvPV_nolen(n), f, t) +#endif + +#ifndef mro_method_changed_in +#define mro_method_changed_in(x) PL_sub_generation++ +#endif + +#ifdef newSVhek +#define newSVhe(he) newSVhek(HeKEY_hek(he)) +#else +#define newSVhe(he) newSVpvn(HePV(he)) +#endif + +#ifndef savesvpv +#define savesvpv(s) savepv(SvPV_nolen(s)) +#endif + typedef enum { VAR_NONE = 0, VAR_SCALAR, @@ -564,7 +582,7 @@ list_all_symbols(self, vartype=VAR_NONE) keys = hv_iterinit(namespace); EXTEND(SP, keys); while ((entry = hv_iternext(namespace))) { - mPUSHs(newSVhek(HeKEY_hek(entry))); + mPUSHs(newSVhe(entry)); } } else {