Chris@0: /* Chris@0: * This file is part of the Symfony package. Chris@0: * Chris@0: * (c) Fabien Potencier Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: #ifndef PHP_SYMFONY_DEBUG_H Chris@0: #define PHP_SYMFONY_DEBUG_H Chris@0: Chris@0: extern zend_module_entry symfony_debug_module_entry; Chris@0: #define phpext_symfony_debug_ptr &symfony_debug_module_entry Chris@0: Chris@0: #define PHP_SYMFONY_DEBUG_VERSION "2.7" Chris@0: Chris@0: #ifdef PHP_WIN32 Chris@0: # define PHP_SYMFONY_DEBUG_API __declspec(dllexport) Chris@0: #elif defined(__GNUC__) && __GNUC__ >= 4 Chris@0: # define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default"))) Chris@0: #else Chris@0: # define PHP_SYMFONY_DEBUG_API Chris@0: #endif Chris@0: Chris@0: #ifdef ZTS Chris@0: #include "TSRM.h" Chris@0: #endif Chris@0: Chris@0: ZEND_BEGIN_MODULE_GLOBALS(symfony_debug) Chris@0: intptr_t req_rand_init; Chris@0: void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); Chris@0: zval *debug_bt; Chris@0: ZEND_END_MODULE_GLOBALS(symfony_debug) Chris@0: Chris@0: PHP_MINIT_FUNCTION(symfony_debug); Chris@0: PHP_MSHUTDOWN_FUNCTION(symfony_debug); Chris@0: PHP_RINIT_FUNCTION(symfony_debug); Chris@0: PHP_RSHUTDOWN_FUNCTION(symfony_debug); Chris@0: PHP_MINFO_FUNCTION(symfony_debug); Chris@0: PHP_GINIT_FUNCTION(symfony_debug); Chris@0: PHP_GSHUTDOWN_FUNCTION(symfony_debug); Chris@0: Chris@0: PHP_FUNCTION(symfony_zval_info); Chris@0: PHP_FUNCTION(symfony_debug_backtrace); Chris@0: Chris@0: static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC); Chris@0: static const char *_symfony_debug_zval_type(zval *); Chris@0: static const char* _symfony_debug_get_resource_type(long TSRMLS_DC); Chris@0: static int _symfony_debug_get_resource_refcount(long TSRMLS_DC); Chris@0: Chris@0: void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); Chris@0: Chris@0: #ifdef ZTS Chris@0: #define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v) Chris@0: #else Chris@0: #define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v) Chris@0: #endif Chris@0: Chris@0: #endif /* PHP_SYMFONY_DEBUG_H */