[devhelp] parser: rename instance variable parent -> parent_node
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] parser: rename instance variable parent -> parent_node
- Date: Fri, 12 May 2017 07:02:39 +0000 (UTC)
commit 1147076e9908ecc0653c7140bbd831cf0a51293b
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri May 12 08:22:37 2017 +0200
parser: rename instance variable parent -> parent_node
src/dh-parser.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/dh-parser.c b/src/dh-parser.c
index 47da5ed..697d85f 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -45,7 +45,7 @@ typedef struct {
GNode *book_node;
/* Current sub section node */
- GNode *parent;
+ GNode *parent_node;
/* Version 2 uses <keyword> instead of <function>. */
gint version;
@@ -177,7 +177,7 @@ parser_start_node_book (DhParser *parser,
g_assert (parser->book_node == NULL);
parser->book_node = g_node_new (dh_link_ref (link));
*parser->book_tree = parser->book_node;
- parser->parent = parser->book_node;
+ parser->parent_node = parser->book_node;
}
static void
@@ -237,8 +237,8 @@ parser_start_node_chapter (DhParser *parser,
*parser->keywords = g_list_prepend (*parser->keywords, link);
node = g_node_new (dh_link_ref (link));
- g_node_prepend (parser->parent, node);
- parser->parent = node;
+ g_node_prepend (parser->parent_node, node);
+ parser->parent_node = node;
}
static void
@@ -383,14 +383,14 @@ parser_start_node_keyword (DhParser *parser,
}
g_assert (parser->book_node != NULL);
- g_assert (parser->parent != NULL);
+ g_assert (parser->parent_node != NULL);
link = dh_link_new (link_type,
NULL,
NULL,
name,
parser->book_node->data,
- parser->parent->data, /* FIXME looks wrong */
+ parser->parent_node->data, /* FIXME looks wrong */
uri);
g_free (name_to_free);
@@ -456,11 +456,11 @@ parser_end_node_cb (GMarkupParseContext *context,
if (g_ascii_strcasecmp (node_name, "functions") == 0)
parser->parsing_keywords = FALSE;
} else if (parser->parsing_chapters) {
- g_node_reverse_children (parser->parent);
+ g_node_reverse_children (parser->parent_node);
if (g_ascii_strcasecmp (node_name, "sub") == 0) {
/* Move up in the tree */
- parser->parent = parser->parent->parent;
+ parser->parent_node = parser->parent_node->parent;
} else if (g_ascii_strcasecmp (node_name, "chapters") == 0) {
parser->parsing_chapters = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]