summaryrefslogtreecommitdiffhomepage
path: root/examples/read.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-06-17 18:04:37 +0200
committerTyge Løvset <[email protected]>2022-06-17 18:04:37 +0200
commit755bcee8a97b2912d047895d37f5b60672486144 (patch)
tree86f662acd342394601984ff8e13f61a803c5275b /examples/read.c
parentfb39cd5db944d13b6de110885081e483234b453f (diff)
downloadSTC-modified-755bcee8a97b2912d047895d37f5b60672486144.tar.gz
STC-modified-755bcee8a97b2912d047895d37f5b60672486144.zip
Various refactoring. Renamed c_apply_arr() => c_apply_array()
Diffstat (limited to 'examples/read.c')
-rw-r--r--examples/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/read.c b/examples/read.c
index 60698789..26fc46dd 100644
--- a/examples/read.c
+++ b/examples/read.c
@@ -9,7 +9,7 @@ cvec_str read_file(const char* name)
c_autovar (FILE* f = fopen(name, "r"), fclose(f))
c_autovar (cstr line = cstr_init(), cstr_drop(&line))
while (cstr_getline(&line, f))
- cvec_str_emplace_back(&vec, cstr_str(&line));
+ cvec_str_push(&vec, cstr_clone(line));
return vec;
}