mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-04 03:36:34 +02:00
Update foreign.md
This commit is contained in:
parent
cf1240eb4e
commit
c3da074f7b
1 changed files with 3 additions and 5 deletions
|
@ -75,10 +75,8 @@ Scheme | C
|
|||
Useful notes:
|
||||
- Use `opaque` if you need to handle any kind of C pointer.
|
||||
- Use `string` to handle C `const char*` (`symbol` is strictly used to represent Scheme symbols).
|
||||
- `thread-data` is a special type used to pass the current thread's `gc_thread_data` instance to a C function. These objects are passed implicitly when making a Scheme function call.
|
||||
- `thread-data` is a special type used to pass the current thread's `gc_thread_data` instance to a C function. These objects are passed implicitly when making a Scheme function call. For example:
|
||||
|
||||
(c-define sub-big-nums bignum "sub_big_nums" thread-data bignum bignum)
|
||||
(sub-big-nums
|
||||
999999999999999999999999
|
||||
222222222222222222222222))
|
||||
(sub-big-nums 999999999999999999999999 222222222222222222222222))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue