提交 fa8dff94 编写于 作者: S Shengliang Guan

tbuffer

上级 6889e19b
......@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_UTIL_TAOS_ERROR_H_
#define _TD_UTIL_TAOS_ERROR_H_
#ifndef _TD_UTIL_ERROR_H_
#define _TD_UTIL_ERROR_H_
#ifdef __cplusplus
extern "C" {
......@@ -469,4 +469,4 @@ int32_t* taosGetErrno();
}
#endif
#endif /*_TD_UTIL_TAOS_ERROR_H_*/
#endif /*_TD_UTIL_ERROR_H_*/
......@@ -16,7 +16,6 @@
#ifndef _TD_UTIL_ARRAY_H
#define _TD_UTIL_ARRAY_H
#include "os.h"
#include "talgo.h"
#ifdef __cplusplus
......
......@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_UTIL_BUFFER_H
#define _TD_UTIL_BUFFER_H
#ifndef _TD_UTIL_BUFFER_H_
#define _TD_UTIL_BUFFER_H_
#include "os.h"
......@@ -87,12 +87,10 @@ typedef struct SBufferWriter {
void* (*allocator)(void*, size_t);
} SBufferWriter;
////////////////////////////////////////////////////////////////////////////////
// common functions & macros for both reader & writer
#define tbufTell(buf) ((buf)->pos)
////////////////////////////////////////////////////////////////////////////////
/* ------------------------ BUFFER WRITER FUNCTIONS AND MACROS ------------------------ */
// *Allocator*, function to allocate memory, will use 'realloc' if NULL
// *Endian*, if true, writer functions of primitive types will do 'hton' automatically
......@@ -167,4 +165,4 @@ double tbufReadDouble(SBufferReader* buf);
}
#endif
#endif /*_TD_UTIL_BUFFER_H*/
#endif /*_TD_UTIL_BUFFER_H_*/
......@@ -14,11 +14,8 @@
*/
#define _DEFAULT_SOURCE
#include "tbuffer.h"
#include "texception.h"
#include "os.h"
//#include "taoserror.h"
typedef union Un4B {
uint32_t ui;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册