From 015e7ce31017797bb4eb919232921f9c47f43b3e Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Wed, 21 Feb 2024 20:48:41 +0100 Subject: [PATCH] Add OBJC_PUBLIC annotation to objc_alloc, objc_allocWithZone, objc_alloc_init Fixes compiler errors on Windows --- fast_paths.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fast_paths.m b/fast_paths.m index 5a4c206..0eda113 100644 --- a/fast_paths.m +++ b/fast_paths.m @@ -12,6 +12,7 @@ typedef struct _NSZone NSZone; /** * Equivalent to [cls alloc]. If there's a fast path opt-in, then this skips the message send. */ +OBJC_PUBLIC id objc_alloc(Class cls) { @@ -29,6 +30,7 @@ objc_alloc(Class cls) /** * Equivalent to [cls allocWithZone: null]. If there's a fast path opt-in, then this skips the message send. */ +OBJC_PUBLIC id objc_allocWithZone(Class cls) { @@ -47,6 +49,7 @@ objc_allocWithZone(Class cls) * Equivalent to [[cls alloc] init]. If there's a fast path opt-in, then this * skips the message send. */ +OBJC_PUBLIC id objc_alloc_init(Class cls) {