Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
diff --git a/py/stream.c b/py/stream.c
index cfdea15..98f6251 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -67,7 +67,7 @@
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Operation not supported"));
}
- machine_int_t sz;
+ mp_int_t sz;
if (n_args == 1 || ((sz = mp_obj_get_int(args[1])) == -1)) {
return stream_readall(args[0]);
}
@@ -80,7 +80,7 @@
byte *buf = m_new(byte, sz);
int error;
- machine_int_t out_sz = o->type->stream_p->read(o, buf, sz, &error);
+ mp_int_t out_sz = o->type->stream_p->read(o, buf, sz, &error);
if (out_sz == -1) {
if (is_nonblocking_error(error)) {
// https://docs.python.org/3.4/library/io.html#io.RawIOBase.read
@@ -109,7 +109,7 @@
mp_get_buffer_raise(arg, &bufinfo, MP_BUFFER_READ);
int error;
- machine_int_t out_sz = o->type->stream_p->write(self_in, bufinfo.buf, bufinfo.len, &error);
+ mp_int_t out_sz = o->type->stream_p->write(self_in, bufinfo.buf, bufinfo.len, &error);
if (out_sz == -1) {
if (is_nonblocking_error(error)) {
// http://docs.python.org/3/library/io.html#io.RawIOBase.write
@@ -139,7 +139,7 @@
int error;
int current_read = DEFAULT_BUFFER_SIZE;
while (true) {
- machine_int_t out_sz = o->type->stream_p->read(self_in, p, current_read, &error);
+ mp_int_t out_sz = o->type->stream_p->read(self_in, p, current_read, &error);
if (out_sz == -1) {
if (is_nonblocking_error(error)) {
// With non-blocking streams, we read as much as we can.
@@ -182,7 +182,7 @@
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Operation not supported"));
}
- machine_int_t max_size = -1;
+ mp_int_t max_size = -1;
if (n_args > 1) {
max_size = MP_OBJ_SMALL_INT_VALUE(args[1]);
}
@@ -201,7 +201,7 @@
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_MemoryError, "out of memory"));
}
- machine_int_t out_sz = o->type->stream_p->read(o, p, 1, &error);
+ mp_int_t out_sz = o->type->stream_p->read(o, p, 1, &error);
if (out_sz == -1) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError, "[Errno %d]", error));
}