From 51fd6c97773a7e0d76bb61e220b35b98f392e27e Mon Sep 17 00:00:00 2001 From: stijn Date: Wed, 3 Jun 2020 10:18:49 +0200 Subject: 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. --- examples/natmod/ure/ure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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 } -- cgit v1.2.3