Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Jan 1, 2024
1 parent 1940338 commit 4c9546a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion learn/advanced/package_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ fn anonymousDependency(b: *Build, relative_build_root: []const u8, comptime buil

:::

TODO:更多示例说明
TODO:更多示例说明
5 changes: 1 addition & 4 deletions learn/more/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Foo = struct {
pub fn main() !void {
// true
std.debug.print("blah:{}\n", .{@hasDecl(Foo, "blah")});
// true
// true
// hi 此声明可以被检测到是因为类型和代码处于同一个文件中,这导致他们之间可以互相访问
// 换另一个文件就不行了
std.debug.print("hi:{}\n", .{@hasDecl(Foo, "hi")});
Expand Down Expand Up @@ -214,7 +214,6 @@ pub fn main() !void {

:::


### `@fieldParentPtr`

[`@fieldParentPtr`](https://ziglang.org/documentation/master/#fieldParentPtr) 根据给定的指向结构体字段的指针和名字,可以获取结构体的基指针。
Expand All @@ -236,8 +235,6 @@ pub fn main() !void {
}
```



### `@call`

[`@call`](https://ziglang.org/documentation/master/#call) 调用一个函数,和普通的函数调用方式相同。
Expand Down

0 comments on commit 4c9546a

Please sign in to comment.