Perl_croak(aTHX_ "Not an object"); \
}
+#if REP_HAS_PERL(5, 19, 4)
+# define REP_ENG_EXEC_MINEND_TYPE SSize_t
+#else
+# define REP_ENG_EXEC_MINEND_TYPE I32
+#endif
+
START_EXTERN_C
EXTERN_C const regexp_engine engine_plugin;
-#if PERL_VERSION <= 10
-EXTERN_C REGEXP * Plugin_comp(pTHX_ const SV * const, const U32);
-#else
+#if REP_HAS_PERL(5, 11, 0)
EXTERN_C REGEXP * Plugin_comp(pTHX_ SV * const, U32);
+#else
+EXTERN_C REGEXP * Plugin_comp(pTHX_ const SV * const, const U32);
#endif
EXTERN_C I32 Plugin_exec(pTHX_ REGEXP * const, char *, char *,
- char *, I32, SV *, void *, U32);
+ char *, REP_ENG_EXEC_MINEND_TYPE, SV *, void *, U32);
+#if REP_HAS_PERL(5, 19, 1)
+EXTERN_C char * Plugin_intuit(pTHX_ REGEXP * const, SV *, const char * const,
+ char *, char *, U32, re_scream_pos_data *);
+#else
EXTERN_C char * Plugin_intuit(pTHX_ REGEXP * const, SV *, char *,
char *, U32, re_scream_pos_data *);
+#endif
EXTERN_C SV * Plugin_checkstr(pTHX_ REGEXP * const);
EXTERN_C void Plugin_free(pTHX_ REGEXP * const);
EXTERN_C void * Plugin_dupe(pTHX_ REGEXP * const, CLONE_PARAMS *);
#ifdef USE_ITHREADS
EXTERN_C void * Plugin_dupe(pTHX_ REGEXP * const, CLONE_PARAMS *);
#endif
-END_EXTERN_C
-START_EXTERN_C
EXTERN_C const regexp_engine engine_plugin;
END_EXTERN_C
Plugin_numbered_buff_LENGTH,
Plugin_named_buff,
Plugin_named_buff_iter,
- Plugin_package,
+ Plugin_package
#if defined(USE_ITHREADS)
- Plugin_dupe,
+ , Plugin_dupe
+#endif
+#if REP_HAS_PERL(5, 17, 0)
+ , 0
#endif
};
SV * cb_num_capture_buff_LENGTH;
} *re__engine__Plugin;
-#if PERL_VERSION >= 11
+#if REP_HAS_PERL(5, 11, 0)
# define rxREGEXP(RX) (SvANY(RX))
# define newREGEXP(RX) ((RX) = ((REGEXP*) newSV_type(SVt_REGEXP)))
#else
#endif
REGEXP *
-#if PERL_VERSION <= 10
-Plugin_comp(pTHX_ const SV * const pattern, const U32 flags)
-#else
+#if REP_HAS_PERL(5, 11, 0)
Plugin_comp(pTHX_ SV * const pattern, U32 flags)
+#else
+Plugin_comp(pTHX_ const SV * const pattern, const U32 flags)
#endif
{
dSP;
rx->extflags = flags; /* Flags for perl to use */
rx->engine = RE_ENGINE_PLUGIN; /* Compile to use this engine */
-#if PERL_VERSION <= 10
+#if !REP_HAS_PERL(5, 11, 0)
rx->refcnt = 1; /* Refcount so we won't be destroyed */
/* Precompiled pattern for pp_regcomp to use */
I32
Plugin_exec(pTHX_ REGEXP * const RX, char *stringarg, char *strend,
- char *strbeg, I32 minend, SV *sv, void *data, U32 flags)
+ char *strbeg, REP_ENG_EXEC_MINEND_TYPE minend,
+ SV *sv, void *data, U32 flags)
{
dSP;
I32 matched;
}
char *
+#if REP_HAS_PERL(5, 19, 1)
+Plugin_intuit(pTHX_ REGEXP * const RX, SV *sv, const char * const strbeg,
+ char *strpos, char *strend, U32 flags, re_scream_pos_data *data)
+#else
Plugin_intuit(pTHX_ REGEXP * const RX, SV *sv, char *strpos,
- char *strend, U32 flags, re_scream_pos_data *data)
+ char *strend, U32 flags, re_scream_pos_data *data)
+#endif
{
PERL_UNUSED_ARG(RX);
PERL_UNUSED_ARG(sv);
+#if REP_HAS_PERL(5, 19, 1)
+ PERL_UNUSED_ARG(strbeg);
+#endif
PERL_UNUSED_ARG(strpos);
PERL_UNUSED_ARG(strend);
PERL_UNUSED_ARG(flags);