CVS update: php4/ext/standard

From: Date: Mon, 21 Jun 1999 15:57:21 +0000
Subject: CVS update: php4/ext/standard
Groups: php.version4 
Request: Send a blank email to php-version4+get-1623@lists.php.net to get a copy of this message
Date: Monday June 21, 1999 @ 11:57 Author: thies Update of /repository/php4/ext/standard In directory php:/tmp/cvs-serv20678/ext/standard Modified Files: string.c Log Message: fixed implode "again" - Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.19 php4/ext/standard/string.c:1.20 --- php4/ext/standard/string.c:1.19 Wed Jun 16 13:06:52 1999 +++ php4/ext/standard/string.c Mon Jun 21 11:57:20 1999 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.19 1999/06/16 17:06:52 ssb Exp $ */ +/* $Id: string.c,v 1.20 1999/06/21 15:57:20 thies Exp $ */ /* Synced with php3 revision 1.193 1999-06-16 [ssb] */ @@ -309,15 +309,15 @@ void _php3_implode(pval *delim, pval *arr, pval *return_value) { - pval *tmp; + pval **tmp; int len = 0, count = 0; /* convert everything to strings, and calculate length */ _php3_hash_internal_pointer_reset(arr->value.ht); while (_php3_hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS) { - convert_to_string(tmp); - if (tmp->type == IS_STRING && tmp->value.str.val != undefined_variable_string) { - len += tmp->value.str.len; + convert_to_string(*tmp); + if ((*tmp)->type == IS_STRING && (*tmp)->value.str.val != undefined_variable_string) { + len += (*tmp)->value.str.len; if (count>0) { len += delim->value.str.len; } @@ -332,9 +332,9 @@ return_value->value.str.val[len] = '\0'; _php3_hash_internal_pointer_reset(arr->value.ht); while (_php3_hash_get_current_data(arr->value.ht, (void **) &tmp) == SUCCESS) { - if (tmp->type == IS_STRING && tmp->value.str.val != undefined_variable_string) { + if ((*tmp)->type == IS_STRING && (*tmp)->value.str.val != undefined_variable_string) { count--; - strcat(return_value->value.str.val, tmp->value.str.val); + strcat(return_value->value.str.val, (*tmp)->value.str.val); if (count > 0) { strcat(return_value->value.str.val, delim->value.str.val); }

« previous php.version4 (#1623) next »