aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--include/object.h8
2 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index 21ecb18..c5af2d1 100644
--- a/README.md
+++ b/README.md
@@ -34,4 +34,5 @@ calling `roscha_deinit()`.
* Better document this... or not if nobody else uses?
* Probably fix some bugs that are currently hidden.
* k, v arguments in for...in loops over hashmaps
+* make hashmaps grow in capacity over a certain load threshold.
* Other stuff like space trimming
diff --git a/include/object.h b/include/object.h
index 157ac0a..71fc969 100644
--- a/include/object.h
+++ b/include/object.h
@@ -35,8 +35,12 @@ struct roscha_object {
enum roscha_type type;
size_t refcount;
union {
- /* booleans are only used internally */
- bool boolean;
+ /*
+ * booleans are only used internally. It's not a bool so that we can
+ * evaluate as truthy objects such as integers and the other types
+ * without overflow problems of bool.
+ */
+ uintptr_t boolean;
/* integer numbers */
int64_t integer;
/* A dynamic string using the sds library */