summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-24 13:08:15 +1000
committerDamien George <damien.p.george@gmail.com>2018-07-02 14:54:56 +1000
commit1e9b871d295ff3c8ab6d9cd0fafa94c52271820a (patch)
tree547f60cb2c49a7bd333856f2da58fedf411f5185 /py
parent1f864609106cc293da3748ee8f93e40c4a28a495 (diff)
extmod/modure: Add match.span(), start() and end() methods, and tests.
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index a979a9579..727375b12 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -1146,6 +1146,10 @@ typedef double mp_float_t;
#define MICROPY_PY_URE_MATCH_GROUPS (0)
#endif
+#ifndef MICROPY_PY_URE_MATCH_SPAN_START_END
+#define MICROPY_PY_URE_MATCH_SPAN_START_END (0)
+#endif
+
#ifndef MICROPY_PY_UHEAPQ
#define MICROPY_PY_UHEAPQ (0)
#endif