mirror of
https://github.com/php/php-src.git
synced 2026-04-29 11:13:36 +02:00
Add a constant, READLINE_LIB, to be able to differenciate which lib is being used
This commit is contained in:
@@ -715,6 +715,12 @@ PHP_MINIT_FUNCTION(cli_readline)
|
||||
ZEND_INIT_MODULE_GLOBALS(cli_readline, cli_readline_init_globals, NULL);
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
#if HAVE_LIBEDIT
|
||||
REGISTER_STRING_CONSTANT("READLINE_LIB", "libedit", CONST_CS|CONST_PERSISTENT);
|
||||
#else
|
||||
REGISTER_STRING_CONSTANT("READLINE_LIB", "readline", CONST_CS|CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
GET_SHELL_CB(cb);
|
||||
if (cb) {
|
||||
cb->cli_shell_write = readline_shell_write;
|
||||
|
||||
Reference in New Issue
Block a user