mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
define function in NSObject.m so that it won't be omitted by clever linkers
This commit is contained in:
parent
2cf2b2d7b9
commit
9b4965e100
2 changed files with 10 additions and 9 deletions
|
@ -97,12 +97,3 @@
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
|
||||||
* objc_enumerationMutation() is called whenever a collection mutates in the
|
|
||||||
* middle of fast enumeration.
|
|
||||||
*/
|
|
||||||
void objc_enumerationMutation(id obj)
|
|
||||||
{
|
|
||||||
[NSException raise: NSGenericException
|
|
||||||
format: @"Collection %@ was mutated while being enumerated", obj];
|
|
||||||
}
|
|
||||||
|
|
|
@ -83,6 +83,16 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* objc_enumerationMutation() is called whenever a collection mutates in the
|
||||||
|
* middle of fast enumeration. We need to have this defined and linked into
|
||||||
|
* any code that uses fast enumeration, so we define it in NSObject.h
|
||||||
|
*/
|
||||||
|
void objc_enumerationMutation(id obj)
|
||||||
|
{
|
||||||
|
[NSException raise: NSGenericException
|
||||||
|
format: @"Collection %@ was mutated while being enumerated", obj];
|
||||||
|
}
|
||||||
|
|
||||||
/* platforms which do not support weak */
|
/* platforms which do not support weak */
|
||||||
#if defined (__WIN32)
|
#if defined (__WIN32)
|
||||||
#define WEAK_ATTRIBUTE
|
#define WEAK_ATTRIBUTE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue