[aravis/dom] gc_register_description: chain to parent set/get_attribute.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis/dom] gc_register_description: chain to parent set/get_attribute.
- Date: Thu, 1 Mar 2012 14:49:48 +0000 (UTC)
commit 875c54302ebcac7b1e09023c4a469bbfd47eae1a
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Thu Mar 1 15:49:09 2012 +0100
gc_register_description: chain to parent set/get_attribute.
src/arvgcregisterdescriptionnode.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/arvgcregisterdescriptionnode.c b/src/arvgcregisterdescriptionnode.c
index d83e316..0c8d9de 100644
--- a/src/arvgcregisterdescriptionnode.c
+++ b/src/arvgcregisterdescriptionnode.c
@@ -26,6 +26,7 @@
*/
#include <arvgcregisterdescriptionnode.h>
+#include <string.h>
static GObjectClass *parent_class = NULL;
@@ -42,10 +43,11 @@ arv_gc_register_description_node_set_attribute (ArvDomElement *self, const char*
{
ArvGcRegisterDescriptionNode *node = ARV_GC_REGISTER_DESCRIPTION_NODE (self);
- if (g_strcmp0 (name, "ModelName") == 0) {
+ if (strcmp (name, "ModelName") == 0) {
g_free (node->model_name);
node->model_name = g_strdup (value);
- }
+ } else
+ ARV_DOM_ELEMENT_CLASS (parent_class)->set_attribute (self, name, value);
}
static const char *
@@ -53,10 +55,10 @@ arv_gc_register_description_node_get_attribute (ArvDomElement *self, const char
{
ArvGcRegisterDescriptionNode *node = ARV_GC_REGISTER_DESCRIPTION_NODE (self);
- if (g_strcmp0 (name, "ModelName") == 0)
+ if (strcmp (name, "ModelName") == 0)
return node->model_name;
-
- return NULL;
+ else
+ return ARV_DOM_ELEMENT_CLASS (parent_class)->get_attribute (self, name);
}
/* ArvGcRegisterDescriptionNode implementation */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]