aboutsummaryrefslogtreecommitdiff
path: root/include/object.h
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-01-26 22:39:41 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-01-26 22:39:41 +0300
commit49c2589427e0f81bea68ccba1a95c6890e10538d (patch)
tree0633bc052552831b3860d1d4816bbee7b85d6313 /include/object.h
parent4665a620775da64ec7280762979a9fc6fa37c0bc (diff)
downloadroscha-49c2589427e0f81bea68ccba1a95c6890e10538d.tar.gz
roscha-49c2589427e0f81bea68ccba1a95c6890e10538d.zip
Fix break tag parsing and code formatHEADmaster
auto-formatted the code with clang-format.
Diffstat (limited to 'include/object.h')
-rw-r--r--include/object.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/object.h b/include/object.h
index 71fc969..2325b15 100644
--- a/include/object.h
+++ b/include/object.h
@@ -58,7 +58,7 @@ struct roscha_object {
sds roscha_object_string(const struct roscha_object *, sds str);
/* Return the textual representation of the type */
-inline const char *roscha_type_print(enum roscha_type);
+const char *roscha_type_print(enum roscha_type);
/* Create a new roscha object based on its type */
struct roscha_object *roscha_object_new_int(int64_t val);
@@ -77,7 +77,12 @@ struct roscha_object *roscha_object_new_hmap(struct hmap *);
)(v)
/* Increment reference count of object */
-void roscha_object_ref(struct roscha_object *);
+static inline void
+roscha_object_ref(struct roscha_object *obj)
+{
+ obj->refcount++;
+}
+
/* Decrement reference count of object */
void roscha_object_unref(struct roscha_object *);