-
-
Notifications
You must be signed in to change notification settings - Fork 89
/
php_vld.h
96 lines (81 loc) · 2.79 KB
/
php_vld.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
+----------------------------------------------------------------------+
| Copyright (c) 1997-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to the 2-Clause BSD license which is |
| available through the LICENSE file, or online at |
| http://opensource.org/licenses/bsd-license.php |
+----------------------------------------------------------------------+
| Authors: Derick Rethans <[email protected]> |
+----------------------------------------------------------------------+
*/
/* $Id: php_vld.h,v 1.9 2009-03-30 18:22:15 derick Exp $ */
#ifndef PHP_VLD_H
#define PHP_VLD_H
#include "php.h"
extern zend_module_entry vld_module_entry;
#define phpext_vld_ptr &vld_module_entry
#ifdef PHP_WIN32
#define PHP_VLD_API __declspec(dllexport)
#else
#define PHP_VLD_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
PHP_MINIT_FUNCTION(vld);
PHP_MSHUTDOWN_FUNCTION(vld);
PHP_RINIT_FUNCTION(vld);
PHP_RSHUTDOWN_FUNCTION(vld);
PHP_MINFO_FUNCTION(vld);
ZEND_BEGIN_MODULE_GLOBALS(vld)
int active;
int skip_prepend;
int skip_append;
int execute;
int verbosity;
int format;
char *col_sep;
int save_paths;
char *save_dir;
FILE *path_dump_file;
int dump_paths;
ZEND_END_MODULE_GLOBALS(vld)
int vld_printf(FILE *stream, const char* fmt, ...);
#ifdef ZTS
#define VLD_G(v) TSRMG(vld_globals_id, zend_vld_globals *, v)
#else
#define VLD_G(v) (vld_globals.v)
#endif
#define VLD_PRINT(v,args) if (VLD_G(verbosity) >= (v)) { vld_printf(stderr, args); }
#define VLD_PRINT1(v,args,x) if (VLD_G(verbosity) >= (v)) { vld_printf(stderr, args, (x)); }
#define VLD_PRINT2(v,args,x,y) if (VLD_G(verbosity) >= (v)) { vld_printf(stderr, args, (x), (y)); }
#if PHP_VERSION_ID >= 70000
# define ZHASHKEYSTR(k) ((k)->key->val)
# define ZHASHKEYLEN(k) ((k)->key->len)
# define PHP_URLENCODE_NEW_LEN(v)
# define ZVAL_VALUE_TYPE zend_value
# define ZVAL_VALUE_STRING_TYPE zend_string
# define ZVAL_STRING_VALUE(s) (s.str)->val
# define ZVAL_STRING_LEN(s) (s.str)->len
# define ZSTRING_VALUE(s) (s ? (s)->val : NULL)
# define OPARRAY_VAR_NAME(v) (v)->val
#else
# define ZHASHKEYSTR(k) ((k)->arKey)
# define ZHASHKEYLEN(k) ((k)->nKeyLength - 1)
# define PHP_URLENCODE_NEW_LEN(v) , &(v)
# define ZVAL_VALUE_TYPE zvalue_value
# define ZVAL_VALUE_STRING_TYPE char
# define ZVAL_STRING_VALUE(s) (s.str.val)
# define ZVAL_STRING_LEN(s) (s.str.len)
# define ZSTRING_VALUE(s) (s)
# define OPARRAY_VAR_NAME(v) (v).name
#endif
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/