1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

key in map syntax

This commit is contained in:
Alexander Medvednikov
2019-07-23 22:57:06 +02:00
parent bd95f5bf8f
commit 527b9e13fa
5 changed files with 24 additions and 13 deletions

View File

@ -244,6 +244,7 @@ typedef map map_string;
#define _PUSH(arr, val, tmp, tmp_typ) {tmp_typ tmp = (val); array__push(arr, &tmp);}
#define _PUSH_MANY(arr, val, tmp, tmp_typ) {tmp_typ tmp = (val); array__push_many(arr, tmp.data, tmp.len);}
#define _IN(typ, val, arr) array_##typ##_contains(arr, val)
#define _IN_MAP(val, m) map__exists(m, val)
#define ALLOC_INIT(type, ...) (type *)memdup((type[]){ __VA_ARGS__ }, sizeof(type))
//================================== GLOBALS =================================*/