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/.
diff --git a/py/obj.h b/py/obj.h
index e800add..fc99055 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -229,7 +229,7 @@
// 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;