Changeset 22702 in vbox
- Timestamp:
- Sep 2, 2009 10:16:24 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51819
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/ptr.h
r22700 r22702 69 69 namespace com 70 70 { 71 #define LOGREF(p Obj, cRefs) com::LogRef(#pObj "{%p}.refCnt=%d\n", (pObj), (cRefs));71 #define LOGREF(prefix, pObj, cRefs) com::LogRef(#pObj "{%p}.refCnt=%d\n", (pObj), (cRefs)); 72 72 void LogRef(const char *pcszFormat, ...); 73 73 } … … 84 84 { 85 85 size_t cRefs = p->AddRef(); 86 LOGREF( p, cRefs);86 LOGREF("ADDREF ", p, cRefs); 87 87 } 88 88 static void release(C *p) 89 89 { 90 size_t cRefs = p->Release(); 91 LOGREF("RELEASE ", p, cRefs); 90 92 p->Release(); 91 93 } -
trunk/src/VBox/Main/glue/com.cpp
r22700 r22702 48 48 #include <iprt/env.h> 49 49 #include <iprt/string.h> 50 #include <iprt/log.h>51 50 52 51 #include <VBox/err.h> 53 52 53 #include <Logging.h> 54 54 55 55 #ifdef RT_OS_DARWIN … … 208 208 void LogRef(const char *pcszFormat, ...) 209 209 { 210 va_list va; 211 va_start(va, pcszFormat); 212 va_end(va); 213 214 char *psz = NULL; 215 RTStrAPrintfV(&psz, pcszFormat, va); 216 LogDJ((psz)); 217 RTStrFree(psz); 210 char *pszNewMsg; 211 va_list args; 212 va_start(args, pcszFormat); 213 RTStrAPrintfV(&pszNewMsg, pcszFormat, args); 214 LogDJ((pszNewMsg)); 215 RTStrFree(pszNewMsg); 216 va_end(args); 218 217 } 219 218
Note:
See TracChangeset
for help on using the changeset viewer.