Skip to content

Commit

Permalink
Use newly allowed kind of pointers more
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Jan 14, 2025
1 parent 590f83a commit dbf0859
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions examples/aoc2023/day20/part1.jou
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ enum ModuleKind:
class Module:
name: byte[15]

# TODO: use Module* instead of void*
# https://github.com/Akuli/jou/issues/473
sources: void*[10]
sources: Module*[10]
nsources: int
destinations: void*[10]
destinations: Module*[10]
ndestinations: int

kind: ModuleKind
Expand Down
6 changes: 2 additions & 4 deletions examples/aoc2023/day20/part2.jou
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ enum ModuleKind:
class Module:
name: byte[15]

# TODO: use Module* instead of void*
# https://github.com/Akuli/jou/issues/473
sources: void*[10]
sources: Module*[10]
nsources: int
destinations: void*[10]
destinations: Module*[10]
ndestinations: int

kind: ModuleKind
Expand Down
2 changes: 1 addition & 1 deletion examples/aoc2024/day16/part2.jou
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def direction_to_0123(dir: int[2]) -> int:

class StateStats:
best_score: int
sources: void*[10] # TODO: https://github.com/Akuli/jou/issues/473
sources: StateStats*[10]
sources_len: int
x: int
y: int
Expand Down
2 changes: 1 addition & 1 deletion examples/aoc2024/day23/part1.jou
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "stdlib/io.jou"

class Computer:
name: byte[3]
connections: void*[100] # TODO: should be Computer*[100], can't be due to compiler bug
connections: Computer*[100]

def connect(self, other: Computer*) -> None:
assert other != NULL
Expand Down

0 comments on commit dbf0859

Please sign in to comment.