From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DB859BC6B for ; Fri, 7 Sep 2007 01:24:36 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l86NOah8015261 for ; Fri, 7 Sep 2007 01:24:36 +0200 Received: by ug-out-1314.google.com with SMTP id m3so226108ugc for ; Thu, 06 Sep 2007 16:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; bh=k5IRXCDiqMOT+nkTkFbt452PhSeY7c+NOnStY6tqr/c=; b=seVe3bmAOdm47v5/HxijwLq1umvRIWnQF3mpbbYUHWglAJsnYEEsyhbWjV67WbOS95QOVHF1MIUcYGdI8gJNiWmnXe35FoLw6g15Zj+BE67ty3VHk24Rbmijk1m18tGrEoUuOWK8CRCKn48duBWdgqbbj5QrT108QVewNmqkklE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=eryiZ+mlDd8LwYcI8MvEJWomceoqLIkbOtxdpYzJglaCFG5i34DzihddCZ3xUBCKZskfmBGMfZ40HftL0I0nvJfRzPa8zio5I1raP+Ws2D8bsgpX7b80KlaXii0j5yYB5F7pwmuf2uLpOgI8d9BoRGNP8Af25cOcj90JqnPam34= Received: by 10.66.243.2 with SMTP id q2mr663089ugh.1189121075495; Thu, 06 Sep 2007 16:24:35 -0700 (PDT) Received: from ?192.168.1.34? ( [83.36.84.169]) by mx.google.com with ESMTPS id c5sm358280nfi.2007.09.06.16.24.30 (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2007 16:24:31 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <6A9B2713-FD3C-4E27-89B1-002A05DA2D26@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: Wrapping a C function that takes a variable number of arguments Date: Fri, 7 Sep 2007 00:24:28 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 46E08C34.000 on discorde : j-chkmail score : XXXX : 5/20 2 0.000 -> 4 X-Miltered: at discorde with ID 46E08C34.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; fprintf:01 idiomatic:02 variable:06 void:06 arguments:07 probably:07 function:08 function:08 looks:08 wrap:08 i'm:09 basically:10 wrapper:10 magic:10 bit:11 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