AFAIK, variadic C functions are not (yet) callable from swift code.

> Le 18 oct. 2014 à 20:37, Rick Mann <rm...@latencyzero.com> a écrit :
> 
> I need access to fcntl, so I thought I'd do what Apple does with Darwin. But 
> I don't actually see how to do that. They create Darwin.stdio.fopen(), for 
> example. But then how do they call the underlying C fopen()?
> 
> For that matter, Swift can call C functions directly in some cases, and not 
> at all in others.
> 
> OH! Is it because fcntl is special? Check out its declaration:
> 
>       int     fcntl(int, int, ...) __DARWIN_ALIAS_C(fcntl);
> 
> __DARWIN_ALIAS_C is:
> 
>       #define __DARWIN_ALIAS_C(sym)   __asm("_" __STRING(sym) 
> __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) 
> 
> So, is there some magic module I can create in Swift to make that accessible 
> to my Swift code?
> 
> -- 
> Rick Mann
> rm...@latencyzero.com
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mailing%40xenonium.com
> 
> This email sent to mail...@xenonium.com

-- Jean-Daniel





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to