[asterisk-dev] Nested Function Usage (twilson: branch 1.4 r153095 - in /branches/1.4: apps/ include/asterisk/ res/)

Kevin P. Fleming kpfleming at digium.com
Fri Oct 31 12:55:02 CDT 2008


Russell Bryant wrote:

> Nested functions are allowed, but their usage should be limited.  They 
> are useful when you have a callback that performs a trivial operation 
> (not very much code), but needs to access local variables in another 
> stack frame.  Essentially, the benefit is just saving you from having to 
> pack up a bunch of arguments in a struct to pass in as an argument.

+1. That's exactly where I think they are useful.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list