Skip to content

Commit 400195a

Browse files
committed
Merge branch 'master' of github.com:apple/swift-corelibs-foundation into cg-api
2 parents e081f2c + 1099962 commit 400195a

File tree

105 files changed

+8578
-2297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+8578
-2297
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ CF_EXPORT void _CFMachPortInstallNotifyPort(CFRunLoopRef rl, CFStringRef mode);
157157

158158
CF_PRIVATE os_log_t _CFOSLog(void);
159159

160-
CF_PRIVATE CFIndex __CFActiveProcessorCount();
160+
CF_PRIVATE CFIndex __CFActiveProcessorCount(void);
161161

162162
#ifndef CLANG_ANALYZER_NORETURN
163163
#if __has_feature(attribute_analyzer_noreturn)
@@ -325,7 +325,7 @@ extern Boolean __CFStringScanHex(CFStringInlineBuffer *buf, SInt32 *indexPtr, un
325325
extern const char *__CFgetenv(const char *n);
326326
extern const char *__CFgetenvIfNotRestricted(const char *n); // Returns NULL in a restricted process
327327

328-
CF_PRIVATE Boolean __CFProcessIsRestricted();
328+
CF_PRIVATE Boolean __CFProcessIsRestricted(void);
329329

330330
// This is really about the availability of C99. We don't have that on Windows, but we should everywhere else.
331331
#if DEPLOYMENT_TARGET_WINDOWS
@@ -587,8 +587,8 @@ CF_PRIVATE SInt32 _CFGetFileProperties(CFAllocatorRef alloc, CFURLRef pathURL, B
587587

588588
/* ==================== Simple path manipulation ==================== */
589589

590-
CF_EXPORT UniChar _CFGetSlash();
591-
CF_PRIVATE CFStringRef _CFGetSlashStr();
590+
CF_EXPORT UniChar _CFGetSlash(void);
591+
CF_PRIVATE CFStringRef _CFGetSlashStr(void);
592592
CF_EXPORT Boolean _CFIsAbsolutePath(UniChar *unichars, CFIndex length);
593593
CF_PRIVATE void _CFAppendTrailingPathSlash2(CFMutableStringRef path);
594594
CF_PRIVATE void _CFAppendConditionalTrailingPathSlash2(CFMutableStringRef path);
@@ -733,7 +733,7 @@ extern void *__CFLookupCoreServicesInternalFunction(const char *name);
733733
CF_PRIVATE CFComparisonResult _CFCompareStringsWithLocale(CFStringInlineBuffer *str1, CFRange str1Range, CFStringInlineBuffer *str2, CFRange str2Range, CFOptionFlags options, const void *compareLocale);
734734

735735

736-
CF_PRIVATE CFArrayRef _CFBundleCopyUserLanguages();
736+
CF_PRIVATE CFArrayRef _CFBundleCopyUserLanguages(void);
737737

738738

739739
// This should only be used in CF types, not toll-free bridged objects!

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ const char *_CFProcessPath(void) {
180180
}
181181
return __CFProcessPath;
182182
}
183+
184+
#else
185+
186+
Boolean _CFIsMainThread(void) {
187+
return pthread_main_np() == 1;
188+
}
183189
#endif
184190

185191
CF_PRIVATE CFStringRef _CFProcessNameString(void) {
@@ -1295,7 +1301,7 @@ CFTypeRef _Nullable _CFThreadSpecificGet(_CFThreadSpecificKey key) {
12951301
return (CFTypeRef)pthread_getspecific(key);
12961302
}
12971303

1298-
void _CThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value) {
1304+
void _CFThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value) {
12991305
if (value != NULL) {
13001306
swift_retain((void *)value);
13011307
pthread_setspecific(key, value);

CoreFoundation/Base.subproj/CFRuntime.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -808,11 +808,11 @@ CFAllocatorRef CFGetAllocator(CFTypeRef cf) {
808808
}
809809

810810

811-
extern CFTypeID CFBinaryHeapGetTypeID();
812-
extern CFTypeID CFBitVectorGetTypeID();
813-
extern CFTypeID CFTreeGetTypeID();
814-
extern CFTypeID CFPlugInInstanceGetTypeID();
815-
extern CFTypeID CFStringTokenizerGetTypeID();
811+
extern CFTypeID CFBinaryHeapGetTypeID(void);
812+
extern CFTypeID CFBitVectorGetTypeID(void);
813+
extern CFTypeID CFTreeGetTypeID(void);
814+
extern CFTypeID CFPlugInInstanceGetTypeID(void);
815+
extern CFTypeID CFStringTokenizerGetTypeID(void);
816816
extern CFTypeID CFStorageGetTypeID(void);
817817
extern void __CFAllocatorInitialize(void);
818818
extern void __CFStringInitialize(void);
@@ -821,7 +821,7 @@ extern void __CFCharacterSetInitialize(void);
821821
extern void __CFPFactoryInitialize(void);
822822
extern void __CFPlugInInitialize(void);
823823
#if (DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_MACOSX) && DEPLOYMENT_RUNTIME_SWIFT
824-
CF_PRIVATE void __CFTSDInitialize();
824+
CF_PRIVATE void __CFTSDInitialize(void);
825825
#endif
826826
#if DEPLOYMENT_TARGET_WINDOWS
827827
// From CFPlatform.c
@@ -1005,7 +1005,7 @@ void __CFInitialize(void) {
10051005
memset(__CFRuntimeObjCClassTable, 0, sizeof(__CFRuntimeObjCClassTable));
10061006

10071007
#if DEPLOYMENT_RUNTIME_SWIFT
1008-
extern uintptr_t __CFSwiftGetBaseClass();
1008+
extern uintptr_t __CFSwiftGetBaseClass(void);
10091009

10101010
uintptr_t NSCFType = __CFSwiftGetBaseClass();
10111011
for (CFIndex idx = 1; idx < __CFRuntimeClassTableSize; idx++) {
@@ -1107,7 +1107,7 @@ void __CFInitialize(void) {
11071107
#endif
11081108

11091109
#if DEPLOYMENT_RUNTIME_SWIFT
1110-
extern void __CFInitializeSwift();
1110+
extern void __CFInitializeSwift(void);
11111111
__CFInitializeSwift();
11121112
__CFNumberInitialize(); /* needs to happen after Swift bridge is initialized */
11131113
#endif

CoreFoundation/Base.subproj/ForFoundationOnly.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,12 @@ CF_EXPORT _CFStringFileSystemRepresentationError _CFStringGetFileSystemRepresent
631631

632632

633633

634-
CF_EXPORT CFIndex __CFProcessorCount();
635-
CF_EXPORT uint64_t __CFMemorySize();
634+
CF_EXPORT CFIndex __CFProcessorCount(void);
635+
CF_EXPORT uint64_t __CFMemorySize(void);
636636
CF_EXPORT CFStringRef _CFProcessNameString(void);
637-
CF_EXPORT CFIndex __CFActiveProcessorCount();
638-
CF_EXPORT CFDictionaryRef __CFGetEnvironment();
639-
CF_EXPORT int32_t __CFGetPid();
637+
CF_EXPORT CFIndex __CFActiveProcessorCount(void);
638+
CF_EXPORT CFDictionaryRef __CFGetEnvironment(void);
639+
CF_EXPORT int32_t __CFGetPid(void);
640640
CF_EXPORT CFTimeInterval CFGetSystemUptime(void);
641641
CF_EXPORT CFStringRef CFCopySystemVersionString(void);
642642
CF_EXPORT CFDictionaryRef _CFCopySystemVersionDictionary(void);

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
#include <CoreFoundation/ForFoundationOnly.h>
2828
#include <fts.h>
2929
#include <pthread.h>
30+
#include <execinfo.h>
31+
32+
#if __has_include(<malloc/malloc.h>)
33+
#include <malloc/malloc.h>
34+
#endif
35+
36+
#if __has_include(<malloc/malloc.h>)
37+
#include <malloc/malloc.h>
38+
#endif
3039

3140
_CF_EXPORT_SCOPE_BEGIN
3241

@@ -138,7 +147,7 @@ struct _NSMutableStringBridge {
138147
};
139148

140149
struct _NSXMLParserBridge {
141-
_CFXMLInterface _Nullable (*_Nonnull currentParser)();
150+
_CFXMLInterface _Nullable (*_Nonnull currentParser)(void);
142151
_CFXMLInterfaceParserInput _Nullable (*_Nonnull _xmlExternalEntityWithURL)(_CFXMLInterface interface, const char *url, const char * identifier, _CFXMLInterfaceParserContext context, _CFXMLInterfaceExternalEntityLoader originalLoaderFunction);
143152

144153
_CFXMLInterfaceParserContext _Nonnull (*_Nonnull getContext)(_CFXMLInterface ctx);
@@ -294,13 +303,14 @@ CF_EXPORT char *_Nullable *_Nonnull _CFEnviron(void);
294303
CF_EXPORT void CFLog1(CFLogLevel lev, CFStringRef message);
295304

296305
CF_EXPORT Boolean _CFIsMainThread(void);
306+
CF_EXPORT pthread_t _CFMainPThread;
297307

298308
CF_EXPORT CFHashCode __CFHashDouble(double d);
299309

300310
typedef pthread_key_t _CFThreadSpecificKey;
301311
CF_EXPORT CFTypeRef _Nullable _CFThreadSpecificGet(_CFThreadSpecificKey key);
302-
CF_EXPORT void _CThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value);
303-
CF_EXPORT _CFThreadSpecificKey _CFThreadSpecificKeyCreate();
312+
CF_EXPORT void _CFThreadSpecificSet(_CFThreadSpecificKey key, CFTypeRef _Nullable value);
313+
CF_EXPORT _CFThreadSpecificKey _CFThreadSpecificKeyCreate(void);
304314

305315
typedef pthread_attr_t _CFThreadAttributes;
306316
typedef pthread_t _CFThreadRef;
@@ -343,6 +353,54 @@ CF_EXPORT CFStringRef _CFXDGCreateCacheDirectoryPath(void);
343353
/// a single base directory relative to which user-specific runtime files and other file objects should be placed. This directory is defined by the environment variable $XDG_RUNTIME_DIR.
344354
CF_EXPORT CFStringRef _CFXDGCreateRuntimeDirectoryPath(void);
345355

356+
357+
typedef struct {
358+
void *_Nonnull memory;
359+
size_t capacity;
360+
_Bool onStack;
361+
} _ConditionalAllocationBuffer;
362+
363+
static inline _Bool _resizeConditionalAllocationBuffer(_ConditionalAllocationBuffer *_Nonnull buffer, size_t amt) {
364+
#if TARGET_OS_MAC
365+
size_t amount = malloc_good_size(amt);
366+
#else
367+
size_t amount = amt;
368+
#endif
369+
if (amount <= buffer->capacity) { return true; }
370+
void *newMemory;
371+
if (buffer->onStack) {
372+
newMemory = malloc(amount);
373+
if (newMemory == NULL) { return false; }
374+
memcpy(newMemory, buffer->memory, buffer->capacity);
375+
buffer->onStack = false;
376+
} else {
377+
newMemory = realloc(buffer->memory, amount);
378+
if (newMemory == NULL) { return false; }
379+
}
380+
if (newMemory == NULL) { return false; }
381+
buffer->memory = newMemory;
382+
buffer->capacity = amount;
383+
return true;
384+
}
385+
386+
static inline _Bool _withStackOrHeapBuffer(size_t amount, void (__attribute__((noescape)) ^ _Nonnull applier)(_ConditionalAllocationBuffer *_Nonnull)) {
387+
_ConditionalAllocationBuffer buffer;
388+
#if TARGET_OS_MAC
389+
buffer.capacity = malloc_good_size(amount);
390+
#else
391+
buffer.capacity = amount;
392+
#endif
393+
buffer.onStack = (_CFIsMainThread() != 0 ? buffer.capacity < 2048 : buffer.capacity < 512);
394+
buffer.memory = buffer.onStack ? alloca(buffer.capacity) : malloc(buffer.capacity);
395+
if (buffer.memory == NULL) { return false; }
396+
applier(&buffer);
397+
if (!buffer.onStack) {
398+
free(buffer.memory);
399+
}
400+
return true;
401+
}
402+
403+
346404
_CF_EXPORT_SCOPE_END
347405

348406
#endif /* __COREFOUNDATION_FORSWIFTFOUNDATIONONLY__ */

CoreFoundation/NumberDate.subproj/CFTimeZone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static CFTimeZoneRef __CFTimeZoneCreateSystem(void) {
793793
size_t zoneInfoDirLen = CFStringGetLength(__tzZoneInfo);
794794
if (strncmp(linkbuf, tzZoneInfo, zoneInfoDirLen) == 0) {
795795
name = CFStringCreateWithBytes(kCFAllocatorSystemDefault, (uint8_t *)linkbuf + zoneInfoDirLen,
796-
strlen(linkbuf) - zoneInfoDirLen + 2, kCFStringEncodingUTF8, false);
796+
strlen(linkbuf) - zoneInfoDirLen + 1, kCFStringEncodingUTF8, false);
797797
} else {
798798
name = CFStringCreateWithBytes(kCFAllocatorSystemDefault, (uint8_t *)linkbuf, strlen(linkbuf), kCFStringEncodingUTF8, false);
799799
}

CoreFoundation/Parsing.subproj/CFXMLInterface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,8 @@ CFArrayRef _CFXMLNodesForXPath(_CFXMLNodePtr node, const unsigned char* xpath) {
893893
CFArrayAppendValue(results, nodes->nodeTab[i]);
894894
}
895895

896-
xmlFree(context);
897-
xmlFree(evalResult);
896+
xmlXPathFreeContext(context);
897+
xmlXPathFreeObject(evalResult);
898898

899899
return results;
900900
}

CoreFoundation/Parsing.subproj/CFXMLInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ typedef void (*_CFXMLInterfaceStructuredErrorFunc)(_CFXMLInterface ctx, _CFXMLIn
100100

101101
void _CFSetupXMLInterface(void);
102102
_CFXMLInterfaceParserInput _CFXMLInterfaceNoNetExternalEntityLoader(const char *URL, const char *ID, _CFXMLInterfaceParserContext ctxt);
103-
_CFXMLInterfaceSAXHandler _CFXMLInterfaceCreateSAXHandler();
103+
_CFXMLInterfaceSAXHandler _CFXMLInterfaceCreateSAXHandler(void);
104104
void _CFXMLInterfaceDestroySAXHandler(_CFXMLInterfaceSAXHandler handler);
105105
void _CFXMLInterfaceSetStructuredErrorFunc(_CFXMLInterface ctx, _CFXMLInterfaceStructuredErrorFunc _Nullable handler);
106106
_CFXMLInterfaceParserContext _CFXMLInterfaceCreatePushParserCtxt(_CFXMLInterfaceSAXHandler _Nullable sax, _CFXMLInterface user_data, const char * chunk, int size, const char *_Nullable filename);

CoreFoundation/PlugIn.subproj/CFBundle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ static const CFRuntimeClass __CFBundleClass = {
882882
};
883883

884884
// From CFBundle_Resources.c
885-
CF_PRIVATE void _CFBundleResourcesInitialize();
885+
CF_PRIVATE void _CFBundleResourcesInitialize(void);
886886

887887
CFTypeID CFBundleGetTypeID(void) {
888888
static dispatch_once_t initOnce;

CoreFoundation/PlugIn.subproj/CFBundle_Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ CF_PRIVATE SInt32 _CFBundleCurrentArchitecture(void);
144144
CF_PRIVATE Boolean _CFBundleGetObjCImageInfo(CFBundleRef bundle, uint32_t *objcVersion, uint32_t *objcFlags);
145145

146146
#if defined(BINARY_SUPPORT_DYLD)
147-
CF_PRIVATE CFMutableDictionaryRef _CFBundleCreateInfoDictFromMainExecutable();
147+
CF_PRIVATE CFMutableDictionaryRef _CFBundleCreateInfoDictFromMainExecutable(void);
148148
CF_PRIVATE Boolean _CFBundleGrokObjCImageInfoFromMainExecutable(uint32_t *objcVersion, uint32_t *objcFlags);
149149
#endif
150150

CoreFoundation/Preferences.subproj/CFApplicationPreferences.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <CoreFoundation/CFNumberFormatter.h>
1818
#include <CoreFoundation/CFDateFormatter.h>
1919
#include <sys/types.h>
20-
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
20+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_LINUX
2121
#include <unistd.h>
2222
#endif
2323

CoreFoundation/Preferences.subproj/CFPreferences.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static CFStringRef _CFPreferencesStandardDomainCacheKey(CFStringRef domainName
445445
static CFURLRef _CFPreferencesURLForStandardDomainWithSafetyLevel(CFStringRef domainName, CFStringRef userName, CFStringRef hostName, unsigned long safeLevel) {
446446
CFURLRef theURL = NULL;
447447
CFAllocatorRef prefAlloc = __CFPreferencesAllocator();
448-
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_WINDOWS
448+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_WINDOWS
449449
CFURLRef prefDir = _preferencesDirectoryForUserHostSafetyLevel(userName, hostName, safeLevel);
450450
CFStringRef appName;
451451
CFStringRef fileName;
@@ -479,7 +479,7 @@ static CFURLRef _CFPreferencesURLForStandardDomainWithSafetyLevel(CFStringRef do
479479
CFRelease(appName);
480480
}
481481
if (fileName) {
482-
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
482+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_LINUX
483483
theURL = CFURLCreateWithFileSystemPathRelativeToBase(prefAlloc, fileName, kCFURLPOSIXPathStyle, false, prefDir);
484484
#elif DEPLOYMENT_TARGET_WINDOWS
485485
theURL = CFURLCreateWithFileSystemPathRelativeToBase(prefAlloc, fileName, kCFURLWindowsPathStyle, false, prefDir);
@@ -497,10 +497,6 @@ static CFURLRef _CFPreferencesURLForStandardDomain(CFStringRef domainName, CFStr
497497
return _CFPreferencesURLForStandardDomainWithSafetyLevel(domainName, userName, hostName, __CFSafeLaunchLevel);
498498
}
499499

500-
const _CFPreferencesDomainCallBacks __kCFXMLPropertyListDomainCallBacks = {
501-
502-
};
503-
504500
CFPreferencesDomainRef _CFPreferencesStandardDomain(CFStringRef domainName, CFStringRef userName, CFStringRef hostName) {
505501
CFPreferencesDomainRef domain;
506502
CFStringRef domainKey;

CoreFoundation/Preferences.subproj/CFXMLPreferencesDomain.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
#include <CoreFoundation/CFDate.h>
1717
#include "CFInternal.h"
1818
#include <time.h>
19-
#if DEPLOYMENT_TARGET_MACOSX
19+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_LINUX
2020
#include <unistd.h>
2121
#include <stdio.h>
2222
#include <sys/stat.h>
23+
#endif
24+
#if DEPLOYMENT_TARGET_MACOSX
2325
#include <mach/mach.h>
2426
#include <mach/mach_syscalls.h>
2527
#endif
@@ -102,7 +104,7 @@ static Boolean _createDirectory(CFURLRef dirURL, Boolean worldReadable) {
102104
if (parentURL) CFRelease(parentURL);
103105
if (!parentExists) return false;
104106

105-
#if DEPLOYMENT_TARGET_MACOSX
107+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_LINUX
106108
mode = worldReadable ? S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH : S_IRWXU;
107109
#else
108110
mode = 0666;
@@ -306,7 +308,7 @@ static Boolean _writeXMLFile(CFURLRef url, CFMutableDictionaryRef dict, Boolean
306308
CFDataRef data = CFPropertyListCreateData(alloc, dict, desiredFormat, 0, NULL);
307309
if (data) {
308310
SInt32 mode;
309-
#if DEPLOYMENT_TARGET_MACOSX
311+
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_LINUX
310312
mode = isWorldReadable ? S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH : S_IRUSR|S_IWUSR;
311313
#else
312314
mode = 0666;

CoreFoundation/String.subproj/CFBurstTrie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef CF_OPTIONS(CFOptionFlags, CFBurstTrieOpts) {
6060
typedef void (*CFBurstTrieTraversalCallback)(void* context, const UInt8* key, uint32_t keyLength, uint32_t payload, Boolean *stop);
6161

6262
CF_EXPORT
63-
CFBurstTrieRef CFBurstTrieCreate() CF_AVAILABLE(10_7, 4_2);
63+
CFBurstTrieRef CFBurstTrieCreate(void) CF_AVAILABLE(10_7, 4_2);
6464

6565
CF_EXPORT
6666
CFBurstTrieRef CFBurstTrieCreateWithOptions(CFDictionaryRef options) CF_AVAILABLE(10_8, 6_0);

CoreFoundation/String.subproj/CFRegularExpression.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ _CFRegularExpressionRef _CFRegularExpressionCreate(CFAllocatorRef allocator, CFS
133133
if (regex == NULL || U_FAILURE(errorCode)) {
134134
// ??? do we need more detailed errors here?
135135
if (errorPtr) {
136-
CFStringRef keys[] = {
137-
CFSTR("NSInvalidValue")
136+
CFStringRef key = CFSTR("NSInvalidValue");
137+
CFTypeRef keys[] = {
138+
key
138139
};
139140
CFTypeRef values[] = {
140141
pattern

CoreFoundation/URL.subproj/CFURLComponents.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ CF_EXPORT CFStringRef _CFStringCreateByAddingPercentEncodingWithAllowedCharacter
102102
CF_EXPORT CFStringRef _Nullable _CFStringCreateByRemovingPercentEncoding(CFAllocatorRef alloc, CFStringRef string);
103103

104104
// These return singletons
105-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLUserAllowedCharacterSet();
106-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLPasswordAllowedCharacterSet();
107-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLHostAllowedCharacterSet();
108-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLPathAllowedCharacterSet();
109-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLQueryAllowedCharacterSet();
110-
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLFragmentAllowedCharacterSet();
105+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLUserAllowedCharacterSet(void);
106+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLPasswordAllowedCharacterSet(void);
107+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLHostAllowedCharacterSet(void);
108+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLPathAllowedCharacterSet(void);
109+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLQueryAllowedCharacterSet(void);
110+
CF_EXPORT CFCharacterSetRef _CFURLComponentsGetURLFragmentAllowedCharacterSet(void);
111111

112112
CF_EXPORT _Nullable CFArrayRef _CFURLComponentsCopyQueryItems(CFURLComponentsRef components);
113113
CF_EXPORT void _CFURLComponentsSetQueryItems(CFURLComponentsRef components, CFArrayRef names, CFArrayRef values);

CoreFoundation/URL.subproj/CFURLSessionInterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,11 @@ CF_EXPORT int const CFURLSessionSeekOk;
546546
CF_EXPORT int const CFURLSessionSeekCantSeek;
547547
CF_EXPORT int const CFURLSessionSeekFail;
548548

549-
CF_EXPORT CFURLSessionEasyHandle _Nonnull CFURLSessionEasyHandleInit();
549+
CF_EXPORT CFURLSessionEasyHandle _Nonnull CFURLSessionEasyHandleInit(void);
550550
CF_EXPORT void CFURLSessionEasyHandleDeinit(CFURLSessionEasyHandle _Nonnull handle);
551551
CF_EXPORT CFURLSessionEasyCode CFURLSessionEasyHandleSetPauseState(CFURLSessionEasyHandle _Nonnull handle, int send, int receive);
552552

553-
CF_EXPORT CFURLSessionMultiHandle _Nonnull CFURLSessionMultiHandleInit();
553+
CF_EXPORT CFURLSessionMultiHandle _Nonnull CFURLSessionMultiHandleInit(void);
554554
CF_EXPORT CFURLSessionMultiCode CFURLSessionMultiHandleDeinit(CFURLSessionMultiHandle _Nonnull handle);
555555
CF_EXPORT CFURLSessionMultiCode CFURLSessionMultiHandleAddHandle(CFURLSessionMultiHandle _Nonnull handle, CFURLSessionEasyHandle _Nonnull curl);
556556
CF_EXPORT CFURLSessionMultiCode CFURLSessionMultiHandleRemoveHandle(CFURLSessionMultiHandle _Nonnull handle, CFURLSessionEasyHandle _Nonnull curl);

Docs/Status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ There is no _Complete_ status for test coverage because there are always additio
278278
| `Process` | Mostly Complete | Substantial | `interrupt()`, `terminate()`, `suspend()`, and `resume()` remain unimplemented |
279279
| `Bundle` | Mostly Complete | Incomplete | `allBundles`, `init(for:)`, `unload()`, `classNamed()`, and `principalClass` remain unimplemented |
280280
| `ProcessInfo` | Complete | Substantial | |
281-
| `Thread` | Incomplete | Incomplete | `isMainThread`, `mainThread`, `name`, `callStackReturnAddresses`, and `callStackSymbols` remain unimplemented |
281+
| `Thread` | Complete | Incomplete | |
282282
| `Operation` | Complete | Incomplete | |
283283
| `BlockOperation` | Complete | Incomplete | |
284284
| `OperationQueue` | Complete | Incomplete | |

0 commit comments

Comments
 (0)