Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45758 invoked by uid 1010); 24 Jul 2006 17:13:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45728 invoked from network); 24 Jul 2006 17:13:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2006 17:13:02 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:40860] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id B8/81-04178-69FF4C44 for ; Mon, 24 Jul 2006 13:12:55 -0400 Received: from localhost (strato.aixcept.de [81.169.182.136]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id C870235C1CE; Mon, 24 Jul 2006 19:12:50 +0200 (CEST) Date: Mon, 24 Jul 2006 10:12:03 -0700 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1482394112.20060724101203@marcus-boerger.de> To: Nuno Lopes Cc: PHPdev , andi@php.net In-Reply-To: <008101c6af40$fea56de0$0100a8c0@pc07653> References: <008101c6af40$fea56de0$0100a8c0@pc07653> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] making PHP_FUNCTION static? From: helly@php.net (Marcus Boerger) Hello Nuno, i think this is a good idea and i suggest that we drop the static from those extensions. The question is whether we need new macros for non static cases and hope we don't. best regards marcus Monday, July 24, 2006, 9:48:29 AM, you wrote: > Hello, > I was wondering if we could make ZEND_FUNCTION() declaration static. This > represents a compatibility break with previous PHP versions, but only > extensions that already declare the function as static would be affected. > Declaring a function as static (or anything else) decreases load times and > the size of the dso, allows better optimizations by the compiler, etc.. So > its all advantages :) (well, then all functions must be defined or > #include'd in the same file as the function table). > There are some (few) extensions that already mark their functions as static, > so should we use a wide static keywording, by changing the macro, or add the > keyword locally? > Nuno > P.S.: Anyone that wants to learn more about why, how and when to use static > and const keywords, just read the Ulrich Drepper dso paper. Best regards, Marcus