* [PATCH] Small fix to gdb.Value constructor doc
@ 2019-03-05 17:06 Simon Marchi
2019-03-05 18:52 ` Kevin Buettner
[not found] ` <83sgw1cjt3.fsf@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Simon Marchi @ 2019-03-05 17:06 UTC (permalink / raw)
To: gdb-patches; +Cc: Kevin Buettner, Eli Zaretskii, Simon Marchi
The synopsis of the two-parameters form of the gdb.Value constructor is
currently shown as
Value.__init__ (val, [, type ])
in the documentation.
First, there is an extra comma, which I think we can remove in any
case.
Then, since the type parameter is not optional, I would not put in
between square brackets. Those usually indicate that something is
optional.
With this patch, it appears as:
Value.__init__ (val, type)
gdb/doc/ChangeLog:
* python.texi (Values From Inferior): Change synopsys of the
second form of Value.__init__.
---
gdb/doc/python.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 7f6f52c4df..aaaa4ff1a6 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -735,7 +735,7 @@ its result is used.
@end table
@end defun
-@defun Value.__init__ (@var{val}, @r{[}, type @r{]})
+@defun Value.__init__ (@var{val}, type)
This second form of the @code{gdb.Value} constructor returns a
@code{gdb.Value} of type @var{type} where the value contents are taken
from the Python buffer object specified by @var{val}. The number of
--
2.21.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Small fix to gdb.Value constructor doc
2019-03-05 17:06 [PATCH] Small fix to gdb.Value constructor doc Simon Marchi
@ 2019-03-05 18:52 ` Kevin Buettner
[not found] ` <83sgw1cjt3.fsf@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2019-03-05 18:52 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
On Tue, 5 Mar 2019 12:05:44 -0500
Simon Marchi <simon.marchi@efficios.com> wrote:
> The synopsis of the two-parameters form of the gdb.Value constructor is
> currently shown as
>
> Value.__init__ (val, [, type ])
>
> in the documentation.
>
> First, there is an extra comma, which I think we can remove in any
> case.
>
> Then, since the type parameter is not optional, I would not put in
> between square brackets. Those usually indicate that something is
> optional.
>
> With this patch, it appears as:
>
> Value.__init__ (val, type)
I agree with your changes. Thanks for fixing this!
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <83sgw1cjt3.fsf@gnu.org>]
* Re: [PATCH] Small fix to gdb.Value constructor doc
[not found] ` <83sgw1cjt3.fsf@gnu.org>
@ 2019-03-05 19:02 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2019-03-05 19:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Simon Marchi, gdb-patches, kevinb
On 2019-03-05 12:28, Eli Zaretskii wrote:
>> From: Simon Marchi <simon.marchi@efficios.com>
>> Cc: Kevin Buettner <kevinb@redhat.com>,
>> Eli Zaretskii <eliz@gnu.org>,
>> Simon Marchi <simon.marchi@efficios.com>
>> Date: Tue, 5 Mar 2019 12:05:44 -0500
>>
>> gdb/doc/ChangeLog:
>>
>> * python.texi (Values From Inferior): Change synopsys of the
>> second form of Value.__init__.
>
> Thanks, this is OK, but please take care of this gotcha:
>
>> -@defun Value.__init__ (@var{val}, @r{[}, type @r{]})
>> +@defun Value.__init__ (@var{val}, type)
>
> "type" should also be in @var.
I pushed it with this fixed.
Thanks,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-05 19:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05 17:06 [PATCH] Small fix to gdb.Value constructor doc Simon Marchi
2019-03-05 18:52 ` Kevin Buettner
[not found] ` <83sgw1cjt3.fsf@gnu.org>
2019-03-05 19:02 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox