summaryrefslogtreecommitdiff
path: root/main/output.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
committerAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
commitbdeb220f48825642f84cdbf3ff23a30613c92e86 (patch)
tree1a6cf34d20420e4815b4becb21311a4457d84103 /main/output.c
parentbb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff)
downloadphp-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz
first shot remove TSRMLS_* things
Diffstat (limited to 'main/output.c')
-rw-r--r--main/output.c388
1 files changed, 194 insertions, 194 deletions
diff --git a/main/output.c b/main/output.c
index 7811316358..c287933fb1 100644
--- a/main/output.c
+++ b/main/output.c
@@ -52,20 +52,20 @@ static HashTable php_output_handler_reverse_conflicts;
/* }}} */
/* {{{ forward declarations */
-static inline int php_output_lock_error(int op TSRMLS_DC);
-static inline void php_output_op(int op, const char *str, size_t len TSRMLS_DC);
+static inline int php_output_lock_error(int op);
+static inline void php_output_op(int op, const char *str, size_t len);
-static inline php_output_handler *php_output_handler_init(zend_string *name, size_t chunk_size, int flags TSRMLS_DC);
+static inline php_output_handler *php_output_handler_init(zend_string *name, size_t chunk_size, int flags);
static inline php_output_handler_status_t php_output_handler_op(php_output_handler *handler, php_output_context *context);
-static inline int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf TSRMLS_DC);
+static inline int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf);
static inline zval *php_output_handler_status(php_output_handler *handler, zval *entry);
-static inline php_output_context *php_output_context_init(php_output_context *context, int op TSRMLS_DC);
+static inline php_output_context *php_output_context_init(php_output_context *context, int op);
static inline void php_output_context_reset(php_output_context *context);
static inline void php_output_context_swap(php_output_context *context);
static inline void php_output_context_dtor(php_output_context *context);
-static inline int php_output_stack_pop(int flags TSRMLS_DC);
+static inline int php_output_stack_pop(int flags);
static int php_output_stack_apply_op(void *h, void *c);
static int php_output_stack_apply_clean(void *h, void *c);
@@ -104,23 +104,23 @@ static size_t php_output_stderr(const char *str, size_t str_len)
static size_t (*php_output_direct)(const char *str, size_t str_len) = php_output_stderr;
/* }}} */
-/* {{{ void php_output_header(TSRMLS_D) */
-static void php_output_header(TSRMLS_D)
+/* {{{ void php_output_header(void) */
+static void php_output_header(void)
{
if (!SG(headers_sent)) {
if (!OG(output_start_filename)) {
- if (zend_is_compiling(TSRMLS_C)) {
- OG(output_start_filename) = zend_get_compiled_filename(TSRMLS_C)->val;
- OG(output_start_lineno) = zend_get_compiled_lineno(TSRMLS_C);
- } else if (zend_is_executing(TSRMLS_C)) {
- OG(output_start_filename) = zend_get_executed_filename(TSRMLS_C);
- OG(output_start_lineno) = zend_get_executed_lineno(TSRMLS_C);
+ if (zend_is_compiling()) {
+ OG(output_start_filename) = zend_get_compiled_filename()->val;
+ OG(output_start_lineno) = zend_get_compiled_lineno();
+ } else if (zend_is_executing()) {
+ OG(output_start_filename) = zend_get_executed_filename();
+ OG(output_start_lineno) = zend_get_executed_lineno();
}
#if PHP_OUTPUT_DEBUG
fprintf(stderr, "!!! output started at: %s (%d)\n", OG(output_start_filename), OG(output_start_lineno));
#endif
}
- if (!php_header(TSRMLS_C)) {
+ if (!php_header()) {
OG(flags) |= PHP_OUTPUT_DISABLED;
}
}
@@ -156,9 +156,9 @@ PHPAPI void php_output_shutdown(void)
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_activate(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_activate(void)
* Reset output globals and setup the output handler stack */
-PHPAPI int php_output_activate(TSRMLS_D)
+PHPAPI int php_output_activate(void)
{
#ifdef ZTS
memset((*((void ***) ZEND_TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(output_globals_id)], 0, sizeof(zend_output_globals));
@@ -173,13 +173,13 @@ PHPAPI int php_output_activate(TSRMLS_D)
}
/* }}} */
-/* {{{ void php_output_deactivate(TSRMLS_D)
+/* {{{ void php_output_deactivate(void)
* Destroy the output handler stack */
-PHPAPI void php_output_deactivate(TSRMLS_D)
+PHPAPI void php_output_deactivate(void)
{
php_output_handler **handler = NULL;
- php_output_header(TSRMLS_C);
+ php_output_header();
OG(flags) ^= PHP_OUTPUT_ACTIVATED;
OG(active) = NULL;
@@ -188,7 +188,7 @@ PHPAPI void php_output_deactivate(TSRMLS_D)
/* release all output handlers */
if (OG(handlers).elements) {
while ((handler = zend_stack_top(&OG(handlers)))) {
- php_output_handler_free(handler TSRMLS_CC);
+ php_output_handler_free(handler);
zend_stack_del_top(&OG(handlers));
}
zend_stack_destroy(&OG(handlers));
@@ -198,7 +198,7 @@ PHPAPI void php_output_deactivate(TSRMLS_D)
/* }}} */
/* {{{ void php_output_register_constants() */
-PHPAPI void php_output_register_constants(TSRMLS_D)
+PHPAPI void php_output_register_constants(void)
{
REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_START", PHP_OUTPUT_HANDLER_START, CONST_CS | CONST_PERSISTENT);
REGISTER_MAIN_LONG_CONSTANT("PHP_OUTPUT_HANDLER_WRITE", PHP_OUTPUT_HANDLER_WRITE, CONST_CS | CONST_PERSISTENT);
@@ -217,17 +217,17 @@ PHPAPI void php_output_register_constants(TSRMLS_D)
}
/* }}} */
-/* {{{ void php_output_set_status(int status TSRMLS_DC)
+/* {{{ void php_output_set_status(int status)
* Used by SAPIs to disable output */
-PHPAPI void php_output_set_status(int status TSRMLS_DC)
+PHPAPI void php_output_set_status(int status)
{
OG(flags) = (OG(flags) & ~0xf) | (status & 0xf);
}
/* }}} */
-/* {{{ int php_output_get_status(TSRMLS_C)
+/* {{{ int php_output_get_status()
* Get output control status */
-PHPAPI int php_output_get_status(TSRMLS_D)
+PHPAPI int php_output_get_status(void)
{
return (
OG(flags)
@@ -237,47 +237,47 @@ PHPAPI int php_output_get_status(TSRMLS_D)
}
/* }}} */
-/* {{{ int php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
+/* {{{ int php_output_write_unbuffered(const char *str, size_t len)
* Unbuffered write */
-PHPAPI size_t php_output_write_unbuffered(const char *str, size_t len TSRMLS_DC)
+PHPAPI size_t php_output_write_unbuffered(const char *str, size_t len)
{
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}
if (OG(flags) & PHP_OUTPUT_ACTIVATED) {
- return sapi_module.ub_write(str, len TSRMLS_CC);
+ return sapi_module.ub_write(str, len);
}
return php_output_direct(str, len);
}
/* }}} */
-/* {{{ int php_output_write(const char *str, size_t len TSRMLS_DC)
+/* {{{ int php_output_write(const char *str, size_t len)
* Buffered write */
-PHPAPI size_t php_output_write(const char *str, size_t len TSRMLS_DC)
+PHPAPI size_t php_output_write(const char *str, size_t len)
{
if (OG(flags) & PHP_OUTPUT_DISABLED) {
return 0;
}
if (OG(flags) & PHP_OUTPUT_ACTIVATED) {
- php_output_op(PHP_OUTPUT_HANDLER_WRITE, str, len TSRMLS_CC);
+ php_output_op(PHP_OUTPUT_HANDLER_WRITE, str, len);
return len;
}
return php_output_direct(str, len);
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_flush(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_flush(void)
* Flush the most recent output handlers buffer */
-PHPAPI int php_output_flush(TSRMLS_D)
+PHPAPI int php_output_flush(void)
{
php_output_context context;
if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_FLUSHABLE)) {
- php_output_context_init(&context, PHP_OUTPUT_HANDLER_FLUSH TSRMLS_CC);
+ php_output_context_init(&context, PHP_OUTPUT_HANDLER_FLUSH);
php_output_handler_op(OG(active), &context);
if (context.out.data && context.out.used) {
zend_stack_del_top(&OG(handlers));
- php_output_write(context.out.data, context.out.used TSRMLS_CC);
+ php_output_write(context.out.data, context.out.used);
zend_stack_push(&OG(handlers), &OG(active));
}
php_output_context_dtor(&context);
@@ -287,24 +287,24 @@ PHPAPI int php_output_flush(TSRMLS_D)
}
/* }}} */
-/* {{{ void php_output_flush_all(TSRMLS_C)
+/* {{{ void php_output_flush_all()
* Flush all output buffers subsequently */
-PHPAPI void php_output_flush_all(TSRMLS_D)
+PHPAPI void php_output_flush_all(void)
{
if (OG(active)) {
- php_output_op(PHP_OUTPUT_HANDLER_FLUSH, NULL, 0 TSRMLS_CC);
+ php_output_op(PHP_OUTPUT_HANDLER_FLUSH, NULL, 0);
}
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_clean(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_clean(void)
* Cleans the most recent output handlers buffer if the handler is cleanable */
-PHPAPI int php_output_clean(TSRMLS_D)
+PHPAPI int php_output_clean(void)
{
php_output_context context;
if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_CLEANABLE)) {
- php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC);
+ php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN);
php_output_handler_op(OG(active), &context);
php_output_context_dtor(&context);
return SUCCESS;
@@ -313,69 +313,69 @@ PHPAPI int php_output_clean(TSRMLS_D)
}
/* }}} */
-/* {{{ void php_output_clean_all(TSRMLS_D)
+/* {{{ void php_output_clean_all(void)
* Cleans all output handler buffers, without regard whether the handler is cleanable */
-PHPAPI void php_output_clean_all(TSRMLS_D)
+PHPAPI void php_output_clean_all(void)
{
php_output_context context;
if (OG(active)) {
- php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC);
+ php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN);
zend_stack_apply_with_argument(&OG(handlers), ZEND_STACK_APPLY_TOPDOWN, php_output_stack_apply_clean, &context);
}
}
-/* {{{ SUCCESS|FAILURE php_output_end(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_end(void)
* Finalizes the most recent output handler at pops it off the stack if the handler is removable */
-PHPAPI int php_output_end(TSRMLS_D)
+PHPAPI int php_output_end(void)
{
- if (php_output_stack_pop(PHP_OUTPUT_POP_TRY TSRMLS_CC)) {
+ if (php_output_stack_pop(PHP_OUTPUT_POP_TRY)) {
return SUCCESS;
}
return FAILURE;
}
/* }}} */
-/* {{{ void php_output_end_all(TSRMLS_D)
+/* {{{ void php_output_end_all(void)
* Finalizes all output handlers and ends output buffering without regard whether a handler is removable */
-PHPAPI void php_output_end_all(TSRMLS_D)
+PHPAPI void php_output_end_all(void)
{
- while (OG(active) && php_output_stack_pop(PHP_OUTPUT_POP_FORCE TSRMLS_CC));
+ while (OG(active) && php_output_stack_pop(PHP_OUTPUT_POP_FORCE));
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_discard(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_discard(void)
* Discards the most recent output handlers buffer and pops it off the stack if the handler is removable */
-PHPAPI int php_output_discard(TSRMLS_D)
+PHPAPI int php_output_discard(void)
{
- if (php_output_stack_pop(PHP_OUTPUT_POP_DISCARD|PHP_OUTPUT_POP_TRY TSRMLS_CC)) {
+ if (php_output_stack_pop(PHP_OUTPUT_POP_DISCARD|PHP_OUTPUT_POP_TRY)) {
return SUCCESS;
}
return FAILURE;
}
/* }}} */
-/* {{{ void php_output_discard_all(TSRMLS_D)
+/* {{{ void php_output_discard_all(void)
* Discard all output handlers and buffers without regard whether a handler is removable */
-PHPAPI void php_output_discard_all(TSRMLS_D)
+PHPAPI void php_output_discard_all(void)
{
while (OG(active)) {
- php_output_stack_pop(PHP_OUTPUT_POP_DISCARD|PHP_OUTPUT_POP_FORCE TSRMLS_CC);
+ php_output_stack_pop(PHP_OUTPUT_POP_DISCARD|PHP_OUTPUT_POP_FORCE);
}
}
/* }}} */
-/* {{{ int php_output_get_level(TSRMLS_D)
+/* {{{ int php_output_get_level(void)
* Get output buffering level, ie. how many output handlers the stack contains */
-PHPAPI int php_output_get_level(TSRMLS_D)
+PHPAPI int php_output_get_level(void)
{
return OG(active) ? zend_stack_count(&OG(handlers)) : 0;
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_get_contents(zval *z TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_get_contents(zval *z)
* Get the contents of the active output handlers buffer */
-PHPAPI int php_output_get_contents(zval *p TSRMLS_DC)
+PHPAPI int php_output_get_contents(zval *p)
{
if (OG(active)) {
ZVAL_STRINGL(p, OG(active)->buffer.data, OG(active)->buffer.used);
@@ -386,9 +386,9 @@ PHPAPI int php_output_get_contents(zval *p TSRMLS_DC)
}
}
-/* {{{ SUCCESS|FAILURE php_output_get_length(zval *z TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_get_length(zval *z)
* Get the length of the active output handlers buffer */
-PHPAPI int php_output_get_length(zval *p TSRMLS_DC)
+PHPAPI int php_output_get_length(zval *p)
{
if (OG(active)) {
ZVAL_LONG(p, OG(active)->buffer.used);
@@ -400,82 +400,82 @@ PHPAPI int php_output_get_length(zval *p TSRMLS_DC)
}
/* }}} */
-/* {{{ php_output_handler* php_output_get_active_handler(TSRMLS_D)
+/* {{{ php_output_handler* php_output_get_active_handler(void)
* Get active output handler */
-PHPAPI php_output_handler* php_output_get_active_handler(TSRMLS_D)
+PHPAPI php_output_handler* php_output_get_active_handler(void)
{
return OG(active);
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_start_default(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_handler_start_default(void)
* Start a "default output handler" */
-PHPAPI int php_output_start_default(TSRMLS_D)
+PHPAPI int php_output_start_default(void)
{
php_output_handler *handler;
- handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC);
- if (SUCCESS == php_output_handler_start(handler TSRMLS_CC)) {
+ handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, 0, PHP_OUTPUT_HANDLER_STDFLAGS);
+ if (SUCCESS == php_output_handler_start(handler)) {
return SUCCESS;
}
- php_output_handler_free(&handler TSRMLS_CC);
+ php_output_handler_free(&handler);
return FAILURE;
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_start_devnull(TSRMLS_D)
+/* {{{ SUCCESS|FAILURE php_output_handler_start_devnull(void)
* Start a "null output handler" */
-PHPAPI int php_output_start_devnull(TSRMLS_D)
+PHPAPI int php_output_start_devnull(void)
{
php_output_handler *handler;
- handler = php_output_handler_create_internal(ZEND_STRL(php_output_devnull_handler_name), php_output_handler_devnull_func, PHP_OUTPUT_HANDLER_DEFAULT_SIZE, 0 TSRMLS_CC);
- if (SUCCESS == php_output_handler_start(handler TSRMLS_CC)) {
+ handler = php_output_handler_create_internal(ZEND_STRL(php_output_devnull_handler_name), php_output_handler_devnull_func, PHP_OUTPUT_HANDLER_DEFAULT_SIZE, 0);
+ if (SUCCESS == php_output_handler_start(handler)) {
return SUCCESS;
}
- php_output_handler_free(&handler TSRMLS_CC);
+ php_output_handler_free(&handler);
return FAILURE;
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_start_user(zval *handler, size_t chunk_size, int flags TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_start_user(zval *handler, size_t chunk_size, int flags)
* Start a user level output handler */
-PHPAPI int php_output_start_user(zval *output_handler, size_t chunk_size, int flags TSRMLS_DC)
+PHPAPI int php_output_start_user(zval *output_handler, size_t chunk_size, int flags)
{
php_output_handler *handler;
if (output_handler) {
- handler = php_output_handler_create_user(output_handler, chunk_size, flags TSRMLS_CC);
+ handler = php_output_handler_create_user(output_handler, chunk_size, flags);
} else {
- handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, chunk_size, flags TSRMLS_CC);
+ handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, chunk_size, flags);
}
- if (SUCCESS == php_output_handler_start(handler TSRMLS_CC)) {
+ if (SUCCESS == php_output_handler_start(handler)) {
return SUCCESS;
}
- php_output_handler_free(&handler TSRMLS_CC);
+ php_output_handler_free(&handler);
return FAILURE;
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_start_internal(zval *name, php_output_handler_func_t handler, size_t chunk_size, int flags TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_start_internal(zval *name, php_output_handler_func_t handler, size_t chunk_size, int flags)
* Start an internal output handler that does not have to maintain a non-global state */
-PHPAPI int php_output_start_internal(const char *name, size_t name_len, php_output_handler_func_t output_handler, size_t chunk_size, int flags TSRMLS_DC)
+PHPAPI int php_output_start_internal(const char *name, size_t name_len, php_output_handler_func_t output_handler, size_t chunk_size, int flags)
{
php_output_handler *handler;
- handler = php_output_handler_create_internal(name, name_len, php_output_handler_compat_func, chunk_size, flags TSRMLS_CC);
- php_output_handler_set_context(handler, output_handler, NULL TSRMLS_CC);
- if (SUCCESS == php_output_handler_start(handler TSRMLS_CC)) {
+ handler = php_output_handler_create_internal(name, name_len, php_output_handler_compat_func, chunk_size, flags);
+ php_output_handler_set_context(handler, output_handler, NULL);
+ if (SUCCESS == php_output_handler_start(handler)) {
return SUCCESS;
}
- php_output_handler_free(&handler TSRMLS_CC);
+ php_output_handler_free(&handler);
return FAILURE;
}
/* }}} */
-/* {{{ php_output_handler *php_output_handler_create_user(zval *handler, size_t chunk_size, int flags TSRMLS_DC)
+/* {{{ php_output_handler *php_output_handler_create_user(zval *handler, size_t chunk_size, int flags)
* Create a user level output handler */
-PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler, size_t chunk_size, int flags TSRMLS_DC)
+PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler, size_t chunk_size, int flags)
{
zend_string *handler_name = NULL;
char *error = NULL;
@@ -485,24 +485,24 @@ PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler,
switch (Z_TYPE_P(output_handler)) {
case IS_NULL:
- handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, chunk_size, flags TSRMLS_CC);
+ handler = php_output_handler_create_internal(ZEND_STRL(php_output_default_handler_name), php_output_handler_default_func, chunk_size, flags);
break;
case IS_STRING:
- if (Z_STRLEN_P(output_handler) && (alias = php_output_handler_alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler) TSRMLS_CC))) {
- handler = alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler), chunk_size, flags TSRMLS_CC);
+ if (Z_STRLEN_P(output_handler) && (alias = php_output_handler_alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler)))) {
+ handler = alias(Z_STRVAL_P(output_handler), Z_STRLEN_P(output_handler), chunk_size, flags);
break;
}
default:
user = ecalloc(1, sizeof(php_output_handler_user_func_t));
- if (SUCCESS == zend_fcall_info_init(output_handler, 0, &user->fci, &user->fcc, &handler_name, &error TSRMLS_CC)) {
- handler = php_output_handler_init(handler_name, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_USER TSRMLS_CC);
+ if (SUCCESS == zend_fcall_info_init(output_handler, 0, &user->fci, &user->fcc, &handler_name, &error)) {
+ handler = php_output_handler_init(handler_name, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_USER);
ZVAL_COPY(&user->zoh, output_handler);
handler->func.user = user;
} else {
efree(user);
}
if (error) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "%s", error);
+ php_error_docref("ref.outcontrol", E_WARNING, "%s", error);
efree(error);
}
if (handler_name) {
@@ -514,14 +514,14 @@ PHPAPI php_output_handler *php_output_handler_create_user(zval *output_handler,
}
/* }}} */
-/* {{{ php_output_handler *php_output_handler_create_internal(zval *name, php_output_handler_context_func_t handler, size_t chunk_size, int flags TSRMLS_DC)
+/* {{{ php_output_handler *php_output_handler_create_internal(zval *name, php_output_handler_context_func_t handler, size_t chunk_size, int flags)
* Create an internal output handler that can maintain a non-global state */
-PHPAPI php_output_handler *php_output_handler_create_internal(const char *name, size_t name_len, php_output_handler_context_func_t output_handler, size_t chunk_size, int flags TSRMLS_DC)
+PHPAPI php_output_handler *php_output_handler_create_internal(const char *name, size_t name_len, php_output_handler_context_func_t output_handler, size_t chunk_size, int flags)
{
php_output_handler *handler;
zend_string *str = zend_string_init(name, name_len, 1);
- handler = php_output_handler_init(str, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_INTERNAL TSRMLS_CC);
+ handler = php_output_handler_init(str, chunk_size, (flags & ~0xf) | PHP_OUTPUT_HANDLER_INTERNAL);
handler->func.internal = output_handler;
zend_string_release(str);
@@ -529,31 +529,31 @@ PHPAPI php_output_handler *php_output_handler_create_internal(const char *name,
}
/* }}} */
-/* {{{ void php_output_handler_set_context(php_output_handler *handler, void *opaq, void (*dtor)(void* TSRMLS_DC) TSRMLS_DC)
+/* {{{ void php_output_handler_set_context(php_output_handler *handler, void *opaq, void (*dtor)(void*))
* Set the context/state of an output handler. Calls the dtor of the previous context if there is one */
-PHPAPI void php_output_handler_set_context(php_output_handler *handler, void *opaq, void (*dtor)(void* TSRMLS_DC) TSRMLS_DC)
+PHPAPI void php_output_handler_set_context(php_output_handler *handler, void *opaq, void (*dtor)(void*))
{
if (handler->dtor && handler->opaq) {
- handler->dtor(handler->opaq TSRMLS_CC);
+ handler->dtor(handler->opaq);
}
handler->dtor = dtor;
handler->opaq = opaq;
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_start(php_output_handler *handler TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_handler_start(php_output_handler *handler)
* Starts the set up output handler and pushes it on top of the stack. Checks for any conflicts regarding the output handler to start */
-PHPAPI int php_output_handler_start(php_output_handler *handler TSRMLS_DC)
+PHPAPI int php_output_handler_start(php_output_handler *handler)
{
HashPosition pos;
HashTable *rconflicts;
php_output_handler_conflict_check_t conflict;
- if (php_output_lock_error(PHP_OUTPUT_HANDLER_START TSRMLS_CC) || !handler) {
+ if (php_output_lock_error(PHP_OUTPUT_HANDLER_START) || !handler) {
return FAILURE;
}
if (NULL != (conflict = zend_hash_find_ptr(&php_output_handler_conflicts, handler->name))) {
- if (SUCCESS != conflict(handler->name->val, handler->name->len TSRMLS_CC)) {
+ if (SUCCESS != conflict(handler->name->val, handler->name->len)) {
return FAILURE;
}
}
@@ -562,7 +562,7 @@ PHPAPI int php_output_handler_start(php_output_handler *handler TSRMLS_DC)
(conflict = zend_hash_get_current_data_ptr_ex(rconflicts, &pos)) != NULL;
zend_hash_move_forward_ex(rconflicts, &pos)
) {
- if (SUCCESS != conflict(handler->name->val, handler->name->len TSRMLS_CC)) {
+ if (SUCCESS != conflict(handler->name->val, handler->name->len)) {
return FAILURE;
}
}
@@ -574,12 +574,12 @@ PHPAPI int php_output_handler_start(php_output_handler *handler TSRMLS_DC)
}
/* }}} */
-/* {{{ int php_output_handler_started(zval *name TSRMLS_DC)
+/* {{{ int php_output_handler_started(zval *name)
* Check whether a certain output handler is in use */
-PHPAPI int php_output_handler_started(const char *name, size_t name_len TSRMLS_DC)
+PHPAPI int php_output_handler_started(const char *name, size_t name_len)
{
php_output_handler **handlers;
- int i, count = php_output_get_level(TSRMLS_C);
+ int i, count = php_output_get_level();
if (count) {
handlers = (php_output_handler **) zend_stack_base(&OG(handlers));
@@ -595,15 +595,15 @@ PHPAPI int php_output_handler_started(const char *name, size_t name_len TSRMLS_D
}
/* }}} */
-/* {{{ int php_output_handler_conflict(zval *handler_new, zval *handler_old TSRMLS_DC)
+/* {{{ int php_output_handler_conflict(zval *handler_new, zval *handler_old)
* Check whether a certain handler is in use and issue a warning that the new handler would conflict with the already used one */
-PHPAPI int php_output_handler_conflict(const char *handler_new, size_t handler_new_len, const char *handler_set, size_t handler_set_len TSRMLS_DC)
+PHPAPI int php_output_handler_conflict(const char *handler_new, size_t handler_new_len, const char *handler_set, size_t handler_set_len)
{
- if (php_output_handler_started(handler_set, handler_set_len TSRMLS_CC)) {
+ if (php_output_handler_started(handler_set, handler_set_len)) {
if (handler_new_len != handler_set_len || memcmp(handler_new, handler_set, handler_set_len)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "output handler '%s' conflicts with '%s'", handler_new, handler_set);
+ php_error_docref("ref.outcontrol", E_WARNING, "output handler '%s' conflicts with '%s'", handler_new, handler_set);
} else {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_WARNING, "output handler '%s' cannot be used twice", handler_new);
+ php_error_docref("ref.outcontrol", E_WARNING, "output handler '%s' cannot be used twice", handler_new);
}
return 1;
}
@@ -611,9 +611,9 @@ PHPAPI int php_output_handler_conflict(const char *handler_new, size_t handler_n
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_conflict_register(zval *name, php_output_handler_conflict_check_t check_func TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_handler_conflict_register(zval *name, php_output_handler_conflict_check_t check_func)
* Register a conflict checking function on MINIT */
-PHPAPI int php_output_handler_conflict_register(const char *name, size_t name_len, php_output_handler_conflict_check_t check_func TSRMLS_DC)
+PHPAPI int php_output_handler_conflict_register(const char *name, size_t name_len, php_output_handler_conflict_check_t check_func)
{
if (!EG(current_module)) {
zend_error(E_ERROR, "Cannot register an output handler conflict outside of MINIT");
@@ -623,9 +623,9 @@ PHPAPI int php_output_handler_conflict_register(const char *name, size_t name_le
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_reverse_conflict_register(zval *name, php_output_handler_conflict_check_t check_func TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_handler_reverse_conflict_register(zval *name, php_output_handler_conflict_check_t check_func)
* Register a reverse conflict checking function on MINIT */
-PHPAPI int php_output_handler_reverse_conflict_register(const char *name, size_t name_len, php_output_handler_conflict_check_t check_func TSRMLS_DC)
+PHPAPI int php_output_handler_reverse_conflict_register(const char *name, size_t name_len, php_output_handler_conflict_check_t check_func)
{
HashTable rev, *rev_ptr = NULL;
@@ -651,17 +651,17 @@ PHPAPI int php_output_handler_reverse_conflict_register(const char *name, size_t
}
/* }}} */
-/* {{{ php_output_handler_alias_ctor_t php_output_handler_alias(zval *name TSRMLS_DC)
+/* {{{ php_output_handler_alias_ctor_t php_output_handler_alias(zval *name)
* Get an internal output handler for a user handler if it exists */
-PHPAPI php_output_handler_alias_ctor_t php_output_handler_alias(const char *name, size_t name_len TSRMLS_DC)
+PHPAPI php_output_handler_alias_ctor_t php_output_handler_alias(const char *name, size_t name_len)
{
return zend_hash_str_find_ptr(&php_output_handler_aliases, name, name_len);
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_alias_register(zval *name, php_output_handler_alias_ctor_t func TSRMLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_handler_alias_register(zval *name, php_output_handler_alias_ctor_t func)
* Registers an internal output handler as alias for a user handler */
-PHPAPI int php_output_handler_alias_register(const char *name, size_t name_len, php_output_handler_alias_ctor_t func TSRMLS_DC)
+PHPAPI int php_output_handler_alias_register(const char *name, size_t name_len, php_output_handler_alias_ctor_t func)
{
if (!EG(current_module)) {
zend_error(E_ERROR, "Cannot register an output handler alias outside of MINIT");
@@ -673,7 +673,7 @@ PHPAPI int php_output_handler_alias_register(const char *name, size_t name_len,
/* {{{ SUCCESS|FAILURE php_output_handler_hook(php_output_handler_hook_t type, void *arg TSMRLS_DC)
* Output handler hook for output handler functions to check/modify the current handlers abilities */
-PHPAPI int php_output_handler_hook(php_output_handler_hook_t type, void *arg TSRMLS_DC)
+PHPAPI int php_output_handler_hook(php_output_handler_hook_t type, void *arg)
{
if (OG(running)) {
switch (type) {
@@ -700,9 +700,9 @@ PHPAPI int php_output_handler_hook(php_output_handler_hook_t type, void *arg TSR
}
/* }}} */
-/* {{{ void php_output_handler_dtor(php_output_handler *handler TSRMLS_DC)
+/* {{{ void php_output_handler_dtor(php_output_handler *handler)
* Destroy an output handler */
-PHPAPI void php_output_handler_dtor(php_output_handler *handler TSRMLS_DC)
+PHPAPI void php_output_handler_dtor(php_output_handler *handler)
{
if (handler->name) {
zend_string_release(handler->name);
@@ -715,7 +715,7 @@ PHPAPI void php_output_handler_dtor(php_output_handler *handler TSRMLS_DC)
efree(handler->func.user);
}
if (handler->dtor && handler->opaq) {
- handler->dtor(handler->opaq TSRMLS_CC);
+ handler->dtor(handler->opaq);
}
memset(handler, 0, sizeof(*handler));
}
@@ -723,19 +723,19 @@ PHPAPI void php_output_handler_dtor(php_output_handler *handler TSRMLS_DC)
/* {{{ void php_output_handler_free(php_output_handler **handler TSMRLS_DC)
* Destroy and free an output handler */
-PHPAPI void php_output_handler_free(php_output_handler **h TSRMLS_DC)
+PHPAPI void php_output_handler_free(php_output_handler **h)
{
if (*h) {
- php_output_handler_dtor(*h TSRMLS_CC);
+ php_output_handler_dtor(*h);
efree(*h);
*h = NULL;
}
}
/* }}} */
-/* void php_output_set_implicit_flush(int enabled TSRMLS_DC)
+/* void php_output_set_implicit_flush(int enabled)
* Enable or disable implicit flush */
-PHPAPI void php_output_set_implicit_flush(int flush TSRMLS_DC)
+PHPAPI void php_output_set_implicit_flush(int flush)
{
if (flush) {
OG(flags) |= PHP_OUTPUT_IMPLICITFLUSH;
@@ -745,40 +745,40 @@ PHPAPI void php_output_set_implicit_flush(int flush TSRMLS_DC)
}
/* }}} */
-/* {{{ char *php_output_get_start_filename(TSRMLS_D)
+/* {{{ char *php_output_get_start_filename(void)
* Get the file name where output has started */
-PHPAPI const char *php_output_get_start_filename(TSRMLS_D)
+PHPAPI const char *php_output_get_start_filename(void)
{
return OG(output_start_filename);
}
/* }}} */
-/* {{{ int php_output_get_start_lineno(TSRMLS_D)
+/* {{{ int php_output_get_start_lineno(void)
* Get the line number where output has started */
-PHPAPI int php_output_get_start_lineno(TSRMLS_D)
+PHPAPI int php_output_get_start_lineno(void)
{
return OG(output_start_lineno);
}
/* }}} */
-/* {{{ static int php_output_lock_error(int op TSRMLS_DC)
+/* {{{ static int php_output_lock_error(int op)
* Checks whether an unallowed operation is attempted from within the output handler and issues a fatal error */
-static inline int php_output_lock_error(int op TSRMLS_DC)
+static inline int php_output_lock_error(int op)
{
/* if there's no ob active, ob has been stopped */
if (op && OG(active) && OG(running)) {
/* fatal error */
- php_output_deactivate(TSRMLS_C);
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_ERROR, "Cannot use output buffering in output buffering display handlers");
+ php_output_deactivate();
+ php_error_docref("ref.outcontrol", E_ERROR, "Cannot use output buffering in output buffering display handlers");
return 1;
}
return 0;
}
/* }}} */
-/* {{{ static php_output_context *php_output_context_init(php_output_context *context, int op TSRMLS_DC)
+/* {{{ static php_output_context *php_output_context_init(php_output_context *context, int op)
* Initialize a new output context */
-static inline php_output_context *php_output_context_init(php_output_context *context, int op TSRMLS_DC)
+static inline php_output_context *php_output_context_init(php_output_context *context, int op)
{
if (!context) {
context = emalloc(sizeof(php_output_context));
@@ -864,9 +864,9 @@ static inline void php_output_context_dtor(php_output_context *context)
}
/* }}} */
-/* {{{ static php_output_handler *php_output_handler_init(zval *name, size_t chunk_size, int flags TSRMLS_DC)
+/* {{{ static php_output_handler *php_output_handler_init(zval *name, size_t chunk_size, int flags)
* Allocates and initializes a php_output_handler structure */
-static inline php_output_handler *php_output_handler_init(zend_string *name, size_t chunk_size, int flags TSRMLS_DC)
+static inline php_output_handler *php_output_handler_init(zend_string *name, size_t chunk_size, int flags)
{
php_output_handler *handler;
@@ -881,9 +881,9 @@ static inline php_output_handler *php_output_handler_init(zend_string *name, siz
}
/* }}} */
-/* {{{ static int php_output_handler_appen(php_output_handler *handler, const php_output_buffer *buf TSRMLS_DC)
+/* {{{ static int php_output_handler_appen(php_output_handler *handler, const php_output_buffer *buf)
* Appends input to the output handlers buffer and indicates whether the buffer does not have to be processed by the output handler */
-static inline int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf TSRMLS_DC)
+static inline int php_output_handler_append(php_output_handler *handler, const php_output_buffer *buf)
{
if (buf->used) {
OG(flags) |= PHP_OUTPUT_WRITTEN;
@@ -939,13 +939,13 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
);
#endif
- if (php_output_lock_error(context->op TSRMLS_CC)) {
+ if (php_output_lock_error(context->op)) {
/* fatal error */
return PHP_OUTPUT_HANDLER_FAILURE;
}
/* storable? */
- if (php_output_handler_append(handler, &context->in TSRMLS_CC) && !context->op) {
+ if (php_output_handler_append(handler, &context->in) && !context->op) {
context->op = original_op;
return PHP_OUTPUT_HANDLER_NO_DATA;
} else {
@@ -960,11 +960,11 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
ZVAL_STRINGL(&ob_data, handler->buffer.data, handler->buffer.used);
ZVAL_LONG(&ob_mode, (zend_long) context->op);
- zend_fcall_info_argn(&handler->func.user->fci TSRMLS_CC, 2, &ob_data, &ob_mode);
+ zend_fcall_info_argn(&handler->func.user->fci, 2, &ob_data, &ob_mode);
zval_ptr_dtor(&ob_data);
#define PHP_OUTPUT_USER_SUCCESS(retval) ((Z_TYPE(retval) != IS_UNDEF) && !(Z_TYPE(retval) == IS_FALSE))
- if (SUCCESS == zend_fcall_info_call(&handler->func.user->fci, &handler->func.user->fcc, &retval, NULL TSRMLS_CC) && PHP_OUTPUT_USER_SUCCESS(retval)) {
+ if (SUCCESS == zend_fcall_info_call(&handler->func.user->fci, &handler->func.user->fcc, &retval, NULL) && PHP_OUTPUT_USER_SUCCESS(retval)) {
/* user handler may have returned TRUE */
status = PHP_OUTPUT_HANDLER_NO_DATA;
if (Z_TYPE(retval) != IS_FALSE && Z_TYPE(retval) != IS_TRUE) {
@@ -981,7 +981,7 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
status = PHP_OUTPUT_HANDLER_FAILURE;
}
- zend_fcall_info_argn(&handler->func.user->fci TSRMLS_CC, 0);
+ zend_fcall_info_argn(&handler->func.user->fci, 0);
zval_ptr_dtor(&retval);
} else {
@@ -1035,19 +1035,19 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
/* }}} */
-/* {{{ static void php_output_op(int op, const char *str, size_t len TSRMLS_DC)
+/* {{{ static void php_output_op(int op, const char *str, size_t len)
* Output op dispatcher, passes input and output handlers output through the output handler stack until it gets written to the SAPI */
-static inline void php_output_op(int op, const char *str, size_t len TSRMLS_DC)
+static inline void php_output_op(int op, const char *str, size_t len)
{
php_output_context context;
php_output_handler **active;
int obh_cnt;
- if (php_output_lock_error(op TSRMLS_CC)) {
+ if (php_output_lock_error(op)) {
return;
}
- php_output_context_init(&context, op TSRMLS_CC);
+ php_output_context_init(&context, op);
/*
* broken up for better performance:
@@ -1071,16 +1071,16 @@ static inline void php_output_op(int op, const char *str, size_t len TSRMLS_DC)
}
if (context.out.data && context.out.used) {
- php_output_header(TSRMLS_C);
+ php_output_header();
if (!(OG(flags) & PHP_OUTPUT_DISABLED)) {
#if PHP_OUTPUT_DEBUG
fprintf(stderr, "::: sapi_write('%s', %zu)\n", context.out.data, context.out.used);
#endif
- sapi_module.ub_write(context.out.data, context.out.used TSRMLS_CC);
+ sapi_module.ub_write(context.out.data, context.out.used);
if (OG(flags) & PHP_OUTPUT_IMPLICITFLUSH) {
- sapi_flush(TSRMLS_C);
+ sapi_flush();
}
OG(flags) |= PHP_OUTPUT_SENT;
@@ -1195,25 +1195,25 @@ static inline zval *php_output_handler_status(php_output_handler *handler, zval
}
/* }}} */
-/* {{{ static int php_output_stack_pop(int flags TSRMLS_DC)
+/* {{{ static int php_output_stack_pop(int flags)
* Pops an output handler off the stack */
-static inline int php_output_stack_pop(int flags TSRMLS_DC)
+static inline int php_output_stack_pop(int flags)
{
php_output_context context;
php_output_handler **current, *orphan = OG(active);
if (!orphan) {
if (!(flags & PHP_OUTPUT_POP_SILENT)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to %s buffer. No buffer to %s", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send");
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to %s buffer. No buffer to %s", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send");
}
return 0;
} else if (!(flags & PHP_OUTPUT_POP_FORCE) && !(orphan->flags & PHP_OUTPUT_HANDLER_REMOVABLE)) {
if (!(flags & PHP_OUTPUT_POP_SILENT)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to %s buffer of %s (%d)", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send", orphan->name->val, orphan->level);
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to %s buffer of %s (%d)", (flags&PHP_OUTPUT_POP_DISCARD)?"discard":"send", orphan->name->val, orphan->level);
}
return 0;
} else {
- php_output_context_init(&context, PHP_OUTPUT_HANDLER_FINAL TSRMLS_CC);
+ php_output_context_init(&context, PHP_OUTPUT_HANDLER_FINAL);
/* don't run the output handler if it's disabled */
if (!(orphan->flags & PHP_OUTPUT_HANDLER_DISABLED)) {
@@ -1238,11 +1238,11 @@ static inline int php_output_stack_pop(int flags TSRMLS_DC)
/* pass output along */
if (context.out.data && context.out.used && !(flags & PHP_OUTPUT_POP_DISCARD)) {
- php_output_write(context.out.data, context.out.used TSRMLS_CC);
+ php_output_write(context.out.data, context.out.used);
}
/* destroy the handler (after write!) */
- php_output_handler_free(&orphan TSRMLS_CC);
+ php_output_handler_free(&orphan);
php_output_context_dtor(&context);
return 1;
@@ -1261,7 +1261,7 @@ static int php_output_handler_compat_func(void **handler_context, php_output_con
char *out_str = NULL;
size_t out_len = 0;
- func(output_context->in.data, output_context->in.used, &out_str, &out_len, output_context->op TSRMLS_CC);
+ func(output_context->in.data, output_context->in.used, &out_str, &out_len, output_context->op);
if (out_str) {
output_context->out.data = out_str;
@@ -1306,7 +1306,7 @@ PHP_FUNCTION(ob_start)
zend_long chunk_size = 0;
zend_long flags = PHP_OUTPUT_HANDLER_STDFLAGS;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z/ll", &output_handler, &chunk_size, &flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z/ll", &output_handler, &chunk_size, &flags) == FAILURE) {
return;
}
@@ -1314,8 +1314,8 @@ PHP_FUNCTION(ob_start)
chunk_size = 0;
}
- if (php_output_start_user(output_handler, chunk_size, flags TSRMLS_CC) == FAILURE) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to create buffer");
+ if (php_output_start_user(output_handler, chunk_size, flags) == FAILURE) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to create buffer");
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1331,12 +1331,12 @@ PHP_FUNCTION(ob_flush)
}
if (!OG(active)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer. No buffer to flush");
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to flush buffer. No buffer to flush");
RETURN_FALSE;
}
- if (SUCCESS != php_output_flush(TSRMLS_C)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
+ if (SUCCESS != php_output_flush()) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to flush buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1352,12 +1352,12 @@ PHP_FUNCTION(ob_clean)
}
if (!OG(active)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer. No buffer to delete");
RETURN_FALSE;
}
- if (SUCCESS != php_output_clean(TSRMLS_C)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
+ if (SUCCESS != php_output_clean()) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1373,11 +1373,11 @@ PHP_FUNCTION(ob_end_flush)
}
if (!OG(active)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
RETURN_FALSE;
}
- RETURN_BOOL(SUCCESS == php_output_end(TSRMLS_C));
+ RETURN_BOOL(SUCCESS == php_output_end());
}
/* }}} */
@@ -1390,11 +1390,11 @@ PHP_FUNCTION(ob_end_clean)
}
if (!OG(active)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer. No buffer to delete");
RETURN_FALSE;
}
- RETURN_BOOL(SUCCESS == php_output_discard(TSRMLS_C));
+ RETURN_BOOL(SUCCESS == php_output_discard());
}
/* }}} */
@@ -1406,13 +1406,13 @@ PHP_FUNCTION(ob_get_flush)
return;
}
- if (php_output_get_contents(return_value TSRMLS_CC) == FAILURE) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
+ if (php_output_get_contents(return_value) == FAILURE) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
RETURN_FALSE;
}
- if (SUCCESS != php_output_end(TSRMLS_C)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
+ if (SUCCESS != php_output_end()) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
}
}
/* }}} */
@@ -1429,13 +1429,13 @@ PHP_FUNCTION(ob_get_clean)
RETURN_FALSE;
}
- if (php_output_get_contents(return_value TSRMLS_CC) == FAILURE) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
+ if (php_output_get_contents(return_value) == FAILURE) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer. No buffer to delete");
RETURN_FALSE;
}
- if (SUCCESS != php_output_discard(TSRMLS_C)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
+ if (SUCCESS != php_output_discard()) {
+ php_error_docref("ref.outcontrol", E_NOTICE, "failed to delete buffer of %s (%d)", OG(active)->name->val, OG(active)->level);
}
}
/* }}} */
@@ -1448,7 +1448,7 @@ PHP_FUNCTION(ob_get_contents)
return;
}
- if (php_output_get_contents(return_value TSRMLS_CC) == FAILURE) {
+ if (php_output_get_contents(return_value) == FAILURE) {
RETURN_FALSE;
}
}
@@ -1462,7 +1462,7 @@ PHP_FUNCTION(ob_get_level)
return;
}
- RETURN_LONG(php_output_get_level(TSRMLS_C));
+ RETURN_LONG(php_output_get_level());
}
/* }}} */
@@ -1474,7 +1474,7 @@ PHP_FUNCTION(ob_get_length)
return;
}
- if (php_output_get_length(return_value TSRMLS_CC) == FAILURE) {
+ if (php_output_get_length(return_value) == FAILURE) {
RETURN_FALSE;
}
}
@@ -1504,7 +1504,7 @@ PHP_FUNCTION(ob_get_status)
{
zend_bool full_status = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &full_status) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_status) == FAILURE) {
return;
}
@@ -1528,11 +1528,11 @@ PHP_FUNCTION(ob_implicit_flush)
{
zend_long flag = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flag) == FAILURE) {
return;
}
- php_output_set_implicit_flush(flag TSRMLS_CC);
+ php_output_set_implicit_flush(flag);
}
/* }}} */
@@ -1540,7 +1540,7 @@ PHP_FUNCTION(ob_implicit_flush)
Reset(clear) URL rewriter values */
PHP_FUNCTION(output_reset_rewrite_vars)
{
- if (php_url_scanner_reset_vars(TSRMLS_C) == SUCCESS) {
+ if (php_url_scanner_reset_vars() == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1555,11 +1555,11 @@ PHP_FUNCTION(output_add_rewrite_var)
char *name, *value;
size_t name_len, value_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &value, &value_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
- if (php_url_scanner_add_var(name, name_len, value, value_len, 1 TSRMLS_CC) == SUCCESS) {
+ if (php_url_scanner_add_var(name, name_len, value, value_len, 1) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;