bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] [PATCH] Enable visibility annotations


From: Pedro Alves
Subject: Re: [Bug-readline] [PATCH] Enable visibility annotations
Date: Fri, 22 Apr 2016 15:24:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

On 04/19/2016 06:45 PM, Chet Ramey wrote:
>> > 
>> > There are other symbols here that look like should probably be public.
>> > For example, history_offset is used by readline's examples:
>> > 
>> >  readline/src/examples/hist_purgecmd.c:44:extern int history_offset;
>> >  readline/src/examples/hist_purgecmd.c:142:        history_offset--;     
>> > /* moving backwards in history list */
>> >  readline/src/examples/hist_erasedups.c:41:extern int history_offset;
>> >  readline/src/examples/hist_erasedups.c:114:           history_offset--; 
>         /* moving backwards in history list */
> 
> All of the public symbols in history.h are part of the history library,
> which can be built both as part of readline and separately.  We were a
> little careless 25 years ago with the public function names, and it's too
> late to change those now, but all of the history library variables have a
> `history_' prefix.

Note that "history_offset" is declared in histlib.h however, which reads:

 /* histlib.h -- internal definitions for the history library. */
 ...
 /* Some variable definitions shared across history source files. */
 extern int history_offset;

Sounds to me that either:

- the example should be updated to use some other mechanism, or,
- the example should be removed, or,
- the declaration should be moved to history.h.

Thanks,
Pedro Alves




reply via email to

[Prev in Thread] Current Thread [Next in Thread]