diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-04 15:53:11 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-04 15:53:11 +0100 |
commit | 2801e6fad8b8b3ecdd9c8bc58f9515ff66eca46c (patch) | |
tree | f49a2102931919c96bcde3f1bfa16b0ec8b2e27d /py/objstr.c | |
parent | 7f59b4b2ca28179c72aa12f35fe59cb14017b5b0 (diff) | |
download | micropython-2801e6fad8b8b3ecdd9c8bc58f9515ff66eca46c.tar.gz micropython-2801e6fad8b8b3ecdd9c8bc58f9515ff66eca46c.zip |
py: Some trivial cosmetic changes, for code style consistency.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py/objstr.c b/py/objstr.c index a7eb629be4..854878ca93 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -789,7 +789,7 @@ STATIC mp_obj_t str_rstrip(mp_uint_t n_args, const mp_obj_t *args) { // Takes an int arg, but only parses unsigned numbers, and only changes // *num if at least one digit was parsed. -static int str_to_int(const char *str, int *num) { +STATIC int str_to_int(const char *str, int *num) { const char *s = str; if ('0' <= *s && *s <= '9') { *num = 0; @@ -802,19 +802,19 @@ static int str_to_int(const char *str, int *num) { return s - str; } -static bool isalignment(char ch) { +STATIC bool isalignment(char ch) { return ch && strchr("<>=^", ch) != NULL; } -static bool istype(char ch) { +STATIC bool istype(char ch) { return ch && strchr("bcdeEfFgGnosxX%", ch) != NULL; } -static bool arg_looks_integer(mp_obj_t arg) { +STATIC bool arg_looks_integer(mp_obj_t arg) { return MP_OBJ_IS_TYPE(arg, &mp_type_bool) || MP_OBJ_IS_INT(arg); } -static bool arg_looks_numeric(mp_obj_t arg) { +STATIC bool arg_looks_numeric(mp_obj_t arg) { return arg_looks_integer(arg) #if MICROPY_PY_BUILTINS_FLOAT || MP_OBJ_IS_TYPE(arg, &mp_type_float) @@ -822,7 +822,7 @@ static bool arg_looks_numeric(mp_obj_t arg) { ; } -static mp_obj_t arg_as_int(mp_obj_t arg) { +STATIC mp_obj_t arg_as_int(mp_obj_t arg) { #if MICROPY_PY_BUILTINS_FLOAT if (MP_OBJ_IS_TYPE(arg, &mp_type_float)) { return mp_obj_new_int_from_float(mp_obj_get_float(arg)); |