ObjFW  Check-in [0b32d65e0c]

Overview
Comment:Make class_isMetaClass() ARC-compatible.

Also adds a missing OF_RETURNS_INNER_POINTER.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0b32d65e0cfce07e93fb51e3d6a6982d8c3b5befb7b814804ecab6cfa8397c39
User & Date: js on 2012-08-06 20:27:42
Other Links: manifest | tags
Context
2012-08-06
20:46
Add --arc to objfw-compile and objfw-config. check-in: 5d2b804601 user: js tags: trunk
20:27
Make class_isMetaClass() ARC-compatible. check-in: 0b32d65e0c user: js tags: trunk
2012-08-05
18:11
Initial ARC support. check-in: 90eae0b1fc user: js tags: trunk
Changes

Modified src/OFHash.h from [89f3a6d86f] to [b9ba1a51a3].

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 * \brief Returns a buffer containing the hash.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 *
 * \return A buffer containing the hash
 */
- (uint8_t*)digest;

/**
 * \brief Returns a boolean whether the hash has already been calculated.
 *
 * \return A boolean whether the hash has already been calculated
 */
- (BOOL)isCalculated;
@end







|








62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 * \brief Returns a buffer containing the hash.
 *
 * The size of the buffer depends on the hash used. The buffer is part of the
 * receiver's memory pool.
 *
 * \return A buffer containing the hash
 */
- (uint8_t*)digest OF_RETURNS_INNER_POINTER;

/**
 * \brief Returns a boolean whether the hash has already been calculated.
 *
 * \return A boolean whether the hash has already been calculated
 */
- (BOOL)isCalculated;
@end

Modified src/runtime/runtime.h from [03d74b30fd] to [47cf79266e].

216
217
218
219
220
221
222
223
224


225
226
227
228
229
230
static inline const char*
object_getClassName(id obj)
{
	return class_getName(object_getClass(obj));
}

static inline BOOL
class_isMetaClass(Class cls)
{


	return (cls->info & OBJC_CLASS_INFO_METACLASS);
}

#undef OBJC_BRIDGE

#endif







|

>
>






216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
static inline const char*
object_getClassName(id obj)
{
	return class_getName(object_getClass(obj));
}

static inline BOOL
class_isMetaClass(Class cls_)
{
	struct objc_class *cls = cls_;

	return (cls->info & OBJC_CLASS_INFO_METACLASS);
}

#undef OBJC_BRIDGE

#endif