X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_url_api.c;h=517ee1aef43b924e8c0351ded1ce576f2da94c1c;hb=7ed0decd1cb0ea45cf10b9741608d2e13c9949ad;hp=2fde306a74154dee0f3ecdedb6b2fd08967b80ea;hpb=9287fdda2887622c8fe69f7b63d6803d60827ded;p=m6w6%2Fext-http diff --git a/http_url_api.c b/http_url_api.c index 2fde306..517ee1a 100644 --- a/http_url_api.c +++ b/http_url_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -299,13 +299,7 @@ PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c return FAILURE; } } else { - zval *val; - - ALLOC_ZVAL(val); - *val = **data; - INIT_PZVAL(val); - zval_copy_ctor(val); - convert_to_string(val); + zval *val = zval_copy(IS_STRING, *data); if (PHPSTR_LEN(str)) { phpstr_append(str, arg_sep, arg_sep_len); @@ -322,7 +316,7 @@ PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c efree(encoded_val); } - zval_ptr_dtor(&val); + zval_free(&val); } phpstr_dtor(&new_prefix); }