aboutsummaryrefslogtreecommitdiff
path: root/lout
diff options
context:
space:
mode:
Diffstat (limited to 'lout')
-rw-r--r--lout/object.cc6
-rw-r--r--lout/object.hh22
2 files changed, 24 insertions, 4 deletions
diff --git a/lout/object.cc b/lout/object.cc
index 5c2ee433..5745e03d 100644
--- a/lout/object.cc
+++ b/lout/object.cc
@@ -2,6 +2,7 @@
* Dillo Widget
*
* Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
+ * Copyright 2025 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -76,12 +77,11 @@ Object *Object::clone()
* \brief Use object::Object::intoStringBuffer to return a textual
* representation of the object.
*
- * The caller does not have to free the memory, object::Object is responsible
+ * The caller must free the memory, object::Object is not responsible
* for this.
*/
-const char *Object::toString()
+char *Object::toString()
{
- /** \todo garbage! */
misc::StringBuffer sb;
intoStringBuffer(&sb);
char *s = dStrdup(sb.getChars());
diff --git a/lout/object.hh b/lout/object.hh
index 9cacff77..c9fa0458 100644
--- a/lout/object.hh
+++ b/lout/object.hh
@@ -1,3 +1,23 @@
+/*
+ * Dillo Widget
+ *
+ * Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
+ * Copyright 2025 Rodrigo Arias Mallo <rodarima@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef __LOUT_OBJECT_HH__
#define __LOUT_OBJECT_HH__
@@ -29,7 +49,7 @@ public:
virtual int hashValue();
virtual Object *clone();
virtual void intoStringBuffer(misc::StringBuffer *sb);
- const char *toString();
+ char *toString();
virtual size_t sizeOf();
};