diff options
Diffstat (limited to 'include/init.h')
-rw-r--r-- | include/init.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/init.h b/include/init.h index ca6ff65..8f914f5 100644 --- a/include/init.h +++ b/include/init.h @@ -14,26 +14,23 @@ namespace Php { /** - * The way how PHP C API deals with "global" variables is stupid. + * The way how PHP C API deals with "global" variables is peculiar. * - * This is supposed to turn into a structure that is going to be - * instantiated for each parallel running request, and for which the - * PHP engine allocates a certain amount of memory, and a magic - * pointer that is passed and should be forwarded to every thinkable - * PHP function. + * The following macros are supposed to turn into a structure that is going + * to be instantiated for each parallel running request, and for which the + * PHP engine allocates a certain amount of memory, and a magic pointer that + * is passed and should be forwarded to every thinkable PHP function. * - * We don't like this architecture. We have our own environment object - * that makes much more sense, and that we use. However, we need - * to assign this object somewhere, so that's what we do in this - * one and only global variable + * We don't use this architecture. We have our own environment object + * that makes much more sense, and that we use. However, the Zend engine + * expects this structure and this structure to exist. */ ZEND_BEGIN_MODULE_GLOBALS(phpcpp) ZEND_END_MODULE_GLOBALS(phpcpp) /** - * And now we're going to define a macro. This also is a ridiculous - * architecture from PHP to get access to a variable from the - * structure above. + * And now we're going to define a macro. This also is a uncommon architecture + * from PHP to get access to a variable from the structure above. */ #ifdef ZTS #define PHPCPP_G(v) TSRMG(phpcpp_globals_id, phpcpp_globals *, v) |