This repository was archived by the owner on Jul 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphp_ref.h
More file actions
60 lines (46 loc) · 1.28 KB
/
php_ref.h
File metadata and controls
60 lines (46 loc) · 1.28 KB
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
/*
* This file is part of the pinepain/php-ref PHP extension.
*
* Copyright (c) 2016-2018 Bogdan Padalko <pinepain@gmail.com>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source or visit
* http://opensource.org/licenses/MIT
*/
#ifndef PHP_REF_H
#define PHP_REF_H
#include "php.h"
extern zend_module_entry php_ref_module_entry;
#define phpext_ref_ptr &php_ref_module_entry
#ifndef PHP_REF_VERSION
#define PHP_REF_VERSION "0.7.0"
#endif
#ifndef PHP_REF_REVISION
#define PHP_REF_REVISION "dev"
#endif
#if PHP_VERSION_ID < 70200
// should never get her, but just in case
#error PHP >= 7.2 required
#endif
#define PHP_REF_NS "Ref"
#ifdef PHP_WIN32
# define PHP_REF_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_REF_API __attribute__ ((visibility("default")))
#else
# define PHP_REF_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
ZEND_BEGIN_MODULE_GLOBALS(ref)
HashTable *referents;
ZEND_END_MODULE_GLOBALS(ref)
ZEND_EXTERN_MODULE_GLOBALS(ref);
#define PHP_REF_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(ref, v)
#if defined(ZTS) && defined(COMPILE_DL_REF)
ZEND_TSRMLS_CACHE_EXTERN();
#endif
#endif /* PHP_REF_H */