unformalized windows patches for enumerations
Windows uses signed enumerations by default rather than unsigned. This
results in the values triggering warnings on Windows.
diff --git a/dispatch/base.h b/dispatch/base.h
index 77fe03f..bd01f48 100644
--- a/dispatch/base.h
+++ b/dispatch/base.h
@@ -208,7 +208,7 @@
#endif
#endif
-#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
+#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || defined(_WIN32)
#define DISPATCH_ENUM(name, type, ...) \
typedef enum : type { __VA_ARGS__ } name##_t
#else
diff --git a/src/object_internal.h b/src/object_internal.h
index 94cb463..0156503 100644
--- a/src/object_internal.h
+++ b/src/object_internal.h
@@ -340,7 +340,7 @@
#define _DISPATCH_INVOKE_AUTORELEASE_MASK 0x00300000u
);
-enum {
+DISPATCH_ENUM(dispatch_object_flags, unsigned long,
_DISPATCH_META_TYPE_MASK = 0xffff0000, // mask for object meta-types
_DISPATCH_TYPEFLAGS_MASK = 0x0000ff00, // mask for object typeflags
_DISPATCH_SUB_TYPE_MASK = 0x000000ff, // mask for object sub-types
@@ -386,8 +386,7 @@
DISPATCH_SOURCE_KEVENT_TYPE = 1 | _DISPATCH_SOURCE_TYPE,
DISPATCH_MACH_CHANNEL_TYPE = 2 | _DISPATCH_SOURCE_TYPE,
-
-};
+);
typedef struct _os_object_vtable_s {
_OS_OBJECT_CLASS_HEADER();