astobj2: Add an ao2_replace macro to astobj2.h
authorGeorge Joseph <george.joseph@fairview5.com>
Sun, 22 Jun 2014 18:53:26 +0000 (18:53 +0000)
committerGeorge Joseph <george.joseph@fairview5.com>
Sun, 22 Jun 2014 18:53:26 +0000 (18:53 +0000)
commit682357dced7caccaa7e11164bf2e3509acbd8c06
tree65b44d2e057e555e4dce3bcdc5a3054b35284c57
parent1a6db55404907b937fc2258b46ab3a7d08b732e6
astobj2: Add an ao2_replace macro to astobj2.h

This macro replaces one object reference with another cleaning up the original.

param dst Pointer to the object that will be cleaned up.
param src Pointer to the object replacing it.

src's ref count is bumped if it's non-NULL.
dst's ref count is decremented if it's non-NULL.
src is assigned to dst,

This patch was reviewed on IRC by coreyfarrell and mjordan.

Tested by: George Joseph
........

Merged revisions 416995 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Makefile
Makefile.rules
include/asterisk/astobj2.h