| ... | @@ -7517,13 +7517,13 @@ test "main" { | ... | @@ -7517,13 +7517,13 @@ test "main" { |
| 7517 | {#header_close#} | 7517 | {#header_close#} |
| 7518 | | 7518 | |
| 7519 | {#header_open|@export#} | 7519 | {#header_open|@export#} |
| 7520 | <pre>{#syntax#}@export(target: anytype, comptime options: std.builtin.ExportOptions) void{#endsyntax#}</pre> | 7520 | <pre>{#syntax#}@export(identifier, comptime options: std.builtin.ExportOptions) void{#endsyntax#}</pre> |
| 7521 | <p> | 7521 | <p> |
| 7522 | Creates a symbol in the output object file. | 7522 | Creates a symbol in the output object file. |
| 7523 | </p> | 7523 | </p> |
| 7524 | <p> | 7524 | <p> |
| 7525 | This function can be called from a {#link|comptime#} block to conditionally export symbols. | 7525 | This function can be called from a {#link|comptime#} block to conditionally export symbols. |
| 7526 | When {#syntax#}target{#endsyntax#} is a function with the C calling convention and | 7526 | When {#syntax#}identifier{#endsyntax#} is a function with the C calling convention and |
| 7527 | {#syntax#}options.linkage{#endsyntax#} is {#syntax#}Strong{#endsyntax#}, this is equivalent to | 7527 | {#syntax#}options.linkage{#endsyntax#} is {#syntax#}Strong{#endsyntax#}, this is equivalent to |
| 7528 | the {#syntax#}export{#endsyntax#} keyword used on a function: | 7528 | the {#syntax#}export{#endsyntax#} keyword used on a function: |
| 7529 | </p> | 7529 | </p> |
| ... | @@ -7550,6 +7550,14 @@ export fn @"A function name that is a complete sentence."() void {} | ... | @@ -7550,6 +7550,14 @@ export fn @"A function name that is a complete sentence."() void {} |
| 7550 | {#see_also|Exporting a C Library#} | 7550 | {#see_also|Exporting a C Library#} |
| 7551 | {#header_close#} | 7551 | {#header_close#} |
| 7552 | | 7552 | |
| | 7553 | {#header_open|@extern#} |
| | 7554 | <pre>{#syntax#}@extern(T: type, comptime options: std.builtin.ExternOptions) *T{#endsyntax#}</pre> |
| | 7555 | <p> |
| | 7556 | Creates a reference to an external symbol in the output object file. |
| | 7557 | </p> |
| | 7558 | {#see_also|@export#} |
| | 7559 | {#header_close#} |
| | 7560 | |
| 7553 | {#header_open|@fence#} | 7561 | {#header_open|@fence#} |
| 7554 | <pre>{#syntax#}@fence(order: AtomicOrder){#endsyntax#}</pre> | 7562 | <pre>{#syntax#}@fence(order: AtomicOrder){#endsyntax#}</pre> |
| 7555 | <p> | 7563 | <p> |