Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Objective-C 2.0 error with gcc-4.0 #1272

Merged
merged 2 commits into from Sep 18, 2012
Merged

Conversation

dmcdougall
Copy link
Member

Fixes #1270.

I'm not sure I have gcc-4.0 any more. @r-owen Could you try this?

@r-owen
Copy link
Contributor

r-owen commented Sep 17, 2012

I'll be happy to do that.

Unfortunately I don't understand how to obtain the code so I can try to build it.
(I use git regularly but am not very familiar with github and am not a git expert).

When I follow the link in github's email: https://github.com/dmcdougall/matplotlib
I find something that hasn't been touched in 5 days (which seems a bit old for this fix) and its log does not list #1270.
So surely it's too old?

I also looked at the patch link, but I'm not sure what to do with the page.

Can you point me to a repository that is a complete distribution and contains the patch so I can clone the whole thing at once,
or else suggest a sequence of commands so I can obtain that for myself. (Or just zip up your repository and send it to me).

-- Russell

On Sep 17, 2012, at 3:21 PM, Damon McDougall wrote:

Fixes #1270.

I'm not sure I have gcc-4.0 any more. @r-owen Could you try this?

You can merge this Pull Request by running:

git pull https://github.com/dmcdougall/matplotlib mac_objc1
Or view, comment on, or merge it at:

#1272

Commit Summary

Fix Objective-C 2.0 error with gcc-4.0
File Changes

M src/_macosx.m (6)
Patch Links

https://github.com/matplotlib/matplotlib/pull/1272.patch
https://github.com/matplotlib/matplotlib/pull/1272.diff

Reply to this email directly or view it on GitHub.

@r-owen
Copy link
Contributor

r-owen commented Sep 17, 2012

Never mind. I think I managed to pull it down. I just need to checkout branch mac_objc1.

-- Russell

On Sep 17, 2012, at 3:21 PM, Damon McDougall wrote:

Fixes #1270.

I'm not sure I have gcc-4.0 any more. @r-owen Could you try this?

You can merge this Pull Request by running:

git pull https://github.com/dmcdougall/matplotlib mac_objc1
Or view, comment on, or merge it at:

#1272

Commit Summary

Fix Objective-C 2.0 error with gcc-4.0
File Changes

M src/_macosx.m (6)
Patch Links

https://github.com/matplotlib/matplotlib/pull/1272.patch
https://github.com/matplotlib/matplotlib/pull/1272.diff

Reply to this email directly or view it on GitHub.

@dmcdougall
Copy link
Member Author

I think you will need to checkout upstream/mac_objc1, depending on which repository you cloned.

@mdehoon
Copy link
Contributor

mdehoon commented Sep 18, 2012

I would suggest to use

NSEnumerator* enumerator = [windowsArray objectEnumerator];
NSWindow* window;
while ((window = [enumerator nextObject])) [window orderFront: nil];

since enumerators were built for this kind of loops.

Also, as far as I know you don't need to retain / release the windowsArray.

@dmcdougall
Copy link
Member Author

@mdehoon Thanks Michiel, that sorts out the C99 declaration inside the for loop, too. I'll update it.

@dmcdougall
Copy link
Member Author

@r-owen If you wouldn't mind, you can git pull the new changes and try the build again. Thanks a lot for helping out!

@r-owen
Copy link
Contributor

r-owen commented Sep 18, 2012

Will do. I'll let you know what happens.

-- Russell

On Sep 18, 2012, at 1:55 AM, Damon McDougall wrote:

@r-owen If you wouldn't mind, you can git pull the new changes and try the build again. Thanks a lot for helping out!


Reply to this email directly or view it on GitHub.

@r-owen
Copy link
Contributor

r-owen commented Sep 18, 2012

That did the trick. I build it successfully on Mac OS X 10.4 (with the usual XCode gcc 4.0) and ran the unit tests. I am missing some 3rd party packages required for full test coverage (trying to install those on such an old system is more than I want to attempt), but those that ran did so without errors.

Thank you for the fix!

-- Russell

On Sep 18, 2012, at 1:55 AM, Damon McDougall wrote:

@r-owen If you wouldn't mind, you can git pull the new changes and try the build again. Thanks a lot for helping out!


Reply to this email directly or view it on GitHub.

@dmcdougall
Copy link
Member Author

Sweet. This is ready to merge, then. Thanks @r-owen for guinea-pigging.

efiring added a commit that referenced this pull request Sep 18, 2012
Fix Objective-C 2.0 error with gcc-4.0
@efiring efiring merged commit b7633bc into matplotlib:v1.2.x Sep 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants