Skip to content

Commit f82f4cb

Browse files
committed
[cxx-interop] Remove array parameter qualifiers in C++ mode.
This C99 extensions is only valid in C. When a program uses the flag "-enable-cxx-interop" this library will be imported in a C++ context so we can only have valid C++ code.
1 parent 49e885a commit f82f4cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,12 @@ CF_EXPORT int _CFPosixSpawnFileActionsDestroy(_CFPosixSpawnFileActionsRef file_a
672672
CF_EXPORT void _CFPosixSpawnFileActionsDealloc(_CFPosixSpawnFileActionsRef file_actions);
673673
CF_EXPORT int _CFPosixSpawnFileActionsAddDup2(_CFPosixSpawnFileActionsRef file_actions, int filedes, int newfiledes);
674674
CF_EXPORT int _CFPosixSpawnFileActionsAddClose(_CFPosixSpawnFileActionsRef file_actions, int filedes);
675+
#ifdef __cplusplus
676+
CF_EXPORT int _CFPosixSpawn(pid_t *_CF_RESTRICT pid, const char *_CF_RESTRICT path, _CFPosixSpawnFileActionsRef file_actions, _CFPosixSpawnAttrRef _Nullable _CF_RESTRICT attrp, char *const argv[], char *const envp[]);
677+
#else
675678
CF_EXPORT int _CFPosixSpawn(pid_t *_CF_RESTRICT pid, const char *_CF_RESTRICT path, _CFPosixSpawnFileActionsRef file_actions, _CFPosixSpawnAttrRef _Nullable _CF_RESTRICT attrp, char *_Nullable const argv[_Nullable _CF_RESTRICT], char *_Nullable const envp[_Nullable _CF_RESTRICT]);
676-
#endif
679+
#endif // __cplusplus
680+
#endif // !TARGET_OS_WIN32
677681

678682
_CF_EXPORT_SCOPE_END
679683

0 commit comments

Comments
 (0)