mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Put back map.has (deprecated)
This commit is contained in:
parent
c152838e25
commit
ef764fcc70
@ -1,23 +1,24 @@
|
|||||||
#include "be_constobj.h"
|
#include "be_constobj.h"
|
||||||
|
|
||||||
static be_define_const_map_slots(be_class_map_map) {
|
static be_define_const_map_slots(be_class_map_map) {
|
||||||
{ be_const_key(size, -1), be_const_func(m_size) },
|
|
||||||
{ be_const_key(tostring, -1), be_const_func(m_tostring) },
|
{ be_const_key(tostring, -1), be_const_func(m_tostring) },
|
||||||
{ be_const_key(insert, -1), be_const_func(m_insert) },
|
|
||||||
{ be_const_key(init, -1), be_const_func(m_init) },
|
|
||||||
{ be_const_key(contains, -1), be_const_func(m_contains) },
|
{ be_const_key(contains, -1), be_const_func(m_contains) },
|
||||||
|
{ be_const_key(item, 4), be_const_func(m_item) },
|
||||||
|
{ be_const_key(setitem, 9), be_const_func(m_setitem) },
|
||||||
|
{ be_const_key(has, -1), be_const_func(m_contains) },
|
||||||
{ be_const_key(keys, -1), be_const_func(m_keys) },
|
{ be_const_key(keys, -1), be_const_func(m_keys) },
|
||||||
|
{ be_const_key(init, -1), be_const_func(m_init) },
|
||||||
|
{ be_const_key(remove, 5), be_const_func(m_remove) },
|
||||||
|
{ be_const_key(size, -1), be_const_func(m_size) },
|
||||||
|
{ be_const_key(iter, -1), be_const_func(m_iter) },
|
||||||
|
{ be_const_key(insert, -1), be_const_func(m_insert) },
|
||||||
{ be_const_key(_X2Ep, -1), be_const_var(0) },
|
{ be_const_key(_X2Ep, -1), be_const_var(0) },
|
||||||
{ be_const_key(iter, 6), be_const_func(m_iter) },
|
{ be_const_key(find, 8), be_const_func(m_find) },
|
||||||
{ be_const_key(setitem, 2), be_const_func(m_setitem) },
|
|
||||||
{ be_const_key(remove, -1), be_const_func(m_remove) },
|
|
||||||
{ be_const_key(item, 11), be_const_func(m_item) },
|
|
||||||
{ be_const_key(find, -1), be_const_func(m_find) },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static be_define_const_map(
|
static be_define_const_map(
|
||||||
be_class_map_map,
|
be_class_map_map,
|
||||||
12
|
13
|
||||||
);
|
);
|
||||||
|
|
||||||
BE_EXPORT_VARIABLE be_define_const_class(
|
BE_EXPORT_VARIABLE be_define_const_class(
|
||||||
|
@ -224,6 +224,7 @@ void be_load_maplib(bvm *vm)
|
|||||||
{ "setitem", m_setitem },
|
{ "setitem", m_setitem },
|
||||||
{ "find", m_find },
|
{ "find", m_find },
|
||||||
{ "contains", m_contains },
|
{ "contains", m_contains },
|
||||||
|
{ "has", m_contains }, /* deprecated */
|
||||||
{ "size", m_size },
|
{ "size", m_size },
|
||||||
{ "insert", m_insert },
|
{ "insert", m_insert },
|
||||||
{ "iter", m_iter },
|
{ "iter", m_iter },
|
||||||
@ -243,6 +244,7 @@ class be_class_map (scope: global, name: map) {
|
|||||||
setitem, func(m_setitem)
|
setitem, func(m_setitem)
|
||||||
find, func(m_find)
|
find, func(m_find)
|
||||||
contains, func(m_contains)
|
contains, func(m_contains)
|
||||||
|
has, func(m_contains)
|
||||||
size, func(m_size)
|
size, func(m_size)
|
||||||
insert, func(m_insert)
|
insert, func(m_insert)
|
||||||
iter, func(m_iter)
|
iter, func(m_iter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user