Commit 3475d4b17fbb3926f7d7ad8a56e10d05eb4efba9
1 parent
b407b35c
Exists in
master
and in
3 other branches
Fixing windows build.
Showing
2 changed files
with
7 additions
and
6 deletions
Show diff stats
src/core/array.c
| @@ -61,7 +61,7 @@ void lib3270_string_array_free(LIB3270_STRING_ARRAY *array) | @@ -61,7 +61,7 @@ void lib3270_string_array_free(LIB3270_STRING_ARRAY *array) | ||
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | -LIB3270_INTERNAL void lib3270_string_array_append(LIB3270_STRING_ARRAY *array, const char *str) | 64 | +void lib3270_string_array_append(LIB3270_STRING_ARRAY *array, const char *str) |
| 65 | { | 65 | { |
| 66 | if(array->str) | 66 | if(array->str) |
| 67 | { | 67 | { |
| @@ -77,3 +77,8 @@ LIB3270_INTERNAL void lib3270_string_array_append(LIB3270_STRING_ARRAY *array, c | @@ -77,3 +77,8 @@ LIB3270_INTERNAL void lib3270_string_array_append(LIB3270_STRING_ARRAY *array, c | ||
| 77 | 77 | ||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | +void lib3270_autoptr_cleanup_LIB3270_STRING_ARRAY(LIB3270_STRING_ARRAY **ptr) | ||
| 81 | +{ | ||
| 82 | + lib3270_string_array_free(*ptr); | ||
| 83 | +} | ||
| 84 | + |
src/include/array.h
| @@ -47,10 +47,6 @@ | @@ -47,10 +47,6 @@ | ||
| 47 | LIB3270_INTERNAL LIB3270_STRING_ARRAY * lib3270_string_array_new(void); | 47 | LIB3270_INTERNAL LIB3270_STRING_ARRAY * lib3270_string_array_new(void); |
| 48 | LIB3270_INTERNAL void lib3270_string_array_free(LIB3270_STRING_ARRAY *object); | 48 | LIB3270_INTERNAL void lib3270_string_array_free(LIB3270_STRING_ARRAY *object); |
| 49 | LIB3270_INTERNAL void lib3270_string_array_append(LIB3270_STRING_ARRAY *object, const char *str); | 49 | LIB3270_INTERNAL void lib3270_string_array_append(LIB3270_STRING_ARRAY *object, const char *str); |
| 50 | - | ||
| 51 | - inline void lib3270_autoptr_cleanup_LIB3270_STRING_ARRAY(LIB3270_STRING_ARRAY **ptr) | ||
| 52 | - { | ||
| 53 | - lib3270_string_array_free(*ptr); | ||
| 54 | - } | 50 | + LIB3270_INTERNAL void lib3270_autoptr_cleanup_LIB3270_STRING_ARRAY(LIB3270_STRING_ARRAY **ptr); |
| 55 | 51 | ||
| 56 | #endif // LIB3270_ARRAY_H_INCLUDED | 52 | #endif // LIB3270_ARRAY_H_INCLUDED |