cvs: php-src /ext/standard basic_functions.c
| From: | Andrei Zmievski | Date: | Mon, 17 Jul 2006 19:32:10 +0000 |
| Subject: | cvs: php-src /ext/standard basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-39317@lists.php.net to get a copy of this message | ||
andrei Mon Jul 17 19:32:10 2006 UTC
Modified files:
/php-src/ext/standard basic_functions.c
Log:
- Use zend_uchar for param type
- %v is for UG() - dependent strings, which is not the case here
- 'T' is only useful for multiple parameters, so use 't' instead
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.790&r2=1.791&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.790 php-src/ext/standard/basic_functions.c:1.791
--- php-src/ext/standard/basic_functions.c:1.790 Mon Jul 17 07:11:06 2006
+++ php-src/ext/standard/basic_functions.c Mon Jul 17 19:32:10 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.790 2006/07/17 07:11:06 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.791 2006/07/17 19:32:10 andrei Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -4173,19 +4173,20 @@
}
-/* {{{ proto mixed constant(string const_name)
- Given the name of a constant this function will return the constants associated value */
+/* {{{ proto mixed constant(string const_name) U
+ Given the name of a constant this function will return the constant's associated value */
PHP_FUNCTION(constant)
{
zstr const_name;
- int const_name_len, const_type;
+ int const_name_len;
+ zend_uchar const_type;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &const_name,
&const_name_len, &const_type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &const_name,
&const_name_len, &const_type) == FAILURE) {
return;
}
if (!zend_u_get_constant(const_type, const_name, const_name_len, return_value TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %v",
const_name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %R",
const_type, const_name);
RETURN_NULL();
}
}