1
0
mirror of synced 2025-12-15 01:28:09 +08:00
Files
SnowFlake-IdGenerator/C/source/YitIdHelper.h
AuroraTea 2da2aa8b4b fix: compatibility of C and C++
// fix: move .h to .c for cpp
// static IdGenerator *_idGenerator = NULL;
2023-01-23 17:35:48 +08:00

27 lines
477 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 版权属于yitter(yitter@126.com)
* 开源地址https://gitee.com/yitter/idgenerator
*/
#pragma once
#include "idgen/IdGenOptions.h"
#include "idgen/common.h"
#ifdef __cplusplus
extern "C"
{
#endif
TAP_DLLEXPORT
extern void TAP_STDCALL SetIdGenerator(IdGeneratorOptions options);
TAP_DLLEXPORT
extern void TAP_STDCALL SetWorkerId(uint32_t workerId);
TAP_DLLEXPORT
extern int64_t TAP_STDCALL NextId();
#ifdef __cplusplus
}
#endif