diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-24 23:03:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-24 23:03:12 +0100 |
commit | ee3fd46f1383e984c968c4a82d634d7b0cea49b8 (patch) | |
tree | 76eb38f9015df5d003f646ce019745426365021c /unix | |
parent | d0ceb04b90ca7edd7e45b8eff1cdebdfa20a0cf8 (diff) | |
download | micropython-ee3fd46f1383e984c968c4a82d634d7b0cea49b8.tar.gz micropython-ee3fd46f1383e984c968c4a82d634d7b0cea49b8.zip |
Rename configuration variables controling Python features.
Now of the form MICROPY_PY_*. See issue #35.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile | 10 | ||||
-rw-r--r-- | unix/file.c | 4 | ||||
-rw-r--r-- | unix/mpconfigport.h | 26 | ||||
-rw-r--r-- | unix/mpconfigport.mk | 4 |
4 files changed, 22 insertions, 22 deletions
diff --git a/unix/Makefile b/unix/Makefile index 4dcba22e23..ffc3391a14 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -27,7 +27,7 @@ UNAME_S := $(shell uname -s) ifeq ($(MICROPY_FORCE_32BIT),1) CFLAGS += -m32 LDFLAGS += -m32 -ifeq ($(MICROPY_MOD_FFI),1) +ifeq ($(MICROPY_PY_FFI),1) ifeq ($(UNAME_S),Linux) CFLAGS_MOD += -I/usr/include/i686-linux-gnu endif @@ -40,14 +40,14 @@ LDFLAGS_MOD += -lreadline # the following is needed for BSD #LDFLAGS_MOD += -ltermcap endif -ifeq ($(MICROPY_MOD_TIME),1) -CFLAGS_MOD += -DMICROPY_MOD_TIME=1 +ifeq ($(MICROPY_PY_TIME),1) +CFLAGS_MOD += -DMICROPY_PY_TIME=1 SRC_MOD += modtime.c endif -ifeq ($(MICROPY_MOD_FFI),1) +ifeq ($(MICROPY_PY_FFI),1) LIBFFI_LDFLAGS_MOD := $(shell pkg-config --libs libffi) LIBFFI_CFLAGS_MOD := $(shell pkg-config --cflags libffi) -CFLAGS_MOD += $(LIBFFI_CFLAGS_MOD) -DMICROPY_MOD_FFI=1 +CFLAGS_MOD += $(LIBFFI_CFLAGS_MOD) -DMICROPY_PY_FFI=1 LDFLAGS_MOD += -ldl $(LIBFFI_LDFLAGS_MOD) SRC_MOD += modffi.c endif diff --git a/unix/file.c b/unix/file.c index 7f45ac4a33..386f018bdd 100644 --- a/unix/file.c +++ b/unix/file.c @@ -131,7 +131,7 @@ STATIC mp_obj_t fdfile_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const case '+': mode |= O_RDWR; break; - #if MICROPY_MOD_IO_FILEIO + #if MICROPY_PY_IO_FILEIO // If we don't have io.FileIO, then files are in text mode implicitly case 'b': type = &mp_type_fileio; @@ -173,7 +173,7 @@ STATIC const mp_map_elem_t rawfile_locals_dict_table[] = { STATIC MP_DEFINE_CONST_DICT(rawfile_locals_dict, rawfile_locals_dict_table); -#if MICROPY_MOD_IO_FILEIO +#if MICROPY_PY_IO_FILEIO STATIC const mp_stream_p_t fileio_stream_p = { .read = fdfile_read, .write = fdfile_write, diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index ec8989f2f8..c56c9fa1a6 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -32,7 +32,6 @@ #define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_ENABLE_GC (1) #define MICROPY_ENABLE_FINALISER (1) -#define MICROPY_ENABLE_FROZENSET (1) #define MICROPY_MEM_STATS (1) #define MICROPY_DEBUG_PRINTERS (1) #define MICROPY_HELPER_REPL (1) @@ -42,10 +41,11 @@ #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) #define MICROPY_STREAMS_NON_BLOCK (1) #define MICROPY_OPT_COMPUTED_GOTO (1) -#define MICROPY_MOD_SYS_EXIT (1) -#define MICROPY_MOD_SYS_STDFILES (1) -#define MICROPY_ENABLE_MOD_CMATH (1) -#define MICROPY_MOD_IO_FILEIO (1) +#define MICROPY_PY_FROZENSET (1) +#define MICROPY_PY_SYS_EXIT (1) +#define MICROPY_PY_SYS_STDFILES (1) +#define MICROPY_PY_CMATH (1) +#define MICROPY_PY_IO_FILEIO (1) // Define to MICROPY_ERROR_REPORTING_DETAILED to get function, etc. // names in exception messages (may require more RAM). #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED) @@ -55,20 +55,20 @@ extern const struct _mp_obj_module_t mp_module_time; extern const struct _mp_obj_module_t mp_module_socket; extern const struct _mp_obj_module_t mp_module_ffi; -#if MICROPY_MOD_FFI -#define MICROPY_MOD_FFI_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_ffi), (mp_obj_t)&mp_module_ffi }, +#if MICROPY_PY_FFI +#define MICROPY_PY_FFI_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_ffi), (mp_obj_t)&mp_module_ffi }, #else -#define MICROPY_MOD_FFI_DEF +#define MICROPY_PY_FFI_DEF #endif -#if MICROPY_MOD_TIME -#define MICROPY_MOD_TIME_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mp_module_time }, +#if MICROPY_PY_TIME +#define MICROPY_PY_TIME_DEF { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mp_module_time }, #else -#define MICROPY_MOD_TIME_DEF +#define MICROPY_PY_TIME_DEF #endif #define MICROPY_PORT_BUILTIN_MODULES \ - MICROPY_MOD_FFI_DEF \ - MICROPY_MOD_TIME_DEF \ + MICROPY_PY_FFI_DEF \ + MICROPY_PY_TIME_DEF \ { MP_OBJ_NEW_QSTR(MP_QSTR_microsocket), (mp_obj_t)&mp_module_socket }, \ { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \ diff --git a/unix/mpconfigport.mk b/unix/mpconfigport.mk index 352d010676..f9b99e234c 100644 --- a/unix/mpconfigport.mk +++ b/unix/mpconfigport.mk @@ -7,7 +7,7 @@ MICROPY_FORCE_32BIT = 0 MICROPY_USE_READLINE = 1 # Subset of CPython time module -MICROPY_MOD_TIME = 1 +MICROPY_PY_TIME = 1 # ffi module requires libffi (libffi-dev Debian package) -MICROPY_MOD_FFI = 1 +MICROPY_PY_FFI = 1 |