summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-05 12:20:57 -0600
committerKarl Williamson <public@khwilliamson.com>2011-07-03 14:05:48 -0600
commit37e85ffe6b230b2dfde9e13a9eab4675c411467a (patch)
treede161862d7763466ca7f8c10da9942ea09651905
parent360c367a522bc597ad7d763d8f1c818dbece2dea (diff)
downloadperl-37e85ffe6b230b2dfde9e13a9eab4675c411467a.tar.gz
Change names of some inversion list functions
The names now begin with an underscore to emphasize that they are for internal use only. This is in preparation for making them accessible beyond regcomp.c.
-rw-r--r--embed.fnc8
-rw-r--r--embed.h8
-rw-r--r--proto.h52
-rw-r--r--regcomp.c30
4 files changed, 49 insertions, 49 deletions
diff --git a/embed.fnc b/embed.fnc
index e8cf4ae176..ecd163c159 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1320,10 +1320,10 @@ EiMR |SV* |invlist_clone |NN SV* const invlist
EiMR |UV* |get_invlist_iter_addr |NN SV* invlist
EiM |void |invlist_iterinit|NN SV* invlist
EsMR |bool |invlist_iternext|NN SV* invlist|NN UV* start|NN UV* end
-EsM |void |invlist_intersection |NN SV* const a|NN SV* const b|NN SV** i
-EsM |void |invlist_union |NN SV* const a|NN SV* const b|NN SV** output
-EsM |void |invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
-EiM |void |invlist_invert|NN SV* const invlist
+EsM |void |_invlist_intersection |NN SV* const a|NN SV* const b|NN SV** i
+EsM |void |_invlist_union |NN SV* const a|NN SV* const b|NN SV** output
+EsM |void |_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
+EiM |void |_invlist_invert|NN SV* const invlist
#endif
Ap |void |taint_env
Ap |void |taint_proper |NULLOK const char* f|NN const char *const s
diff --git a/embed.h b/embed.h
index bc0532db9e..1a12c78f10 100644
--- a/embed.h
+++ b/embed.h
@@ -866,6 +866,10 @@
# endif
# if defined(PERL_IN_REGCOMP_C)
#define _invlist_array_init(a,b) S__invlist_array_init(aTHX_ a,b)
+#define _invlist_intersection(a,b,c) S__invlist_intersection(aTHX_ a,b,c)
+#define _invlist_invert(a) S__invlist_invert(aTHX_ a)
+#define _invlist_subtract(a,b,c) S__invlist_subtract(aTHX_ a,b,c)
+#define _invlist_union(a,b,c) S__invlist_union(aTHX_ a,b,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
@@ -882,16 +886,12 @@
#define invlist_array(a) S_invlist_array(aTHX_ a)
#define invlist_clone(a) S_invlist_clone(aTHX_ a)
#define invlist_extend(a,b) S_invlist_extend(aTHX_ a,b)
-#define invlist_intersection(a,b,c) S_invlist_intersection(aTHX_ a,b,c)
-#define invlist_invert(a) S_invlist_invert(aTHX_ a)
#define invlist_iterinit(a) S_invlist_iterinit(aTHX_ a)
#define invlist_iternext(a,b,c) S_invlist_iternext(aTHX_ a,b,c)
#define invlist_len(a) S_invlist_len(aTHX_ a)
#define invlist_max(a) S_invlist_max(aTHX_ a)
#define invlist_set_len(a,b) S_invlist_set_len(aTHX_ a,b)
-#define invlist_subtract(a,b,c) S_invlist_subtract(aTHX_ a,b,c)
#define invlist_trim(a) S_invlist_trim(aTHX_ a)
-#define invlist_union(a,b,c) S_invlist_union(aTHX_ a,b,c)
#define join_exact(a,b,c,d,e,f) S_join_exact(aTHX_ a,b,c,d,e,f)
#define make_trie(a,b,c,d,e,f,g,h) S_make_trie(aTHX_ a,b,c,d,e,f,g,h)
#define make_trie_failtable(a,b,c,d) S_make_trie_failtable(aTHX_ a,b,c,d)
diff --git a/proto.h b/proto.h
index be4dfb4029..8d02302b62 100644
--- a/proto.h
+++ b/proto.h
@@ -5992,6 +5992,32 @@ PERL_STATIC_INLINE UV* S__invlist_array_init(pTHX_ SV* const invlist, const bool
#define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT \
assert(invlist)
+STATIC void S__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION \
+ assert(a); assert(b); assert(i)
+
+PERL_STATIC_INLINE void S__invlist_invert(pTHX_ SV* const invlist)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__INVLIST_INVERT \
+ assert(invlist)
+
+STATIC void S__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT \
+ assert(a); assert(b); assert(result)
+
+STATIC void S__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT__INVLIST_UNION \
+ assert(a); assert(b); assert(output)
+
STATIC void S_add_alternate(pTHX_ AV** alternate_ptr, U8* string, STRLEN len)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
@@ -6082,18 +6108,6 @@ STATIC void S_invlist_extend(pTHX_ SV* const invlist, const UV len)
#define PERL_ARGS_ASSERT_INVLIST_EXTEND \
assert(invlist)
-STATIC void S_invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_INVLIST_INTERSECTION \
- assert(a); assert(b); assert(i)
-
-PERL_STATIC_INLINE void S_invlist_invert(pTHX_ SV* const invlist)
- __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_INVLIST_INVERT \
- assert(invlist)
-
PERL_STATIC_INLINE void S_invlist_iterinit(pTHX_ SV* invlist)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_INVLIST_ITERINIT \
@@ -6124,25 +6138,11 @@ PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len)
#define PERL_ARGS_ASSERT_INVLIST_SET_LEN \
assert(invlist)
-STATIC void S_invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_INVLIST_SUBTRACT \
- assert(a); assert(b); assert(result)
-
PERL_STATIC_INLINE void S_invlist_trim(pTHX_ SV* const invlist)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_INVLIST_TRIM \
assert(invlist)
-STATIC void S_invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2)
- __attribute__nonnull__(pTHX_3);
-#define PERL_ARGS_ASSERT_INVLIST_UNION \
- assert(a); assert(b); assert(output)
-
STATIC U32 S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, I32 *min, U32 flags, regnode *val, U32 depth)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
diff --git a/regcomp.c b/regcomp.c
index e18a1adcf5..a8b1b3c9a9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6132,7 +6132,7 @@ Perl__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV
#endif
STATIC void
-S_invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
+S__invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
{
/* Take the union of two inversion lists and point 'result' to it. If
* 'result' on input points to one of the two lists, the reference count to
@@ -6171,7 +6171,7 @@ S_invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
*/
UV count = 0;
- PERL_ARGS_ASSERT_INVLIST_UNION;
+ PERL_ARGS_ASSERT__INVLIST_UNION;
/* If either one is empty, the union is the other one */
len_a = invlist_len(a);
@@ -6322,7 +6322,7 @@ S_invlist_union(pTHX_ SV* const a, SV* const b, SV** output)
}
STATIC void
-S_invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
+S__invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
{
/* Take the intersection of two inversion lists and point 'i' to it. If
* 'i' on input points to one of the two lists, the reference count to that
@@ -6357,7 +6357,7 @@ S_invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i)
*/
UV count = 0;
- PERL_ARGS_ASSERT_INVLIST_INTERSECTION;
+ PERL_ARGS_ASSERT__INVLIST_INTERSECTION;
/* If either one is empty, the intersection is null */
len_a = invlist_len(a);
@@ -6524,7 +6524,7 @@ S_add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
range_invlist = _new_invlist(2);
_append_range_to_invlist(range_invlist, start, end);
- invlist_union(invlist, range_invlist, &invlist);
+ _invlist_union(invlist, range_invlist, &invlist);
/* The temporary can be freed */
SvREFCNT_dec(range_invlist);
@@ -6538,7 +6538,7 @@ S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp) {
}
PERL_STATIC_INLINE void
-S_invlist_invert(pTHX_ SV* const invlist)
+S__invlist_invert(pTHX_ SV* const invlist)
{
/* Complement the input inversion list. This adds a 0 if the list didn't
* have a zero; removes it otherwise. As described above, the data
@@ -6546,7 +6546,7 @@ S_invlist_invert(pTHX_ SV* const invlist)
UV* len_pos = get_invlist_len_addr(invlist);
- PERL_ARGS_ASSERT_INVLIST_INVERT;
+ PERL_ARGS_ASSERT__INVLIST_INVERT;
/* The inverse of matching nothing is matching everything */
if (*len_pos == 0) {
@@ -6581,12 +6581,12 @@ S_invlist_clone(pTHX_ SV* const invlist)
}
STATIC void
-S_invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
+S__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
{
/* Point result to an inversion list which consists of all elements in 'a'
* that aren't also in 'b' */
- PERL_ARGS_ASSERT_INVLIST_SUBTRACT;
+ PERL_ARGS_ASSERT__INVLIST_SUBTRACT;
/* Subtracting nothing retains the original */
if (invlist_len(b) == 0) {
@@ -6598,8 +6598,8 @@ S_invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result)
}
} else {
SV *b_copy = invlist_clone(b);
- invlist_invert(b_copy); /* Everything not in 'b' */
- invlist_intersection(a, b_copy, result); /* Everything in 'a' not in
+ _invlist_invert(b_copy); /* Everything not in 'b' */
+ _invlist_intersection(a, b_copy, result); /* Everything in 'a' not in
'b' */
SvREFCNT_dec(b_copy);
}
@@ -10402,7 +10402,7 @@ parseit:
* be checked. Get the intersection of this class and all the
* possible characters that are foldable. This can quickly narrow
* down a large class */
- invlist_intersection(PL_utf8_foldable, nonbitmap, &fold_intersection);
+ _invlist_intersection(PL_utf8_foldable, nonbitmap, &fold_intersection);
/* Now look at the foldable characters in this class individually */
invlist_iterinit(fold_intersection);
@@ -10536,7 +10536,7 @@ parseit:
/* Combine the two lists into one. */
if (l1_fold_invlist) {
if (nonbitmap) {
- invlist_union(nonbitmap, l1_fold_invlist, &nonbitmap);
+ _invlist_union(nonbitmap, l1_fold_invlist, &nonbitmap);
SvREFCNT_dec(l1_fold_invlist);
}
else {
@@ -10576,7 +10576,7 @@ parseit:
* individually and add it to the list to get rid of from those
* things not in the bitmap */
SV *remove_list = _new_invlist(2);
- invlist_invert(nonbitmap);
+ _invlist_invert(nonbitmap);
for (value = 0; value < 256; ++value) {
if (ANYOF_BITMAP_TEST(ret, value)) {
ANYOF_BITMAP_CLEAR(ret, value);
@@ -10586,7 +10586,7 @@ parseit:
ANYOF_BITMAP_SET(ret, value);
}
}
- invlist_subtract(nonbitmap, remove_list, &nonbitmap);
+ _invlist_subtract(nonbitmap, remove_list, &nonbitmap);
SvREFCNT_dec(remove_list);
}