diff --git a/py/obj.h b/py/obj.h
index 3d0339473545715212489407d86f5cc0835199c2..6959821cf5d50fdba0542a71c4493954df20cb33 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -425,7 +425,7 @@ typedef struct _mp_buffer_info_t {
     //int ver; // ?
 
     void *buf;      // can be NULL if len == 0
-    mp_uint_t len;  // in bytes
+    size_t len;     // in bytes
     int typecode;   // as per binary.h
 
     // Rationale: to load arbitrary-sized sprites directly to LCD