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

Declared some extra nullability to please Xcode 7 beta. #500

Merged
merged 3 commits into from
Aug 7, 2015
Merged

Declared some extra nullability to please Xcode 7 beta. #500

merged 3 commits into from
Aug 7, 2015

Conversation

wilshipley
Copy link
Contributor

I added some "nonnull" and "_Null_unspecified" attributes to four public headers.

This shouldn't change the functionality at all, but it removes some warnings I get when I compile on the latest Xcode.

This is my first pull request on this project, apologies in advance if I'm doing this totally wrong.

- Had to use "_Null_unspecified" on some because it wasn't clear what to use.
@phatblat phatblat self-assigned this Aug 7, 2015
@phatblat
Copy link
Member

phatblat commented Aug 7, 2015

This change is great for shutting up Xcode 7, but 6.4 errors out on _Null_unspecified. It looks like __null_unspecified works for both. Would you mind changing these to the more compatible version?

@wilshipley
Copy link
Contributor Author

Ok, done! Hopefully they don't deprecate "__null_unspecified" any time soon. (I don't think they're eager to.)

phatblat added a commit that referenced this pull request Aug 7, 2015
Declared some extra nullability to please Xcode 7 beta.
@phatblat phatblat merged commit d7eb46c into libgit2:master Aug 7, 2015
@phatblat
Copy link
Member

phatblat commented Aug 7, 2015

Fantastic! Thanks for the contribution.

If they end up dropping the nullability attributes introduced in Xcode 6.3 we will probably need our own compatibility macro. But I'd prefer not to get into that unless it ends up being recessary.

@wilshipley
Copy link
Contributor Author

Yah, no need to go looking for trouble.

I have another thing I did where I made an Xcode project for this and for libgit2 that you can include as a subproject in another Xcode project, and it'll build on iOS or OS X automatically all inside Xcode with no external tools (e.g. no cmake, no scripts). Not sure if you guys want that, though, because the libgit2 one DOES require maintaining by the Xcode project by hand if you add / remove files.

@phatblat
Copy link
Member

phatblat commented Aug 7, 2015

I'm very interested in seeing this libgit2 Xcode project. Do you have it in a branch on your fork of ObjectiveGit?

I understand at least some of the issues with having a build system separate from the libgit2 cmake build, but there are a couple issues I've been looking into that I can't seem to resolve:

  • git2 is not a real module, it's a submodule under ObjectiveGit (causing errors when importing ObjectiveGit as a module Including library in Swift only project is failing #436)
  • bitcode support - this is pretty easy to add for one architecture, but gets dropped when we lipo the slices together

Both of these seem easy to solve with a real Xcode build.

@joshaber
Copy link
Member

joshaber commented Aug 7, 2015

🤘 Those warnings had been bugging me.

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.

3 participants