summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Atom.hpp10
-rw-r--r--src/Thread.cpp1
-rw-r--r--wscript1
3 files changed, 6 insertions, 6 deletions
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<char*>(_string_val));
+ g_free(const_cast<char*>(_string_val));
break;
case BLOB:
delete _blob_val;
diff --git a/src/Thread.cpp b/src/Thread.cpp
index 8a84779..8c89707 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -108,7 +108,6 @@ Thread::stop()
pthread_cancel(_pthread);
pthread_join(_pthread, NULL);
}
- _pthread = 0;
_pthread_exists = false;
LOG(info) << "Exiting thread" << endl;
}
diff --git a/wscript b/wscript
index 5572579..652d11e 100644
--- a/wscript
+++ b/wscript
@@ -122,6 +122,7 @@ def build(bld):
obj.name = 'libraul'
obj.target = 'raul'
obj.uselib = 'GLIB GTHREAD'
+ obj.linkflags = ['-lpthread']
obj.framework = framework
obj.install_path = '${LIBDIR}'
obj.vnum = RAUL_LIB_VERSION