summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/log.hpp4
-rw-r--r--src/log.cpp8
-rw-r--r--wscript5
3 files changed, 9 insertions, 8 deletions
diff --git a/raul/log.hpp b/raul/log.hpp
index 17d728f..a2298f1 100644
--- a/raul/log.hpp
+++ b/raul/log.hpp
@@ -44,10 +44,10 @@ public:
{}
/** Change the colour of the output, e.g. out << colour(RED) << "red" << endl; */
- const char* colour(Colour c);
+ std::string colour(Colour c);
/** Reset the colour of the output, e.g. out << plain() << "plain" << endl; */
- const char* plain();
+ std::string plain();
protected:
int_type overflow(int_type c) {
diff --git a/src/log.cpp b/src/log.cpp
index e9a61b2..fe6b9b5 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -50,16 +50,16 @@ std::ostream error(&error_buffer);
std::ostream debug(&debug_buffer);
-const char*
+std::string
Raul::LogBuffer::colour(Colour c)
{
std::stringstream ss;
ss << "\033[0;" << _colour << "m";
- return ss.str().c_str();
+ return ss.str();
}
-const char*
+std::string
Raul::LogBuffer::plain()
{
return "\033[0m";
@@ -70,7 +70,7 @@ void
Raul::LogBuffer::emit()
{
if (_colour != DEFAULT)
- _out << colour(_colour);
+ _out << std::string(colour(_colour));
_out << _prefix << _line;
diff --git a/wscript b/wscript
index 18a3a68..16d50a6 100644
--- a/wscript
+++ b/wscript
@@ -4,7 +4,7 @@ import Options
import os
# Version of this package (even if built as a child)
-RAUL_VERSION = '0.6.0'
+RAUL_VERSION = '0.6.1'
# Library version (UNIX style major, minor, micro)
# major increment <=> incompatible changes
@@ -15,7 +15,8 @@ RAUL_VERSION = '0.6.0'
# 0.5.0 = 1,0,0 (SVN r1283)
# 0.5.1 = 2,0,0
# 0.6.0 = 3,0,0
-RAUL_LIB_VERSION = '3.0.0'
+# 0.6.1 = 4,0,0 (unreleased)
+RAUL_LIB_VERSION = '4.0.0'
# Variables for 'waf dist'
APPNAME = 'raul'