DerelictCocoa

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jul 30 11:20:54 PDT 2015


On 2015-07-30 12:19, ponce wrote:
> Based on prior Jacob Carlborg'work (AFAIK) and inspired by DerelictCF
> (https://github.com/Extrawurst/DerelictCF), DerelictCocoa is an
> elaborated hack to be able to use Cocoa without Xcode (tm).
>
> It does _not_ rely on the recent extern(Objective-C) additions so I'm a
> bit unsure how far the compatibility will go in the OS X lineage.
>
> https://github.com/p0nce/DerelictCocoa
>
> This is an unofficial Derelict package, so use at your own risk.

I had a quick look at the implementation. You're not using the 
objc_msgSend_* family of functions correctly. That's one of the main 
reasons why extern(Objective-C) was implemented. I strongly recommend 
you adapting extern(Objective-C) instead. At least read the commit 
message [1] for the commit which implements extern(Objective-C). It 
explains how objc_msgSend_* works.

I can provide more detail if necessary.

[1] 
https://github.com/D-Programming-Language/dmd/commit/867d5479b6d98b23b6c797ee487d1ec1474bee10

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list