diff options
author | Damien George <damien.p.george@gmail.com> | 2014-09-17 22:56:34 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-09-17 22:56:34 +0100 |
commit | 612045f53f7e5edf9faa359ee9ee52d490d58000 (patch) | |
tree | a021612e31ff6275246514405c4a8421c6eff5d7 /py/obj.h | |
parent | 8a9b999f1c9a0edf84b2507940efb8deaaa380b8 (diff) |
py: Add native json printing using existing print framework.
Also add start of ujson module with dumps implemented. Enabled in unix
and stmhal ports. Test passes on both.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -187,7 +187,8 @@ typedef enum { PRINT_STR = 0, PRINT_REPR = 1, PRINT_EXC = 2, // Special format for printing exception in unhandled exception message - PRINT_EXC_SUBCLASS = 4, // Internal flag for printing exception subclasses + PRINT_JSON = 3, + PRINT_EXC_SUBCLASS = 0x80, // Internal flag for printing exception subclasses } mp_print_kind_t; typedef void (*mp_print_fun_t)(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o, mp_print_kind_t kind); |