aboutsummaryrefslogtreecommitdiff
path: root/include/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/object.h')
-rw-r--r--include/object.h8
1 files changed, 6 insertions, 2 deletions
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 */