-
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.
libwaku better params validation and a bit more clarity (#3005)
- Loading branch information
1 parent
e8a49b7
commit 19feb6b
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.