all: Rename mp_obj_type_t::stream_p to protocol.

It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
This commit is contained in:
Paul Sokolovsky
2016-06-18 18:19:24 +03:00
parent 080137961d
commit 07209f8592
22 changed files with 38 additions and 33 deletions

View File

@@ -174,7 +174,7 @@ const mp_obj_type_t mp_type_stringio = {
.make_new = stringio_make_new,
.getiter = mp_identity,
.iternext = mp_stream_unbuffered_iter,
.stream_p = &stringio_stream_p,
.protocol = &stringio_stream_p,
.locals_dict = (mp_obj_dict_t*)&stringio_locals_dict,
};
@@ -186,7 +186,7 @@ const mp_obj_type_t mp_type_bytesio = {
.make_new = stringio_make_new,
.getiter = mp_identity,
.iternext = mp_stream_unbuffered_iter,
.stream_p = &bytesio_stream_p,
.protocol = &bytesio_stream_p,
.locals_dict = (mp_obj_dict_t*)&stringio_locals_dict,
};
#endif