summaryrefslogtreecommitdiffstatshomepage
path: root/py/objbool.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-12 18:15:40 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-12 18:21:11 +0200
commitd5df6cd44a433d6253a61cb0f987835fbc06b2de (patch)
tree76cdea7b7fa8c6664f711314912837861b3906e4 /py/objbool.c
parent1d1e38d91103cc9a3941a55048fc446290aca64e (diff)
downloadmicropython-d5df6cd44a433d6253a61cb0f987835fbc06b2de.tar.gz
micropython-d5df6cd44a433d6253a61cb0f987835fbc06b2de.zip
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().
Diffstat (limited to 'py/objbool.c')
-rw-r--r--py/objbool.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objbool.c b/py/objbool.c
index 3a3ac3eb87..fb38bdfb00 100644
--- a/py/objbool.c
+++ b/py/objbool.c
@@ -14,7 +14,7 @@ typedef struct _mp_obj_bool_t {
bool value;
} mp_obj_bool_t;
-static void bool_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
+STATIC void bool_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
mp_obj_bool_t *self = self_in;
if (self->value) {
print(env, "True");
@@ -23,7 +23,7 @@ static void bool_print(void (*print)(void *env, const char *fmt, ...), void *env
}
}
-static mp_obj_t bool_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t bool_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
// TODO check n_kw == 0
switch (n_args) {
@@ -33,7 +33,7 @@ static mp_obj_t bool_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp
}
}
-static mp_obj_t bool_unary_op(int op, mp_obj_t o_in) {
+STATIC mp_obj_t bool_unary_op(int op, mp_obj_t o_in) {
machine_int_t value = ((mp_obj_bool_t*)o_in)->value;
switch (op) {
case RT_UNARY_OP_BOOL: return o_in;
@@ -53,8 +53,8 @@ const mp_obj_type_t bool_type = {
.unary_op = bool_unary_op,
};
-static const mp_obj_bool_t false_obj = {{&bool_type}, false};
-static const mp_obj_bool_t true_obj = {{&bool_type}, true};
+STATIC const mp_obj_bool_t false_obj = {{&bool_type}, false};
+STATIC const mp_obj_bool_t true_obj = {{&bool_type}, true};
const mp_obj_t mp_const_false = (mp_obj_t)&false_obj;
const mp_obj_t mp_const_true = (mp_obj_t)&true_obj;