You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/05/11 20:31:30 UTC
[trafficserver] 06/33: TS-4425: Add unsafe Ptr::swizzle().
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 5389f2602fcbe8d8e7dc0b577db90da09cc23671
Author: James Peach <jp...@apache.org>
AuthorDate: Sat May 7 13:50:48 2016 -0700
TS-4425: Add unsafe Ptr::swizzle().
---
lib/ts/Ptr.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/ts/Ptr.h b/lib/ts/Ptr.h
index d1288fa..3391608 100644
--- a/lib/ts/Ptr.h
+++ b/lib/ts/Ptr.h
@@ -161,6 +161,15 @@ public:
return tmp;
}
+ // XXX Clearly this is not safe. This is used in HdrHeap::unmarshal() to swizzle
+ // the refcount of the managed heap pointers. That code needs to be cleaned up
+ // so that this can be removed. Do not use this in new code.
+ void
+ swizzle(RefCountObj *ptr)
+ {
+ m_ptr = ptr;
+ }
+
T *m_ptr;
};
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.