From 036e325e8a8be79a364004128eb2e9a936c0b393 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 27 Feb 2018 01:00:05 +0300 Subject: Add script function for check is hash table exists. New script function: htexists. --- src/emap/script_buildins.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/emap/script_buildins.c') diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 520f16f..6359ff6 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -1965,6 +1965,12 @@ BUILDIN(htSize) return true; } +BUILDIN(htExists) +{ + int64 id = script_getnum(st, 2); + script_pushint(st, htreg->hashtable_exists(id)); +} + BUILDIN(htIterator) { int64 id = script_getnum(st, 2); -- cgit v1.2.3-60-g2f50