From a688b574d294faae5f56224908b40856c5045aac Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 16 Feb 2011 15:23:08 -0800 Subject: Remove RefBase.h dependency on TextOutput.h Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73 --- libs/utils/RefBase.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/utils/RefBase.cpp') diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp index 0bd1af4ebf18..f934eec80f80 100644 --- a/libs/utils/RefBase.cpp +++ b/libs/utils/RefBase.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -530,5 +531,20 @@ bool RefBase::onIncStrongAttempted(uint32_t flags, const void* id) void RefBase::onLastWeakRef(const void* /*id*/) { } - + +// --------------------------------------------------------------------------- + +TextOutput& printStrongPointer(TextOutput& to, const void* val) +{ + to << "sp<>(" << val << ")"; + return to; +} + +TextOutput& printWeakPointer(TextOutput& to, const void* val) +{ + to << "wp<>(" << val << ")"; + return to; +} + + }; // namespace android -- cgit v1.2.3-59-g8ed1b