cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c
| From: | Thies C . Arntzen | Date: | Tue, 14 Sep 1999 13:34:28 +0000 |
| Subject: | cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4427@lists.php.net to get a copy of this message | ||
thies Tue Sep 14 09:34:28 1999 EDT
Modified files:
/php4 ChangeLog
/php4/ext/standard basic_functions.c
Log:
count() now uses the new getParamertersEx API.
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.102 php4/ChangeLog:1.103
--- php4/ChangeLog:1.102 Tue Sep 14 08:40:59 1999
+++ php4/ChangeLog Tue Sep 14 09:34:27 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ?? 1999, Version 4.0 Beta 3
+- count() speedup. (Thies)
- OCI8 supports appending and positioning when saving LOBs (Thies)
- Added metaphone support (Thies)
- OCI8 doesn't use define callbacks any longer. (Thies)
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.83 php4/ext/standard/basic_functions.c:1.84
--- php4/ext/standard/basic_functions.c:1.83 Sat Sep 11 23:25:02 1999
+++ php4/ext/standard/basic_functions.c Tue Sep 14 09:34:27 1999
@@ -705,15 +705,16 @@
PHP_FUNCTION(count)
{
- pval *array;
+ pval **array;
HashTable *target_hash;
- if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &array) == FAILURE) {
+ if (ARG_COUNT(ht) != 1 || getParametersEx(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
- target_hash = HASH_OF(array);
+
+ target_hash = HASH_OF(*array);
if (!target_hash) {
- if (array->type == IS_STRING && array->value.str.val==undefined_variable_string) {
+ if ((*array)->type == IS_STRING &&
(*array)->value.str.val==undefined_variable_string) {
RETURN_LONG(0);
} else {
RETURN_LONG(1);