Skip to content

Commit 03de208

Browse files
committed
Silence abi_check
1 parent 16d2582 commit 03de208

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

src/main/cpp/multiprocessrollingfileappender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ void MultiprocessRollingFileAppender::subAppend(const LoggingEventPtr& event, Po
428428
@param os output stream, may not be null.
429429
@return new writer.
430430
*/
431-
WriterPtr MultiprocessRollingFileAppender::createWriter(const OutputStreamPtr& os)
431+
WriterPtr MultiprocessRollingFileAppender::createWriter(LOG4CXX_16_CONST OutputStreamPtr& os)
432432
{
433433
auto fos = LOG4CXX_NS::cast<FileOutputStream>(os);
434434
if( fos )

src/main/cpp/rollingfileappender.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ bool RollingFileAppender::rolloverInternal(Pool& p)
357357
setFileInternal(rollover1->getActiveFileName());
358358
// Call activateOptions to create any intermediate directories(if required)
359359
FileAppender::activateOptionsInternal(p);
360-
auto os = std::make_shared<FileOutputStream>
360+
OutputStreamPtr os = std::make_shared<FileOutputStream>
361361
( rollover1->getActiveFileName()
362362
, rollover1->getAppend()
363363
);
@@ -570,7 +570,7 @@ class CountingOutputStream : public OutputStream
570570
@param os output stream, may not be null.
571571
@return new writer.
572572
*/
573-
WriterPtr RollingFileAppender::createWriter(const OutputStreamPtr& os)
573+
WriterPtr RollingFileAppender::createWriter(LOG4CXX_16_CONST OutputStreamPtr& os)
574574
{
575575
OutputStreamPtr cos = std::make_shared<CountingOutputStream>(os, this);
576576
return FileAppender::createWriter(cos);

src/main/cpp/writerappender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void WriterAppender::closeWriter()
190190
<code>encoding</code> property. If the encoding value is
191191
specified incorrectly the writer will be opened using the default
192192
system encoding (an error message will be printed to the loglog. */
193-
WriterPtr WriterAppender::createWriter(const OutputStreamPtr& os)
193+
WriterPtr WriterAppender::createWriter(LOG4CXX_16_CONST OutputStreamPtr& os)
194194
{
195195

196196
LogString enc(getEncoding());

src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public RollingFileAppende
9191
@param os output stream, may not be null.
9292
@return new writer.
9393
*/
94-
helpers::WriterPtr createWriter(const helpers::OutputStreamPtr& os) override;
94+
helpers::WriterPtr createWriter(LOG4CXX_16_CONST helpers::OutputStreamPtr& os) override;
9595

9696
private:
9797
/**

src/main/include/log4cxx/rolling/rollingfileappender.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public FileAppender
220220
@param os output stream, may not be null.
221221
@return new writer.
222222
*/
223-
helpers::WriterPtr createWriter(const helpers::OutputStreamPtr& os) override;
223+
helpers::WriterPtr createWriter(LOG4CXX_16_CONST helpers::OutputStreamPtr& os) override;
224224

225225
public:
226226
/**

src/main/include/log4cxx/writerappender.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
#include <log4cxx/helpers/outputstreamwriter.h>
2323
#include <atomic>
2424

25+
#if 15 < LOG4CXX_ABI_VERSION
26+
#define LOG4CXX_16_CONST const
27+
#else
28+
#define LOG4CXX_16_CONST
29+
#endif
30+
2531
namespace LOG4CXX_NS
2632
{
2733

@@ -126,7 +132,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton
126132
<code>encoding</code> property. If the encoding value is
127133
specified incorrectly the writer will be opened using the default
128134
system encoding (an error message will be printed to the loglog. */
129-
virtual helpers::WriterPtr createWriter(const helpers::OutputStreamPtr& os);
135+
virtual helpers::WriterPtr createWriter(LOG4CXX_16_CONST helpers::OutputStreamPtr& os);
130136

131137
public:
132138
/**

0 commit comments

Comments
 (0)