Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3063 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65511 invoked from network); 30 Jun 2003 20:17:36 -0000 Received: from unknown (HELO hasele) (216.179.74.133) by pb1.pair.com with SMTP; 30 Jun 2003 20:17:36 -0000 Received: by hasele (Postfix, from userid 1000) id A90B04EA56; Mon, 30 Jun 2003 15:55:49 -0400 (EDT) To: internals@lists.php.net Cc: zeev@zend.com, andi@zend.com Content-Type: multipart/mixed; boundary="=-SHPRxk6zRUBlgT32A01p" Message-ID: <1057002949.4160.109.camel@hasele> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 30 Jun 2003 15:55:49 -0400 Subject: Removing reserved main:: From: sterling@bumblebury.com (Sterling Hughes) --=-SHPRxk6zRUBlgT32A01p Content-Type: text/plain Content-Transfer-Encoding: 7bit Hey, Edin pointed out that we no longer need to reserve the "main" keyword in zend engine 2. As the main:: keyword was only reserved for the main:: namespace in the first place. We no longer have namespaces, therefore we no longer need to reserve main. Attached is a patch to zend_compile.c that removes main. I'll commit it to zend_compile.c unless someone objects. -Sterling -- "A business that makes nothing but money is a poor kind of business." - Henry Ford --=-SHPRxk6zRUBlgT32A01p Content-Disposition: attachment; filename=remove_main.diff Content-Type: text/x-patch; name=remove_main.diff; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Index: zend_compile.c =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_compile.c,v retrieving revision 1.429 diff -u -r1.429 zend_compile.c --- zend_compile.c 21 Jun 2003 21:56:06 -0000 1.429 +++ zend_compile.c 30 Jun 2003 20:13:58 -0000 @@ -2251,8 +2251,7 @@ =20 zend_str_tolower(class_name->u.constant.value.str.val, class_name->u.cons= tant.value.str.len);=20 =20 - if (!(strcmp(class_name->u.constant.value.str.val, "main") && strcmp(clas= s_name->u.constant.value.str.val, "self") && - strcmp(class_name->u.constant.value.str.val, "parent"))) { + if (!(strcmp(class_name->u.constant.value.str.val, "self") && strcmp(clas= s_name->u.constant.value.str.val, "parent"))) { zend_error(E_COMPILE_ERROR, "Cannot use '%s' as class name as it is rese= rved", class_name->u.constant.value.str.val); } =20 --=-SHPRxk6zRUBlgT32A01p--