From: Vincent Pit Date: Thu, 6 Jan 2011 00:56:56 +0000 (+0100) Subject: Use cop_hints_fetch_pvn() whenever possible X-Git-Tag: rt66996^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=879b678a52c18c12349431fee0030a48db6d42ff;p=perl%2Fmodules%2Fre-engine-Plugin.git Use cop_hints_fetch_pvn() whenever possible refcounted_he_fetch() never was public, but in recent 5.13.x versions it is no longer linkable. --- diff --git a/Plugin.xs b/Plugin.xs index d64951e..cffc463 100644 --- a/Plugin.xs +++ b/Plugin.xs @@ -249,12 +249,17 @@ STATIC const rep_hint_t *rep_hint(pTHX) { #define rep_hint() rep_hint(aTHX) SV *hint; +#ifdef cop_hints_fetch_pvn + hint = cop_hints_fetch_pvn(PL_curcop, + __PACKAGE__, __PACKAGE_LEN__, rep_hash, 0); +#else /* We already require 5.9.5 for the regexp engine API. */ hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, NULL, __PACKAGE__, __PACKAGE_LEN__, 0, rep_hash); +#endif return rep_detag(hint); }