[PATCH v3 1/2] guile: Add support for Guile 2.2.
Ludovic Courtès
ludo@gnu.org
Sun Jun 28 14:20:54 GMT 2020
Hello Eli,
Eli Zaretskii <eliz@gnu.org> skribis:
>> @deffn {Scheme Procedure} set-memory-port-read-buffer-size! memory-port size
>> Set the size of the read buffer of @code{<gdb:memory-port>}
>> @var{memory-port} to @var{size}. The result is unspecified.
>> +
>> +This procedure is deprecated and will be removed in @value{GDBN} 11.
>> +When using Guile 2.2 or later, you can call @code{setvbuf} instead
>> +(@pxref{Buffering, @code{setvbuf},, guile, GNU Guile Reference Manual}).
>
> First, instead of "When using" I'd suggest to say "When @value{GDBN}
> was built with".
Agreed.
> And second, there's a certain conundrum here: the node "Buffering"
> doesn't exist in the Guile v2.0.x manual, so I wonder whether we
> should say something here about that to prevent user surprise when the
> hyperlink causes an error.
We explicitly write “When GDB is built with Guile 2.2”, so I think we
can’t really do better; removing the link would annoy users of current
Guile versions. WDYT?
>> @deffn {Scheme Procedure} set-memory-port-write-buffer-size! memory-port size
>> Set the size of the write buffer of @code{<gdb:memory-port>}
>> @var{memory-port} to @var{size}. The result is unspecified.
>> +
>> +This procedure is deprecated and will be removed in @value{GDBN} 11.
>> +When using Guile 2.2 or later, you can call @code{setvbuf} instead
>> +(@pxref{Buffering, @code{setvbuf},, guile, GNU Guile Reference Manual}).
>> @end deffn
>
> Here, I'd remove the @pxref: we already have the same hyperlink a
> short ways above, so repetition is not necessary.
Agreed.
> The documentation parts are okay with those nits fixed.
>
>> +/* Whether we're using Guile < 2.2 and its clumsy port API. */
>> +
>> +#define USING_GUILE_BEFORE_2_2 \
>> + (SCM_MAJOR_VERSION < 2 \
>> + || (SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION == 0))
>
> Since Guile < 2.0 is not supported, do we need the first part of the
> macro?
It’s not.
I’m sending v4; changes since v3:
• Adjust wording for deprecated procedures as you suggested above.
• Simplify USING_GUILE_BEFORE_2_2 C macro.
Any other suggestions? It would be perfect if this could land in time
for GDB 10.
Thank you,
Ludo’.
More information about the Gdb-patches
mailing list