summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-05 22:29:03 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-05 22:29:03 +0000
commitba3f87c94776538fece5e87ff1d7de547930397a (patch)
tree3112b328cff278168a1ef48fc37a65778ea9324a /unix/main.c
parent6e1e98f8648d327098a03ce8d175c9854dd06cc8 (diff)
parent12e2656472bf53e467c066eda6f3e177a97210ca (diff)
downloadmicropython-ba3f87c94776538fece5e87ff1d7de547930397a.tar.gz
micropython-ba3f87c94776538fece5e87ff1d7de547930397a.zip
Merge remote-tracking branch 'upstream/master' into list_reverse
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/unix/main.c b/unix/main.c
index 1aa3331202..16fcf6ef8d 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -15,7 +15,7 @@
#include "runtime.h"
#include "repl.h"
-#ifdef USE_READLINE
+#if MICROPY_USE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
@@ -35,7 +35,7 @@ static char *str_join(const char *s1, int sep_char, const char *s2) {
}
static char *prompt(char *p) {
-#ifdef USE_READLINE
+#if MICROPY_USE_READLINE
char *line = readline(p);
if (line) {
add_history(line);
@@ -192,6 +192,7 @@ static const mp_obj_type_t test_type = {
{ &mp_const_type },
"Test",
test_print, // print
+ NULL, // make_new
NULL, // call_n
NULL, // unary_op
NULL, // binary_op
@@ -217,6 +218,13 @@ int main(int argc, char **argv) {
rt_store_name(qstr_from_str_static("test"), test_obj_new(42));
+ /*
+ printf("bytes:\n");
+ printf(" total %d\n", m_get_total_bytes_allocated());
+ printf(" cur %d\n", m_get_current_bytes_allocated());
+ printf(" peak %d\n", m_get_peak_bytes_allocated());
+ */
+
if (argc == 1) {
do_repl();
} else if (argc == 2) {