cvs: ZendAPI / Extending_Zend_Printing.xml
| From: | Yasuo Ohgaki | Date: | Sun, 24 Feb 2002 06:39:37 +0000 |
| Subject: | cvs: ZendAPI / Extending_Zend_Printing.xml | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9435@lists.php.net to get a copy of this message | ||
yohgaki Sun Feb 24 01:39:37 2002 EDT
Modified files:
/ZendAPI Extending_Zend_Printing.xml
Log:
Update to use TSRMLS_* macro
Index: ZendAPI/Extending_Zend_Printing.xml
diff -u ZendAPI/Extending_Zend_Printing.xml:1.6 ZendAPI/Extending_Zend_Printing.xml:1.7
--- ZendAPI/Extending_Zend_Printing.xml:1.6 Mon Feb 11 05:10:33 2002
+++ ZendAPI/Extending_Zend_Printing.xml Sun Feb 24 01:39:35 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <!-- $Revision: 1.6 $ -->
+ <!-- $Revision: 1.7 $ -->
<chapter id="zend.printing">
<title>Printing Information</title>
<para>
@@ -144,13 +144,13 @@
arguments. To retrieve the name of the file currently being
executed, use <function>zend_get_executed_filename</function>.
This function accesses the executor globals, which are passed to
- it using the <literal>ELS_C</literal> macro. The executor globals
+ it using the <literal>TSRMLS_C</literal> macro. The executor globals
are automatically available to every function that's called
directly by Zend (they're part of the
<literal>INTERNAL_FUNCTION_PARAMETERS</literal> described earlier
in this chapter). If you want to access the executor globals in
another function that doesn't have them available automatically,
- call the macro <literal>ELS_FETCH()</literal> once in that
+ call the macro <literal>TSRMLS_FETCH()</literal> once in that
function; this will introduce them to your local scope.
</para>
<para>
@@ -163,9 +163,9 @@
<figure>
<title>Listing 9.15. Printing execution information.</title>
<programlisting>
-zend_printf("The name of the current function is %s<br>",
get_active_function_name());
-zend_printf("The file currently executed is %s<br>",
zend_get_executed_filename(ELS_C));
-zend_printf("The current line being executed is %i<br>",
zend_get_executed_lineno(ELS_C));
+zend_printf("The name of the current function is %s<br>",
get_active_function_name(TSRMLS_C));
+zend_printf("The file currently executed is %s<br>",
zend_get_executed_filename(TSRMLS_C));
+zend_printf("The current line being executed is %i<br>",
zend_get_executed_lineno(TSRMLS_C));
</programlisting>
<graphic fileref="figures/Extending_Zend_9_execution_info.png"/>
</figure>