ObjFW  Check-in [48df0f966f]

Overview
Comment:Add OF_ROOT_CLASS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 48df0f966fe060d9678aea2d6293f671454c6a69d8889c84526f7e84e79f81b8
User & Date: js on 2013-11-23 01:38:31
Other Links: manifest | tags
Context
2013-11-23
02:07
OFZIP: Fix type mismatch. check-in: 6e61a3dc0e user: js tags: trunk
01:38
Add OF_ROOT_CLASS. check-in: 48df0f966f user: js tags: trunk
01:27
Add OF_UNRECOGNIZED_SELECTOR. check-in: 6e19bd47ee user: js tags: trunk
Changes

Modified Doxyfile from [39c776f5b0] to [03db00e725].

11
12
13
14
15
16
17

18
19
20
21
22
	     OF_HAVE_BLOCKS		\
	     OF_HAVE_THREADS		\
	     OF_SENTINEL		\
	     OF_REQUIRES_SUPER		\
	     OF_RETURNS_RETAINED	\
	     OF_RETURNS_NOT_RETAINED	\
	     OF_RETURNS_INNER_POINTER	\

	     OF_CONSUMED		\
	     OF_WEAK_UNAVAILABLE
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
IGNORE_PREFIX = OF of_







>





11
12
13
14
15
16
17
18
19
20
21
22
23
	     OF_HAVE_BLOCKS		\
	     OF_HAVE_THREADS		\
	     OF_SENTINEL		\
	     OF_REQUIRES_SUPER		\
	     OF_RETURNS_RETAINED	\
	     OF_RETURNS_NOT_RETAINED	\
	     OF_RETURNS_INNER_POINTER	\
	     OF_ROOT_CLASS		\
	     OF_CONSUMED		\
	     OF_WEAK_UNAVAILABLE
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
IGNORE_PREFIX = OF of_

Modified configure.ac from [8dc8e76438] to [d1b16c9399].

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"
	AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings")
])
AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32 -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"])
AX_CHECK_COMPILER_FLAGS(-Wsemicolon-before-method-body -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"])
AX_CHECK_COMPILER_FLAGS(-Wno-objc-root-class -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wno-objc-root-class"])
AX_CHECK_COMPILER_FLAGS([-Wno-deprecated-objc-pointer-introspection -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wno-deprecated-objc-pointer-introspection"])
AX_CHECK_COMPILER_FLAGS(-Wdocumentation -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wdocumentation"])

case "$OBJC" in
	*clang*)







<
<







67
68
69
70
71
72
73


74
75
76
77
78
79
80
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"
	AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings")
])
AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32 -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"])
AX_CHECK_COMPILER_FLAGS(-Wsemicolon-before-method-body -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"])


AX_CHECK_COMPILER_FLAGS([-Wno-deprecated-objc-pointer-introspection -Werror],
	[OBJCFLAGS="$OBJCFLAGS -Wno-deprecated-objc-pointer-introspection"])
AX_CHECK_COMPILER_FLAGS(-Wdocumentation -Werror,
	[OBJCFLAGS="$OBJCFLAGS -Wdocumentation"])

case "$OBJC" in
	*clang*)

Modified src/OFObject.h from [ac40fa6ce0] to [c6bd5b455e].

93
94
95
96
97
98
99






100
101
102
103
104
105
106
#endif

#if __has_attribute(objc_requires_super)
# define OF_REQUIRES_SUPER __attribute__((objc_requires_super))
#else
# define OF_REQUIRES_SUPER
#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







>
>
>
>
>
>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#endif

#if __has_attribute(objc_requires_super)
# define OF_REQUIRES_SUPER __attribute__((objc_requires_super))
#else
# define OF_REQUIRES_SUPER
#endif

#if __has_attribute(objc_root_class)
# define OF_ROOT_CLASS __attribute__((objc_root_class))
#else
# define OF_ROOT_CLASS
#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
378
379
380
381
382
383
384

385
386
387
388
389
390
391
 */
- (bool)isProxy;
@end

/*!
 * @brief The root class for all other classes inside ObjFW.
 */

@interface OFObject <OFObject>
{
@public
	Class _isa;
}

/*!







>







384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
 */
- (bool)isProxy;
@end

/*!
 * @brief The root class for all other classes inside ObjFW.
 */
OF_ROOT_CLASS
@interface OFObject <OFObject>
{
@public
	Class _isa;
}

/*!

Modified src/runtime/runtime.h from [ced3444651] to [b39bf61658].

18
19
20
21
22
23
24




25
26
27
28
29
30






31
32
33
34
35
36
37
#define __OBJFW_RUNTIME_H__
#include <stdint.h>
#include <stdbool.h>

#ifndef __has_feature
# define __has_feature(x) 0
#endif





#if __has_feature(objc_arc)
# define OBJC_UNSAFE_UNRETAINED __unsafe_unretained
#else
# define OBJC_UNSAFE_UNRETAINED
#endif







typedef struct objc_class* Class;
typedef struct objc_object* id;
typedef const struct objc_selector* SEL;
typedef signed char BOOL;
typedef id (*IMP)(id, SEL, ...);








>
>
>
>






>
>
>
>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#define __OBJFW_RUNTIME_H__
#include <stdint.h>
#include <stdbool.h>

#ifndef __has_feature
# define __has_feature(x) 0
#endif

#ifndef __has_attribute
# define __has_attribute(x) 0
#endif

#if __has_feature(objc_arc)
# define OBJC_UNSAFE_UNRETAINED __unsafe_unretained
#else
# define OBJC_UNSAFE_UNRETAINED
#endif

#if __has_attribute(objc_root_class)
# define OBJC_ROOT_CLASS __attribute__((objc_root_class))
#else
# define OBJC_ROOT_CLASS
#endif

typedef struct objc_class* Class;
typedef struct objc_object* id;
typedef const struct objc_selector* SEL;
typedef signed char BOOL;
typedef id (*IMP)(id, SEL, ...);

130
131
132
133
134
135
136

137
138
139
140
141
142
143
struct objc_property_list {
	unsigned count;
	struct objc_property_list *next;
	struct objc_property properties[1];
};

#ifdef __OBJC__

@interface Protocol
{
@public
#else
typedef struct {
#endif
	Class isa;







>







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
struct objc_property_list {
	unsigned count;
	struct objc_property_list *next;
	struct objc_property properties[1];
};

#ifdef __OBJC__
OBJC_ROOT_CLASS
@interface Protocol
{
@public
#else
typedef struct {
#endif
	Class isa;
204
205
206
207
208
209
210

211
212
extern void objc_autoreleasePoolPop(void*);
extern id _objc_rootAutorelease(id);
#ifdef __cplusplus
}
#endif

#undef OBJC_UNSAFE_UNRETAINED


#endif







>


215
216
217
218
219
220
221
222
223
224
extern void objc_autoreleasePoolPop(void*);
extern id _objc_rootAutorelease(id);
#ifdef __cplusplus
}
#endif

#undef OBJC_UNSAFE_UNRETAINED
#undef OBJC_ROOT_CLASS

#endif