Hi!

In order to fix Xdebug bug #587 (http://bugs.xdebug.org/view.php?id=587) 
I need to have access to module_initialized which is currently a static 
in main/main.c. I've added a simple function to retrieve that and would 
like to commit that to 5.3/5.4 and trunk. Comments?
The patch is attached.

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Index: trunk/main/php.h
===================================================================
--- trunk/main/php.h    (revision 312158)
+++ trunk/main/php.h    (working copy)
@@ -285,6 +285,7 @@
 PHPAPI int php_write(void *buf, uint size TSRMLS_DC);
 PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1,
                2);
+PHPAPI int php_get_module_initialized(void);
 PHPAPI void php_log_err(char *log_message TSRMLS_DC);
 int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
 int cfgparse(void);
Index: trunk/main/main.c
===================================================================
--- trunk/main/main.c   (revision 312158)
+++ trunk/main/main.c   (working copy)
@@ -527,6 +527,13 @@
 }
 /* }}} */
 
+/* {{{ php_get_module_initialized
+ */
+PHPAPI int php_get_module_initialized(void)
+{
+       return module_initialized;
+}
+
 /* {{{ php_log_err
  */
 PHPAPI void php_log_err(char *log_message TSRMLS_DC)
Index: branches/PHP_5_3/main/php.h
===================================================================
--- branches/PHP_5_3/main/php.h (revision 312158)
+++ branches/PHP_5_3/main/php.h (working copy)
@@ -279,6 +279,7 @@
 PHPAPI int php_write(void *buf, uint size TSRMLS_DC);
 PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1,
                2);
+PHPAPI int php_get_module_initialized(void);
 PHPAPI void php_log_err(char *log_message TSRMLS_DC);
 int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
 int cfgparse(void);
Index: branches/PHP_5_3/main/main.c
===================================================================
--- branches/PHP_5_3/main/main.c        (revision 312158)
+++ branches/PHP_5_3/main/main.c        (working copy)
@@ -555,6 +555,13 @@
 }
 /* }}} */
 
+/* {{{ php_get_module_initialized
+ */
+PHPAPI int php_get_module_initialized(void)
+{
+       return module_initialized;
+}
+
 /* {{{ php_log_err
  */
 PHPAPI void php_log_err(char *log_message TSRMLS_DC)
Index: branches/PHP_5_4/main/php.h
===================================================================
--- branches/PHP_5_4/main/php.h (revision 312158)
+++ branches/PHP_5_4/main/php.h (working copy)
@@ -285,6 +285,7 @@
 PHPAPI int php_write(void *buf, uint size TSRMLS_DC);
 PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1,
                2);
+PHPAPI int php_get_module_initialized(void);
 PHPAPI void php_log_err(char *log_message TSRMLS_DC);
 int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
 int cfgparse(void);
Index: branches/PHP_5_4/main/main.c
===================================================================
--- branches/PHP_5_4/main/main.c        (revision 312158)
+++ branches/PHP_5_4/main/main.c        (working copy)
@@ -527,6 +527,13 @@
 }
 /* }}} */
 
+/* {{{ php_get_module_initialized
+ */
+PHPAPI int php_get_module_initialized(void)
+{
+       return module_initialized;
+}
+
 /* {{{ php_log_err
  */
 PHPAPI void php_log_err(char *log_message TSRMLS_DC)
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to