summaryrefslogtreecommitdiff
path: root/src/runtime/c/gu/file.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-09-04 10:06:07 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-09-04 10:06:07 +0000
commit805f95eac61ef17d7ec3f87dda1dfbc932951dee (patch)
tree62ab374454b87aa4d7d04bbee18ead8a4cbace37 /src/runtime/c/gu/file.c
parentae87c3d272104a933d148a544c9eab15865c1758 (diff)
remove the dependency on the HAVE_STATEMENT_EXPRESSIONS flag. This reduces the dependency on the ./configure script
Diffstat (limited to 'src/runtime/c/gu/file.c')
-rw-r--r--src/runtime/c/gu/file.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/runtime/c/gu/file.c b/src/runtime/c/gu/file.c
index ed1956537..f51eb1ca1 100644
--- a/src/runtime/c/gu/file.c
+++ b/src/runtime/c/gu/file.c
@@ -34,10 +34,12 @@ gu_file_flush(GuOutStream* stream, GuExn* err)
GuOut*
gu_file_out(FILE* file, GuPool* pool)
{
- GuFileOutStream* fos = gu_new_i(pool, GuFileOutStream,
- .stream.output = gu_file_output,
- .stream.flush = gu_file_flush,
- .file = file);
+ GuFileOutStream* fos = gu_new(GuFileOutStream, pool);
+ fos->stream.begin_buf = NULL;
+ fos->stream.end_buf = NULL;
+ fos->stream.output = gu_file_output;
+ fos->stream.flush = gu_file_flush;
+ fos->file = file;
return gu_new_out(&fos->stream, pool);
}
@@ -66,8 +68,10 @@ gu_file_input(GuInStream* stream, uint8_t* buf, size_t sz, GuExn* err)
GuIn*
gu_file_in(FILE* file, GuPool* pool)
{
- GuFileInStream* fis = gu_new_s(pool, GuFileInStream,
- .stream.input = gu_file_input,
- .file = file);
+ GuFileInStream* fis = gu_new(GuFileInStream, pool);
+ fis->stream.begin_buffer = NULL;
+ fis->stream.end_buffer = NULL;
+ fis->stream.input = gu_file_input;
+ fis->file = file;
return gu_new_in(&fis->stream, pool);
}