doc: minor fixes

pull/5311/head
Alexander Medvednikov 2020-06-09 22:47:41 +02:00 committed by GitHub
parent b9bd296adc
commit 3f6c3edd19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -80,7 +80,6 @@ you can do in V.
<td><a href='#cross-compilation'>Cross compilation</a></td> <td><a href='#cross-compilation'>Cross compilation</a></td>
<td><a href='#cross-platform-shell-scripts-in-v'>Cross-platform shell scripts in V</a></td> <td><a href='#cross-platform-shell-scripts-in-v'>Cross-platform shell scripts in V</a></td>
<td><a href='#attributes'>Attributes</a></td> <td><a href='#attributes'>Attributes</a></td>
</tr> </tr>
<tr> <tr>
<td><a href='#appendix-i-keywords'>Appendix I: Keywords</a></td> <td><a href='#appendix-i-keywords'>Appendix I: Keywords</a></td>
@ -1942,15 +1941,12 @@ On Unix-like platforms, the file can be run directly after making it executable
## Attributes ## Attributes
```v ```v
// calling this function will result in a deprecation warning // Calling this function will result in a deprecation warning
[deprecated] [deprecated]
fn foo() {} fn foo() {}
// for C interop only, tells V that the following struct is defined with `typedef struct` in C // The following struct can only be used as a reference (`&Window`) and allocated on the heap.
[typedef] [ref_only]
struct C.Foo { }
[ref_only] //
struct Window { struct Window {
} }
@ -1963,7 +1959,11 @@ fn bar() {
foo() // will not be called if `-d debug` is not passed foo() // will not be called if `-d debug` is not passed
} }
// declare a function with WINAPI // For C interop only, tells V that the following struct is defined with `typedef struct` in C
[typedef]
struct C.Foo { }
// Declare a function with WINAPI
[windows_stdcall] [windows_stdcall]
fn C.WinFunction() fn C.WinFunction()
``` ```