py: #if guard str_make_new when not needed.

This commit is contained in:
Damien George 2014-11-27 16:55:47 +00:00
parent acb92c186c
commit 6f5eb84c19
1 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,7 @@ STATIC void str_print(void (*print)(void *env, const char *fmt, ...), void *env,
}
}
#if !MICROPY_PY_BUILTINS_STR_UNICODE || MICROPY_CPYTHON_COMPAT
STATIC mp_obj_t str_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
#if MICROPY_CPYTHON_COMPAT
if (n_kw != 0) {
@ -173,6 +174,7 @@ STATIC mp_obj_t str_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw,
}
}
}
#endif
STATIC mp_obj_t bytes_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
if (n_args == 0) {