return status;
}
-STATUS php_http_encoding_deflate(int flags, const char *data, size_t data_len, char **encoded, size_t *encoded_len TSRMLS_DC)
+ZEND_RESULT_CODE php_http_encoding_deflate(int flags, const char *data, size_t data_len, char **encoded, size_t *encoded_len TSRMLS_DC)
{
int status, level, wbits, strategy;
z_stream Z;
(*encoded)[*encoded_len = Z.total_out] = '\0';
return SUCCESS;
} else {
- STR_SET(*encoded, NULL);
+ PTR_SET(*encoded, NULL);
*encoded_len = 0;
}
}
return FAILURE;
}
-STATUS php_http_encoding_inflate(const char *data, size_t data_len, char **decoded, size_t *decoded_len TSRMLS_DC)
+ZEND_RESULT_CODE php_http_encoding_inflate(const char *data, size_t data_len, char **decoded, size_t *decoded_len TSRMLS_DC)
{
z_stream Z;
int status, wbits = PHP_HTTP_WINDOW_BITS_ANY;
return NULL;
}
-STATUS php_http_encoding_stream_reset(php_http_encoding_stream_t **s)
+ZEND_RESULT_CODE php_http_encoding_stream_reset(php_http_encoding_stream_t **s)
{
php_http_encoding_stream_t *ss;
if ((*s)->ops->dtor) {
return FAILURE;
}
-STATUS php_http_encoding_stream_update(php_http_encoding_stream_t *s, const char *in_str, size_t in_len, char **out_str, size_t *out_len)
+ZEND_RESULT_CODE php_http_encoding_stream_update(php_http_encoding_stream_t *s, const char *in_str, size_t in_len, char **out_str, size_t *out_len)
{
if (!s->ops->update) {
return FAILURE;
return s->ops->update(s, in_str, in_len, out_str, out_len);
}
-STATUS php_http_encoding_stream_flush(php_http_encoding_stream_t *s, char **out_str, size_t *out_len)
+ZEND_RESULT_CODE php_http_encoding_stream_flush(php_http_encoding_stream_t *s, char **out_str, size_t *out_len)
{
if (!s->ops->flush) {
*out_str = NULL;
return s->ops->done(s);
}
-STATUS php_http_encoding_stream_finish(php_http_encoding_stream_t *s, char **out_str, size_t *out_len)
+ZEND_RESULT_CODE php_http_encoding_stream_finish(php_http_encoding_stream_t *s, char **out_str, size_t *out_len)
{
if (!s->ops->finish) {
*out_str = NULL;
return NULL;
}
-static STATUS deflate_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **encoded, size_t *encoded_len)
+static ZEND_RESULT_CODE deflate_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **encoded, size_t *encoded_len)
{
int status;
z_streamp ctx = s->ctx;
return SUCCESS;
}
- STR_SET(*encoded, NULL);
+ PTR_SET(*encoded, NULL);
*encoded_len = 0;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to update deflate stream: %s", zError(status));
return FAILURE;
}
-static STATUS inflate_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **decoded, size_t *decoded_len)
+static ZEND_RESULT_CODE inflate_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **decoded, size_t *decoded_len)
{
int status;
z_streamp ctx = s->ctx;
return FAILURE;
}
-static STATUS dechunk_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **decoded, size_t *decoded_len)
+static ZEND_RESULT_CODE dechunk_update(php_http_encoding_stream_t *s, const char *data, size_t data_len, char **decoded, size_t *decoded_len)
{
php_http_buffer_t tmp;
struct dechunk_ctx *ctx = s->ctx;
return SUCCESS;
}
-static STATUS deflate_flush(php_http_encoding_stream_t *s, char **encoded, size_t *encoded_len)
+static ZEND_RESULT_CODE deflate_flush(php_http_encoding_stream_t *s, char **encoded, size_t *encoded_len)
{
int status;
z_streamp ctx = s->ctx;
return SUCCESS;
}
- STR_SET(*encoded, NULL);
+ PTR_SET(*encoded, NULL);
*encoded_len = 0;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to flush deflate stream: %s", zError(status));
return FAILURE;
}
-static STATUS dechunk_flush(php_http_encoding_stream_t *s, char **decoded, size_t *decoded_len)
+static ZEND_RESULT_CODE dechunk_flush(php_http_encoding_stream_t *s, char **decoded, size_t *decoded_len)
{
struct dechunk_ctx *ctx = s->ctx;
return SUCCESS;
}
-static STATUS deflate_finish(php_http_encoding_stream_t *s, char **encoded, size_t *encoded_len)
+static ZEND_RESULT_CODE deflate_finish(php_http_encoding_stream_t *s, char **encoded, size_t *encoded_len)
{
int status;
z_streamp ctx = s->ctx;
return SUCCESS;
}
- STR_SET(*encoded, NULL);
+ PTR_SET(*encoded, NULL);
*encoded_len = 0;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to finish deflate stream: %s", zError(status));
return FAILURE;
}
-static STATUS inflate_finish(php_http_encoding_stream_t *s, char **decoded, size_t *decoded_len)
+static ZEND_RESULT_CODE inflate_finish(php_http_encoding_stream_t *s, char **decoded, size_t *decoded_len)
{
int status;
z_streamp ctx = s->ctx;
return SUCCESS;
}
- STR_SET(*decoded, NULL);
+ PTR_SET(*decoded, NULL);
*decoded_len = 0;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to finish inflate stream: %s", zError(status));
return FAILURE;
RETURN_EMPTY_STRING();
}
} else {
- STR_FREE(encoded_str);
+ PTR_FREE(encoded_str);
}
}
}