Kaydet (Commit) 2cbd4121 authored tarafından Chris Sherlock's avatar Chris Sherlock

cppu: remove unnecessary LOG_LIFECYCLE_* macros

Change-Id: I0f19cf7045e6ff2906404a73ce710e42800c0a72
Reviewed-on: https://gerrit.libreoffice.org/39994Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Tested-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst fab72885
......@@ -28,19 +28,6 @@
#include "cppu/helper/purpenv/Mapping.hxx"
#ifdef debug
# define LOG_LIFECYCLE_AffineBridge
#endif
#ifdef LOG_LIFECYCLE_AffineBridge
# include <iostream>
# define LOG_LIFECYCLE_AffineBridge_emit(x) x
#else
# define LOG_LIFECYCLE_AffineBridge_emit(x)
#endif
class InnerThread;
class OuterThread;
......@@ -147,12 +134,12 @@ AffineBridge::AffineBridge()
m_outerThreadId(0),
m_pOuterThread (nullptr)
{
LOG_LIFECYCLE_AffineBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "AffineBridge::AffineBridge(uno_Environment * pEnv)", this));
SAL_INFO("cppu.affinebridge", "LIFE: AffineBridge::AffineBridge(uno_Environment * pEnv) -> " << this);
}
AffineBridge::~AffineBridge()
{
LOG_LIFECYCLE_AffineBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "AffineBridge::~AffineBridge()", this));
SAL_INFO("cppu.affinebridge", "LIFE: AffineBridge::~AffineBridge() -> " << this);
if (m_pInnerThread && osl::Thread::getCurrentIdentifier() != m_innerThreadId)
{
......
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "osl/mutex.hxx"
#include "osl/thread.h"
#include "osl/thread.hxx"
......@@ -27,21 +26,6 @@
#include "cppu/helper/purpenv/Environment.hxx"
#include "cppu/helper/purpenv/Mapping.hxx"
#ifdef debug
# define LOG_LIFECYCLE_UnsafeBridge
#endif
#ifdef LOG_LIFECYCLE_UnsafeBridge
# include <iostream>
# define LOG_LIFECYCLE_UnsafeBridge_emit(x) x
#else
# define LOG_LIFECYCLE_UnsafeBridge_emit(x)
#endif
class UnsafeBridge : public cppu::Enterable
{
osl::Mutex m_mutex;
......@@ -66,12 +50,12 @@ UnsafeBridge::UnsafeBridge()
: m_count (0),
m_threadId(0)
{
LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::UnsafeBridge(uno_Environment * pEnv)", this));
SAL_INFO("cppu.unsafebridge", "LIFE: UnsafeBridge::UnsafeBridge(uno_Environment * pEnv) -> " << this);
}
UnsafeBridge::~UnsafeBridge()
{
LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::~UnsafeBridge()", this));
SAL_INFO("cppu.unsafebridge", "LIFE: UnsafeBridge::~UnsafeBridge() -> " << this);
SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
}
......
......@@ -27,20 +27,6 @@
#include "typelib/typedescription.h"
#include "osl/interlck.h"
#ifdef debug
# define LOG_LIFECYCLE_cppu_helper_purpenv_Base
#endif
#ifdef LOG_LIFECYCLE_cppu_helper_purpenv_Base
# include <iostream>
# define LOG_LIFECYCLE_cppu_helper_purpenv_Base_emit(x) x
#else
# define LOG_LIFECYCLE_cppu_helper_purpenv_Base_emit(x)
#endif
extern "C" {
typedef void SAL_CALL EnvFun_P (uno_Environment *);
typedef void SAL_CALL EnvFun_PP_P(uno_Environment ** ppHardEnv, uno_Environment *);
......@@ -241,7 +227,7 @@ Base::Base(uno_Environment * pEnv, cppu::Enterable * pEnterable)
m_env_acquireInterface (pEnv->pExtEnv->acquireInterface),
m_env_releaseInterface (pEnv->pExtEnv->releaseInterface)
{
LOG_LIFECYCLE_cppu_helper_purpenv_Base_emit(fprintf(stderr, "LIFE: %s -> %p\n", "cppu::helper::purpenv::Base::Base(uno_Environment * pEnv)", this));
SAL_INFO("cppu.purpenv", "LIFE: cppu::helper::purpenv::Base::Base(uno_Environment * pEnv) -> " << this);
OSL_ENSURE(
rtl_ustr_ascii_compare_WithLength(pEnv->pTypeName->buffer, rtl_str_getLength(UNO_LB_UNO), UNO_LB_UNO)
== 0,
......@@ -267,7 +253,7 @@ Base::Base(uno_Environment * pEnv, cppu::Enterable * pEnterable)
Base::~Base()
{
LOG_LIFECYCLE_cppu_helper_purpenv_Base_emit(fprintf(stderr, "LIFE: %s -> %p\n", "cppu::helper::purpenv::Base::~Base()", this));
SAL_INFO("cppu.purpenv", "LIFE: cppu::helper::purpenv::Base::~Base() -> " << this);
m_pEnv->acquire = m_env_acquire;
m_pEnv->release = m_env_release;
......
......@@ -27,24 +27,8 @@
#include "uno/dispatcher.h"
#include "typelib/typedescription.h"
#ifdef debug
# define LOG_LIFECYCLE_cppu_helper_purpenv_Mapping
#endif
#ifdef LOG_LIFECYCLE_cppu_helper_purpenv_Mapping
# include <iostream>
# define LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(x) x
#else
# define LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(x)
#endif
using namespace com::sun::star;
class Mapping : public uno_Mapping
{
uno::Environment m_from;
......@@ -128,7 +112,7 @@ Mapping::Mapping(uno_Environment * pFrom,
m_probeFun(probeFun),
m_pContext(pProbeContext)
{
LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Mapping::Mapping(uno_Environment * pFrom, uno_Environment * pTo)", this));
SAL_INFO("cppu.purpenv", "LIFE: Mapping::Mapping(uno_Environment * pFrom, uno_Environment * pTo -> " << this);
uno_Mapping::acquire = s_acquire;
uno_Mapping::release = s_release;
......@@ -137,7 +121,7 @@ Mapping::Mapping(uno_Environment * pFrom,
Mapping::~Mapping()
{
LOG_LIFECYCLE_cppu_helper_purpenv_Mapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Mapping::~Mapping()", this));
SAL_INFO("cppu.purpenv", "LIFE: Mapping:~Mapping() -> " << this);
}
......
......@@ -25,21 +25,8 @@
#include "typelib/typedescription.hxx"
#include "cppu/EnvDcp.hxx"
//#define LOG_LIFECYCLE_Proxy
#ifdef LOG_LIFECYCLE_Proxy
# include <iostream>
# define LOG_LIFECYCLE_Proxy_emit(x) x
#else
# define LOG_LIFECYCLE_Proxy_emit(x)
#endif
using namespace com::sun::star;
static bool relatesToInterface(typelib_TypeDescription * pTypeDescr)
{
switch (pTypeDescr->eTypeClass)
......@@ -222,7 +209,7 @@ Proxy::Proxy(uno::Mapping const & to_from,
m_probeFun (probeFun),
m_pProbeContext(pProbeContext)
{
LOG_LIFECYCLE_Proxy_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Proxy::Proxy(<>)", this));
SAL_INFO("cppu.purpenv", "LIFE: Proxy::Proxy(<>) -> " << this);
typelib_typedescription_acquire(&m_pTypeDescr->aBase);
if (!m_pTypeDescr->aBase.bComplete)
......@@ -249,7 +236,7 @@ extern "C" { static void s_releaseAndRevoke_v(va_list * pParam)
Proxy::~Proxy()
{
LOG_LIFECYCLE_Proxy_emit(fprintf(stderr, "LIFE: %s -> %p\n", "Proxy::~Proxy()", this));
SAL_INFO("cppu.purpenv", "LIFE: Proxy::~Proxy() -> " << this);
uno_Environment_invoke(m_to.get(), s_releaseAndRevoke_v, m_to.get(), m_pUnoI);
......
......@@ -28,16 +28,6 @@
#include "cascade_mapping.hxx"
#ifdef LOG_LIFECYLE_MediatorMapping
# include <iostream>
# define LOG_LIFECYLE_MediatorMapping_emit(x) x
#else
# define LOG_LIFECYLE_MediatorMapping_emit(x)
#endif
using namespace com::sun::star;
class MediatorMapping : public uno_Mapping
......@@ -98,7 +88,7 @@ MediatorMapping::MediatorMapping(uno_Environment * pFrom,
m_interm (pInterm),
m_to (pTo)
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
SAL_INFO("cppu.mapping", __FUNCTION__);
if (!m_from2uno.get() || !m_uno2to.get())
abort();
......@@ -110,19 +100,19 @@ MediatorMapping::MediatorMapping(uno_Environment * pFrom,
MediatorMapping::~MediatorMapping()
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
SAL_INFO("cppu.mapping", __FUNCTION__);
}
void MediatorMapping::acquire()
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
SAL_INFO("cppu.mapping", __FUNCTION__);
osl_atomic_increment(&m_refCount);
}
void MediatorMapping::release()
{
LOG_LIFECYLE_MediatorMapping_emit(std::cerr << __FUNCTION__ << std::endl);
SAL_INFO("cppu.mapping", __FUNCTION__);
if (osl_atomic_decrement(&m_refCount) == 0)
{
......
......@@ -101,7 +101,10 @@ certain functionality.
@li @c cppu.log
@li @c cppu.threadpool
@li @c cppu.typelib
@li @c cppu.purpenv
@li @c cppu.mapping
@li @c cppu.unsafebridge
@li @c cppu.affinebridge
@section cppuhelper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment