2895b70256978f6ce3d1fde52a8578e5a991776b
[m6w6/ext-json_post] / php_json_post.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: json_post |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2015, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 #ifndef PHP_JSON_POST_H
14 #define PHP_JSON_POST_H
15
16 extern zend_module_entry json_post_module_entry;
17 #define phpext_json_post_ptr &json_post_module_entry
18
19 #define PHP_JSON_POST_VERSION "1.1.0"
20
21 #ifdef PHP_WIN32
22 # define PHP_JSON_POST_API __declspec(dllexport)
23 #elif defined(__GNUC__) && __GNUC__ >= 4
24 # define PHP_JSON_POST_API extern __attribute__ ((visibility("default")))
25 #else
26 # define PHP_JSON_POST_API extern
27 #endif
28
29 #ifdef ZTS
30 # include "TSRM.h"
31 #endif
32
33 #if PHP_VERSION_ID < 70000
34 typedef long zend_long;
35 #endif
36
37 ZEND_BEGIN_MODULE_GLOBALS(json_post)
38 zend_long flags;
39 struct {
40 zend_long response;
41 zend_bool warning;
42 zend_bool exit;
43 } onerror;
44 ZEND_END_MODULE_GLOBALS(json_post)
45
46 ZEND_EXTERN_MODULE_GLOBALS(json_post);
47
48 #ifdef ZTS
49 # define JSON_POST_G(v) TSRMG(json_post_globals_id, zend_json_post_globals *, v)
50 #else
51 # define JSON_POST_G(v) (json_post_globals.v)
52 #endif
53
54 #endif /* PHP_JSON_POST_H */
55
56 /*
57 * Local variables:
58 * tab-width: 4
59 * c-basic-offset: 4
60 * End:
61 * vim600: noet sw=4 ts=4 fdm=marker
62 * vim<600: noet sw=4 ts=4
63 */