This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Change "set history size" back to signed (Re: [committed]: [PATCH 1/3] var_integer -> var_uinteger)
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <dje at google dot com>, <gdb-patches at sourceware dot org>
- Date: Wed, 27 Mar 2013 10:13:18 +0800
- Subject: Re: Change "set history size" back to signed (Re: [committed]: [PATCH 1/3] var_integer -> var_uinteger)
- References: <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1 at cs dot umd dot edu> <1344871663-915-1-git-send-email-yao at codesourcery dot com> <1344871663-915-2-git-send-email-yao at codesourcery dot com> <20534 dot 29766 dot 629459 dot 204573 at ruffy2 dot mtv dot corp dot google dot com> <50372591 dot 7080404 at codesourcery dot com> <20535 dot 46196 dot 619465 dot 922388 at ruffy2 dot mtv dot corp dot google dot com> <503B476F dot 50805 at codesourcery dot com> <20539 dot 61738 dot 119545 dot 634687 at ruffy2 dot mtv dot corp dot google dot com> <503CD0F7 dot 20906 at codesourcery dot com> <5150A09D dot 3090202 at redhat dot com> <515176BB dot 4000702 at codesourcery dot com> <5151C9DF dot 6030303 at redhat dot com>
On 03/27/2013 12:16 AM, Pedro Alves wrote:
Anyway, I care more about the exported user interface than
the implementation. If we're staying with unsigned,
then let's rename the variable to at least make it more
obvious that this variable is not one of GNU history's
public variables.
Indeed.
@@ -1381,19 +1384,9 @@ show_commands (char *args, int from_tty)
/* The first command in the history which doesn't exist (i.e. one more
than the number of the last command). Relative to history_base. */
- unsigned int hist_len;
+ int hist_len = history_length;
Probably, we can replace local variable 'hist_len' with 'history_length'
in function show_commands. Anyway, the patch looks pretty good.
--
Yao (éå)