Commit Graph

83 Commits

Author SHA1 Message Date
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
ebaa6a74a5 force more static tsrmls cache usage 2014-10-07 09:09:46 +02:00
Anatol Belski
f790036711 some cleanups for TSRMLS_FETCH and direct tsrm_ls usage in main 2014-09-26 11:06:58 +02:00
Anatol Belski
d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
67beaebaa8 reduce the struct size by 8 byte on x64 2014-09-12 23:08:09 +02:00
Dmitry Stogov
9fea4348fd cleanup 2014-08-13 16:55:21 +04:00
Xinchen Hui
c2933c234c Fixed invalid pointer usage (tests/output/ob_start_callbacks.phpt) 2014-03-07 16:49:01 +08:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Michael Wallner
0ad53bfd7d fix bug #60761 zlib.output_compression fails on refresh 2012-05-15 09:33:47 +02:00
Michael Wallner
bfccc4ed58 fix crash with display_startup_errors=1 2012-01-25 17:22:46 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Michael Wallner
ecfb3af78f follow naming convention 2011-12-30 09:20:07 +00:00
Dmitry Stogov
f7942c9e63 Added an API call to return active output handler 2011-12-30 08:50:49 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Andrey Hristov
0048446fdd gcc barks about these, so clean it 2011-01-14 12:32:27 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Dmitry Stogov
caffc1c972 Preallocate zend_hash instead of allocation/deallocation it on each request 2010-08-27 06:09:18 +00:00
Michael Wallner
99da695ec9 fix cxx build 2010-06-02 12:49:12 +00:00
Michael Wallner
11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00
Jani Taskinen
af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen
06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Marcus Boerger
97b5bb474e Guard display_startup_errors with checking for default (working) output
functions.
2004-03-14 23:56:07 +00:00
Hartmut Holzgraefe
b8f7d9f9f5 wrap all PHPAPI prototypes into BEGIN_EXTERN_C/END_EXTERN_C blocks
(else they won't be usable from C++ extensions)
2004-02-20 08:04:30 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Zeev Suraski
de36720e0e Begin the cleanup - remove ob_flush_all() 2002-10-06 09:06:24 +00:00
Yasuo Ohgaki
66a50c5373 Added ob_flush_all() that flushes bufferred contents until it actually
sent/printed.
@ Added ob_flush_all() that flushes all buffers. (Yasuo)
2002-10-03 07:17:14 +00:00
Yasuo Ohgaki
22bf29384e Move wrong output buffer usage check to ob_gzhandler init.
Export some output buffer functions.
2002-10-03 03:58:12 +00:00
Yasuo Ohgaki
bd177ce7c1 Added ob_get_clean() and ob_get_flush().
Someone requested this feature before.
@ Added ob_get_clean() and og_get_flush(). (Yasuo)
2002-10-03 01:36:44 +00:00
Sebastian Bergmann
714c19fe66 Per discussion on #php.bugs (+1 from at least Derick and Jani), revert double_buffering. 2002-09-01 11:33:19 +00:00
Marcus Boerger
5e7a9af062 full decopling of size parameters of ob_start() and internal buffer handlers
#intended behaviour is now fully implemented,
2002-08-21 03:04:17 +00:00
Marcus Boerger
2a443b2e77 Changed handling of output buffer sizes.
@Added php.ini option "double_buffering" that forces an additional first
@output buffer and improved handling of buffer sizes. (Marcus)
2002-08-20 19:49:37 +00:00
Marcus Boerger
9c8ba935d6 Improved handling of output buffers (see news)\n#No trim for the string parameter... 2002-08-09 22:29:58 +00:00
Marcus Boerger
6d21c9465d Added php_ob_handler_used to check if a specific output handler is used
in c.
2002-08-05 18:54:53 +00:00
Marcus Boerger
fd26a5c0a9 -New function ob_list_handlers
@- Added ob_list_handlers() which returns an array of all active output
@  handlers. (marcus)
2002-08-05 03:09:42 +00:00
Sascha Schumann
9743860d35 simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each
URL/form.

also fix an unconditional segfault in rshutdown due to efree'ing
a static char *.

remove remove_var, add reset_vars.  move the function declarations
into the right header file.
2002-05-04 18:33:13 +00:00
Yasuo Ohgaki
82a8d372e5 Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)

Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.

php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.

Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.

Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.

@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@   buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@   deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@   functions return TRUE for success, FALSE for failure. (Yasuo)
2002-03-01 03:05:50 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00