Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28401 invoked from network); 1 Apr 2009 15:16:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2009 15:16:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.30 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 74.125.44.30 yx-out-2324.google.com Received: from [74.125.44.30] ([74.125.44.30:27715] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/9A-05266-A5583D94 for ; Wed, 01 Apr 2009 10:16:43 -0500 Received: by yx-out-2324.google.com with SMTP id 3so42166yxj.83 for ; Wed, 01 Apr 2009 08:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8s88ZoMu56BbXe5cVsRnHwKlsHiTTU06cxoYBdzE2ng=; b=ax5KIROEbalwjxCLYQ6ksQRDzwHtsYh+WQ/iWeYWYaD1XqLMI78T8t/1wPJGBZX+gN TlmRUJhYsWOhMmdafHSwqnAjvPLJUTSwBqULevVIxDw9MF0h1a9IcnQmhl1itxNyi5t8 EBQD5gJ8UZGUbGqX9GmSpPOVWUV9UD+RJKN6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xGEBuoNeqR++T+beL6HG3ossAf56/crWmQ2B+N7JpIjnN1I31ZQiEcofj+rZK0vzA8 MN0ljijjHHId7gx7gYUUBcD+ftf4DQ7ypxkKZFZYUwnINjOamRZSMk6YDXlVmWucohaM 47T7R92Sl8dr25qO6sCHNURdFtmmLlnh05IYs= MIME-Version: 1.0 In-Reply-To: <1238595978.5733.9.camel@goldfinger> References: <29CF2C07F9044405AF6332BE2F3A373F@PC3EE1F19287> <1238595978.5733.9.camel@goldfinger> Date: Wed, 1 Apr 2009 16:16:20 +0100 Received: by 10.150.158.10 with SMTP id g10mr14810756ybe.166.1238599000348; Wed, 01 Apr 2009 08:16:40 -0700 (PDT) Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Nuno Lopes , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Removing the Zend API From: paul.biggar@gmail.com (Paul Biggar) 2009/4/1 Johannes Schl=C3=BCter : > Hi, > > On Wed, 2009-04-01 at 14:24 +0100, Paul Biggar wrote: >> > Moreover, in your example in the wiki you don't include how you would = do >> > parameter parsing. Or do you rely on the code generator to look at the= C >> > functions signatures and figure out by itself what to do? (actually th= ere is >> > some ambiguity, AFAIR, and thus guessing cannot be done reliably) >> >> That is exactly right. (I'll make this clearer in the RFC). I can't >> think of any cases where guess cannot be done reliably. If you can >> give me an example, I'll try and address it. > > Well, take your example: > > void Y(char *, int) > > Is the second parameter the length of the string or something > independent? Is the char* changed? And who is going to free it? Good points. I had initially thought that there should be some simple declarative DSL, and later thought 'why can't it be a header file in the simple case'. I guess this is why. I think that to handle more complex cases we need the kind of information which makes it straightforward to easily generate code to make a seamless interface between C and the engine API. The only case I had thought of was to somehow mangle structs/pointers into resources. But I suppose we need lengths for strings. I expect (many?) more of these cases will come up. (Of course, this is why I recommended a SoC project to try it) Thanks for the comments, I'll update the RFC. Paul --=20 Paul Biggar paul.biggar@gmail.com