Output more details in the re tracing (GH-111357)

This commit is contained in:
Serhiy Storchaka 2023-10-26 16:42:42 +03:00 committed by GitHub
parent 31c05b72c1
commit 573eff3e2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 4 deletions

View file

@ -107,9 +107,11 @@ static unsigned int sre_toupper(unsigned int ch) {
#if VERBOSE == 0
# define INIT_TRACE(state)
# define DO_TRACE 0
# define TRACE(v)
#elif VERBOSE == 1
# define INIT_TRACE(state) int _debug = (state)->debug
# define DO_TRACE (_debug)
# define TRACE(v) do { \
if (_debug) { \
printf v; \
@ -117,6 +119,7 @@ static unsigned int sre_toupper(unsigned int ch) {
} while (0)
#elif VERBOSE == 2
# define INIT_TRACE(state)
# define DO_TRACE 1
# define TRACE(v) printf v
#else
# error VERBOSE must be 0, 1 or 2