-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f856298
commit 47a6235
Showing
13 changed files
with
321 additions
and
291 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
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
################################################################################ | ||
### Exported types | ||
|
||
type WakuCallBack* = proc( | ||
callerRet: cint, msg: ptr cchar, len: csize_t, userData: pointer | ||
) {.cdecl, gcsafe, raises: [].} | ||
|
||
const RET_OK*: cint = 0 | ||
const RET_ERR*: cint = 1 | ||
const RET_MISSING_CALLBACK*: cint = 2 | ||
|
||
### End of exported types | ||
################################################################################ | ||
|
||
################################################################################ | ||
### FFI utils | ||
|
||
template foreignThreadGc*(body: untyped) = | ||
when declared(setupForeignThreadGc): | ||
setupForeignThreadGc() | ||
|
||
body | ||
|
||
when declared(tearDownForeignThreadGc): | ||
tearDownForeignThreadGc() | ||
|
||
type onDone* = proc() | ||
|
||
### End of FFI utils | ||
################################################################################ |
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.