From b67d3e5447f4b2bca3ed92f3db84adb3f79f9b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 9 Nov 2011 17:27:52 +0100 Subject: BEAM loader: Clean up handling of error reasons There is no reason to have erts_load_module() return integer values, only to have the caller convert the values to atoms. Return the appropriate atom directly from the place where the error is generated instead. Return NIL if the module was successfully loaded. --- erts/emulator/beam/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/global.h') diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index e4e9386dd7..6c75c3876b 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -866,7 +866,7 @@ typedef struct { Eterm* fname_ptr; /* Pointer to fname table */ } FunctionInfo; -int erts_load_module(Process *c_p, ErtsProcLocks c_p_locks, +Eterm erts_load_module(Process *c_p, ErtsProcLocks c_p_locks, Eterm group_leader, Eterm* mod, byte* code, int size); void init_load(void); BeamInstr* find_function_from_pc(BeamInstr* pc); -- cgit v1.2.3