php_sqlite3.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 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. | Authors: Scott MacVicar <scottmac@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef PHP_SQLITE3_H
  19. #define PHP_SQLITE3_H
  20. #define PHP_SQLITE3_VERSION PHP_VERSION
  21. extern zend_module_entry sqlite3_module_entry;
  22. #define phpext_sqlite3_ptr &sqlite3_module_entry
  23. ZEND_BEGIN_MODULE_GLOBALS(sqlite3)
  24. char *extension_dir;
  25. int dbconfig_defensive;
  26. ZEND_END_MODULE_GLOBALS(sqlite3)
  27. #ifdef ZTS
  28. # define SQLITE3G(v) TSRMG(sqlite3_globals_id, zend_sqlite3_globals *, v)
  29. # ifdef COMPILE_DL_SQLITE3
  30. ZEND_TSRMLS_CACHE_EXTERN()
  31. # endif
  32. #else
  33. # define SQLITE3G(v) (sqlite3_globals.v)
  34. #endif
  35. #define PHP_SQLITE3_ASSOC 1<<0
  36. #define PHP_SQLITE3_NUM 1<<1
  37. #define PHP_SQLITE3_BOTH (PHP_SQLITE3_ASSOC|PHP_SQLITE3_NUM)
  38. #endif
  39. /*
  40. * Local variables:
  41. * tab-width: 4
  42. * c-basic-offset: 4
  43. * indent-tabs-mode: t
  44. * End:
  45. */