Version française
Home     About     Download     Resources     Contact us    
Browse thread
Wrapping a C function that takes a variable number of arguments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Wrapping a C function that takes a variable number of arguments
I'm trying to figure out how to wrap Cocoa's NSLog [1].

It's basically just like fprintf in that the signature looks like this

void NSLog(NSString *format, ...);

There must be an idiomatic way of creating a wrapper for such a  
function, probably with a bit of dark magic. Would someone please  
show me how?

	Thanks, Joel

[1] http://www.cocoadev.com/index.pl?NSLog

--
http://wagerlabs.com