From 505199e3497eee8105b1a66dbc8d1bab3c762e35 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Fri, 11 Jan 2008 23:01:41 +0000 Subject: [PATCH] Do not save the content of the deprecated variable, only if it's set or 2008-01-11 Johan Dahlin * src/scanner.c: (g_igenerator_process_function_symbol): * src/scannerlexer.l: Do not save the content of the deprecated variable, only if it's set or not. svn path=/trunk/; revision=98 --- ChangeLog | 7 +++++++ src/scanner.c | 2 +- src/scannerlexer.l | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index faf97ec..4937eaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-01-11 Johan Dahlin + * src/scanner.c: (g_igenerator_process_function_symbol): + * src/scannerlexer.l: + Do not save the content of the deprecated variable, only + if it's set or not. + +2008-01-11 Johan Dahlin + * tests/parser/foo-object.h: Add a couple of comment parser tests. 2008-01-11 Jürg Billeter diff --git a/src/scanner.c b/src/scanner.c index 5888579..9d7caf3 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -740,7 +740,7 @@ g_igenerator_process_function_symbol (GIGenerator * igenerator, CSymbol * sym) CDirective *directive = (CDirective*)l->data; if (!strcmp (directive->name, "deprecated")) - gifunc->deprecated = strcmp (directive->value, "1") == 0; + gifunc->deprecated = TRUE; else g_printerr ("Unknown function directive: %s\n", directive->name); diff --git a/src/scannerlexer.l b/src/scannerlexer.l index e06c6ae..114b736 100644 --- a/src/scannerlexer.l +++ b/src/scannerlexer.l @@ -215,7 +215,7 @@ static void parse_gtkdoc (GIGenerator *igenerator, int *c1, int *c2) else /* parts == 1 */ { name = parts[0]; - value = "1"; + value = NULL; } directive = cdirective_new (name, value); -- 2.7.4