提交 54708073 编写于 作者: H Hongze Cheng

more code

上级 da0c5d8e
......@@ -84,8 +84,9 @@ int32_t tBufferReserve(SBuffer *pBuffer, int64_t nData, void **ppData);
#define COL_VAL_IS_VALUE(CV) ((CV)->flag == CV_FLAG_VALUE)
// SRow ================================
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer);
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SRow **ppRow);
void tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal);
void tRowDestroy(SRow *pRow);
// SRowIter ================================
int32_t tRowIterOpen(SRow *pRow, STSchema *pTSchema, SRowIter **ppIter);
......
......@@ -95,7 +95,7 @@ typedef struct {
} \
} while (0)
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SRow **ppRow) {
int32_t code = 0;
ASSERT(taosArrayGetSize(aColVal) > 0);
......@@ -196,9 +196,9 @@ int32_t tRowBuild(SArray *aColVal, STSchema *pTSchema, SBuffer *pBuffer) {
}
// alloc --------------
SRow *pRow = NULL;
code = tBufferReserve(pBuffer, nRow, (void **)&pRow);
code = tRealloc((uint8_t **)ppRow, nRow);
if (code) return code;
SRow *pRow = *ppRow;
// build --------------
pColVal = (SColVal *)taosArrayGet(aColVal, 0);
......@@ -490,6 +490,8 @@ void tRowGet(SRow *pRow, STSchema *pTSchema, int32_t iCol, SColVal *pColVal) {
}
}
void tRowDestroy(SRow *pRow) { tFree(pRow); }
// SRowIter ========================================
struct SRowIter {
SRow *pRow;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册