This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, Jan 6, 2015 at 11:03 PM, Joel Brobecker <brobecker@adacore.com> wrote: >> +/* Return 1 if C is a whitespace character, 0 otherwise. */ >> + >> +static int >> +whitespace_p (const char c) >> +{ >> + if (c == ' ' || c == '\n' || c == '\t') >> + return 1; >> + else >> + return 0; > > Why not using isspace directly? Apologies if this was explained > before, but then, a comment would be helpful, and maybe a more > specific function name. My first reaction to this kind of routine > was that this should be in one of our "utils" files, so as to allow > other parts of the code to use it as well. To be honest, I did not know about the existence of "isspace". I have removed whitespace_p now from my patch. The v3 is attached. 2015-01-07 Siva Chandra Reddy <sivachandra@google.com> gdb/ChangeLog: * language.c (language_lookup_primitive_type_1): Remove unwanted space in the type name before looking it up. gdb/testsuite/ChangeLog: * gdb.python/py-type.exp: Add new tests.
Attachment:
unwanted_space_v3.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |