X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_filter_api.c;h=23b71190acebb730a3d5002b734d4f108299e9ed;hp=6b58a0be45fb1c872464df02dc4074fa24476ed2;hb=refs%2Fheads%2Fv1.7.x;hpb=650dad8564d53bd3fb6c9867fa81e0abf17f6f7b diff --git a/http_filter_api.c b/http_filter_api.c index 6b58a0b..23b7119 100644 --- a/http_filter_api.c +++ b/http_filter_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -492,8 +492,7 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int HTTP_FILTER_BUFFER(deflate) *b = NULL; if (params) { - switch (Z_TYPE_P(params)) - { + switch (Z_TYPE_P(params)) { case IS_ARRAY: case IS_OBJECT: if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) { @@ -501,11 +500,10 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int } default: { - zval *orig = *tmp; + zval *num = http_zsep(IS_LONG, *tmp); - convert_to_long_ex(tmp); - flags |= (Z_LVAL_PP(tmp) & 0x0fffffff); - if (orig != *tmp) zval_ptr_dtor(tmp); + flags |= (Z_LVAL_P(num) & 0x0fffffff); + zval_ptr_dtor(&num); } } }