Skip to content

Build fails with recent libedit versions #109191

Closed
@jmroot

Description

@jmroot

Bug report

Bug description:

readline_set_completion_display_matches_hook_impl will use either VFunction (if _RL_FUNCTION_TYPEDEF is defined) or rl_compdisp_func_t. The former is deprecated but available in current readline, while the latter has historically not been available in libedit. However, libedit recently added rl_compdisp_func_t and removed VFunction entirely: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/readline/readline.h.diff?r1=1.53&r2=1.54&sortby=date

We ship a recent libedit in MacPorts, so we see a compilation failure like this:

./Modules/readline.c:448:10: error: use of undeclared identifier 'VFunction'; did you mean 'function'?
        (VFunction *)on_completion_display_matches_hook : 0;
         ^~~~~~~~~

It's easy enough for us to patch around this, but I guess if compatibility with both current libedit and the older version shipped by Apple is desired, there needs to be another check for the availability of this type.

CPython versions tested on:

3.12

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions