From 7e758b1cf878312cab5d9d2825b36e7235ea10a3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 4 Apr 2015 22:04:53 +0100 Subject: [PATCH] stmhal, qemu-arm: Enable sys.maxsize attribute. --- qemu-arm/mpconfigport.h | 3 +++ stmhal/mpconfigport.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/qemu-arm/mpconfigport.h b/qemu-arm/mpconfigport.h index a9f98e5ce2..38ea2f7c3e 100644 --- a/qemu-arm/mpconfigport.h +++ b/qemu-arm/mpconfigport.h @@ -19,6 +19,7 @@ #define MICROPY_PY_BUILTINS_MEMORYVIEW (1) #define MICROPY_PY_IO (0) #define MICROPY_PY_SYS_EXIT (1) +#define MICROPY_PY_SYS_MAXSIZE (1) // type definitions for the specific machine @@ -26,6 +27,8 @@ #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1)) +#define MP_SSIZE_MAX (0x7fffffff) + #define UINT_FMT "%lu" #define INT_FMT "%ld" diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h index bfb3661eac..07db263d5e 100644 --- a/stmhal/mpconfigport.h +++ b/stmhal/mpconfigport.h @@ -64,6 +64,7 @@ #define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) #define MICROPY_PY_SYS_EXIT (1) +#define MICROPY_PY_SYS_MAXSIZE (1) #define MICROPY_PY_SYS_STDFILES (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1) @@ -171,6 +172,8 @@ extern const struct _mp_obj_module_t mp_module_network; #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1)) +#define MP_SSIZE_MAX (0x7fffffff) + #define UINT_FMT "%u" #define INT_FMT "%d"