From 0a442615ae4d01adf87e83aadb73946e928bd396 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 4 Oct 2018 20:22:43 +0800 Subject: [PATCH] add types: string_array_t and key_value_array_t --- src/common_define.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/common_define.h b/src/common_define.h index 4592aa4..ff49471 100644 --- a/src/common_define.h +++ b/src/common_define.h @@ -182,12 +182,24 @@ typedef struct int len; } string_t; +typedef struct +{ + string_t *strings; + int count; +} string_array_t; + typedef struct { string_t key; string_t value; } key_value_pair_t; +typedef struct +{ + key_value_pair_t *kv_pairs; + int count; +} key_value_array_t; + typedef void (*FreeDataFunc)(void *ptr); typedef int (*CompareFunc)(void *p1, void *p2); typedef void* (*MallocFunc)(size_t size);