8000 Fix Objective-C 2.0 error with gcc-4.0 · matplotlib/matplotlib@2eb6b91 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2eb6b91

Browse files
committed
Fix Objective-C 2.0 error with gcc-4.0
1 parent 795930e commit 2eb6b91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/_macosx.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5760,9 +5760,11 @@ - (int)index
57605760
if(nwin > 0)
57615761
{
57625762
[NSApp activateIgnoringOtherApps: YES];
5763-
for (NSWindow *window in [NSApp windows]) {
5764-
[window orderFront:nil];
5763+
NSArray *windowsArray = [[NSApp windows] retain];
5764+
for (int i = 0; i < [windowsArray count]; i++) {
5765+
[[windowsArray objectAtIndex:i] orderFront:nil];
57655766
}
5767+
[windowsArray release];
57665768
[NSApp run];
57675769
}
57685770
Py_INCREF(Py_None);

0 commit comments

Comments
 (0)
0