-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libwaky better params validation and a bit more clarity
- Loading branch information
1 parent
bd2cf99
commit 88e3755
Showing
5 changed files
with
77 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
import ./waku_thread/waku_thread | ||
|
||
type WakuCallBack* = proc( | ||
callerRet: cint, msg: ptr cchar, len: csize_t, userData: pointer | ||
) {.cdecl, gcsafe, raises: [].} | ||
|
||
template checkLibwakuParams*(ctx: ptr WakuContext, callback: WakuCallBack, userData: pointer) = | ||
ctx[].userData = userData | ||
|
||
if isNil(callback): | ||
return RET_MISSING_CALLBACK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.