-
Notifications
You must be signed in to change notification settings - Fork 1
/
php_spy.h
57 lines (44 loc) · 1.22 KB
/
php_spy.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
#ifndef PHP_SPY_H
#define PHP_SPY_H
#ifdef ZTS
#include <TSRM.h>
#endif
#include <php.h>
#include <zend_extensions.h>
#ifndef ZEND_EXT_API
# if defined(__GNUC__) && __GNUC__ >= 4
# define ZEND_EXT_API __attribute__ ((visibility("default")))
# else
# define ZEND_EXT_API
# endif
#endif
void dump_coverage(void);
typedef struct spy_coverage_line {
int lineno;
int count;
} spy_coverage_line;
void spy_coverage_line_dtor(void *data);
typedef struct spy_coverage_file {
char *name;
HashTable *lines;
} spy_coverage_file;
spy_coverage_file *spy_coverage_file_ctor(const char *filename);
void spy_coverage_file_dtor(void *data);
typedef struct _spy_globals {
HashTable *coverage;
char *previous_filename;
spy_coverage_file *previous_file;
char *script_name;
char *server_name;
struct sockaddr_storage sockaddr;
size_t sockaddr_len;
int fd;
} zend_spy_globals;
#ifdef ZTS
# define SPY_G(v) ZEND_TSRMG(spy_globals_id, zend_spy_globals *, v)
extern int spy_globals_id;
#else
# define SPY_G(v) (spy_globals.v)
extern zend_spy_globals spy_globals;
#endif
#endif /* PHP_SPY_H */