aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-23 17:07:23 +0100
committerRickard Green <[email protected]>2017-02-06 19:54:48 +0100
commit5a97997217e5c3f901e8fefbd7bbf6c64652c9a8 (patch)
treebc7ebe05fcc7027997098d8c35c6c377dc731286 /lib/kernel/src
parent7c70239985c4591ef2770a59a1bf62b51f5108cc (diff)
downloadotp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.gz
otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.tar.bz2
otp-5a97997217e5c3f901e8fefbd7bbf6c64652c9a8.zip
Use magic refs for code loading state
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/code.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index 5a7ca493cc..2a06d0cb15 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.erl
@@ -489,13 +489,13 @@ prepare_check_uniq_1([], [_|_]=Errors) ->
{error,Errors}.
partition_on_load(Prep) ->
- P = fun({_,{Bin,_,_}}) ->
- erlang:has_prepared_code_on_load(Bin)
+ P = fun({_,{PC,_,_}}) ->
+ erlang:has_prepared_code_on_load(PC)
end,
lists:partition(P, Prep).
verify_prepared([{M,{Prep,Name,_Native}}|T])
- when is_atom(M), is_binary(Prep), is_list(Name) ->
+ when is_atom(M), is_list(Name) ->
try erlang:has_prepared_code_on_load(Prep) of
false ->
verify_prepared(T);
@@ -562,10 +562,10 @@ prepare_loading_fun() ->
GetNative = get_native_fun(),
fun(Mod, FullName, Beam) ->
case erlang:prepare_loading(Mod, Beam) of
- Prepared when is_binary(Prepared) ->
- {ok,{Prepared,FullName,GetNative(Beam)}};
{error,_}=Error ->
- Error
+ Error;
+ Prepared ->
+ {ok,{Prepared,FullName,GetNative(Beam)}}
end
end.