Skip to content

Commit

Permalink
asyncdispatch: export Callback (#14042) [backport]
Browse files Browse the repository at this point in the history
This let us see the definition of `Callback` in docs, which is required
to even make use of asyncdispatch.

Ref #13539.

(cherry picked from commit 7beed44)
  • Loading branch information
alaviss authored and narimiran committed Apr 23, 2020
1 parent 5a1ed8f commit 8cf8879
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/asyncdispatch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ when defined(windows) or defined(nimdoc):
pcd: PostCallbackDataPtr
AsyncEvent* = ptr AsyncEventImpl

Callback = proc (fd: AsyncFD): bool {.closure, gcsafe.}
Callback* = proc (fd: AsyncFD): bool {.closure, gcsafe.}

proc hash(x: AsyncFD): Hash {.borrow.}
proc `==`*(x: AsyncFD, y: AsyncFD): bool {.borrow.}
Expand Down Expand Up @@ -1093,7 +1093,7 @@ else:
# queue.
type
AsyncFD* = distinct cint
Callback = proc (fd: AsyncFD): bool {.closure, gcsafe.}
Callback* = proc (fd: AsyncFD): bool {.closure, gcsafe.}

AsyncData = object
readList: seq[Callback]
Expand Down

0 comments on commit 8cf8879

Please sign in to comment.