changeset 96:95f67e67feb0

- updated dyncallback.3, blurb about handler's retval signature character was outdated
author cslag
date Sat, 04 Jun 2016 19:32:21 +0200
parents 9e99918065e6
children d0787f3b81fb
files dyncallback/dyncallback.3
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dyncallback/dyncallback.3	Sat Jun 04 18:36:12 2016 +0200
+++ b/dyncallback/dyncallback.3	Sat Jun 04 19:32:21 2016 +0200
@@ -39,14 +39,15 @@
 .Fn dcbNewCallback
 creates a new callback object, where
 .Ar signature
-is a signature string describing the function to be called back (see manual for
-format). This is needed for
+is a signature string describing the function to be called back (see manual or
+dyncall_signature.h for format). This is needed for
 .Nm
 dyncallback to correctly prepare the arguments passed in by the function that
 calls the callback handler. Note that the handler doesn't return the value
-specified in the signature, directly, but simply 'i' or 'f' depending on whether
-it is a integral or floating point type. The return value itself is stored
-where the handler's 3rd parameter points to (see example).
+specified in the signature, directly, but a signature character, specifying the
+return value's type.
+The return value itself is stored where the handler's
+3rd parameter points to (see below).
 .Ar funcptr
 is a pointer to the
 .Nm
@@ -106,13 +107,12 @@
   // .. do something ..
 
   result->s = 1244;
-  return 'i';
+  return 's';
 }
 .Ed
 .Pp
 Note that the return value of the handler is a signature character, not the
-actual return value, itself, and note that the actual return value is of type
-short.
+actual return value, itself.
 Now, let's call it through a DCCallback object:
 .Bd -literal -offset indent
   DCCallback* cb;