]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 4 Dec 2019 16:21:16 +0000 (08:21 -0800)
committerGitHub <noreply@github.com>
Wed, 4 Dec 2019 16:21:16 +0000 (08:21 -0800)
commit68669ef7883ea6338ca441e50f4f9d975f54d017
treedc75cda6ffa110eaf29b03a0a5e91ddda810acfc
parenta75cad440ab50d823af5f06e51dfed3a319f1e8c
bpo-38634: Allow non-apple build to cope with libedit (GH-16986)

The readline module now detects if Python is linked to libedit at runtime
on all platforms.  Previously, the check was only done on macOS.

If Python is used as a library by a binary linking to libedit, the linker
resolves the rl_initialize symbol required by the readline module against
libedit instead of libreadline, which leads to a segfault.

Take advantage of the existing supporting code to have readline module being
compatible with both situations.
(cherry picked from commit 7105319ada2e663659020cbe9fdf7ff38f421ab2)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
Misc/NEWS.d/next/Library/2019-12-04-15-56-28.bpo-38634.pq0ZWa.rst [new file with mode: 0644]
Modules/readline.c