Re: cvs: php4 /main streams.c
| From: | Zeev Suraski | Date: | Sun, 26 Aug 2001 12:15:33 +0000 |
| Subject: | Re: cvs: php4 /main streams.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-7082@lists.php.net to get a copy of this message | ||
Yeah. CLS_FETCH, ELS_FETCH and all of the other *LS macros were replaced by TSRMLS* macros for improved performance and simplicity.
Zeev
At 13:05 26-08-01, Markus Fischer wrote:
Is TSRMLS_FETCH the successor of CLS_FETCH()? - Markus On Sun, Aug 26, 2001 at 12:39:49PM +0300, Zeev Suraski wrote : The thread safety macros pass around a context that the rest of the thread safety macros use. There are three types of such macros: 1. Macros that are used in function declarations, to denote that the function accepts this context as an argument:-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/TSRMLS_D - if it's the only argument (Thread Safe Resource ManagerLocal Storage, Declaration)TSRMLS_DC - if it's not the only argument (Thread Safe ResourceManager Local Storage, Declaration with Comma) 2. Macros that are used in function calls, to pass the context to functions that accept it:TSRMLS_C - if it's the only argument (Thread Safe Resource ManagerLocal Storage, Call)TSRMLS_CC - if it's not the only argument (Thread Safe ResourceManager Local Storage, Call with Comma) 3. If the context cannot be passed using function arguments (e.g., in certain callbacks), it can be obtained by calling TSRMLS_FETCH() at the end of the variable declarations (Thread Safe Resource Manager Local Storage Fetch) For performance reasons, using 1+2 is usually preferred to using 3. Zeev At 12:07 26-08-01, Joey Smith wrote:I really don't understand the thread-safety stuff, but shouldn't this also be using TSRMLS_CC instead of TSRMLS_FETCH()?-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Markus Fischer, http://guru.josefine.at/~mfischer/PHP_STREAM_AS_XXX defines in php_streams.h */- TSRMLS_FETCH();-/* these names depend on the values of theDescriptor"static const char * cast_names[3] = { "STDIO FILE*", "File Descriptor", "Sockettype %s as a %s",}; + TSRMLS_FETCH();+zend_error(E_WARNING, "%s(): cannot represent a stream of-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netget_active_function_name(TSRMLS_C), stream->ops->label,EMail: mfischer@guru.josefine.atPGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0-All your scripts are belong to Zend--- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net