Skip to content

Commit

Permalink
Note that we want the mutation function exported
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Jan 19, 2025
1 parent 9b4965e commit 9236ef9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/NSObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@
/* 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
* This symbol is exported to take precedence over the weak symbol provided
* by the runtime library.
*/
void objc_enumerationMutation(id obj)
GS_EXPORT void objc_enumerationMutation(id obj)
{
[NSException raise: NSGenericException
format: @"Collection %@ was mutated while being enumerated", obj];
Expand Down

0 comments on commit 9236ef9

Please sign in to comment.