summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2020-06-03 10:18:49 +0200
committerstijn <stijn@ignitron.net>2020-06-08 09:16:09 +0200
commit51fd6c97773a7e0d76bb61e220b35b98f392e27e (patch)
tree239b3c574cc2183ef030e995ca5fae1d51915d43 /examples
parentbd06c698f05b7b53070263653e74eb078b5278a9 (diff)
extmod/ure: Use single function for match/search/sub.
Saves about 500 bytes on unix x64 and enables CPython-conform usage of passing a re object to these functions.
Diffstat (limited to 'examples')
-rw-r--r--examples/natmod/ure/ure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/natmod/ure/ure.c b/examples/natmod/ure/ure.c
index 00ca2e9eb..175b93e39 100644
--- a/examples/natmod/ure/ure.c
+++ b/examples/natmod/ure/ure.c
@@ -71,8 +71,8 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
re_type.locals_dict = (void*)&re_locals_dict;
mp_store_global(MP_QSTR_compile, MP_OBJ_FROM_PTR(&mod_re_compile_obj));
- mp_store_global(MP_QSTR_match, MP_OBJ_FROM_PTR(&mod_re_match_obj));
- mp_store_global(MP_QSTR_search, MP_OBJ_FROM_PTR(&mod_re_search_obj));
+ mp_store_global(MP_QSTR_match, MP_OBJ_FROM_PTR(&re_match_obj));
+ mp_store_global(MP_QSTR_search, MP_OBJ_FROM_PTR(&re_search_obj));
MP_DYNRUNTIME_INIT_EXIT
}