php_symfony_debug.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * This file is part of the Symfony package.
  3. *
  4. * (c) Fabien Potencier <fabien@symfony.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. #ifndef PHP_SYMFONY_DEBUG_H
  10. #define PHP_SYMFONY_DEBUG_H
  11. extern zend_module_entry symfony_debug_module_entry;
  12. #define phpext_symfony_debug_ptr &symfony_debug_module_entry
  13. #define PHP_SYMFONY_DEBUG_VERSION "2.7"
  14. #ifdef PHP_WIN32
  15. # define PHP_SYMFONY_DEBUG_API __declspec(dllexport)
  16. #elif defined(__GNUC__) && __GNUC__ >= 4
  17. # define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default")))
  18. #else
  19. # define PHP_SYMFONY_DEBUG_API
  20. #endif
  21. #ifdef ZTS
  22. #include "TSRM.h"
  23. #endif
  24. ZEND_BEGIN_MODULE_GLOBALS(symfony_debug)
  25. intptr_t req_rand_init;
  26. void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
  27. zval *debug_bt;
  28. ZEND_END_MODULE_GLOBALS(symfony_debug)
  29. PHP_MINIT_FUNCTION(symfony_debug);
  30. PHP_MSHUTDOWN_FUNCTION(symfony_debug);
  31. PHP_RINIT_FUNCTION(symfony_debug);
  32. PHP_RSHUTDOWN_FUNCTION(symfony_debug);
  33. PHP_MINFO_FUNCTION(symfony_debug);
  34. PHP_GINIT_FUNCTION(symfony_debug);
  35. PHP_GSHUTDOWN_FUNCTION(symfony_debug);
  36. PHP_FUNCTION(symfony_zval_info);
  37. PHP_FUNCTION(symfony_debug_backtrace);
  38. static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC);
  39. static const char *_symfony_debug_zval_type(zval *);
  40. static const char* _symfony_debug_get_resource_type(long TSRMLS_DC);
  41. static int _symfony_debug_get_resource_refcount(long TSRMLS_DC);
  42. void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
  43. #ifdef ZTS
  44. #define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v)
  45. #else
  46. #define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v)
  47. #endif
  48. #endif /* PHP_SYMFONY_DEBUG_H */