+#if OS_OBJECT_SWIFT3
+#define OS_OBJECT_DECL_CLASS(name) \
+ OS_OBJECT_DECL_SUBCLASS_SWIFT(name, object)
+#elif OS_OBJECT_USE_OBJC
+#define OS_OBJECT_DECL_CLASS(name) \
+ OS_OBJECT_DECL(name)
+#else
+#define OS_OBJECT_DECL_CLASS(name) \
+ typedef struct name##_s *name##_t
+#endif
+
+#define OS_OBJECT_GLOBAL_OBJECT(type, object) ((OS_OBJECT_BRIDGE type)&(object))
+
+__BEGIN_DECLS
+
+/*!
+ * @function os_retain
+ *
+ * @abstract
+ * Increment the reference count of an os_object.
+ *
+ * @discussion
+ * On a platform with the modern Objective-C runtime this is exactly equivalent
+ * to sending the object the -[retain] message.
+ *
+ * @param object
+ * The object to retain.
+ *
+ * @result
+ * The retained object.
+ */
+API_AVAILABLE(macos(10.10), ios(8.0))
+OS_EXPORT OS_SWIFT_UNAVAILABLE("Can't be used with ARC")
+void*
+os_retain(void *object);
+#if OS_OBJECT_USE_OBJC
+#undef os_retain
+#define os_retain(object) [object retain]
+#endif
+
+/*!
+ * @function os_release
+ *
+ * @abstract
+ * Decrement the reference count of a os_object.
+ *
+ * @discussion
+ * On a platform with the modern Objective-C runtime this is exactly equivalent
+ * to sending the object the -[release] message.
+ *
+ * @param object
+ * The object to release.
+ */
+API_AVAILABLE(macos(10.10), ios(8.0))
+OS_EXPORT
+void OS_SWIFT_UNAVAILABLE("Can't be used with ARC")
+os_release(void *object);
+#if OS_OBJECT_USE_OBJC
+#undef os_release
+#define os_release(object) [object release]
+#endif
+
+__END_DECLS
+