summaryrefslogtreecommitdiff
path: root/main/php_output.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-06-24 13:27:34 +0000
committerZeev Suraski <zeev@php.net>2000-06-24 13:27:34 +0000
commitd1a6a646752cfe93382e16dc2308808d25c055ee (patch)
tree840f858c6bd8b8c5533a383441fb68b2d76d8bee /main/php_output.h
parentee5e330bcf6758759d23c8c8fb63c05166e25be0 (diff)
downloadphp-git-d1a6a646752cfe93382e16dc2308808d25c055ee.tar.gz
- Make the output globals accessible from the outside world
- Fix Win32 compilation
Diffstat (limited to 'main/php_output.h')
-rw-r--r--main/php_output.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/php_output.h b/main/php_output.h
index 957116ca41..1b747e7641 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -41,4 +41,32 @@ PHP_FUNCTION(ob_implicit_flush);
PHP_GINIT_FUNCTION(output);
+typedef struct {
+ int (*php_body_write)(const char *str, uint str_length); /* string output */
+ int (*php_header_write)(const char *str, uint str_length); /* unbuffer string output */
+ char *ob_buffer;
+ uint ob_size;
+ uint ob_block_size;
+ uint ob_text_length;
+ unsigned char implicit_flush;
+ char *output_start_filename;
+ int output_start_lineno;
+} php_output_globals;
+
+
+#ifdef ZTS
+#define OLS_D php_output_globals *output_globals
+#define OLS_C output_globals
+#define OG(v) (output_globals->v)
+#define OLS_FETCH() php_output_globals *output_globals = ts_resource(output_globals_id)
+ZEND_API extern int output_globals_id;
+#else
+#define OLS_D void
+#define OLS_C
+#define OG(v) (output_globals.v)
+#define OLS_FETCH()
+ZEND_API extern php_output_globals output_globals;
+#endif
+
+
#endif /* _OUTPUT_BUFFER */