aboutsummaryrefslogtreecommitdiff
path: root/lout
diff options
context:
space:
mode:
Diffstat (limited to 'lout')
-rw-r--r--lout/misc.cc8
-rw-r--r--lout/misc.hh3
-rw-r--r--lout/object.cc5
3 files changed, 9 insertions, 7 deletions
diff --git a/lout/misc.cc b/lout/misc.cc
index bffc68f7..c6e057fa 100644
--- a/lout/misc.cc
+++ b/lout/misc.cc
@@ -32,10 +32,10 @@ namespace misc {
const char *prgName = PRGNAME;
-void init (int argc, char *argv[])
-{
- prgName = strdup (argv[0]);
-}
+//void init (int argc, char *argv[])
+//{
+// prgName = dStrdup (argv[0]);
+//}
// ------------------
diff --git a/lout/misc.hh b/lout/misc.hh
index 80f227f8..1108c1eb 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include "dlib/dlib.h"
namespace lout {
@@ -586,7 +587,7 @@ public:
* A copy is kept in the buffer, so the caller does not have to care
* about memory management.
*/
- inline void append(const char *str) { appendNoCopy(strdup(str)); }
+ inline void append(const char *str) { appendNoCopy(dStrdup(str)); }
inline void appendInt(int n)
{ char buf[32]; sprintf (buf, "%d", n); append (buf); }
inline void appendPointer(void *p)
diff --git a/lout/object.cc b/lout/object.cc
index e4e0152a..5c2ee433 100644
--- a/lout/object.cc
+++ b/lout/object.cc
@@ -20,6 +20,7 @@
#include "object.hh"
+#include "dlib/dlib.h"
#include <stdio.h>
#include <stdint.h>
#include <config.h>
@@ -83,7 +84,7 @@ const char *Object::toString()
/** \todo garbage! */
misc::StringBuffer sb;
intoStringBuffer(&sb);
- char *s = strdup(sb.getChars());
+ char *s = dStrdup(sb.getChars());
return s;
}
@@ -291,7 +292,7 @@ void ConstString::intoStringBuffer(misc::StringBuffer *sb)
// String
// ------------
-String::String (const char *str): ConstString (str ? strdup(str) : NULL)
+String::String (const char *str): ConstString (str ? dStrdup(str) : NULL)
{
}