summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-11-26 21:17:16 +0200
committerDamien George <damien.p.george@gmail.com>2014-11-27 17:37:07 +0000
commite5dbe1e28340a9d1a7b651b35d8de449c46fcf23 (patch)
tree5214b5ad2f6d335873486892105d7a7a33b72d4e /py/obj.h
parent317cf18486a4791b0322aadcb07c32c6e0a7d0d9 (diff)
map: Add empty fixed map.
Useful when need to call kw-receiving functions without any keywords from C, etc.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index 09f277a19..8a8a1eb21 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -148,6 +148,8 @@ typedef enum _mp_map_lookup_kind_t {
MP_MAP_LOOKUP_REMOVE_IF_FOUND, // 2
} mp_map_lookup_kind_t;
+extern const mp_map_t mp_const_empty_map;
+
static inline bool MP_MAP_SLOT_IS_FILLED(const mp_map_t *map, mp_uint_t pos) { return ((map)->table[pos].key != MP_OBJ_NULL && (map)->table[pos].key != MP_OBJ_SENTINEL); }
void mp_map_init(mp_map_t *map, mp_uint_t n);