summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-08 09:50:15 -0800
committerDamien George <damien.p.george@gmail.com>2014-01-08 09:50:15 -0800
commit199b9e04eb186320f5d94bdc3b852f2443e466e0 (patch)
treee078242c4696f90eeeb6728e517ba5d9ce5f90dd /unix/main.c
parentbb2ed8e43129b8b311b5cc1f907b5dd6b3e30ad9 (diff)
parente0e79ae6d6fd7223e65b41243c4858fde6bbf0e4 (diff)
downloadmicropython-199b9e04eb186320f5d94bdc3b852f2443e466e0.tar.gz
micropython-199b9e04eb186320f5d94bdc3b852f2443e466e0.zip
Merge pull request #114 from pfalcon/streams-bootstrap
Define buffer and stream protocols, and other starting bits of io.* framework, with io.FileIO-like implementation for Unix
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c
index 920aed3444..b29a99f4fa 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -20,6 +20,8 @@
#include <readline/history.h>
#endif
+extern const mp_obj_fun_native_t mp_builtin_open_obj;
+
static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind, bool is_repl) {
if (lex == NULL) {
return;
@@ -206,6 +208,7 @@ int main(int argc, char **argv) {
rt_init();
rt_store_name(qstr_from_str_static("test"), test_obj_new(42));
+ rt_store_name(qstr_from_str_static("open"), (mp_obj_t)&mp_builtin_open_obj);
/*
printf("bytes:\n");