diff options
-rw-r--r-- | erts/emulator/beam/beam_load.c | 1 | ||||
-rw-r--r-- | erts/emulator/test/module_info_SUITE.erl | 1 | ||||
-rw-r--r-- | system/doc/reference_manual/modules.xml | 7 |
3 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 5c98d5c0b5..8b3fc90826 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -5119,6 +5119,7 @@ erts_module_info_0(Process* p, Eterm module) BUILD_INFO(am_attributes); BUILD_INFO(am_imports); BUILD_INFO(am_exports); + BUILD_INFO(am_module); #undef BUILD_INFO return list; } diff --git a/erts/emulator/test/module_info_SUITE.erl b/erts/emulator/test/module_info_SUITE.erl index 06cd2a9b9a..f3986f0c4f 100644 --- a/erts/emulator/test/module_info_SUITE.erl +++ b/erts/emulator/test/module_info_SUITE.erl @@ -128,6 +128,7 @@ info(Config) when is_list(Config) -> Info = erlang:get_module_info(?MODULE), All = all_exported(), {ok,{?MODULE,MD5}} = beam_lib:md5(code:which(?MODULE)), + {module, ?MODULE} = lists:keyfind(module, 1, Info), {md5, MD5} = lists:keyfind(md5, 1, Info), {exports, Exports} = lists:keyfind(exports, 1, Info), All = lists:sort(Exports), diff --git a/system/doc/reference_manual/modules.xml b/system/doc/reference_manual/modules.xml index c8f443d9dd..ac778805fe 100644 --- a/system/doc/reference_manual/modules.xml +++ b/system/doc/reference_manual/modules.xml @@ -229,7 +229,7 @@ behaviour_info(callbacks) -> Callbacks.</pre> <p>The <c>module_info/0</c> function in each module returns a list of <c>{Key,Value}</c> tuples with information about the module. Currently, the list contain tuples with the following - <c>Key</c>s: <c>attributes</c>, <c>compile</c>, + <c>Key</c>s: <c>module</c>, <c>attributes</c>, <c>compile</c>, <c>exports</c>, <c>imports</c> and <c>md5</c>. The order and number of tuples may change without prior notice.</p> @@ -246,6 +246,11 @@ behaviour_info(callbacks) -> Callbacks.</pre> <p>The following values are allowed for <c>Key</c>:</p> <taglist> + <tag><c>module</c></tag> + <item> + <p>Return an atom representing the module name.</p> + </item> + <tag><c>attributes</c></tag> <item> <p>Return a list of <c>{AttributeName,ValueList}</c> tuples, |