summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-11-02 16:41:24 +0000
committerDamien <damien.p.george@gmail.com>2013-11-02 16:41:24 +0000
commite0b18643376246c9669007ee0c979ce19bceafe2 (patch)
treebb2eedf6aa212ce81fa3bebde585e3bd7c93ecbd /py
parentccfc9c51ba6e0d3e54d109d9f482595e2eac3b33 (diff)
downloadmicropython-e0b18643376246c9669007ee0c979ce19bceafe2.tar.gz
micropython-e0b18643376246c9669007ee0c979ce19bceafe2.zip
Small hack to temporarily fix allocation of unique_code slots.
Diffstat (limited to 'py')
-rw-r--r--py/runtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index d97763adf0..41cfc4ba7b 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -619,7 +619,7 @@ int rt_get_unique_code_id(bool is_main_module) {
static void alloc_unique_codes(void) {
if (unique_codes == NULL) {
- unique_codes = m_new(py_code_t, next_unique_code_id);
+ unique_codes = m_new(py_code_t, next_unique_code_id + 10); // XXX hack until we fix the REPL allocation problem
for (int i = 0; i < next_unique_code_id; i++) {
unique_codes[i].kind = PY_CODE_NONE;
}