From 1c2f27178245166c6c53c812e8ef2db01de4353d Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 8 Dec 2005 01:35:48 +0100 Subject: [PATCH] Add parent member to dom_node Signed-off-by: Jonas Fonseca --- src/document/dom/node.c | 1 + src/document/dom/node.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/document/dom/node.c b/src/document/dom/node.c index 7ee0b065e..b240d2dac 100644 --- a/src/document/dom/node.c +++ b/src/document/dom/node.c @@ -213,6 +213,7 @@ init_dom_node_(unsigned char *file, int line, node->type = type; node->string = string; node->length = length; + node->parent = parent; if (parent) { struct dom_node_list **list = get_dom_node_list(parent, node); diff --git a/src/document/dom/node.h b/src/document/dom/node.h index 971154bec..a6affc0b3 100644 --- a/src/document/dom/node.h +++ b/src/document/dom/node.h @@ -190,6 +190,8 @@ struct dom_node { uint16_t length; unsigned char *string; + struct dom_node *parent; + /* Various info depending on the type of the node. */ union dom_node_data { struct dom_document_node document;