X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_querystring.c;h=d72337f80a5bc29e4c6544528127363f849c2cac;hp=f2164fb56ab7d860bdff9510a572f2bad111c605;hb=c3f7d34f18cd62956f241092c67a38edf246328d;hpb=b62c3811cac715f7a0e668ee864d57fd730b47b3 diff --git a/php_http_querystring.c b/php_http_querystring.c index f2164fb..d72337f 100644 --- a/php_http_querystring.c +++ b/php_http_querystring.c @@ -16,6 +16,9 @@ #include #ifdef PHP_HTTP_HAVE_ICONV +# ifndef HAVE_ICONV +# define HAVE_ICONV 1 +# endif # undef PHP_ATOM_INC # include #endif @@ -76,7 +79,7 @@ static inline void php_http_querystring_get(zval *this_ptr, int type, char *name } #ifdef PHP_HTTP_HAVE_ICONV -STATUS php_http_querystring_xlate(zval *dst, zval *src, const char *ie, const char *oe TSRMLS_DC) +ZEND_RESULT_CODE php_http_querystring_xlate(zval *dst, zval *src, const char *ie, const char *oe TSRMLS_DC) { HashPosition pos; zval **entry = NULL; @@ -131,7 +134,7 @@ STATUS php_http_querystring_xlate(zval *dst, zval *src, const char *ie, const ch } #endif /* HAVE_ICONV */ -STATUS php_http_querystring_ctor(zval *instance, zval *params TSRMLS_DC) +ZEND_RESULT_CODE php_http_querystring_ctor(zval *instance, zval *params TSRMLS_DC) { php_http_querystring_set(instance, params, 0 TSRMLS_CC); return SUCCESS; @@ -158,9 +161,9 @@ static int apply_querystring(void *pData TSRMLS_DC) return ZEND_HASH_APPLY_KEEP; } -STATUS php_http_querystring_parse(HashTable *ht, const char *str, size_t len TSRMLS_DC) +ZEND_RESULT_CODE php_http_querystring_parse(HashTable *ht, const char *str, size_t len TSRMLS_DC) { - STATUS rv = FAILURE; + ZEND_RESULT_CODE rv = FAILURE; php_http_params_opts_t opts; php_http_params_token_t psep = { ZEND_STRL("&") }, *psepp[] = { &psep, NULL }; php_http_params_token_t vsep = { ZEND_STRL("=") }, *vsepp[] = { &vsep, NULL }; @@ -206,7 +209,7 @@ STATUS php_http_querystring_parse(HashTable *ht, const char *str, size_t len TSR return rv; } -STATUS php_http_querystring_update(zval *qarray, zval *params, zval *outstring TSRMLS_DC) +ZEND_RESULT_CODE php_http_querystring_update(zval *qarray, zval *params, zval *outstring TSRMLS_DC) { /* enforce proper type */ if (Z_TYPE_P(qarray) != IS_ARRAY) {