Skip to content

Commit d5a542c

Browse files
committed
unformalized windows patches for enumerations
Windows uses signed enumerations by default rather than unsigned. This results in the values triggering warnings on Windows.
1 parent 0d7d906 commit d5a542c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dispatch/base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
#endif
209209
#endif
210210

211-
#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
211+
#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || defined(_WIN32)
212212
#define DISPATCH_ENUM(name, type, ...) \
213213
typedef enum : type { __VA_ARGS__ } name##_t
214214
#else

src/object_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ DISPATCH_ENUM(dispatch_invoke_flags, uint32_t,
340340
#define _DISPATCH_INVOKE_AUTORELEASE_MASK 0x00300000u
341341
);
342342

343-
enum {
343+
enum : unsigned long {
344344
_DISPATCH_META_TYPE_MASK = 0xffff0000, // mask for object meta-types
345345
_DISPATCH_TYPEFLAGS_MASK = 0x0000ff00, // mask for object typeflags
346346
_DISPATCH_SUB_TYPE_MASK = 0x000000ff, // mask for object sub-types

0 commit comments

Comments
 (0)