doc: add`[unsafe]` and `[manualfree]` (#9038)
parent
db9b523cc9
commit
2be3a72df6
10
doc/docs.md
10
doc/docs.md
|
@ -3996,6 +3996,16 @@ fn bar() {
|
||||||
foo() // will not be called if `-d debug` is not passed
|
foo() // will not be called if `-d debug` is not passed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calls to this function must be in unsafe{} blocks
|
||||||
|
[unsafe]
|
||||||
|
fn risky_business() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// V's autofree engine will not take care of memory management in this function
|
||||||
|
[manualfree]
|
||||||
|
fn custom_allocations() {
|
||||||
|
}
|
||||||
|
|
||||||
// For C interop only, tells V that the following struct is defined with `typedef struct` in C
|
// For C interop only, tells V that the following struct is defined with `typedef struct` in C
|
||||||
[typedef]
|
[typedef]
|
||||||
struct C.Foo {
|
struct C.Foo {
|
||||||
|
|
Loading…
Reference in New Issue