From d5df6cd44a433d6253a61cb0f987835fbc06b2de Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 12 Feb 2014 18:15:40 +0200 Subject: Replace global "static" -> "STATIC", to allow "analysis builds". Part 1. Some tools do not support local/static symbols (one example is GNU ld map file). Exposing all functions will allow to do detailed size comparisons, etc. Also, added bunch of statics where they were missing, and replaced few identity functions with global mp_identity(). --- py/objmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py/objmap.c') diff --git a/py/objmap.c b/py/objmap.c index 39778e11e..f7508b204 100644 --- a/py/objmap.c +++ b/py/objmap.c @@ -15,7 +15,7 @@ typedef struct _mp_obj_map_t { mp_obj_t iters[]; } mp_obj_map_t; -static mp_obj_t map_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { +STATIC mp_obj_t map_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { if (n_args < 2 || n_kw != 0) { nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "map must have at least 2 arguments and no keyword arguments")); } @@ -30,11 +30,11 @@ static mp_obj_t map_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_ return o; } -static mp_obj_t map_getiter(mp_obj_t self_in) { +STATIC mp_obj_t map_getiter(mp_obj_t self_in) { return self_in; } -static mp_obj_t map_iternext(mp_obj_t self_in) { +STATIC mp_obj_t map_iternext(mp_obj_t self_in) { assert(MP_OBJ_IS_TYPE(self_in, &map_type)); mp_obj_map_t *self = self_in; mp_obj_t *nextses = m_new(mp_obj_t, self->n_iters); -- cgit v1.2.3