summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc1
-rw-r--r--embed.h1
-rw-r--r--proto.h3
-rw-r--r--regcomp.c5
4 files changed, 10 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index 1a18a3ab62..eb915efc61 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1301,6 +1301,7 @@ EXMpR |HV* |_new_invlist |IV initial_size
EXMpR |HV* |_swash_to_invlist |NN SV* const swash
EXMp |void |_append_range_to_invlist |NN HV* const invlist|const UV start|const UV end
#ifdef PERL_IN_REGCOMP_C
+EiMR |HV* |add_cp_to_invlist |NULLOK HV* invlist|const UV cp
EsMR |HV* |add_range_to_invlist |NULLOK HV* invlist|const UV start|const UV end
EiMR |UV* |invlist_array |NN HV* const invlist
EiM |void |invlist_destroy |NN HV* const invlist
diff --git a/embed.h b/embed.h
index 6aa7eb5c63..d334542dfb 100644
--- a/embed.h
+++ b/embed.h
@@ -867,6 +867,7 @@
# endif
# if defined(PERL_IN_REGCOMP_C)
#define add_alternate(a,b,c) S_add_alternate(aTHX_ a,b,c)
+#define add_cp_to_invlist(a,b) S_add_cp_to_invlist(aTHX_ a,b)
#define add_data S_add_data
#define add_range_to_invlist(a,b,c) S_add_range_to_invlist(aTHX_ a,b,c)
#define checkposixcc(a) S_checkposixcc(aTHX_ a)
diff --git a/proto.h b/proto.h
index 2faf6d5091..92e1ad3732 100644
--- a/proto.h
+++ b/proto.h
@@ -5960,6 +5960,9 @@ STATIC void S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
#define PERL_ARGS_ASSERT_ADD_ALTERNATE \
assert(alternate_ptr); assert(string)
+PERL_STATIC_INLINE HV* S_add_cp_to_invlist(pTHX_ HV* invlist, const UV cp)
+ __attribute__warn_unused_result__;
+
STATIC U32 S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s)
__attribute__warn_unused_result__
__attribute__nonnull__(1)
diff --git a/regcomp.c b/regcomp.c
index 4e9a098a67..c4673ec9a1 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6294,6 +6294,11 @@ S_add_range_to_invlist(pTHX_ HV* invlist, const UV start, const UV end)
return added_invlist;
}
+PERL_STATIC_INLINE HV*
+S_add_cp_to_invlist(pTHX_ HV* invlist, const UV cp) {
+ return add_range_to_invlist(invlist, cp, cp);
+}
+
/* End of inversion list object */
/*