fix fwrite prototype (#20644)

* fix fwrite prototype

* Update lib/std/syncio.nim

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
Jacek Sieka
2022-10-24 17:25:34 +02:00
committed by GitHub
parent 7c2aa53e44
commit e2f412145f
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ proc c_feof(f: File): cint {.
importc: "feof", header: "<stdio.h>".}
when not declared(c_fwrite):
proc c_fwrite(buf: pointer, size, n: csize_t, f: File): cint {.
proc c_fwrite(buf: pointer, size, n: csize_t, f: File): csize_t {.
importc: "fwrite", header: "<stdio.h>".}
# C routine that is used here:

View File

@@ -211,7 +211,7 @@ else:
proc c_realloc*(p: pointer, newsize: csize_t): pointer {.
importc: "realloc", header: "<stdlib.h>".}
proc c_fwrite*(buf: pointer, size, n: csize_t, f: CFilePtr): cint {.
proc c_fwrite*(buf: pointer, size, n: csize_t, f: CFilePtr): csize_t {.
importc: "fwrite", header: "<stdio.h>".}
proc c_fflush*(f: CFilePtr): cint {.