release 1.1.0
[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 #if PHP_VERSION_ID < 70000
45 zend_module_entry *json_module;
46 #endif
47 ZEND_END_MODULE_GLOBALS(json_post)
48
49 ZEND_EXTERN_MODULE_GLOBALS(json_post);
50
51 #ifdef ZTS
52 # define JSON_POST_G(v) TSRMG(json_post_globals_id, zend_json_post_globals *, v)
53 #else
54 # define JSON_POST_G(v) (json_post_globals.v)
55 #endif
56
57 #endif /* PHP_JSON_POST_H */
58
59 /*
60 * Local variables:
61 * tab-width: 4
62 * c-basic-offset: 4
63 * End:
64 * vim600: noet sw=4 ts=4 fdm=marker
65 * vim<600: noet sw=4 ts=4
66 */