summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
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/mpconfig.h
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/mpconfig.h')
-rw-r--r--py/mpconfig.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 799c9d8e71..1eb2acf538 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -110,6 +110,12 @@ typedef long long mp_longint_impl_t;
/*****************************************************************************/
/* Miscellaneous settings */
+// Allow to override static modifier for global objects, e.g. to use with
+// object code analysis tools which don't support static symbols.
+#ifndef STATIC
+#define STATIC static
+#endif
+
#define BITS_PER_BYTE (8)
#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD)
// machine_int_t value with most significant bit set