| 27 #ifndef STRING_LIST_H_ |
27 #ifndef STRING_LIST_H_ |
| 28 #define STRING_LIST_H_ |
28 #define STRING_LIST_H_ |
| 29 |
29 |
| 30 #include "stdinc.h" |
30 #include "stdinc.h" |
| 31 |
31 |
| 32 typedef struct string_list_s { |
32 typedef struct { |
| 33 size_t count; |
33 size_t count; |
| 34 size_t capacity; |
34 size_t capacity; |
| 35 char** items; |
35 char** items; |
| 36 void (*free_item)(void*); |
36 void (*free_item)(void*); |
| 37 } string_list_t; |
37 } string_list; |
| 38 |
38 |
| 39 #ifdef _cplusplus |
39 #ifdef _cplusplus |
| 40 extern "C" { |
40 extern "C" { |
| 41 #endif |
41 #endif |
| 42 |
42 |
| 43 string_list_t* new_string_list_t(); |
43 string_list* new_string_list(); |
| 44 void destroy_string_list_t(string_list_t*); |
44 void destroy_string_list(string_list*); |
| 45 void add_string(string_list_t*, char*); |
45 void add_string(string_list*, char*); |
| 46 |
46 |
| 47 #ifdef _cplusplus |
47 #ifdef _cplusplus |
| 48 } |
48 } |
| 49 #endif |
49 #endif |
| 50 |
50 |