Fix a few more warnings
This commit is contained in:
parent
5668ab3a49
commit
e686ca2523
16 changed files with 131 additions and 129 deletions
|
|
@ -64,7 +64,7 @@ proc node_move*(n: ptr TNode, oldlist: ptr TList, newlist: ptr TList){.
|
|||
cdecl, importc: "node_move", dynlib: clarodll.}
|
||||
|
||||
type
|
||||
TClaroObj*{.pure.} = object
|
||||
TClaroObj*{.pure, inheritable.} = object
|
||||
typ*: array[0..64 - 1, char]
|
||||
destroy_pending*: cint
|
||||
event_handlers*: TList
|
||||
|
|
@ -86,7 +86,7 @@ type
|
|||
TEventHandler*{.pure.} = object
|
||||
typ*: array[0..32 - 1, char]
|
||||
data*: pointer
|
||||
func*: TEventFunc # the function that handles this event
|
||||
fun*: TEventFunc # the function that handles this event
|
||||
|
||||
|
||||
# #define event_handler(n) void n ( TClaroObj *object, event_t *event )
|
||||
|
|
@ -121,10 +121,10 @@ proc object_set_parent*(obj: ptr TClaroObj, parent: ptr TClaroObj){.cdecl,
|
|||
# event functions
|
||||
|
||||
proc object_addhandler*(obj: ptr TClaroObj, event: cstring,
|
||||
func: TEventFunc){.cdecl,
|
||||
fun: TEventFunc){.cdecl,
|
||||
importc: "object_addhandler", dynlib: clarodll.}
|
||||
proc object_addhandler_interface*(obj: ptr TClaroObj, event: cstring,
|
||||
func: TEventFunc, data: pointer){.cdecl,
|
||||
fun: TEventFunc, data: pointer){.cdecl,
|
||||
importc: "object_addhandler_interface", dynlib: clarodll.}
|
||||
proc event_send*(obj: ptr TClaroObj, event: cstring, fmt: cstring): cint{.
|
||||
varargs, cdecl, importc: "event_send", dynlib: clarodll.}
|
||||
|
|
@ -258,7 +258,7 @@ proc image_load_inline_png*(parent: ptr TClaroObj, data: cstring,
|
|||
## len size of data
|
||||
|
||||
when true:
|
||||
nil
|
||||
discard
|
||||
else:
|
||||
# status icons are not supported on all platforms yet:
|
||||
type
|
||||
|
|
@ -682,7 +682,7 @@ const
|
|||
type
|
||||
TCanvas*{.pure.} = object of TWidget
|
||||
surface*: cairo.PSurface
|
||||
cr*: Cairo.PContext
|
||||
cr*: cairo.PContext
|
||||
surfdata*: pointer
|
||||
fontdata*: pointer
|
||||
font_height*: cint
|
||||
|
|
@ -854,7 +854,7 @@ proc canvas_cairo_buffered_text_display_count*(widget: ptr TCanvas,
|
|||
text: cstring, width: cint): cint{.cdecl,
|
||||
importc: "canvas_cairo_buffered_text_display_count",
|
||||
dynlib: clarodll.}
|
||||
proc canvas_get_cairo_context*(widget: ptr TCanvas): Cairo.PContext {.cdecl,
|
||||
proc canvas_get_cairo_context*(widget: ptr TCanvas): cairo.PContext {.cdecl,
|
||||
importc: "canvas_get_cairo_context", dynlib: clarodll.}
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ type
|
|||
CheckProc* = proc (handle: PCheck, status: cint) {.cdecl.}
|
||||
IdleProc* = proc (handle: PIdle, status: cint) {.cdecl.}
|
||||
|
||||
PSockAddr* = ptr TSockAddr
|
||||
PSockAddr* = ptr SockAddr
|
||||
|
||||
GetAddrInfoProc* = proc (handle: PGetAddrInfo, status: cint, res: ptr TAddrInfo)
|
||||
GetAddrInfoProc* = proc (handle: PGetAddrInfo, status: cint, res: ptr AddrInfo)
|
||||
|
||||
ExitProc* = proc (a2: PProcess, exit_status: cint, term_signal: cint)
|
||||
FsProc* = proc (req: PFS)
|
||||
|
|
@ -210,7 +210,7 @@ type
|
|||
cunsigned = int
|
||||
|
||||
UdpSendProc* = proc (req: PUdpSend, status: cint)
|
||||
UdpRecvProc* = proc (handle: PUdp, nread: cssize, buf: TBuf, adr: ptr TSockAddr, flags: cunsigned)
|
||||
UdpRecvProc* = proc (handle: PUdp, nread: cssize, buf: TBuf, adr: ptr SockAddr, flags: cunsigned)
|
||||
|
||||
TUdp* {.pure, final, importc: "uv_udp_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
|
|
@ -366,7 +366,7 @@ type
|
|||
tcp_port* {.importc: "tcp_port".}: TPort
|
||||
socket_send_buffer_size* {.importc: "socket_send_buffer_size".}: int
|
||||
socket_recv_buffer_size* {.importc: "socket_receive_buffer_size".}: int
|
||||
servers* {.importc: "servers".}: ptr TInAddr
|
||||
servers* {.importc: "servers".}: ptr InAddr
|
||||
nservers* {.importc: "nservers".}: int
|
||||
domains* {.importc: "domains".}: ptr cstring
|
||||
ndomains* {.importc: "ndomains".}: int
|
||||
|
|
@ -450,19 +450,19 @@ proc write*(req: PWrite, handle: PStream, bufs: ptr TBuf, bufcnt: cint, send_han
|
|||
proc tcp_init*(a2: PLoop, handle: PTcp): cint{.
|
||||
importc: "uv_tcp_init", header: "uv.h".}
|
||||
|
||||
proc tcp_bind*(handle: PTcp, a3: TSockAddrIn): cint{.
|
||||
proc tcp_bind*(handle: PTcp, a3: SockAddrIn): cint{.
|
||||
importc: "uv_tcp_bind", header: "uv.h".}
|
||||
|
||||
proc tcp_bind6*(handle: PTcp, a3: TSockAddrIn6): cint{.
|
||||
importc: "uv_tcp_bind6", header: "uv.h".}
|
||||
|
||||
proc tcp_getsockname*(handle: PTcp, name: ptr TSockAddr, namelen: var cint): cint{.
|
||||
proc tcp_getsockname*(handle: PTcp, name: ptr SockAddr, namelen: var cint): cint{.
|
||||
importc: "uv_tcp_getsockname", header: "uv.h".}
|
||||
|
||||
proc tcp_getpeername*(handle: PTcp, name: ptr TSockAddr, namelen: var cint): cint{.
|
||||
proc tcp_getpeername*(handle: PTcp, name: ptr SockAddr, namelen: var cint): cint{.
|
||||
importc: "uv_tcp_getpeername", header: "uv.h".}
|
||||
|
||||
proc tcp_connect*(req: PConnect, handle: PTcp, address: TSockAddrIn, cb: ConnectProc): cint{.
|
||||
proc tcp_connect*(req: PConnect, handle: PTcp, address: SockAddrIn, cb: ConnectProc): cint{.
|
||||
importc: "uv_tcp_connect", header: "uv.h".}
|
||||
|
||||
proc tcp_connect6*(req: PConnect, handle: PTcp, address: TSockAddrIn6, cb: ConnectProc): cint{.
|
||||
|
|
@ -471,16 +471,16 @@ proc tcp_connect6*(req: PConnect, handle: PTcp, address: TSockAddrIn6, cb: Conne
|
|||
proc udp_init*(a2: PLoop, handle: PUdp): cint{.
|
||||
importc: "uv_udp_init", header: "uv.h".}
|
||||
|
||||
proc udp_bind*(handle: PUdp, adr: TSockAddrIn, flags: cunsigned): cint{.
|
||||
proc udp_bind*(handle: PUdp, adr: SockAddrIn, flags: cunsigned): cint{.
|
||||
importc: "uv_udp_bind", header: "uv.h".}
|
||||
|
||||
proc udp_bind6*(handle: PUdp, adr: TSockAddrIn6, flags: cunsigned): cint{.
|
||||
importc: "uv_udp_bind6", header: "uv.h".}
|
||||
|
||||
proc udp_getsockname*(handle: PUdp, name: ptr TSockAddr, namelen: var cint): cint{.
|
||||
proc udp_getsockname*(handle: PUdp, name: ptr SockAddr, namelen: var cint): cint{.
|
||||
importc: "uv_udp_getsockname", header: "uv.h".}
|
||||
|
||||
proc udp_send*(req: PUdpSend, handle: PUdp, bufs: ptr TBuf, bufcnt: cint, adr: TSockAddrIn, send_cb: UdpSendProc): cint{.
|
||||
proc udp_send*(req: PUdpSend, handle: PUdp, bufs: ptr TBuf, bufcnt: cint, adr: SockAddrIn, send_cb: UdpSendProc): cint{.
|
||||
importc: "uv_udp_send", header: "uv.h".}
|
||||
|
||||
proc udp_send6*(req: PUdpSend, handle: PUdp, bufs: ptr TBuf, bufcnt: cint, adr: TSockAddrIn6, send_cb: UdpSendProc): cint{.
|
||||
|
|
@ -492,7 +492,7 @@ proc udp_recv_start*(handle: PUdp, alloc_cb: AllocProc, recv_cb: UdpRecvProc): c
|
|||
proc udp_recv_stop*(handle: PUdp): cint{.
|
||||
importc: "uv_udp_recv_stop", header: "uv.h".}
|
||||
|
||||
proc tty_init*(a2: PLoop, a3: pTTy, fd: TFile): cint{.
|
||||
proc tty_init*(a2: PLoop, a3: pTTy, fd: File): cint{.
|
||||
importc: "uv_tty_init", header: "uv.h".}
|
||||
|
||||
proc tty_set_mode*(a2: pTTy, mode: cint): cint{.
|
||||
|
|
@ -504,13 +504,13 @@ proc tty_get_winsize*(a2: pTTy, width: var cint, height: var cint): cint{.
|
|||
proc tty_reset_mode*() {.
|
||||
importc: "uv_tty_reset_mode", header: "uv.h".}
|
||||
|
||||
proc guess_handle*(file: TFile): THandleType{.
|
||||
proc guess_handle*(file: File): THandleType{.
|
||||
importc: "uv_guess_handle", header: "uv.h".}
|
||||
|
||||
proc pipe_init*(a2: PLoop, handle: PPipe, ipc: int): cint{.
|
||||
importc: "uv_pipe_init", header: "uv.h".}
|
||||
|
||||
proc pipe_open*(a2: PPipe, file: TFile){.
|
||||
proc pipe_open*(a2: PPipe, file: File){.
|
||||
importc: "uv_pipe_open", header: "uv.h".}
|
||||
|
||||
proc pipe_bind*(handle: PPipe, name: cstring): cint{.
|
||||
|
|
@ -576,10 +576,10 @@ proc ares_init_options*(a2: PLoop, channel: PAresChannel, options: PAresOptions,
|
|||
proc ares_destroy*(a2: PLoop, channel: PAresChannel){.
|
||||
importc: "uv_ares_destroy", header: "uv.h".}
|
||||
|
||||
proc getaddrinfo*(a2: PLoop, handle: PGetAddrInfo,getaddrinfo_cb: GetAddrInfoProc, node: cstring, service: cstring, hints: ptr TAddrInfo): cint{.
|
||||
proc getaddrinfo*(a2: PLoop, handle: PGetAddrInfo,getaddrinfo_cb: GetAddrInfoProc, node: cstring, service: cstring, hints: ptr AddrInfo): cint{.
|
||||
importc: "uv_getaddrinfo", header: "uv.h".}
|
||||
|
||||
proc freeaddrinfo*(ai: ptr TAddrInfo){.
|
||||
proc freeaddrinfo*(ai: ptr AddrInfo){.
|
||||
importc: "uv_freeaddrinfo", header: "uv.h".}
|
||||
|
||||
proc spawn*(a2: PLoop, a3: PProcess, options: TProcessOptions): cint{.
|
||||
|
|
@ -594,19 +594,19 @@ proc queue_work*(loop: PLoop, req: PWork, work_cb: WorkProc, after_work_cb: Afte
|
|||
proc req_cleanup*(req: PFS){.
|
||||
importc: "uv_fs_req_cleanup", header: "uv.h".}
|
||||
|
||||
proc close*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
|
||||
proc close*(loop: PLoop, req: PFS, file: File, cb: FsProc): cint{.
|
||||
importc: "uv_fs_close", header: "uv.h".}
|
||||
|
||||
proc open*(loop: PLoop, req: PFS, path: cstring, flags: cint, mode: cint, cb: FsProc): cint{.
|
||||
importc: "uv_fs_open", header: "uv.h".}
|
||||
|
||||
proc read*(loop: PLoop, req: PFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
|
||||
proc read*(loop: PLoop, req: PFS, file: File, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
|
||||
importc: "uv_fs_read", header: "uv.h".}
|
||||
|
||||
proc unlink*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
|
||||
importc: "uv_fs_unlink", header: "uv.h".}
|
||||
|
||||
proc write*(loop: PLoop, req: PFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
|
||||
proc write*(loop: PLoop, req: PFS, file: File, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
|
||||
importc: "uv_fs_write", header: "uv.h".}
|
||||
|
||||
proc mkdir*(loop: PLoop, req: PFS, path: cstring, mode: cint, cb: FsProc): cint{.
|
||||
|
|
@ -621,22 +621,22 @@ proc readdir*(loop: PLoop, req: PFS, path: cstring, flags: cint, cb: FsProc): ci
|
|||
proc stat*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
|
||||
importc: "uv_fs_stat", header: "uv.h".}
|
||||
|
||||
proc fstat*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
|
||||
proc fstat*(loop: PLoop, req: PFS, file: File, cb: FsProc): cint{.
|
||||
importc: "uv_fs_fstat", header: "uv.h".}
|
||||
|
||||
proc rename*(loop: PLoop, req: PFS, path: cstring, new_path: cstring, cb: FsProc): cint{.
|
||||
importc: "uv_fs_rename", header: "uv.h".}
|
||||
|
||||
proc fsync*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
|
||||
proc fsync*(loop: PLoop, req: PFS, file: File, cb: FsProc): cint{.
|
||||
importc: "uv_fs_fsync", header: "uv.h".}
|
||||
|
||||
proc fdatasync*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
|
||||
proc fdatasync*(loop: PLoop, req: PFS, file: File, cb: FsProc): cint{.
|
||||
importc: "uv_fs_fdatasync", header: "uv.h".}
|
||||
|
||||
proc ftruncate*(loop: PLoop, req: PFS, file: TFile, offset: coff, cb: FsProc): cint{.
|
||||
proc ftruncate*(loop: PLoop, req: PFS, file: File, offset: coff, cb: FsProc): cint{.
|
||||
importc: "uv_fs_ftruncate", header: "uv.h".}
|
||||
|
||||
proc sendfile*(loop: PLoop, req: PFS, out_fd: TFile, in_fd: TFile, in_offset: coff, length: csize, cb: FsProc): cint{.
|
||||
proc sendfile*(loop: PLoop, req: PFS, out_fd: File, in_fd: File, in_offset: coff, length: csize, cb: FsProc): cint{.
|
||||
importc: "uv_fs_sendfile", header: "uv.h".}
|
||||
|
||||
proc chmod*(loop: PLoop, req: PFS, path: cstring, mode: cint, cb: FsProc): cint{.
|
||||
|
|
@ -645,7 +645,7 @@ proc chmod*(loop: PLoop, req: PFS, path: cstring, mode: cint, cb: FsProc): cint{
|
|||
proc utime*(loop: PLoop, req: PFS, path: cstring, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
|
||||
importc: "uv_fs_utime", header: "uv.h".}
|
||||
|
||||
proc futime*(loop: PLoop, req: PFS, file: TFile, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
|
||||
proc futime*(loop: PLoop, req: PFS, file: File, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
|
||||
importc: "uv_fs_futime", header: "uv.h".}
|
||||
|
||||
proc lstat*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
|
||||
|
|
@ -660,25 +660,25 @@ proc symlink*(loop: PLoop, req: PFS, path: cstring, new_path: cstring, flags: ci
|
|||
proc readlink*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
|
||||
importc: "uv_fs_readlink", header: "uv.h".}
|
||||
|
||||
proc fchmod*(loop: PLoop, req: PFS, file: TFile, mode: cint, cb: FsProc): cint{.
|
||||
proc fchmod*(loop: PLoop, req: PFS, file: File, mode: cint, cb: FsProc): cint{.
|
||||
importc: "uv_fs_fchmod", header: "uv.h".}
|
||||
|
||||
proc chown*(loop: PLoop, req: PFS, path: cstring, uid: cint, gid: cint, cb: FsProc): cint{.
|
||||
importc: "uv_fs_chown", header: "uv.h".}
|
||||
|
||||
proc fchown*(loop: PLoop, req: PFS, file: TFile, uid: cint, gid: cint, cb: FsProc): cint{.
|
||||
proc fchown*(loop: PLoop, req: PFS, file: File, uid: cint, gid: cint, cb: FsProc): cint{.
|
||||
importc: "uv_fs_fchown", header: "uv.h".}
|
||||
|
||||
proc event_init*(loop: PLoop, handle: PFSEvent, filename: cstring, cb: FsEventProc): cint{.
|
||||
importc: "uv_fs_event_init", header: "uv.h".}
|
||||
|
||||
proc ip4_addr*(ip: cstring, port: cint): TSockAddrIn{.
|
||||
proc ip4_addr*(ip: cstring, port: cint): SockAddrIn{.
|
||||
importc: "uv_ip4_addr", header: "uv.h".}
|
||||
|
||||
proc ip6_addr*(ip: cstring, port: cint): TSockAddrIn6{.
|
||||
importc: "uv_ip6_addr", header: "uv.h".}
|
||||
|
||||
proc ip4_name*(src: ptr TSockAddrIn, dst: cstring, size: csize): cint{.
|
||||
proc ip4_name*(src: ptr SockAddrIn, dst: cstring, size: csize): cint{.
|
||||
importc: "uv_ip4_name", header: "uv.h".}
|
||||
|
||||
proc ip6_name*(src: ptr TSockAddrIn6, dst: cstring, size: csize): cint{.
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ proc uncompress*(sourceBuf: cstring, sourceLen: int): string =
|
|||
return
|
||||
|
||||
# Make sure memory allocated by inflateInit2() is freed eventually.
|
||||
finally: discard inflateEnd(z)
|
||||
defer: discard inflateEnd(z)
|
||||
|
||||
# Decompress all of self.
|
||||
while true:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue