You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

php_snowdrift.h 2.3 kB

4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. +----------------------------------------------------------------------+
  3. | snowdrift |
  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. | Author: 63851587@qq.com |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_SNOWDRIFT_H
  20. #define PHP_SNOWDRIFT_H
  21. extern zend_module_entry snowdrift_module_entry;
  22. #define phpext_snowdrift_ptr &snowdrift_module_entry
  23. #define PHP_SNOWDRIFT_VERSION \
  24. "1.0.0" /* Replace with version number for your extension */
  25. #ifdef PHP_WIN32
  26. #define PHP_SNOWDRIFT_API __declspec(dllexport)
  27. #elif defined(__GNUC__) && __GNUC__ >= 4
  28. #define PHP_SNOWDRIFT_API __attribute__((visibility("default")))
  29. #else
  30. #define PHP_SNOWDRIFT_API
  31. #endif
  32. #ifdef ZTS
  33. #include "TSRM.h"
  34. #endif
  35. // PHP8
  36. #if PHP_VERSION_ID >= 80000
  37. #define TSRMLS_D void
  38. #define TSRMLS_DC
  39. #define TSRMLS_C
  40. #define TSRMLS_CC
  41. #define TSRMLS_FETCH()
  42. #define ZEND_ACC_DTOR 0
  43. #endif
  44. ZEND_BEGIN_MODULE_GLOBALS(snowdrift)
  45. uint8_t Method;
  46. uint64_t BaseTime;
  47. uint8_t WorkerId;
  48. uint8_t WorkerIdNum;
  49. uint8_t WorkerIdBitLength;
  50. uint8_t SeqBitLength;
  51. uint32_t MaxSeqNumber;
  52. uint32_t MinSeqNumber;
  53. uint16_t TopOverCostCount;
  54. ZEND_END_MODULE_GLOBALS(snowdrift)
  55. ZEND_DECLARE_MODULE_GLOBALS(snowdrift)
  56. #define SD_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(snowdrift, v)
  57. #if defined(ZTS) && defined(COMPILE_DL_SNOWDRIFT)
  58. ZEND_TSRMLS_CACHE_EXTERN()
  59. #endif
  60. static int snowdrift_init();
  61. #endif /* PHP_SNOWDRIFT_H */