From 9dfc9857ff5089282f97656fe59012c26ccae52a Mon Sep 17 00:00:00 2001
From: Hans Bolinder
Date: Tue, 25 Mar 2014 14:08:30 +0100
Subject: refman: Clarify the '-callback' attribute
---
system/doc/reference_manual/modules.xml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
(limited to 'system/doc/reference_manual/modules.xml')
diff --git a/system/doc/reference_manual/modules.xml b/system/doc/reference_manual/modules.xml
index 9e5f4de385..cd4c3a1b1b 100644
--- a/system/doc/reference_manual/modules.xml
+++ b/system/doc/reference_manual/modules.xml
@@ -4,7 +4,7 @@
- 20032013
+ 20032014
Ericsson AB. All Rights Reserved.
@@ -134,8 +134,21 @@ fact(0) -> % |
standard behaviours gen_server, gen_fsm,
gen_event or supervisor.
The spelling behavior is also accepted.
- Read more about behaviours and callback modules in OTP Design
- Principles.
+ The callback functions of the module can be specified either
+ directly by the exported function behaviour_info/1:
+
+behaviour_info(callbacks) -> Callbacks.
+ or by a -callback attribute for each callback
+ function:
+
+-callback Name(Arguments) -> Result.
+ where Arguments is a list of zero or more arguments.
+ The -callback attribute is to be preferred since the
+ extra type information can be used by tools to produce
+ documentation or find discrepancies.
+ Read more about behaviours and callback modules in
+
+ OTP Design Principles.