ObjFW  Check-in [1e39c46eab]

Overview
Comment:Move feature defines from macros.h to OFObject.h.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1e39c46eab0fa17f651b5dd83ee3f20c2817cb833bb52262c0803ab03b87a119
User & Date: js on 2013-07-11 01:39:14
Other Links: manifest | tags
Context
2013-07-11
10:54
OFXMLElementBuilderTests: Use OF_ENSURE(). check-in: b91ce5dba8 user: js tags: trunk
01:39
Move feature defines from macros.h to OFObject.h. check-in: 1e39c46eab user: js tags: trunk
01:36
PLATFORMS.md: Add Wii and PSP. check-in: 4d5fd9f914 user: js tags: trunk
Changes

Modified src/OFObject.h from [d0848d39ae] to [3de31d4c62].

86
87
88
89
90
91
92















93
94
95
96
97
98
99
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406
# define OF_SENTINEL __attribute__((sentinel))
#else
# define OF_SENTINEL
#endif
















#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((ns_returns_retained))
# define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
# define OF_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer))
# define OF_CONSUMED __attribute__((ns_consumed))
# define OF_WEAK_UNAVAILABLE __attribute__((objc_arc_weak_unavailable))







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#endif

#if defined(__clang__) || __GCC_VERSION__ >= 406
# define OF_SENTINEL __attribute__((sentinel))
#else
# define OF_SENTINEL
#endif

#ifdef OF_APPLE_RUNTIME
# if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
    defined(__ppc__)
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
#else
# ifdef __ELF__
#  if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) || \
    defined(__arm__) || defined(__ARM__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  endif
# endif
#endif

#if __has_feature(objc_arc)
# define OF_RETURNS_RETAINED __attribute__((ns_returns_retained))
# define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
# define OF_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer))
# define OF_CONSUMED __attribute__((ns_consumed))
# define OF_WEAK_UNAVAILABLE __attribute__((objc_arc_weak_unavailable))

Modified src/macros.h from [1a66d76e58] to [171260d70c].

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#  endif
#  ifdef OF_ARMV7_ASM
#   define OF_ARMV6_ASM
#  endif
# endif
#endif

#ifdef OF_APPLE_RUNTIME
# if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
    defined(__ppc__)
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
#else
# ifdef __ELF__
#  if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) || \
    defined(__arm__) || defined(__ARM__)
#   define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#  endif
# endif
#endif

#define OF_ENSURE(cond)							\
	if (!(cond)) {							\
		fprintf(stderr, "Failed to ensure condition in "	\
		    __FILE__ ":%d:\n" #cond "\n", __LINE__);		\
		abort();						\
	}








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







102
103
104
105
106
107
108















109
110
111
112
113
114
115
#  endif
#  ifdef OF_ARMV7_ASM
#   define OF_ARMV6_ASM
#  endif
# endif
#endif
















#define OF_ENSURE(cond)							\
	if (!(cond)) {							\
		fprintf(stderr, "Failed to ensure condition in "	\
		    __FILE__ ":%d:\n" #cond "\n", __LINE__);		\
		abort();						\
	}