summaryrefslogtreecommitdiff
path: root/ext/sqlite3/php_sqlite3.h
diff options
context:
space:
mode:
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)