ci: add 8.1
[m6w6/ext-pq] / php_pq.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: pq |
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) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13
14 #ifndef PHP_PQ_H
15 #define PHP_PQ_H
16
17 #define PHP_PQ_VERSION "2.2.0"
18
19 #ifdef PHP_WIN32
20 # define PHP_PQ_API __declspec(dllexport)
21 #elif defined(__GNUC__) && __GNUC__ >= 4
22 # define PHP_PQ_API extern __attribute__ ((visibility("default")))
23 #else
24 # define PHP_PQ_API extern
25 #endif
26
27 extern int pq_module_number;
28 extern zend_module_entry pq_module_entry;
29 #define phpext_pq_ptr &pq_module_entry
30
31 ZEND_BEGIN_MODULE_GLOBALS(php_pq)
32 struct {
33 /* for ext-raphf */
34 zend_string *name;
35 } connection;
36 ZEND_END_MODULE_GLOBALS(php_pq)
37
38 ZEND_EXTERN_MODULE_GLOBALS(php_pq);
39
40 #ifdef ZTS
41 # include "TSRM/TSRM.h"
42 # define PHP_PQ_G ((zend_php_pq_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(php_pq_globals_id)])
43 #else
44 # define PHP_PQ_G (&php_pq_globals)
45 #endif
46
47 #endif /* PHP_PQ_H */
48
49
50 /*
51 * Local variables:
52 * tab-width: 4
53 * c-basic-offset: 4
54 * End:
55 * vim600: noet sw=4 ts=4 fdm=marker
56 * vim<600: noet sw=4 ts=4
57 */