diff options
Diffstat (limited to 'system/doc/reference_manual/modules.xml')
-rw-r--r-- | system/doc/reference_manual/modules.xml | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/system/doc/reference_manual/modules.xml b/system/doc/reference_manual/modules.xml index b373e2506b..360345d4ad 100644 --- a/system/doc/reference_manual/modules.xml +++ b/system/doc/reference_manual/modules.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2003</year><year>2022</year> + <year>2003</year><year>2023</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -141,24 +141,23 @@ fact(0) -> % | <c>[Name1/Arity1, ..., NameN/ArityN]</c>, where each <c>NameI</c> is an atom and <c>ArityI</c> an integer. </p> - <note> - <p> - The <c>-nifs()</c> attribute was introduced in OTP 25.0. For older - Erlang source code without it, any functions in the module may be - loaded as NIFs. However, it is recommended to declare the NIFs with - the <c>-nifs</c> attribute. This allows the compiler to make better - decisions regarding optimizations for example. - </p> + <p>While not strictly necessary, it is recommended to use <c>-nifs()</c> + attribute in any module that load NIFs, to allow the compiler to make + better decisions regarding optimizations.</p> + <p>There is no need to add <c>-nifs([])</c> in modules that do not + load NIFs. The lack of any call to + <seemfa marker="erts:erlang#load_nif/2"><c>erlang:load_nif/2</c></seemfa>, + from within the module, is enough for the compiler to draw the + same conclusion. + </p> + <change> <p> - There is no need to add <c>-nifs([])</c> in modules that do not - load NIFs. The lack of any call to - <seemfa marker="erts:erlang#load_nif/2"><c>erlang:load_nif/2</c></seemfa>, - from within the module, is enough for the compiler to draw the - same conclusion. + The special meaning for the <c>-nifs()</c> attribute was + introduced in Erlang/OTP 25.0. In previous releases, the + <c>-nifs()</c> was accepted, but had no special meaning. </p> - </note> + </change> </item> - </taglist> </section> @@ -344,9 +343,7 @@ behaviour_info(callbacks) -> Callbacks.</pre> <tag><c>md5</c></tag> <item> - <p>Returns a binary representing the MD5 checksum of the module. - If the module has native code loaded, this will be the MD5 of the - native code, not the BEAM bytecode.</p> + <p>Returns a binary representing the MD5 checksum of the module.</p> </item> <tag><c>exports</c></tag> |