Re: cvs: php4 /ext/standard basic_functions.c string.c

From: Date: Tue, 12 Sep 2000 18:17:19 +0000
Subject: Re: cvs: php4 /ext/standard basic_functions.c string.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1734@lists.php.net to get a copy of this message
Please reverse this patch. We only have aliases for backwards compatibility when we want to change a function's name to the new standard but can't break old scripts. Adding another function name to the name space is quite pointless. People who prefer PHP can get over not having chomp() but chop(). Thanks, Andi At 15:54 12/09/00 +0000, Daniel Beckham wrote:
danbeck         Tue Sep 12 08:54:10 2000 EDT
Modified files:
    /php4/ext/standard  basic_functions.c string.c
Log: added chomp() alias for chop() for us Perl purists. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.255 php4/ext/standard/basic_functions.c:1.256 --- php4/ext/standard/basic_functions.c:1.255 Mon Sep 11 07:50:26 2000 +++ php4/ext/standard/basic_functions.c Tue Sep 12 08:54:10 2000 @@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: basic_functions.c,v 1.255 2000/09/11 14:50:26 stas Exp $ */ +/* $Id: basic_functions.c,v 1.256 2000/09/12 15:54:10 danbeck Exp $ */ #include "php.h" #include "php_main.h" @@ -185,6 +185,7 @@
        PHP_FE(parse_str,               second_arg_force_ref)
        PHP_FE(str_pad,              NULL)
        PHP_FALIAS(rtrim,                       chop,      NULL)
+    PHP_FALIAS(chomp,           chop,               NULL)
PHP_FALIAS(strchr, strstr, NULL) PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL)
        PHP_NAMED_FE(printf,            PHP_FN(user_printf),    NULL)
Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.155 php4/ext/standard/string.c:1.156
--- php4/ext/standard/string.c:1.155    Tue Sep 12 03:56:25 2000
+++ php4/ext/standard/string.c Tue Sep 12 08:54:10 2000 @@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: string.c,v 1.155 2000/09/12 10:56:25 stas Exp $ */ +/* $Id: string.c,v 1.156 2000/09/12 15:54:10 danbeck Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -173,6 +173,10 @@ } /* {{{ proto string rtrim(string str) + An alias for chop */ +/* }}} */ + +/* {{{ proto string chomp(string str)
    An alias for chop */
/* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.cvs (#1734) next »