[RFA,07/14] Fix up wchar_iterator comment
Commit Message
This fixes up a comment in charset.h that has been obsolete for a
while. I think this patch is obvious.
2017-04-07 Tom Tromey <tom@tromey.com>
* charset.h (wchar_iterator): Fix comment.
---
gdb/ChangeLog | 4 ++++
gdb/charset.h | 6 +-----
2 files changed, 5 insertions(+), 5 deletions(-)
Comments
On 2017-04-08 16:12, Tom Tromey wrote:
> This fixes up a comment in charset.h that has been obsolete for a
> while. I think this patch is obvious.
>
> 2017-04-07 Tom Tromey <tom@tromey.com>
>
> * charset.h (wchar_iterator): Fix comment.
> ---
> gdb/ChangeLog | 4 ++++
> gdb/charset.h | 6 +-----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 56b1a87..1cf860a 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,5 +1,9 @@
> 2017-04-07 Tom Tromey <tom@tromey.com>
>
> + * charset.h (wchar_iterator): Fix comment.
> +
> +2017-04-07 Tom Tromey <tom@tromey.com>
> +
> * charset.c (iconv_wrapper): New class.
> (cleanup_iconv): Remove.
> (convert_between_encodings): Use it.
> diff --git a/gdb/charset.h b/gdb/charset.h
> index 9e8ca4a..0d00f56 100644
> --- a/gdb/charset.h
> +++ b/gdb/charset.h
> @@ -92,11 +92,7 @@ class wchar_iterator
> the input buffer. BYTES is the number of bytes in the input
> buffer. CHARSET is the name of the character set in which INPUT
> is
> encoded. WIDTH is the number of bytes in a base character of
> - CHARSET.
> -
> - This function either returns a new character set iterator, or
> calls
> - error. The result can be freed using a cleanup; see
> - make_cleanup_wchar_iterator. */
> + CHARSET. */
> wchar_iterator (const gdb_byte *input, size_t bytes, const char
> *charset,
> size_t width);
Well, the part about calling error is still true (well, it's technically
not calling error but perror_with_name). I think it's good to mention
that the constructor can throw an exception.
Simon
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> Well, the part about calling error is still true (well, it's
Simon> technically not calling error but perror_with_name). I think it's good
Simon> to mention that the constructor can throw an exception.
I changed it to:
-
- This function either returns a new character set iterator, or calls
- error. The result can be freed using a cleanup; see
- make_cleanup_wchar_iterator. */
+
+ This constructor can throw on error. */
wchar_iterator (const gdb_byte *input, size_t bytes, const char *charset,
size_t width);
Tom
@@ -1,5 +1,9 @@
2017-04-07 Tom Tromey <tom@tromey.com>
+ * charset.h (wchar_iterator): Fix comment.
+
+2017-04-07 Tom Tromey <tom@tromey.com>
+
* charset.c (iconv_wrapper): New class.
(cleanup_iconv): Remove.
(convert_between_encodings): Use it.
@@ -92,11 +92,7 @@ class wchar_iterator
the input buffer. BYTES is the number of bytes in the input
buffer. CHARSET is the name of the character set in which INPUT is
encoded. WIDTH is the number of bytes in a base character of
- CHARSET.
-
- This function either returns a new character set iterator, or calls
- error. The result can be freed using a cleanup; see
- make_cleanup_wchar_iterator. */
+ CHARSET. */
wchar_iterator (const gdb_byte *input, size_t bytes, const char *charset,
size_t width);