diff options
author | Mathias Agopian <mathias@google.com> | 2011-02-23 15:23:13 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-23 15:23:13 -0800 |
commit | 7f97c4ef12263a70a5c9ee7cd16f194c0240e658 (patch) | |
tree | b0ca0631106dac07c5a9aa0423f4b1cc9652fe87 /libs/utils/RefBase.cpp | |
parent | 17f49e4f91c04290721dc029b73b9a430f5298d5 (diff) | |
parent | a688b574d294faae5f56224908b40856c5045aac (diff) | |
download | frameworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.zip frameworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.tar.gz frameworks_base-7f97c4ef12263a70a5c9ee7cd16f194c0240e658.tar.bz2 |
Merge "Remove RefBase.h dependency on TextOutput.h"
Diffstat (limited to 'libs/utils/RefBase.cpp')
-rw-r--r-- | libs/utils/RefBase.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp index 0bd1af4..f934eec 100644 --- a/libs/utils/RefBase.cpp +++ b/libs/utils/RefBase.cpp @@ -23,6 +23,7 @@ #include <utils/KeyedVector.h> #include <utils/Log.h> #include <utils/threads.h> +#include <utils/TextOutput.h> #include <stdlib.h> #include <stdio.h> @@ -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 |