Re: Calling PHP functions from an extension
| From: | Andrey Hristov | Date: | Sat, 24 Jul 2004 12:20:01 +0000 |
| Subject: | Re: Calling PHP functions from an extension | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11537@lists.php.net to get a copy of this message | ||
John Lim wrote:
"Andrey Hristov" <php@hristov.com> wrote in message news:4102471A.70405@hristov.com...#ifdef ZTS #define BG(v) TSRMG(basic_globals_id, php_basic_globals *, v) extern int basic_globals_id; #else #define BG(v) (basic_globals.v) extern php_basic_globals basic_globals; #endif andreyG usually comes from Globals and I have seen BG in ext/standard so maybe BG means Basic functions Globals. andrey John Lim wrote:Thanks for the info. I get a error with the following (BG is undefined function): if (zend_call_function(&fci, &BG(fci_cache) TSRMLS_CC) == SUCCESS) So I tested with if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS) and it works fine. So do i need to use BG(), and how do i so ? It is for thread safety access of globals. Defined in basic_functions.h :Andi, Just a few quick questions. What is the BG macro for? Eg. if (zend_call_function(&fci, &BG(fci_cache) TSRMLS_CC) == SUCCESS)