Skip to content

Commit

Permalink
Load the nif by looking at the module path
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed Mar 19, 2010
1 parent f2e9272 commit 3b421b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wat.erl
Expand Up @@ -12,7 +12,11 @@ init(N) ->
on_load() ->
on_load(32).
on_load(N) ->
erlang:load_nif("./wat", N).
Lib = filename:join([
filename:dirname(code:which(?MODULE)),
?MODULE
]),
erlang:load_nif(Lib, N).

get(_) ->
erlang:error(not_implemented).
Expand Down

0 comments on commit 3b421b2

Please sign in to comment.