summaryrefslogtreecommitdiff
path: root/ext/sqlite3/php_sqlite3.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-03-12 14:15:47 +0300
committerDmitry Stogov <dmitry@zend.com>2019-03-12 14:15:47 +0300
commitf1b306fe117cfbbe69ab4ef9713d39ea068e74c0 (patch)
tree876485fc86d30924b161cd623919ddfc11a5c69a /ext/sqlite3/php_sqlite3.h
parent5aa1176238f41097ea7295ba6911aa19ae7c1021 (diff)
downloadphp-git-f1b306fe117cfbbe69ab4ef9713d39ea068e74c0.tar.gz
Switch to use ZTS cache
Diffstat (limited to 'ext/sqlite3/php_sqlite3.h')
-rw-r--r--ext/sqlite3/php_sqlite3.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/sqlite3/php_sqlite3.h b/ext/sqlite3/php_sqlite3.h
index 411c4eb0ba..ca09e341ab 100644
--- a/ext/sqlite3/php_sqlite3.h
+++ b/ext/sqlite3/php_sqlite3.h
@@ -29,15 +29,13 @@ ZEND_BEGIN_MODULE_GLOBALS(sqlite3)
int dbconfig_defensive;
ZEND_END_MODULE_GLOBALS(sqlite3)
-#ifdef ZTS
-# define SQLITE3G(v) TSRMG(sqlite3_globals_id, zend_sqlite3_globals *, v)
-# ifdef COMPILE_DL_SQLITE3
+#if defined(ZTS) && defined(COMPILE_DL_SQLITE3)
ZEND_TSRMLS_CACHE_EXTERN()
-# endif
-#else
-# define SQLITE3G(v) (sqlite3_globals.v)
#endif
+ZEND_EXTERN_MODULE_GLOBALS(sqlite3)
+#define SQLITE3G(v) ZEND_MODULE_GLOBALS_ACCESSOR(sqlite3, v)
+
#define PHP_SQLITE3_ASSOC 1<<0
#define PHP_SQLITE3_NUM 1<<1
#define PHP_SQLITE3_BOTH (PHP_SQLITE3_ASSOC|PHP_SQLITE3_NUM)