Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3f5f6b9f
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3f5f6b9f
编写于
2月 28, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename file
上级
40ba2bd8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
27 deletion
+27
-27
include/common/tmsg.h
include/common/tmsg.h
+1
-1
include/util/tencode.h
include/util/tencode.h
+5
-5
include/util/texception.h
include/util/texception.h
+19
-19
source/util/src/tencode.c
source/util/src/tencode.c
+1
-1
source/util/test/encodeTest.cpp
source/util/test/encodeTest.cpp
+1
-1
未找到文件。
include/common/tmsg.h
浏览文件 @
3f5f6b9f
...
...
@@ -20,7 +20,7 @@
extern
"C"
{
#endif
#include "encode.h"
#include "
t
encode.h"
#include "taosdef.h"
#include "taoserror.h"
#include "tarray.h"
...
...
include/util/encode.h
→
include/util/
t
encode.h
浏览文件 @
3f5f6b9f
...
...
@@ -16,8 +16,8 @@
#ifndef _TD_UTIL_ENCODE_H_
#define _TD_UTIL_ENCODE_H_
#include "tfreelist.h"
#include "tcoding.h"
#include "tfreelist.h"
#include "tmacro.h"
#ifdef __cplusplus
...
...
@@ -71,11 +71,11 @@ typedef struct {
TD_SLIST
(
SCoderNode
)
stack
;
}
SCoder
;
#define TD_CODER_POS(CODER) ((CODER)->pos)
#define TD_CODER_CURRENT(CODER) ((CODER)->data + (CODER)->pos)
#define TD_CODER_MOVE_POS(CODER, MOVE) ((CODER)->pos += (MOVE))
#define TD_CODER_POS(CODER)
((CODER)->pos)
#define TD_CODER_CURRENT(CODER)
((CODER)->data + (CODER)->pos)
#define TD_CODER_MOVE_POS(CODER, MOVE)
((CODER)->pos += (MOVE))
#define TD_CODER_CHECK_CAPACITY_FAILED(CODER, EXPSIZE) (((CODER)->size - (CODER)->pos) < (EXPSIZE))
#define TCODER_MALLOC(SIZE, CODER) TFL_MALLOC(SIZE, &((CODER)->fl))
#define TCODER_MALLOC(SIZE, CODER)
TFL_MALLOC(SIZE, &((CODER)->fl))
void
tCoderInit
(
SCoder
*
pCoder
,
td_endian_t
endian
,
uint8_t
*
data
,
int32_t
size
,
td_coder_t
type
);
void
tCoderClear
(
SCoder
*
pCoder
);
...
...
include/util/texception.h
浏览文件 @
3f5f6b9f
...
...
@@ -31,21 +31,21 @@ typedef struct SCleanupAction {
uint16_t
reserved
;
void
*
func
;
union
{
void
*
Ptr
;
bool
Bool
;
char
Char
;
int8_t
Int8
;
uint8_t
Uint8
;
int16_t
Int16
;
uint16_t
Uint16
;
int
Int
;
u
nsigned
in
t
Uint
;
int32_t
Int32
;
uint32_t
Uint32
;
int64_t
Int64
;
uint64_t
Uint64
;
float
Float
;
double
Double
;
void
*
Ptr
;
bool
Bool
;
char
Char
;
int8_t
Int8
;
uint8_t
Uint8
;
int16_t
Int16
;
uint16_t
Uint16
;
int
32_t
Int
;
u
int32_
t
Uint
;
int32_t
Int32
;
uint32_t
Uint32
;
int64_t
Int64
;
uint64_t
Uint64
;
float
Float
;
double
Double
;
}
arg1
,
arg2
;
}
SCleanupAction
;
...
...
@@ -67,7 +67,7 @@ typedef struct SExceptionNode {
void
cleanupPush_void_ptr_ptr
(
bool
failOnly
,
void
*
func
,
void
*
arg1
,
void
*
arg2
);
void
cleanupPush_void_ptr_bool
(
bool
failOnly
,
void
*
func
,
void
*
arg1
,
bool
arg2
);
void
cleanupPush_void_ptr
(
bool
failOnly
,
void
*
func
,
void
*
arg
);
void
cleanupPush_int_int
(
bool
failOnly
,
void
*
func
,
int
arg
);
void
cleanupPush_int_int
(
bool
failOnly
,
void
*
func
,
int
32_t
arg
);
void
cleanupPush_void
(
bool
failOnly
,
void
*
func
);
void
cleanupPush_int_ptr
(
bool
failOnly
,
void
*
func
,
void
*
arg
);
...
...
@@ -81,11 +81,11 @@ bool cleanupExceedLimit();
#define CLEANUP_PUSH_VOID_PTR_BOOL(failOnly, func, arg1, arg2) \
cleanupPush_void_ptr_bool((failOnly), (void*)(func), (void*)(arg1), (bool)(arg2))
#define CLEANUP_PUSH_VOID_PTR(failOnly, func, arg) cleanupPush_void_ptr((failOnly), (void*)(func), (void*)(arg))
#define CLEANUP_PUSH_INT_INT(failOnly, func, arg) cleanupPush_void_ptr((failOnly), (void*)(func), (int)(arg))
#define CLEANUP_PUSH_INT_INT(failOnly, func, arg) cleanupPush_void_ptr((failOnly), (void*)(func), (int
32_t
)(arg))
#define CLEANUP_PUSH_VOID(failOnly, func) cleanupPush_void((failOnly), (void*)(func))
#define CLEANUP_PUSH_INT_PTR(failOnly, func, arg) cleanupPush_int_ptr((failOnly), (void*)(func), (void*)(arg))
#define CLEANUP_PUSH_FREE(failOnly, arg) cleanupPush_void_ptr((failOnly), free, (void*)(arg))
#define CLEANUP_PUSH_CLOSE(failOnly, arg) cleanupPush_int_int((failOnly), close, (int)(arg))
#define CLEANUP_PUSH_CLOSE(failOnly, arg) cleanupPush_int_int((failOnly), close, (int
32_t
)(arg))
#define CLEANUP_PUSH_FCLOSE(failOnly, arg) cleanupPush_int_ptr((failOnly), fclose, (void*)(arg))
#define CLEANUP_GET_ANCHOR() cleanupGetActionCount()
...
...
@@ -106,7 +106,7 @@ void exceptionThrow(int32_t code);
exceptionNode.maxCleanupAction = (maxCleanupActions) > 0 ? (maxCleanupActions) : 1; \
exceptionNode.cleanupActions = cleanupActions; \
exceptionPushNode(&exceptionNode); \
int
caughtException = setjmp(exceptionNode.jb);
\
int
32_t caughtException = setjmp(exceptionNode.jb);
\
if (caughtException == 0)
#define CATCH(code) \
...
...
source/util/src/encode.c
→
source/util/src/
t
encode.c
浏览文件 @
3f5f6b9f
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "encode.h"
#include "
t
encode.h"
#if __STDC_VERSION__ >= 201112L
static_assert
(
sizeof
(
float
)
==
sizeof
(
uint32_t
),
"sizeof(float) must equal to sizeof(uint32_t)"
);
...
...
source/util/test/encodeTest.cpp
浏览文件 @
3f5f6b9f
...
...
@@ -2,7 +2,7 @@
#include "gtest/gtest.h"
#include "encode.h"
#include "
t
encode.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshift-count-overflow"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录