Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36466 invoked from network); 24 Mar 2012 15:43:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Mar 2012 15:43:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:63073] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/B3-18105-BBBED6F4 for ; Sat, 24 Mar 2012 10:43:56 -0500 Received: from [192.168.2.230] (ppp-93-104-22-221.dynamic.mnet-online.de [93.104.22.221]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 07F7F607C4; Sat, 24 Mar 2012 16:43:52 +0100 (CET) To: =?ISO-8859-1?Q?Fran=E7ois?= Gannaz Cc: internals@lists.php.net In-Reply-To: <20120324115738.04fa708b@coriolan> References: <20120323172608.3672eec8@coriolan> <4F6CB50D.2060804@sugarcrm.com> <20120324115738.04fa708b@coriolan> Content-Type: text/plain; charset="UTF-8" Date: Sat, 24 Mar 2012 16:43:51 +0100 Message-ID: <1332603831.1965.24.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Validate complex types From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sat, 2012-03-24 at 11:57 +0100, François Gannaz wrote: > > No, it's currently not meant for public use - it's an internal > function > > that is not available to outside modules (thus declared 'static'). > > It may make sense to refactor this code and make it more accessible > to > > functions that want to parse individual parameter, but currently it > is > > not suited for that. > > Thanks. As I'm new to php-src, it takes some time to understand this > kind of (undocumented?) conventions. I know it's a tedious task, but > I'd really enjoy a few comments for the Zend API functions. Well, in this case the convention is quite simple: * If it's static (like the mentioned case) you can't use it in from a different file (or rather: compile unit) ... that's in the C standard (-> internal linking) * If it is ZEND_API/PHPAPI/... it can be used everywhere (while TSRM should not use anything external, zend should use nothing besides TSRM, for inter-extension dependencies one should be careful) * No-modifier-stuff can be used in the same library (same extension), depending on compiler flags, compiler version, ... this might (not) be enforced (by default we enforce it on Windows and with "modern" gcc (4.1, I think), while you probably won't see an effect with large static builds, which produce a single, big, php binary only) johannes