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:
parent
7c2aa53e44
commit
e2f412145f
2 changed files with 2 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ proc c_feof(f: File): cint {.
|
||||||
importc: "feof", header: "<stdio.h>".}
|
importc: "feof", header: "<stdio.h>".}
|
||||||
|
|
||||||
when not declared(c_fwrite):
|
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>".}
|
importc: "fwrite", header: "<stdio.h>".}
|
||||||
|
|
||||||
# C routine that is used here:
|
# C routine that is used here:
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ else:
|
||||||
proc c_realloc*(p: pointer, newsize: csize_t): pointer {.
|
proc c_realloc*(p: pointer, newsize: csize_t): pointer {.
|
||||||
importc: "realloc", header: "<stdlib.h>".}
|
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>".}
|
importc: "fwrite", header: "<stdio.h>".}
|
||||||
|
|
||||||
proc c_fflush*(f: CFilePtr): cint {.
|
proc c_fflush*(f: CFilePtr): cint {.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue