aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/tutorial/complex6.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-04-28 10:21:36 +0000
committerErlang/OTP <[email protected]>2010-04-28 10:21:36 +0000
commit933304e3dcce052eff6d36c37b708949e53597c3 (patch)
tree2ffd95992221fda3d31ec1cfe8ec41584b21bd07 /system/doc/tutorial/complex6.erl
parent39e5ca57147c08502806f873c107c77e197a78ab (diff)
downloadotp-933304e3dcce052eff6d36c37b708949e53597c3.tar.gz
otp-933304e3dcce052eff6d36c37b708949e53597c3.tar.bz2
otp-933304e3dcce052eff6d36c37b708949e53597c3.zip
OTP-8474 NIF improvements after R13B04
New NIF API function enif_make_new_binary
Diffstat (limited to 'system/doc/tutorial/complex6.erl')
-rw-r--r--system/doc/tutorial/complex6.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/doc/tutorial/complex6.erl b/system/doc/tutorial/complex6.erl
new file mode 100644
index 0000000000..a5f51886c8
--- /dev/null
+++ b/system/doc/tutorial/complex6.erl
@@ -0,0 +1,11 @@
+-module(complex6).
+-export([foo/1, bar/1]).
+-on_load(init/0).
+
+init() ->
+ ok = erlang:load_nif("./complex6_nif", 0).
+
+foo(_X) ->
+ exit(nif_library_not_loaded).
+bar(_Y) ->
+ exit(nif_library_not_loaded).