From 1d90577b7e1fa5c4f452471378dd887152a4825c Mon Sep 17 00:00:00 2001 From: Anson Mansfield Date: Sat, 30 Aug 2025 14:37:35 -0400 Subject: py/gc: Clean up usage of GC_ALLOC_FLAG_HAS_FINALISER flag. The calls signature for gc_malloc was changed in 5ed578e5b48730606536ded9a711223ae9a70262, without cleaning up existing code on the rationale that the previous bool is automatically converted to an int with the same meaning. This commit goes back and cleans up existing invocations to make their behavior more readable in a modern context. Signed-off-by: Anson Mansfield --- py/malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'py/malloc.c') diff --git a/py/malloc.c b/py/malloc.c index 05daeb35d..5135dc26b 100644 --- a/py/malloc.c +++ b/py/malloc.c @@ -56,8 +56,8 @@ #undef malloc #undef free #undef realloc -#define malloc(b) gc_alloc((b), false) -#define malloc_with_finaliser(b) gc_alloc((b), true) +#define malloc(b) gc_alloc((b), 0) +#define malloc_with_finaliser(b) gc_alloc((b), GC_ALLOC_FLAG_HAS_FINALISER) #define free gc_free #define realloc(ptr, n) gc_realloc(ptr, n, true) #define realloc_ext(ptr, n, mv) gc_realloc(ptr, n, mv) -- cgit v1.2.3