Update runtime defines to match Apple platforms

main
Frederik Seiffert 4 years ago committed by David Chisnall
parent 646c142f3c
commit bdf03cb55d

@ -190,30 +190,32 @@ typedef struct
#ifndef YES
# define YES ((BOOL)1)
# if __has_feature(objc_bool)
# define YES __objc_yes
# else
# define YES ((BOOL)1)
# endif
#endif
#ifndef NO
# define NO ((BOOL)0)
#endif
#ifdef __GNUC
# define _OBJC_NULL_PTR __null
#elif defined(__cplusplus)
# if __has_feature(cxx_nullptr)
# define _OBJC_NULL_PTR nullptr
# if __has_feature(objc_bool)
# define NO __objc_no
# else
# define _OBJC_NULL_PTR 0
# define NO ((BOOL)0)
# endif
#endif
#if __has_feature(cxx_nullptr)
# define _OBJC_NULL_PTR nullptr
#else
# define _OBJC_NULL_PTR ((void*)0)
# define _OBJC_NULL_PTR NULL
#endif
#ifndef nil
# define nil ((id)_OBJC_NULL_PTR)
# define nil _OBJC_NULL_PTR
#endif
#ifndef Nil
# define Nil ((Class)_OBJC_NULL_PTR)
# define Nil _OBJC_NULL_PTR
#endif
#include "slot.h"

Loading…
Cancel
Save