File: php_pq.h

package info (click to toggle)
php-pq 2.2.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 788 kB
  • sloc: ansic: 8,210; xml: 175; sh: 102; awk: 40; pascal: 9; makefile: 1
file content (57 lines) | stat: -rw-r--r-- 1,608 bytes parent folder | download
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
/*
    +--------------------------------------------------------------------+
    | PECL :: pq                                                         |
    +--------------------------------------------------------------------+
    | Redistribution and use in source and binary forms, with or without |
    | modification, are permitted provided that the conditions mentioned |
    | in the accompanying LICENSE file are met.                          |
    +--------------------------------------------------------------------+
    | Copyright (c) 2013, Michael Wallner <mike@php.net>                |
    +--------------------------------------------------------------------+
*/


#ifndef PHP_PQ_H
#define PHP_PQ_H

#define PHP_PQ_VERSION "2.2.3"

#ifdef PHP_WIN32
#	define PHP_PQ_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
#	define PHP_PQ_API extern __attribute__ ((visibility("default")))
#else
#	define PHP_PQ_API extern
#endif

extern int pq_module_number;
extern zend_module_entry pq_module_entry;
#define phpext_pq_ptr &pq_module_entry

ZEND_BEGIN_MODULE_GLOBALS(php_pq)
	struct {
		/* for ext-raphf */
		zend_string *name;
	} connection;
ZEND_END_MODULE_GLOBALS(php_pq)

ZEND_EXTERN_MODULE_GLOBALS(php_pq);

#ifdef ZTS
#	include "TSRM/TSRM.h"
#	define PHP_PQ_G ((zend_php_pq_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(php_pq_globals_id)])
#else
#	define PHP_PQ_G (&php_pq_globals)
#endif

#endif	/* PHP_PQ_H */


/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim<600: noet sw=4 ts=4
 */