Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / debug / Resources / ext / php_symfony_debug.h
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
10 #ifndef PHP_SYMFONY_DEBUG_H
11 #define PHP_SYMFONY_DEBUG_H
12
13 extern zend_module_entry symfony_debug_module_entry;
14 #define phpext_symfony_debug_ptr &symfony_debug_module_entry
15
16 #define PHP_SYMFONY_DEBUG_VERSION "2.7"
17
18 #ifdef PHP_WIN32
19 #       define PHP_SYMFONY_DEBUG_API __declspec(dllexport)
20 #elif defined(__GNUC__) && __GNUC__ >= 4
21 #       define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default")))
22 #else
23 #       define PHP_SYMFONY_DEBUG_API
24 #endif
25
26 #ifdef ZTS
27 #include "TSRM.h"
28 #endif
29
30 ZEND_BEGIN_MODULE_GLOBALS(symfony_debug)
31         intptr_t req_rand_init;
32         void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
33         zval *debug_bt;
34 ZEND_END_MODULE_GLOBALS(symfony_debug)
35
36 PHP_MINIT_FUNCTION(symfony_debug);
37 PHP_MSHUTDOWN_FUNCTION(symfony_debug);
38 PHP_RINIT_FUNCTION(symfony_debug);
39 PHP_RSHUTDOWN_FUNCTION(symfony_debug);
40 PHP_MINFO_FUNCTION(symfony_debug);
41 PHP_GINIT_FUNCTION(symfony_debug);
42 PHP_GSHUTDOWN_FUNCTION(symfony_debug);
43
44 PHP_FUNCTION(symfony_zval_info);
45 PHP_FUNCTION(symfony_debug_backtrace);
46
47 static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC);
48 static const char *_symfony_debug_zval_type(zval *);
49 static const char* _symfony_debug_get_resource_type(long TSRMLS_DC);
50 static int _symfony_debug_get_resource_refcount(long TSRMLS_DC);
51
52 void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
53
54 #ifdef ZTS
55 #define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v)
56 #else
57 #define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v)
58 #endif
59
60 #endif  /* PHP_SYMFONY_DEBUG_H */