Skip to content

Commit

Permalink
fixes basic errors and dirty_cpu and dirty_io
Browse files Browse the repository at this point in the history
  • Loading branch information
ityonemo committed May 23, 2024
1 parent 4624416 commit 3c7ac33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/zig/nif/_basic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ defmodule Zig.Nif.Basic do
end
]

argument_error_prong = [ErrorProng.argument_error_prong(:elixir, nif.file, nif.line)]
argument_error_prong = ErrorProng.argument_error_prong(:elixir, nif.file, nif.line)

error_return_prong =
List.wrap(
Expand All @@ -130,7 +130,7 @@ defmodule Zig.Nif.Basic do

function_block = function_code ++ error_prongs

quote do
quote context: Elixir do
unquote(Nif.style(nif))(
unquote(nif.name)(unquote_splicing(used_params_ast)),
unquote(function_block)
Expand Down
4 changes: 2 additions & 2 deletions lib/zig/nif/dirty_cpu.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ defmodule Zig.Nif.DirtyCpu do
defdelegate render_zig(nif), to: Basic

@impl true
def table_entries(%{type: type} = nif) do
[{Basic.entrypoint(nif), type.arity, type.name, :dirty_cpu}]
def table_entries(nif) do
[{Basic.entrypoint(nif), nif.signature.arity, nif.name, :dirty_cpu}]
end

@impl true
Expand Down
4 changes: 2 additions & 2 deletions lib/zig/nif/dirty_io.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ defmodule Zig.Nif.DirtyIo do
defdelegate render_zig(nif), to: Basic

@impl true
def table_entries(%{type: type} = nif) do
[{Basic.entrypoint(nif), type.arity, type.name, :dirty_io}]
def table_entries(nif) do
[{Basic.entrypoint(nif), nif.signature.arity, nif.name, :dirty_io}]
end

@impl true
Expand Down

0 comments on commit 3c7ac33

Please sign in to comment.