Skip to content

Commit 7fb7120

Browse files
committed
op.h: Use PERL_UNIQUE_NAME to make code more readable
This allows a variable name in a macro to be used that doesn't have much extra verbiage that otherwise would be required to make it distinct from other variables.
1 parent 1cda32e commit 7fb7120

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

op.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ struct pmop {
318318
more complex, and we'd have an AV with (SV*)NULL in it, which feels bad */
319319
/* BEWARE - something that calls this macro passes (r) which has a side
320320
effect. */
321+
#define r1_ PERL_UNIQUE_NAME(r)
321322
#define PM_SETRE(o,r) STMT_START { \
322-
REGEXP *const pm_setre_ = (r); \
323-
assert(pm_setre_); \
324-
PM_SETRE_raw(o, pm_setre_); \
323+
REGEXP *const r1_ = (r); \
324+
assert(r1_); \
325+
PM_SETRE_raw(o, r1_); \
325326
} STMT_END
326327
#else
327328
#define PM_GETRE_raw(o) ((o)->op_pmregexp)

0 commit comments

Comments
 (0)