Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80393 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46813 invoked from network); 12 Jan 2015 00:27:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2015 00:27:32 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-lb0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:43229] helo=mail-lb0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/42-34383-4F413B45 for ; Sun, 11 Jan 2015 19:27:32 -0500 Received: by mail-lb0-f169.google.com with SMTP id p9so15308111lbv.0 for ; Sun, 11 Jan 2015 16:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O7dw6RIl8zyzKyI00Cs05NOvZNYuJf/brPiHJ2d6kw8=; b=OM19MswTGNUJwMr7r97zUjtzrLx4FmxFZkiRFStmyVwuUlGIaZ8fmfF76w/AMfPG0Y 5hI6pmENV+PR+JNCYsZbU6V7P55DztUCGsH/DfqUN+piiiOw7lpjcg9ItHhC73k9djdY KzsBQeRTev5Gfkr2i4sKxC5KvY9YoKeCDSfid4innx9kMOOaDVHCS42sWzQ8DeMDRwNQ P1vptCWbXLImHYY5HuBUHni35Z+VuND4bV+VXPfYkfSxSeEKy094rsCNZWzYTU50YtR3 VpaXgvm64vuRkZdi64bYHBELlWQXlechwaB09qaUAhklcgKH8xLwnmh7/HcjrNhN8WKW ktvA== MIME-Version: 1.0 X-Received: by 10.112.150.194 with SMTP id uk2mr33880578lbb.84.1421022449679; Sun, 11 Jan 2015 16:27:29 -0800 (PST) Received: by 10.112.154.133 with HTTP; Sun, 11 Jan 2015 16:27:29 -0800 (PST) Received: by 10.112.154.133 with HTTP; Sun, 11 Jan 2015 16:27:29 -0800 (PST) In-Reply-To: <003d01d02de7$85460c00$8fd22400$@tekwire.net> References: <54B1AA31.6050703@gmail.com> <003d01d02de7$85460c00$8fd22400$@tekwire.net> Date: Sun, 11 Jan 2015 16:27:29 -0800 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: PHP internals , Stas Malyshev , Sara Golemon Content-Type: multipart/alternative; boundary=047d7b342f0c54c5b7050c69926a Subject: RE: [PHP-DEV] One API to rule them all? (Was: Extension Prepend Files) From: pierre.php@gmail.com (Pierre Joye) --047d7b342f0c54c5b7050c69926a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Jan 12, 2015 4:42 AM, "Fran=C3=A7ois Laupretre" w= rote: > > > De : Pierre Joye [mailto:pierre.php@gmail.com] > > > > I have a working proof of concept using something like: > > > > > function u_foo() { > > } > > ?> > > ---- native > > void foo() > > { > > printf("Hello from native!"); > > } > > ?> > > > ... some other codes. > > ?> > > In your example, I don't see how you execute the foo() C function from PHP. PHP_FE/ME are created. I forgot to add foo (); in the example. > Would it be possible to embed C code in a PHP function or method ? Yes, on the plan > If yes, how do both codes access each other's data ? If foo() takes arguments, how would they be transmitted from PHP ? What about scalar type conversions to fit the expected C argument types ? The same about return value. Zpp. And the C function signature for the return value. Also I like to have the base working. The rest is a spec issue and the implementation can change if necessary. :) --047d7b342f0c54c5b7050c69926a--