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

tbuffer

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