Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59155 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71129 invoked from network); 24 Mar 2012 19:43:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Mar 2012 19:43:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.153 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.153 smtp153.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.153] ([67.192.241.153:34845] helo=smtp153.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/06-37560-AD32E6F4 for ; Sat, 24 Mar 2012 14:43:22 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp25.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 31FF22D00DF; Sat, 24 Mar 2012 15:43:20 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp25.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id DB3292D00D4; Sat, 24 Mar 2012 15:43:19 -0400 (EDT) Message-ID: <4F6E23D7.9040308@sugarcrm.com> Date: Sat, 24 Mar 2012 12:43:19 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fran=E7ois_Gannaz?= CC: "internals@lists.php.net" References: <20120323172608.3672eec8@coriolan> <4F6CB50D.2060804@sugarcrm.com> <20120324115738.04fa708b@coriolan> In-Reply-To: <20120324115738.04fa708b@coriolan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Validate complex types From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > 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. As Johannes mentioned, function marked "static" is a standard C feature saying "this function is internal, do not try to use it from outside". API functions are marked ZEND_API or PHP_API, you are not supposed to use any functions not marked so in your extension unless they also belong to the extension. > This is something you wrote on github, but I took the liberty to insert it here > as it is related. I thought `zend_parse_arg()` could be a substitute of your > `zend_parse_single_arg()`. It cannot be. So, is it worth adding this function > to the API? My own answer is yes, of course, but it does count much. No, existing functions do not allow doing that, since they are written as internal ones and thus rely on certain way of doing things. We'd need to do some wrapper or refactoring there. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227