diff options
| author | Paul Sokolovsky | 2014-04-03 14:57:53 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-04-03 22:08:57 +0300 |
| commit | 98a627dc03bc02e1b827ead8cc71b02259731551 (patch) | |
| tree | d6c57e86f9a95c2aeeb65eec6d9eb3e78461a0d9 /stm | |
| parent | 8270e3853dc167d2d7946bb0de7a0f0bb2adde48 (diff) | |
py: Add "io" module.
So far just includes "open" function, which should be supplied by a port.
TODO: Make the module #ifdef'ed.
Diffstat (limited to 'stm')
| -rw-r--r-- | stm/file.c | 2 | ||||
| -rw-r--r-- | stm/mpconfigport.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/stm/file.c b/stm/file.c index 40ac3ff9c..6a1162385 100644 --- a/stm/file.c +++ b/stm/file.c @@ -92,3 +92,5 @@ mp_obj_t pyb_io_open(mp_obj_t o_filename, mp_obj_t o_mode) { } return self; } + +MP_DEFINE_CONST_FUN_OBJ_2(mp_builtin_open_obj, pyb_io_open); diff --git a/stm/mpconfigport.h b/stm/mpconfigport.h index 3f48c43f0..4c8338be5 100644 --- a/stm/mpconfigport.h +++ b/stm/mpconfigport.h @@ -18,6 +18,8 @@ #define MICROPY_ENABLE_LFN (0) #define MICROPY_LFN_CODE_PAGE (1) /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */ +extern const struct _mp_obj_fun_native_t mp_builtin_open_obj; + // type definitions for the specific machine #define BYTES_PER_WORD (4) |
