summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-18 11:06:20 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-21 16:26:01 +1100
commit4ebdb1f2b217410cdc1cee0e0c0da8fceb7627f2 (patch)
treed6188cf8f6579ffa66b8370032b8184a901a5312 /unix
parent5d0735b93a52ff7f2f41dd27f3a22ca847f6b49b (diff)
downloadmicropython-4ebdb1f2b217410cdc1cee0e0c0da8fceb7627f2.tar.gz
micropython-4ebdb1f2b217410cdc1cee0e0c0da8fceb7627f2.zip
py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.
In order to have more fine-grained control over how builtin functions are constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific, with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now match the MP_DEFINE_CONST_FUN_OBJ macros.
Diffstat (limited to 'unix')
-rw-r--r--unix/main.c2
-rw-r--r--unix/modos.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/unix/main.c b/unix/main.c
index a1c057400f..482d1944e2 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -461,7 +461,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
#if defined(MICROPY_UNIX_COVERAGE)
{
- MP_DECLARE_CONST_FUN_OBJ(extra_coverage_obj);
+ MP_DECLARE_CONST_FUN_OBJ_0(extra_coverage_obj);
mp_store_global(QSTR_FROM_STR_STATIC("extra_coverage"), MP_OBJ_FROM_PTR(&extra_coverage_obj));
}
#endif
diff --git a/unix/modos.c b/unix/modos.c
index 36945720d1..72f5d872e4 100644
--- a/unix/modos.c
+++ b/unix/modos.c
@@ -43,9 +43,9 @@
// Can't include this, as FATFS structure definition is required,
// and FatFs header defining it conflicts with POSIX.
//#include "extmod/fsusermount.h"
-MP_DECLARE_CONST_FUN_OBJ(fsuser_mount_obj);
-MP_DECLARE_CONST_FUN_OBJ(fsuser_umount_obj);
-MP_DECLARE_CONST_FUN_OBJ(fsuser_mkfs_obj);
+MP_DECLARE_CONST_FUN_OBJ_KW(fsuser_mount_obj);
+MP_DECLARE_CONST_FUN_OBJ_1(fsuser_umount_obj);
+MP_DECLARE_CONST_FUN_OBJ_KW(fsuser_mkfs_obj);
extern const mp_obj_type_t mp_fat_vfs_type;
#ifdef __ANDROID__