discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about CoreBase


From: Stefan Bidigaray
Subject: Re: Question about CoreBase
Date: Sun, 16 Apr 2017 12:29:18 -0400

I'm on my phone, so I'm going to be brief.

Looking at the documentation, it looks like CFBridgingRetain is exactly like CFRetain, but for ARC code. The way I understand ARC in libobjc2, it simply increments the pointer-sized integer in the object header. That's exactly what we do in CFRetain, so it effectively transfer ownership to the CF code. The only thing making this fiction different is the cast from id to CFTypeRef. I guess it would be easy enough to make it an alias to CFRetain.

This is a new function (CoreBase targets 10.5), so that's why it's not in the code, but it seems fairly straight forward to add of is something important to have these days.

On Apr 16, 2017 10:53, "Ivan Vučica" <ivucica@gmail.com> wrote:
That depends on how bridging to ObjC objects works with CoreBase. Top search result:

I guess it depends on whether one can CFRetain an NSString and expect it’ll work correctly as a CFString / NSCFString in CoreBase. Stefan, I looked super quickly at the CoreBase source, but I can’t guess: is that going to work?

On 16 April 2017 at 13:32:01, Stefan Bidigaray (stefanbidi@gmail.com) wrote:

I'm not sure what that function does exactly, but if it is just a plain retain function you can replace it with CFRetain or a call to the -retain method.

On Apr 15, 2017 21:20, "Germán Arias" <germanandre@gmx.es> wrote:
I'm trying to use a Mac project with GNUstep. But now I have this
problem at linker:

undefined reference to 'CFBridgingRetain'

why I get this error only at linker? As far as I can see
CFBridgingRetain is not available at CoreBase. If so, can I replace
this function with some code?

Thanks
Germán


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

reply via email to

[Prev in Thread] Current Thread [Next in Thread]