fix strnew ()
authorshura <[email protected]>
Mon, 7 Jul 2025 17:39:15 +0000 (7 20:39 +0300)
committershura <[email protected]>
Mon, 7 Jul 2025 17:39:15 +0000 (7 20:39 +0300)
include/libex/str.h
src/str_stralloc.c

index 1c3237b..cdaaa05 100644 (file)
@@ -122,7 +122,7 @@ typedef struct {
 
 cstr_t *mkcstr (const char *str, size_t len);
 str_t *stralloc (size_t len, size_t chunk_size);
-static str_t *strnew () { return stralloc(64, 64); };
+str_t *strnew ();
 wstr_t *wstralloc (size_t len, size_t chunk_size);
 wstr_t *str2wstr (const char *str, size_t str_len, size_t chunk_size);
 str_t *wstr2str (const wchar_t *str, size_t str_len, size_t chunk_size);
index 4c67122..bd2ccfa 100644 (file)
@@ -26,3 +26,7 @@ str_t *stralloc (size_t len, size_t chunk_size) {
     ret->chunk_size = chunk_size;
     return ret;
 }
+
+str_t *strnew () {
+    return stralloc(64, 64);
+}