From: Paul Eggert Date: Sun, 9 Jul 2006 19:55:15 +0000 (+0000) Subject: * src/symlist.c (symbol_list_length): Return int, not unsigned X-Git-Tag: v2.3b~333 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/b37acfe18c54a04afb3093a145fe99668962889d * src/symlist.c (symbol_list_length): Return int, not unsigned int, since callers expect int. --- diff --git a/src/symlist.c b/src/symlist.c index 67766fa2..e00814ed 100644 --- a/src/symlist.c +++ b/src/symlist.c @@ -100,8 +100,8 @@ symbol_list_free (symbol_list *list) | Return its length. | `--------------------*/ -unsigned int -symbol_list_length (const symbol_list *l) +int +symbol_list_length (symbol_list const *l) { int res = 0; for (/* Nothing. */; l && l->sym; l = l->next) diff --git a/src/symlist.h b/src/symlist.h index a2272608..215fdf0a 100644 --- a/src/symlist.h +++ b/src/symlist.h @@ -1,6 +1,6 @@ /* Lists of symbols for Bison - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -47,7 +47,7 @@ typedef struct symbol_list const char *action; location action_location; - /* Whether this symbol's value is used in the current action. */ + /* Whether this symbol's value is used in the current action. */ bool used; /* Precedence/associativity. */ @@ -76,7 +76,7 @@ symbol_list *symbol_list_prepend (symbol_list *l, void symbol_list_free (symbol_list *l); /* Return its length. */ -unsigned int symbol_list_length (const symbol_list *l); +int symbol_list_length (symbol_list const *l); /* Get symbol N in symbol list L. */ symbol_list *symbol_list_n_get (symbol_list *l, int n);