diff options
author | Henrik Nord <[email protected]> | 2012-07-18 11:04:02 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-07-18 11:04:02 +0200 |
commit | 154c00482d134260190127040ac6b4efb9f85a8f (patch) | |
tree | 9c09386fda97663f98a4bb5a5840df3d58f0b05f /lib/kernel/src/code.erl | |
parent | f82a553307c865440a01ff38e9b9d6482fe55550 (diff) | |
parent | 7875e98fcac4a45607a99ba08a421206a7cf1586 (diff) | |
download | otp-154c00482d134260190127040ac6b4efb9f85a8f.tar.gz otp-154c00482d134260190127040ac6b4efb9f85a8f.tar.bz2 otp-154c00482d134260190127040ac6b4efb9f85a8f.zip |
Merge branch 'ta/prim_archive-reloading' into maint
* ta/prim_archive-reloading:
escript_SUITE: remove gratuitous space
[erts,kernel,stdlib] fix escript/primary archive reloading
Conflicts:
erts/preloaded/src/erl_prim_loader.erl
OTP-10151
Diffstat (limited to 'lib/kernel/src/code.erl')
-rw-r--r-- | lib/kernel/src/code.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl index b7fda69ce0..363072951e 100644 --- a/lib/kernel/src/code.erl +++ b/lib/kernel/src/code.erl @@ -63,7 +63,7 @@ which/1, where_is_file/1, where_is_file/2, - set_primary_archive/3, + set_primary_archive/4, clash/0]). -export_type([load_error_rsn/0, load_ret/0]). @@ -107,7 +107,7 @@ %% unstick_mod(Module) -> true %% is_sticky(Module) -> boolean() %% which(Module) -> Filename | loaded_ret_atoms() | non_existing -%% set_primary_archive((FileName, Bin, FileInfo) -> ok | {error, Reason} +%% set_primary_archive((FileName, ArchiveBin, FileInfo, ParserFun) -> ok | {error, Reason} %% clash() -> ok prints out number of clashes %%---------------------------------------------------------------------------- @@ -481,13 +481,16 @@ where_is_file(Path, File) when is_list(Path), is_list(File) -> -spec set_primary_archive(ArchiveFile :: file:filename(), ArchiveBin :: binary(), - FileInfo :: file:file_info()) + FileInfo :: file:file_info(), + ParserFun :: fun()) -> 'ok' | {'error', atom()}. -set_primary_archive(ArchiveFile0, ArchiveBin, #file_info{} = FileInfo) +set_primary_archive(ArchiveFile0, ArchiveBin, #file_info{} = FileInfo, + ParserFun) when is_list(ArchiveFile0), is_binary(ArchiveBin) -> ArchiveFile = filename:absname(ArchiveFile0), - case call({set_primary_archive, ArchiveFile, ArchiveBin, FileInfo}) of + case call({set_primary_archive, ArchiveFile, ArchiveBin, FileInfo, + ParserFun}) of {ok, []} -> ok; {ok, _Mode, Ebins} -> |