From 766d74b92142d76a8b61b8fe54e0564524ebe519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 24 Oct 2024 17:15:22 +0200 Subject: [PATCH 1/2] Put `jl_gc_new_weakref` in a header file again --- src/gc-common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gc-common.h b/src/gc-common.h index 32b7470b13a58..005dbd2bc2ecd 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 struct _jl_weakref_t *jl_gc_new_weakref(struct _jl_value_t *value); + #endif // JL_GC_COMMON_H From 1cac29acadfbf43589a32e27cfa75e2cbb35cba3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 24 Oct 2024 19:48:32 +0200 Subject: [PATCH 2/2] Update src/gc-common.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lars Göttgens --- src/gc-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gc-common.h b/src/gc-common.h index 005dbd2bc2ecd..bbac5f30c6755 100644 --- a/src/gc-common.h +++ b/src/gc-common.h @@ -192,6 +192,6 @@ extern int gc_logging_enabled; // 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 struct _jl_weakref_t *jl_gc_new_weakref(struct _jl_value_t *value); +JL_DLLEXPORT jl_weakref_t *jl_gc_new_weakref(jl_value_t *value); #endif // JL_GC_COMMON_H