You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2008/01/10 07:26:46 UTC
svn commit: r610691 -
/logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp
Author: carnold
Date: Wed Jan 9 22:26:45 2008
New Revision: 610691
URL: http://svn.apache.org/viewvc?rev=610691&view=rev
Log:
LOGCXX-200: filename.c_str() invalidated before exec on VC 2008
Modified:
logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp
Modified: logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp?rev=610691&r1=610690&r2=610691&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp (original)
+++ logging/log4cxx/trunk/src/test/cpp/util/transformer.cpp Wed Jan 9 22:26:45 2008
@@ -20,6 +20,7 @@
#include <apr_thread_proc.h>
#include <apr_pools.h>
#include <apr_file_io.h>
+#include <apr_strings.h>
#include <assert.h>
#include <iostream>
@@ -174,11 +175,11 @@
std::string regexArg("-f");
regexArg.append(regexName);
- args[i++] = regexArg.c_str();
+ args[i++] = apr_pstrdup(pool, regexArg.c_str());
//
// specify the input file
- args[i++] = in.getOSName().c_str();
+ args[i++] = apr_pstrdup(pool, in.getOSName().c_str());
args[i] = NULL;