[lasem] dom_character_data: implement get/set_node_value.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] dom_character_data: implement get/set_node_value.
- Date: Sun, 21 Nov 2010 22:25:54 +0000 (UTC)
commit 76770bf6b4d68a38e04b690948ed358bc4579c3f
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Nov 21 23:25:17 2010 +0100
dom_character_data: implement get/set_node_value.
src/lsmdomcharacterdata.c | 18 ++++++++++++++++--
src/lsmdomcharacterdata.h | 6 +++---
2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/src/lsmdomcharacterdata.c b/src/lsmdomcharacterdata.c
index f5470d8..bfa043f 100644
--- a/src/lsmdomcharacterdata.c
+++ b/src/lsmdomcharacterdata.c
@@ -43,9 +43,21 @@ lsm_dom_character_data_write_to_stream (LsmDomNode *self, GOutputStream *stream,
g_output_stream_write (stream, character_data->data, strlen (character_data->data), NULL, error);
}
+static const char *
+lsm_dom_character_data_get_node_value (LsmDomNode* self)
+{
+ return lsm_dom_character_data_get_data (LSM_DOM_CHARACTER_DATA (self));
+}
+
+static void
+lsm_dom_character_data_set_node_value (LsmDomNode* self, const char *value)
+{
+ lsm_dom_character_data_set_data (LSM_DOM_CHARACTER_DATA (self), value);
+}
+
/* LsmDomCharacterData implementation */
-char*
+const char *
lsm_dom_character_data_get_data (LsmDomCharacterData* self)
{
g_return_val_if_fail (LSM_IS_DOM_CHARACTER_DATA (self), NULL);
@@ -54,7 +66,7 @@ lsm_dom_character_data_get_data (LsmDomCharacterData* self)
}
void
-lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char* value)
+lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char * value)
{
g_return_if_fail (LSM_IS_DOM_CHARACTER_DATA (self));
g_return_if_fail (value != NULL);
@@ -95,6 +107,8 @@ lsm_dom_character_data_class_init (LsmDomCharacterDataClass *character_data_clas
object_class->finalize = lsm_dom_character_data_finalize;
node_class->write_to_stream = lsm_dom_character_data_write_to_stream;
+ node_class->set_node_value = lsm_dom_character_data_set_node_value;
+ node_class->get_node_value = lsm_dom_character_data_get_node_value;
}
G_DEFINE_ABSTRACT_TYPE (LsmDomCharacterData, lsm_dom_character_data, LSM_TYPE_DOM_NODE)
diff --git a/src/lsmdomcharacterdata.h b/src/lsmdomcharacterdata.h
index 1dc3f31..c438928 100644
--- a/src/lsmdomcharacterdata.h
+++ b/src/lsmdomcharacterdata.h
@@ -1,6 +1,6 @@
/* Lasem - SVG and Mathml library
*
- * Copyright © 2007-2008 Emmanuel Pacaud
+ * Copyright © 2007-2010 Emmanuel Pacaud
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -50,8 +50,8 @@ struct _LsmDomCharacterDataClass {
GType lsm_dom_character_data_get_type (void);
-char* lsm_dom_character_data_get_data (LsmDomCharacterData* self);
-void lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char* value);
+const char * lsm_dom_character_data_get_data (LsmDomCharacterData* self);
+void lsm_dom_character_data_set_data (LsmDomCharacterData* self, const char* value);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]