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

A couple of fixes for cfstr_to_str() #43

Merged
merged 2 commits into from
Jan 7, 2013
Merged

Conversation

ferrous26
Copy link
Contributor

I was reviewing your code and found some simple fixes.

Memory is created with a "Create" method, so the
function owns it and needs to release it.
@alloy
Copy link
Member

alloy commented Jan 7, 2013

Awesome, thanks!

I was thinking, you suggested to copy MacRuby’s code into this repo, but how about we create a unified version of all the code and move it out of this repo into a CoreFoundation based gem that does nothing but (de)serialize plists? That should help us both out.

alloy added a commit that referenced this pull request Jan 7, 2013
A couple of fixes for cfstr_to_str()
@alloy alloy merged commit 954b782 into CocoaPods:master Jan 7, 2013
@fabiopelosin
Copy link
Member

👍

I was tanking into account solutions for simplifying the installation of CocoaPods and the compilation of the native extension appears to be a major pain point. Does the MacRuby code handle the old plist format? What about using something like plutil to ensure that a plist is in the new format?

@ferrous26
Copy link
Contributor Author

@alloy A shared project would be great, but I think the overhead of having to bridge all the core types is a lot of if the gem is only going to work with plists.

The issue for me is that I need a lot of bridging code (too much) in my project. I've actually already got 95% of what I need done in https://github.com/AXElements/accessibility_core/blob/master/ext/accessibility/bridge/bridge.h, though I would have to clean it up if were to be shared.

Perhaps the better solution is to have a shared git submodule (or something like that), with some code that builds a dylib that we can link against. The dylib would only contain functions for bridging objects

@irrationalfab I'm not sure I understand the problem you are describing. Are you looking to build CocoaPods as a binary distribution, sort of like Vagrant or Tokaido? When I suggested copying some code from MacRuby, I meant only https://github.com/MacRuby/MacRuby/blob/master/objc.m#L741-756, which is not much, but it translated into my bridging code fairly easily https://github.com/AXElements/accessibility_core/blob/master/ext/accessibility/extras/extras.c#L447-468

It could be changed to take an optional argument with the style of plist. Same thing with Object#to_plist. I would then also have to propose/make those changes in MacRuby, but that should be almost trivial if the bridging code remains similar.

@fabiopelosin
Copy link
Member

@ferrous26 Thanks for pointing out where the source was located, I was naively searching among the ruby files. Actually now I see that MacRuby is using Foundation as well, so this pull was not the best place to discuss those ideas.

Are you looking to build CocoaPods as a binary distribution, sort of like Vagrant or Tokaido?

Yes, I'm interested in simplifying the installation of CocoaPods (avoid the need to install command line tools on a Mac) and in having a binary distribution as with a bundled Ruby. For the latter I have done some progress (https://github.com/irrationalfab/Ikeda) but it is more a working hack for now :-)

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