Skip to content

Commit fa30868

Browse files
[wasm] Fix signatures of swift_retain
Function signature cannot be inconsistent in Wasm platforms. This patch fixes the signature of `swift_retain` to return the retained object.
1 parent c890a55 commit fa30868

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ CF_PRIVATE int asprintf(char **ret, const char *format, ...) {
16251625
#if DEPLOYMENT_RUNTIME_SWIFT
16261626
#include <fcntl.h>
16271627

1628-
extern void swift_retain(void *);
1628+
extern void *swift_retain(void *);
16291629
extern void swift_release(void *);
16301630

16311631
#if TARGET_OS_WIN32

CoreFoundation/Base.subproj/CFRuntime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ int DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID pReserved ) {
14071407
#endif
14081408

14091409
#if DEPLOYMENT_RUNTIME_SWIFT
1410-
extern void swift_retain(void *);
1410+
extern void *swift_retain(void *);
14111411
#endif
14121412

14131413
// For "tryR==true", a return of NULL means "failed".

0 commit comments

Comments
 (0)