Skip to content

Commit d694e43

Browse files
committed
Remove unused global
1 parent 808029c commit d694e43

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

main/output.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,20 @@ static size_t (*php_output_direct)(const char *str, size_t str_len) = php_output
103103
static void php_output_header(void)
104104
{
105105
if (!SG(headers_sent)) {
106-
if (!OG(output_start_filename_str)) {
106+
if (!OG(output_start_filename)) {
107107
if (zend_is_compiling()) {
108-
OG(output_start_filename_str) = zend_get_compiled_filename();
108+
OG(output_start_filename) = zend_get_compiled_filename();
109109
OG(output_start_lineno) = zend_get_compiled_lineno();
110110
} else if (zend_is_executing()) {
111-
OG(output_start_filename_str) = zend_get_executed_filename_ex();
111+
OG(output_start_filename) = zend_get_executed_filename_ex();
112112
OG(output_start_lineno) = zend_get_executed_lineno();
113113
}
114-
if (OG(output_start_filename_str)) {
115-
zend_string_addref(OG(output_start_filename_str));
114+
if (OG(output_start_filename)) {
115+
zend_string_addref(OG(output_start_filename));
116116
}
117117
#if PHP_OUTPUT_DEBUG
118118
fprintf(stderr, "!!! output started at: %s (%d)\n",
119-
ZSTR_VAL(OG(output_start_filename_str)), OG(output_start_lineno));
119+
ZSTR_VAL(OG(output_start_filename)), OG(output_start_lineno));
120120
#endif
121121
}
122122
if (!php_header()) {
@@ -195,9 +195,9 @@ PHPAPI void php_output_deactivate(void)
195195
zend_stack_destroy(&OG(handlers));
196196
}
197197

198-
if (OG(output_start_filename_str)) {
199-
zend_string_release(OG(output_start_filename_str));
200-
OG(output_start_filename_str) = NULL;
198+
if (OG(output_start_filename)) {
199+
zend_string_release(OG(output_start_filename));
200+
OG(output_start_filename) = NULL;
201201
}
202202
}
203203
/* }}} */
@@ -758,7 +758,7 @@ PHPAPI void php_output_set_implicit_flush(int flush)
758758
* Get the file name where output has started */
759759
PHPAPI const char *php_output_get_start_filename(void)
760760
{
761-
return ZSTR_VAL(OG(output_start_filename_str));
761+
return ZSTR_VAL(OG(output_start_filename));
762762
}
763763
/* }}} */
764764

main/php_output.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ ZEND_BEGIN_MODULE_GLOBALS(output)
137137
zend_stack handlers;
138138
php_output_handler *active;
139139
php_output_handler *running;
140-
const char *output_start_filename; /* TODO: Unused, remove */
140+
zend_string *output_start_filename;
141141
int output_start_lineno;
142142
int flags;
143-
zend_string *output_start_filename_str;
144143
ZEND_END_MODULE_GLOBALS(output)
145144

146145
PHPAPI ZEND_EXTERN_MODULE_GLOBALS(output)

0 commit comments

Comments
 (0)