xref: /PHP-7.0/ext/pdo_sqlite/php_pdo_sqlite.h (revision 478f119a)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 7                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2017 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 3.01 of the PHP license,      |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.php.net/license/3_01.txt                                  |
11   | If you did not receive a copy of the PHP license and are unable to   |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@php.net so we can mail you a copy immediately.               |
14   +----------------------------------------------------------------------+
15   | Author: Wez Furlong <wez@php.net>                                    |
16   +----------------------------------------------------------------------+
17 */
18 
19 /* $Id$ */
20 
21 
22 #ifndef PHP_PDO_SQLITE_H
23 #define PHP_PDO_SQLITE_H
24 
25 extern zend_module_entry pdo_sqlite_module_entry;
26 #define phpext_pdo_sqlite_ptr &pdo_sqlite_module_entry
27 
28 #include "php_version.h"
29 #define PHP_PDO_SQLITE_VERSION PHP_VERSION
30 
31 #ifdef ZTS
32 #include "TSRM.h"
33 #endif
34 
35 PHP_MINIT_FUNCTION(pdo_sqlite);
36 PHP_MSHUTDOWN_FUNCTION(pdo_sqlite);
37 PHP_RINIT_FUNCTION(pdo_sqlite);
38 PHP_RSHUTDOWN_FUNCTION(pdo_sqlite);
39 PHP_MINFO_FUNCTION(pdo_sqlite);
40 
41 /*
42   	Declare any global variables you may need between the BEGIN
43 	and END macros here:
44 
45 ZEND_BEGIN_MODULE_GLOBALS(pdo_sqlite)
46 	long  global_value;
47 	char *global_string;
48 ZEND_END_MODULE_GLOBALS(pdo_sqlite)
49 */
50 
51 /* In every utility function you add that needs to use variables
52    in php_pdo_sqlite_globals, call TSRMLS_FETCH(); after declaring other
53    variables used by that function, or better yet, pass in
54    after the last function argument and declare your utility function
55    with after the last declared argument.  Always refer to
56    the globals in your function as PDO_SQLITE_G(variable).  You are
57    encouraged to rename these macros something shorter, see
58    examples in any other php module directory.
59 */
60 
61 #ifdef ZTS
62 #define PDO_SQLITE_G(v) TSRMG(pdo_sqlite_globals_id, zend_pdo_sqlite_globals *, v)
63 #else
64 #define PDO_SQLITE_G(v) (pdo_sqlite_globals.v)
65 #endif
66 
67 #endif	/* PHP_PDO_SQLITE_H */
68 
69