Skip to content

Commit 20d9bc2

Browse files
Tom Sparkspfalcon
authored andcommitted
extmod/modure: re_exec() renamed to ure_exec() due to collison in 4.3BSD.
Addresses issue adafruit#1972.
1 parent 05ba243 commit 20d9bc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extmod/modure.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ STATIC void re_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
9292
mp_printf(print, "<re %p>", self);
9393
}
9494

95-
STATIC mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
95+
STATIC mp_obj_t ure_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
9696
(void)n_args;
9797
mp_obj_re_t *self = MP_OBJ_TO_PTR(args[0]);
9898
Subject subj;
@@ -116,12 +116,12 @@ STATIC mp_obj_t re_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
116116
}
117117

118118
STATIC mp_obj_t re_match(size_t n_args, const mp_obj_t *args) {
119-
return re_exec(true, n_args, args);
119+
return ure_exec(true, n_args, args);
120120
}
121121
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_match_obj, 2, 4, re_match);
122122

123123
STATIC mp_obj_t re_search(size_t n_args, const mp_obj_t *args) {
124-
return re_exec(false, n_args, args);
124+
return ure_exec(false, n_args, args);
125125
}
126126
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_search_obj, 2, 4, re_search);
127127

@@ -211,7 +211,7 @@ STATIC mp_obj_t mod_re_exec(bool is_anchored, uint n_args, const mp_obj_t *args)
211211
mp_obj_t self = mod_re_compile(1, args);
212212

213213
const mp_obj_t args2[] = {self, args[1]};
214-
mp_obj_t match = re_exec(is_anchored, 2, args2);
214+
mp_obj_t match = ure_exec(is_anchored, 2, args2);
215215
return match;
216216
}
217217

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy