summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-12-14 16:30:22 +1100
committerDamien George <damien@micropython.org>2022-12-15 17:40:36 +1100
commit9e9176467179bcb477b92f32033e62fcde14ea41 (patch)
treecf304deb3ed9290407fe913b4757c325285d6b4c /py
parent68090cc6cd832f62f0c12474ee63b56571a4c6a5 (diff)
py/obj: Remove unused MP_DEFINE_CONST_OBJ_FULL_TYPE macro.
This was previously used for the definition of NIC types, but they have been updated to use a protocol instead. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py')
-rw-r--r--py/obj.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/py/obj.h b/py/obj.h
index b5b855bad..cb9a6cc45 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -773,15 +773,14 @@ typedef struct _mp_obj_full_type_t {
// of the 29th argument (29 is 13*2 + 3).
#define MP_DEFINE_CONST_OBJ_TYPE_NARGS(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, N, ...) MP_DEFINE_CONST_OBJ_TYPE_NARGS_##N
-// These macros are used to define a object type in ROM.
+// This macros is used to define a object type in ROM.
// Invoke as MP_DEFINE_CONST_OBJ_TYPE(_typename, _name, _flags, _make_new [, slot, func]*)
-// They use the number of arguments to select which MP_DEFINE_CONST_OBJ_TYPE_*
+// It uses the number of arguments to select which MP_DEFINE_CONST_OBJ_TYPE_*
// macro to use based on the number of arguments. It works by shifting the
// numeric values 12, 11, ... 0 by the number of arguments, such that the
// 29th argument ends up being the number to use. The _INV values are
// placeholders because the slot arguments come in pairs.
#define MP_DEFINE_CONST_OBJ_TYPE(...) MP_DEFINE_CONST_OBJ_TYPE_EXPAND(MP_DEFINE_CONST_OBJ_TYPE_NARGS(__VA_ARGS__, _INV, 12, _INV, 11, _INV, 10, _INV, 9, _INV, 8, _INV, 7, _INV, 6, _INV, 5, _INV, 4, _INV, 3, _INV, 2, _INV, 1, _INV, 0)(mp_obj_type_t, __VA_ARGS__))
-#define MP_DEFINE_CONST_OBJ_FULL_TYPE(...) MP_DEFINE_CONST_OBJ_TYPE_EXPAND(MP_DEFINE_CONST_OBJ_TYPE_NARGS(__VA_ARGS__, _INV, 12, _INV, 11, _INV, 10, _INV, 9, _INV, 8, _INV, 7, _INV, 6, _INV, 5, _INV, 4, _INV, 3, _INV, 2, _INV, 1, _INV, 0)(mp_obj_full_type_t, __VA_ARGS__))
// Constant types, globally accessible
extern const mp_obj_type_t mp_type_type;