From 4378875d3c74b4fa501e92d6e11837c7fe67c525 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 Apr 2011 01:12:54 +0000 Subject: Fix compilation on MinGW/Windows. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@3206 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Atom.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'raul') diff --git a/raul/Atom.hpp b/raul/Atom.hpp index 0a1edf6..a65dd8f 100644 --- a/raul/Atom.hpp +++ b/raul/Atom.hpp @@ -57,9 +57,9 @@ public: Atom(int32_t val) : _type(INT), _int_val(val) {} Atom(float val) : _type(FLOAT), _float_val(val) {} Atom(bool val) : _type(BOOL), _bool_val(val) {} - Atom(const char* val) : _type(STRING), _string_val(strdup(val)) {} + Atom(const char* val) : _type(STRING), _string_val(g_strdup(val)) {} - Atom(const std::string& val) : _type(STRING), _string_val(strdup(val.c_str())) {} + Atom(const std::string& val) : _type(STRING), _string_val(g_strdup(val.c_str())) {} /** URI constructor (@a t must be URI) */ Atom(Type t, const std::string& val) : _type(t), _string_val(g_intern_string(val.c_str())) { @@ -83,7 +83,7 @@ public: case FLOAT: _float_val = copy._float_val; break; case BOOL: _bool_val = copy._bool_val; break; case URI: _string_val = copy._string_val; break; - case STRING: _string_val = strdup(copy._string_val); break; + case STRING: _string_val = g_strdup(copy._string_val); break; case BLOB: _blob_val = new BlobValue(*copy._blob_val); break; case DICT: _dict_val = new DictValue(*copy._dict_val); break; } @@ -99,7 +99,7 @@ public: case FLOAT: _float_val = other._float_val; break; case BOOL: _bool_val = other._bool_val; break; case URI: _string_val = other._string_val; break; - case STRING: _string_val = strdup(other._string_val); break; + case STRING: _string_val = g_strdup(other._string_val); break; case BLOB: _blob_val = new BlobValue(*other._blob_val); break; case DICT: _dict_val = new DictValue(*other._dict_val); break; } @@ -187,7 +187,7 @@ private: inline void dealloc() { switch (_type) { case STRING: - free(const_cast(_string_val)); + g_free(const_cast(_string_val)); break; case BLOB: delete _blob_val; -- cgit v1.2.1