Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38621 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81730 invoked from network); 26 Jun 2008 00:12:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2008 00:12:46 -0000 Authentication-Results: pb1.pair.com header.from=crrodriguez@suse.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=crrodriguez@suse.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain suse.de from 195.135.220.15 cause and error) X-PHP-List-Original-Sender: crrodriguez@suse.de X-Host-Fingerprint: 195.135.220.15 mx2.suse.de Linux 2.4/2.6 Received: from [195.135.220.15] ([195.135.220.15:52140] helo=mx2.suse.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/1E-20985-8FED2684 for ; Wed, 25 Jun 2008 20:12:42 -0400 Received: from Relay1.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 28DE545AA3; Thu, 26 Jun 2008 02:12:37 +0200 (CEST) Message-ID: <4862DEEC.4080906@suse.de> Date: Wed, 25 Jun 2008 20:12:28 -0400 Organization: Platform/OpenSUSE - Core Services, SUSE LINUX Products GmbH, Research & Development User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Stanislav Malyshev Cc: 'PHP Internals' References: <485AE658.3050204@zend.com> In-Reply-To: <485AE658.3050204@zend.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=85898BD3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig267BB43B4059DFBCD6D2FF61" Subject: Re: [PHP-DEV] cleaning up the functions - any volunteers? From: crrodriguez@suse.de (=?UTF-8?B?Q3Jpc3RpYW4gUm9kcsOtZ3Vleg==?=) --------------enig267BB43B4059DFBCD6D2FF61 Content-Type: multipart/mixed; boundary="------------020508010109070500080005" This is a multi-part message in MIME format. --------------020508010109070500080005 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Stanislav Malyshev escribi=C3=B3: > Hi! >=20 > While we nearing the release of 5.3 (hopefully?), there are many=20 > functions in the PHP code which still use old parameter parsing API=20 > (zend_get_parameters_ex) instead of the new one (zend_parse_parameters)= =2E >=20 > P.S. if some genius would invent a script to automate that - it'd be=20 > awesome, but I don't have very high hopes on that. :) The attached patch may also help both core and PECL extensions, emiting=20 a deprecation compile warning when those functions are used. ps: you have to add the attribute to all deprecated functions ;-) -- Cristian Rodr=C3=ADguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------020508010109070500080005 Content-Type: text/x-patch; name="php_5_3-attr_deprecated.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="php_5_3-attr_deprecated.patch" Index: Zend/zend.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.293.2.11.2.9.2.21 diff -u -p -r1.293.2.11.2.9.2.21 zend.h --- Zend/zend.h 11 Jun 2008 13:18:39 -0000 1.293.2.11.2.9.2.21 +++ Zend/zend.h 26 Jun 2008 00:03:52 -0000 @@ -176,6 +176,12 @@ char *alloca (); # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) #endif =20 +#if ZEND_GCC_VERSION >=3D 3001 +# define ZEND_ATTRIBUTE_DEPRECATED __attribute__((deprecated)) +#else +# define ZEND_ATTRIBUTE_DEPRECATED +#endif + #if defined(__GNUC__) && ZEND_GCC_VERSION >=3D 3400 && defined(__i386__)= # define ZEND_FASTCALL __attribute__((fastcall)) #elif defined(_MSC_VER) && defined(_M_IX86) Index: Zend/zend_API.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /repository/ZendEngine2/zend_API.h,v retrieving revision 1.207.2.8.2.8.2.12 diff -u -p -r1.207.2.8.2.8.2.12 zend_API.h --- Zend/zend_API.h 27 May 2008 10:29:33 -0000 1.207.2.8.2.8.2.12 +++ Zend/zend_API.h 26 Jun 2008 00:03:52 -0000 @@ -199,7 +199,7 @@ int zend_next_free_module(void); BEGIN_EXTERN_C() ZEND_API int zend_get_parameters(int ht, int param_count, ...); ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval **= argument_array TSRMLS_DC); -ZEND_API int zend_get_parameters_ex(int param_count, ...); +ZEND_API int zend_get_parameters_ex(int param_count, ...) ZEND_ATTRIBUTE= _DEPRECATED; ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argu= ment_array TSRMLS_DC); =20 /* internal function to efficiently copy parameters when executing __cal= l() */ --------------020508010109070500080005-- --------------enig267BB43B4059DFBCD6D2FF61 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIYt7vhbiInYWJi9MRAh+7AKCg6u1wMD9P2B/zUckTlg8EQwBVMACfThDm IvEkpVZ0qeVk0+rsSnJqKlo= =FK6K -----END PGP SIGNATURE----- --------------enig267BB43B4059DFBCD6D2FF61--