aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2024-01-20 16:37:26 -0800
committerPreston Pan <preston@nullring.xyz>2024-01-20 16:37:26 -0800
commitff43bd2fb2c2617b53a0157d62d07cf96b2ef92f (patch)
tree3dbd2aa8f7c1af171edb232fb56c00879b3876ab /include
parenta9d6c221d7686e3055593359b02125a3f20ab3e5 (diff)
add more detailed error messages; fix a couple bugs
Diffstat (limited to 'include')
-rw-r--r--include/builtins.h4
-rw-r--r--include/stem.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/builtins.h b/include/builtins.h
index 629b935..38b9965 100644
--- a/include/builtins.h
+++ b/include/builtins.h
@@ -154,6 +154,10 @@ void stemfwrite(value_t *v);
/*! @brief [VINT/VFLOAT] sleep; sleeps for an amount of seconds. */
void stemsleep(value_t *v);
+void stemcut(value_t *v);
+
+void undef(value_t *v);
+
/*! @brief adds all the custom objects defined to OBJ_TABLE */
void add_objs();
diff --git a/include/stem.h b/include/stem.h
index 69bfcb4..381b0ad 100644
--- a/include/stem.h
+++ b/include/stem.h
@@ -197,6 +197,9 @@ void sll_add(sll_t *l, string_t *key, void *v, void (*freefunc)(void *));
/*! Gets value by key from singly linked list. */
void *sll_get(sll_t *l, string_t *key);
+/*! deletes item from singly linked list */
+void sll_delete(sll_t *l, string_t *k, void (*freefunc)(void *));
+
/*! Frees singly linked list */
void sll_free(sll_t *l, void (*freefunc)(void *));
@@ -210,6 +213,9 @@ void ht_add(ht_t *h, string_t *key, void *v, void (*freefunc)(void *));
/*! Gets value from hash table by key */
void *ht_get(ht_t *h, string_t *key);
+/*! Deletes item from hash table */
+void ht_delete(ht_t *h, string_t *key, void (*freefunc)(void *));
+
/*! returns true if key exists in hash table. false otherwise */
bool ht_exists(ht_t *h, string_t *key);