bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] _rl_search_cxt may look different to different compil


From: Chet Ramey
Subject: Re: [Bug-readline] _rl_search_cxt may look different to different compilation units
Date: Thu, 26 Oct 2017 10:12:25 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/26/17 1:21 AM, Benjamin Peterson wrote:
> The layout of the _rl_search_cxt struct, defined in rlprivate.h, depends on
> whether HANDLE_MULTIBYTE is defined when the struct is defined. Since
> rlprivate.h doesn't include rlmbutil.h, the header responsible for defining or
> not defining HANDLE_MULTIBYTE, the layout of _rl_search_cxt will depend on
> whether the translation unit has included rlmbutil.h before it includes
> rlprivate.h.
> 
> In particular, callback.c doesn't include rlmbutil.h but uses references
> variables of type _rl_search_cxt. This could easily be problematic in the
> future.

Thanks for the report; this is a good catch. The best thing to do is
probably to include rlmbutil.h in rlprivate.h, as you suggest.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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