mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doc: add calling V from C to toc (#11006)
This commit is contained in:
parent
19c11bace9
commit
dbacf9cfab
@ -131,6 +131,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h
|
|||||||
* [Structs with reference fields](#structs-with-reference-fields)
|
* [Structs with reference fields](#structs-with-reference-fields)
|
||||||
* [sizeof and __offsetof](#sizeof-and-__offsetof)
|
* [sizeof and __offsetof](#sizeof-and-__offsetof)
|
||||||
* [Calling C from V](#calling-c-from-v)
|
* [Calling C from V](#calling-c-from-v)
|
||||||
|
* [Calling V from C](#calling-v-from-c)
|
||||||
* [Atomics](#atomics)
|
* [Atomics](#atomics)
|
||||||
* [Global Variables](#global-variables)
|
* [Global Variables](#global-variables)
|
||||||
* [Debugging](#debugging)
|
* [Debugging](#debugging)
|
||||||
@ -4270,11 +4271,11 @@ fn main() {
|
|||||||
|
|
||||||
## Calling V from C
|
## Calling V from C
|
||||||
|
|
||||||
Since V can compile to C, calling V code from C is very easy.
|
Since V can compile to C, calling V code from C is very easy.
|
||||||
|
|
||||||
By default all V functions have the following naming scheme in C: `[module name]__[fn_name]`.
|
By default all V functions have the following naming scheme in C: `[module name]__[fn_name]`.
|
||||||
|
|
||||||
For example, `fn foo() {}` in module `bar` will result in `foo__bar()`.
|
For example, `fn foo() {}` in module `bar` will result in `bar__foo()`.
|
||||||
|
|
||||||
To use a custom export name, use the `[export]` attribute:
|
To use a custom export name, use the `[export]` attribute:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user