[asterisk-dev] [Code Review] 3089: Presenting AO2_ITERATOR_SAFE_LOOP_START() for ao2_iterator looping safety.

rmudgett reviewboard at asterisk.org
Fri Jan 3 13:15:08 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3089/
-----------------------------------------------------------

(Updated Jan. 3, 2014, 1:15 p.m.)


Review request for Asterisk Developers.


Changes
-------

Moved the loop_obj declaration to outside the AO2_ITERATOR_SAFE_LOOP_START() macro definition.  The user of AO2_ITERATOR_SAFE_LOOP_START() must declare the loop_obj variable.


Repository: Asterisk


Description
-------

Due to repeated errors in people remembering to call ao2_iterator_destroy() I have created the AO2_ITERATOR_SAFE_LOOP_START() / AO2_ITERATOR_SAFE_LOOP_END macros.  Usage examples are documented where these macros are declared.


Diffs (updated)
-----

  /branches/12/tests/test_stasis.c 404786 
  /branches/12/include/asterisk/astobj2.h 404786 

Diff: https://reviewboard.asterisk.org/r/3089/diff/


Testing
-------

No memory leaks from running "test execute category /stasis/core/ name cache_dump".


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140103/2ae4f1a5/attachment.html>


More information about the asterisk-dev mailing list