Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69138 invoked by uid 1010); 2 Jun 2006 08:39:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69123 invoked from network); 2 Jun 2006 08:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2006 08:39:53 -0000 X-PHP-List-Original-Sender: michael.walter@gmail.com X-Host-Fingerprint: 66.249.82.206 wx-out-0102.google.com Linux 2.4/2.6 Received: from ([66.249.82.206:39707] helo=wx-out-0102.google.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C0/9E-22639-859FF744 for ; Fri, 02 Jun 2006 04:39:53 -0400 Received: by wx-out-0102.google.com with SMTP id s14so357447wxc for ; Fri, 02 Jun 2006 01:39:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eDuUpAwZsCkG3WSBJqU/4RuI9e+Z+NlseSw9qMEfhbrifxePr3vP1XnSGJeKT/Y2SpYRfJhyRZJK1UpQ5uD1L5AM8jmeJD5Br7DobNyQ09S9mcXR8N96yascr89JhThm5xyObqSfWf7YBpqT156uWeEDyWwLL5qpogXoqzjIBAQ= Received: by 10.70.68.10 with SMTP id q10mr2147804wxa; Fri, 02 Jun 2006 01:39:50 -0700 (PDT) Received: by 10.70.87.4 with HTTP; Fri, 2 Jun 2006 01:39:50 -0700 (PDT) Message-ID: <877e9a170606020139v798d343au69ce9eca7db30309@mail.gmail.com> Date: Fri, 2 Jun 2006 10:39:50 +0200 To: "Sara Golemon" Cc: boards@gmail.com, internals@lists.php.net In-Reply-To: <003501c6859c$a5b988b0$88051fac@OHRLVN4523SG> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <447F154F.6070009@gmail.com> <003501c6859c$a5b988b0$88051fac@OHRLVN4523SG> Subject: Re: [PHP-DEV] Re: Question regarding extension function entries. From: michael.walter@gmail.com ("Michael Walter") At least the C++ standard guarantees that all remaining members of the struct are initialized with their respective default value (which would is be 0/NULL). So technically speaking, simply using {NULL} is absolutely fine. From a cursory glance it appears to me that it is the same with C, but feel free to check the standard on your own ;) Regards, Michael On 6/1/06, Sara Golemon wrote: > > According to all documentation I've found, a > > zend_function_entry[] array should be ended > > with { NULL, NULL, NULL }, but I've noticed > > that _zend_function_entry now has five parts; > > > Your analysis is correct, however(functionally speaking) the only attribute > that NEEDs to be explicitly set NULL is fname. The rest can be garbage and > everything will still function fine. The second and third elements are set > NULL becasue they can be safely without losing version agnosticism. > > We could extend the skeleton with a couple of zeros in those elements, but > it'd need a note on the indavisability of doing that if you need BC with 4 > (the compiler would spit error about excess elements in initializer). > > I'm all for a macro, maybe even a full start/end set like the > global/ini/arg_info declarations have. Again, there's version BC to be > considered, but that can be solved with some #ifndefs in the skeleton... > > PHP_BEGIN_FUNCTION_LIST(extname) > PHP_FE(...) > PHP_FE(...) > PHP_FE(...) > PHP_END_FUNCTION_LIST(extname) > > Same for the module entry.... > > These are all just window dressing though so unless someone else sees this > as a worthwhile thing...*shrug* > > -Sara > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >