aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/include
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2026-01-27 13:28:52 -0600
committerCalvin Rose <calsrose@gmail.com>2026-01-27 13:28:52 -0600
commitae0afe6198a6b9dc3787d8a6ecc9ab05ecb2b6d6 (patch)
tree288608fdaaced8f2bf2beb85da80133ef101220e /src/include
parentAdd test case to help address #1705 (diff)
Add janet_decref_abstract_maybe_free
Diffstat (limited to 'src/include')
-rw-r--r--src/include/janet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/janet.h b/src/include/janet.h
index 248998d9..10d38dd0 100644
--- a/src/include/janet.h
+++ b/src/include/janet.h
@@ -1482,6 +1482,9 @@ JANET_API void *janet_abstract_threaded(const JanetAbstractType *atype, size_t s
JANET_API int32_t janet_abstract_incref(void *abst);
JANET_API int32_t janet_abstract_decref(void *abst);
+/* If this returns 0, *abst will be deinitialized and freed */
+JANET_API int32_t janet_abstract_decref_maybe_free(void *abst);
+
/* Expose channel utilities */
JANET_API JanetChannel *janet_channel_make(uint32_t limit);
JANET_API JanetChannel *janet_channel_make_threaded(uint32_t limit);