[Asterisk-code-review] Astobj2: Add ao2 weakproxy ref object function. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Wed Apr 29 12:20:11 CDT 2015


Hello Richard Mudgett,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/280

to look at the new patch set (#2).

Change subject: Astobj2: Add ao2_weakproxy_ref_object function.
......................................................................

Astobj2: Add ao2_weakproxy_ref_object function.

This function allows code to run ao2_ref against the real
object associated with a weakproxy.  It is useful when
all of the following conditions are true:
* You have a pointer to weakproxy.
* You do not have or need a pointer to the real object.
* You need to ensure the real object exists and is not
  destroyed during a process.

In this case it's wasteful to store a pointer to the real
object just for the sake of releasing it later.

Change-Id: I38a319b83314de75be74207a8771aab269bcca46
---
M include/asterisk/astobj2.h
M main/astobj2.c
M tests/test_astobj2_weaken.c
3 files changed, 75 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/280/2
-- 
To view, visit https://gerrit.asterisk.org/280
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I38a319b83314de75be74207a8771aab269bcca46
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list