doc: add calling V from C to toc (#11006)

pull/11008/head
JalonSolov 2021-07-30 19:31:15 -04:00 committed by GitHub
parent 19c11bace9
commit dbacf9cfab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h
* [Structs with reference fields](#structs-with-reference-fields)
* [sizeof and __offsetof](#sizeof-and-__offsetof)
* [Calling C from V](#calling-c-from-v)
* [Calling V from C](#calling-v-from-c)
* [Atomics](#atomics)
* [Global Variables](#global-variables)
* [Debugging](#debugging)
@ -4270,11 +4271,11 @@ fn main() {
## 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]`.
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: