ObjFW  Check-in [2c40c95434]

Overview
Comment:Check for objc_enumerationMutation and provide it if it's missing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2c40c9543478d42a8292158a9fae3c6aa3e3f1431c1cfff606af539123cfe6cf
User & Date: js on 2010-01-03 18:48:26
Other Links: manifest | tags
Context
2010-01-03
19:38
Throw an exception when trying to use +[dealloc]. check-in: 5e88aed650 user: js tags: trunk
18:48
Check for objc_enumerationMutation and provide it if it's missing. check-in: 2c40c95434 user: js tags: trunk
18:39
Check for fast enumeration support in compiler and run tests. check-in: a2effa2a7f user: js tags: trunk
Changes

Modified configure.ac from [9b2731e7d3] to [23d53411b3].

48
49
50
51
52
53
54




55
56
57
58
59
60
61
	objc_runtime="GNU"
	], [
	AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime])
	AC_SUBST(RUNTIME_DEF, "-DOF_APPLE_RUNTIME")
	objc_runtime="Apple"])
AC_MSG_RESULT($objc_runtime)





BUILDSYS_LIB
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
if test x"$PLUGIN_SUFFIX" != "x"; then
	AC_SUBST(OFPLUGIN_M, "OFPlugin.m")
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")







>
>
>
>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	objc_runtime="GNU"
	], [
	AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime])
	AC_SUBST(RUNTIME_DEF, "-DOF_APPLE_RUNTIME")
	objc_runtime="Apple"])
AC_MSG_RESULT($objc_runtime)

AC_CHECK_FUNC(objc_enumerationMutation, [
	AC_DEFINE(HAVE_OBJC_ENUMERATIONMUTATION, 1,
		[Whether we have objc_enumerationMutation])])

BUILDSYS_LIB
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
if test x"$PLUGIN_SUFFIX" != "x"; then
	AC_SUBST(OFPLUGIN_M, "OFPlugin.m")
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support])
	AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS")

Modified src/OFObject.m from [529e251348] to [c5b8c0b3b5].

43
44
45
46
47
48
49




50
51
52
53
54
55
56
static struct {
	Class isa;
} alloc_failed_exception;

#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif





void
enumeration_mutation_handler(id object)
{
	@throw [OFEnumerationMutationException newWithClass: [object class]];
}








>
>
>
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
static struct {
	Class isa;
} alloc_failed_exception;

#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif

#ifndef HAVE_OBJC_ENUMERATIONMUTATION
#define enumeration_mutation_handler objc_enumerationMutation
#endif

void
enumeration_mutation_handler(id object)
{
	@throw [OFEnumerationMutationException newWithClass: [object class]];
}