/* reached the end */
if (!chunk_len) {
/* move over '0' chunked encoding terminator and any new lines */
- do {
+ while(1) {
switch (*e_ptr) {
case '0':
case '\r':
++e_ptr;
continue;
}
- } while (0);
+ break;
+ }
break;
}
}
inflateEnd(&Z);
- if (decoded_len && *decoded) {
+ if (*decoded_len && *decoded) {
efree(*decoded);
}
}
php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stream_t *from, php_http_encoding_stream_t *to)
{
if (from->ops->copy) {
- int freeme;
php_http_encoding_stream_t *ns;
- if ((freeme = !to)) {
+ if (!to) {
to = pemalloc(sizeof(*to), (from->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
}
memset(to, 0, sizeof(*to));
} else {
return to;
}
-
- if (freeme) {
- pefree(to, (to->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
- }
}
return NULL;
zend_object_std_dtor(object);
}
+static zend_class_entry *php_http_encoding_stream_class_entry;
+zend_class_entry *php_http_get_encoding_stream_class_entry(void)
+{
+ return php_http_encoding_stream_class_entry;
+}
+static zend_class_entry *php_http_deflate_stream_class_entry;
+zend_class_entry *php_http_get_deflate_stream_class_entry(void)
+{
+ return php_http_deflate_stream_class_entry;
+}
+static zend_class_entry *php_http_inflate_stream_class_entry;
+zend_class_entry *php_http_get_inflate_stream_class_entry(void)
+{
+ return php_http_inflate_stream_class_entry;
+}
+static zend_class_entry *php_http_dechunk_stream_class_entry;
+zend_class_entry *php_http_get_dechunk_stream_class_entry(void)
+{
+ return php_http_dechunk_stream_class_entry;
+}
+
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEncodingStream___construct, 0, 0, 0)
ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO();
EMPTY_FUNCTION_ENTRY
};
-zend_class_entry *php_http_encoding_stream_class_entry;
-zend_class_entry *php_http_deflate_stream_class_entry;
-zend_class_entry *php_http_inflate_stream_class_entry;
-zend_class_entry *php_http_dechunk_stream_class_entry;
-
PHP_MINIT_FUNCTION(http_encoding)
{
zend_class_entry ce = {0};