diff --git a/doc/docs.md b/doc/docs.md index 435ea15af05c6d..14185bcc556065 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -7443,7 +7443,7 @@ By default all V functions have the following naming scheme in C: `[module name] 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: ``` @[export: 'my_custom_c_name'] diff --git a/vlib/v/help/build/build-c.txt b/vlib/v/help/build/build-c.txt index f7e843f2514924..668b19f984662c 100644 --- a/vlib/v/help/build/build-c.txt +++ b/vlib/v/help/build/build-c.txt @@ -68,17 +68,17 @@ see also `v help build`. bare_panic(msg string) Print "V panic: " + msg, along with an optional backtrace and/or the V commit hash, and then exit. - [export: 'malloc'] + @[export: 'malloc'] __malloc(n usize) &C.void Allocates n bytes of memory and returns the pointer to the first byte. - [export: 'free'] + @[export: 'free'] __free(ptr &C.void) Free the block of memory ptr allocated by malloc. realloc(old_area &C.void, new_size usize) &C.void Allocates a new area of size new_size, copies old_area to the new area, and returns a pointer to the new area. - [export: 'calloc'] + @[export: 'calloc'] __calloc(nmemb usize, size usize) &C.void Like malloc, but sets all the bytes to `0` first. memcpy(dest &C.void, src &C.void, n usize) &C.void @@ -102,7 +102,7 @@ see also `v help build`. bare_backtrace() string Return a backtrace that can be printed. If backtraces are not supported, return a message stating that backtraces do not work. - [export: 'exit'] + @[export: 'exit'] __exit(code int) Exit with code code. code is allowed to be ignored.