summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-04-09 22:44:03 -0600
committerKarl Williamson <khw@cpan.org>2020-04-12 16:12:05 -0600
commitd3e3ece8ff6b23dfbaa6eb6d1b2289cc6ad26ef6 (patch)
treea96af5465626aa572f08ff77fb24f9f1c9922efb /proto.h
parent3bc2a7809d92db3d5c7c838645f17fa7f3ebf94f (diff)
downloadperl-d3e3ece8ff6b23dfbaa6eb6d1b2289cc6ad26ef6.tar.gz
regcomp.c: Rmv C undefined behavior
One analyzer said that what this commit changes was C undefined behavior, in casting void* pointers. Right now, the only actual type it is called with is SV*, but I made it void*, because I thought it might be used more generally. But, it turns out that Unicode is planning on changing its regular expression processing requirements to where what I have no longer will make sense. And, since only SV* is actually used, this commit changes the void* to SV*, removing any undefined behavior, with no changes to program logic. The changes for the new Unicode direction will come in probably 5.34; their document is still in draft, but I anticipate it will soon be finalized.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 17a6f6ed9d..6d6cccfe02 100644
--- a/proto.h
+++ b/proto.h
@@ -5871,7 +5871,7 @@ STATIC regnode_offset S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 o
STATIC regnode_offset S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth);
#define PERL_ARGS_ASSERT_REGPIECE \
assert(pRExC_state); assert(flagp)
-STATIC regnode_offset S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, void * arg);
+STATIC regnode_offset S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg);
#define PERL_ARGS_ASSERT_REGPNODE \
assert(pRExC_state); assert(arg)
STATIC bool S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth)