-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathphp_wrapper.h
41 lines (26 loc) · 843 Bytes
/
php_wrapper.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
//
// Created by vic on 16-4-18.
//
#ifndef DONKEYID_PHP_WRAPPER_H
#define DONKEYID_PHP_WRAPPER_H
#include <Zend/zend_types.h>
#if PHP_MAJOR_VERSION < 7
#define DK_RETURN_STRINGL RETURN_STRINGL
typedef int zend_size_t;
#define dk_add_next_index_stringl(a,s,l,d) add_next_index_stringl(a,s,l,d)
#define dk_add_assoc_stringl_ex(a,ks,kl,s,l,d) add_assoc_stringl_ex(a,ks,kl,s,l,d)
#else
#define DK_RETURN_STRINGL(s,l,dup) RETURN_STRINGL(s,l)
#define dk_add_next_index_stringl(a,s,l,d) add_next_index_stringl(a,s,l)
#define dk_add_assoc_stringl_ex(a,ks,kl,s,l,d) add_assoc_stringl_ex(a,ks,kl,s,l)
typedef size_t zend_size_t;
#endif
#if PHP_VERSION_ID >= 80000
#define TSRMLS_C
#define TSRMLS_CC
#define TSRMLS_D
#define TSRMLS_DC
#define TSRMLS_FETCH_FROM_CTX(ctx)
#define TSRMLS_SET_CTX(ctx)
#endif
#endif //DONKEYID_PHP_WRAPPER_H