summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-05 23:02:23 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-05 23:02:23 +0100
commit27e735fd1870e24595eadb02164b164a3bb81b98 (patch)
tree055a15886ec0e55f19d32533a827fa5d1586b6a6 /py/obj.h
parent17520224fad7a0c4a742f9b8a46e016c2ba3cc46 (diff)
downloadmicropython-27e735fd1870e24595eadb02164b164a3bb81b98.tar.gz
micropython-27e735fd1870e24595eadb02164b164a3bb81b98.zip
py: Replace stream_p with *stream_p in mp_obj_type_t.
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/obj.h b/py/obj.h
index e800addade..fc99055b6e 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -229,7 +229,7 @@ struct _mp_obj_type_t {
// in mp_obj_type_t at the expense of extra pointer and extra dereference
// when actually used.
mp_buffer_p_t buffer_p;
- mp_stream_p_t stream_p;
+ const mp_stream_p_t *stream_p;
// these are for dynamically created types (classes)
mp_obj_t bases_tuple;