summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-10-19 15:09:32 +0100
committerDamien <damien.p.george@gmail.com>2013-10-19 15:09:32 +0100
commit1595f3257e9b194c86b9e790c2d58f46ae907bae (patch)
treeaccfd03b2ab69d88440a63b879af44b1a7809f91
parent00ff04fc4932fc7c3fc2f9b9074f11c189045dad (diff)
downloadmicropython-1595f3257e9b194c86b9e790c2d58f46ae907bae.tar.gz
micropython-1595f3257e9b194c86b9e790c2d58f46ae907bae.zip
Make rt_fun_table const, so it goes in .text section.
-rw-r--r--py/runtime.c2
-rw-r--r--py/runtime.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c
index d367530ccc..01fd92fcff 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1546,7 +1546,7 @@ py_obj_t rt_iternext(py_obj_t o_in) {
}
}
-void *rt_fun_table[RT_F_NUMBER_OF] = {
+const void *const rt_fun_table[RT_F_NUMBER_OF] = {
rt_load_const_str,
rt_load_name,
rt_load_global,
diff --git a/py/runtime.h b/py/runtime.h
index e676f14c08..86d59f24e5 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -76,7 +76,7 @@ typedef enum {
RT_F_NUMBER_OF,
} rt_fun_kind_t;
-extern void *rt_fun_table[RT_F_NUMBER_OF];
+extern const void *const rt_fun_table[RT_F_NUMBER_OF];
typedef machine_ptr_t py_obj_t; // must be of pointer size
typedef py_obj_t (*py_fun_0_t)();