From 5cdf3789d8058d137b62259d2ab12f6eb456911e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 24 Oct 2024 22:43:27 +0200 Subject: [PATCH] Put `jl_gc_new_weakref` in a header file again (#56319) --- src/gc-common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gc-common.h b/src/gc-common.h index 32b7470b13a58..bbac5f30c6755 100644 --- a/src/gc-common.h +++ b/src/gc-common.h @@ -185,4 +185,13 @@ extern jl_ptls_t* gc_all_tls_states; extern int gc_logging_enabled; +// =========================================================================== // +// Misc +// =========================================================================== // + +// Allocates a new weak-reference, assigns its value and increments Julia allocation +// counters. If thread-local allocators are used, then this function should allocate in the +// thread-local allocator of the current thread. +JL_DLLEXPORT jl_weakref_t *jl_gc_new_weakref(jl_value_t *value); + #endif // JL_GC_COMMON_H