]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
Use cop_hints_fetch_pvn() whenever possible rt66996
authorVincent Pit <vince@profvince.com>
Thu, 6 Jan 2011 00:56:56 +0000 (01:56 +0100)
committerVincent Pit <vince@profvince.com>
Thu, 6 Jan 2011 00:56:56 +0000 (01:56 +0100)
refcounted_he_fetch() never was public, but in recent 5.13.x versions it is
no longer linkable.

Plugin.xs

index d64951ea73016f3fcdc3a5dec3d0404c43246b0a..cffc46389e01ad1d6175296136266d36eefd88b1 100644 (file)
--- 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;
 
 #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);
  /* 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);
 }
 
  return rep_detag(hint);
 }