...
 
Commits (2)
    https://gitcode.net/yitter/idgenerator/-/commit/43c5cc450f2d6a249731393e6818e417e5295e74 !19 !fixed 修复静态编译问题 2022-11-11T05:00:54+00:00 微希夷 63851587@qq.com * 修复静态编译时宏重复定义问题 * !optimize 时间追平漂移量时,损耗一点时间(微妙级别)降低CPU占用 https://gitcode.net/yitter/idgenerator/-/commit/c728595ac9449af8e889730fea81e502ebde6d29 auto commit 2022-11-11T13:01:46+08:00 yitter yitter@126.com
# ❄ idgenerator-Java
# ❄ idgenerator-Java
## 运行环境
......@@ -25,7 +25,7 @@ IdGeneratorOptions options = new IdGeneratorOptions(Your_Unique_Worker_Id);
// ...... 其它参数参考 IdGeneratorOptions 定义。
// 保存参数(务必调用,否则参数设置不生效):
YitIdHelper.SetIdGenerator(options);
YitIdHelper.setIdGenerator(options);
// 以上过程只需全局一次,且应在生成ID之前完成。
```
......
......@@ -51,6 +51,8 @@ extern zend_module_entry snowdrift_module_entry;
#define ZEND_ACC_DTOR 0
#endif
#define SD_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(snowdrift, v)
ZEND_BEGIN_MODULE_GLOBALS(snowdrift)
uint8_t Method;
uint64_t BaseTime;
......@@ -64,10 +66,6 @@ uint8_t Multi;
ZEND_END_MODULE_GLOBALS(snowdrift)
ZEND_DECLARE_MODULE_GLOBALS(snowdrift)
#define SD_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(snowdrift, v)
#if defined(ZTS) && defined(COMPILE_DL_SNOWDRIFT)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
......
......@@ -38,6 +38,8 @@ zend_class_entry snowdrift_ce;
static uint16_t wid_num = 0;
ZEND_DECLARE_MODULE_GLOBALS(snowdrift)
/* {{{ PHP_INI */
PHP_INI_BEGIN()
......