mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/readline: readline_read_history/readline_write_history returning a boolean value using RETURN_BOOL (#21140)
This commit is contained in:
@@ -393,13 +393,9 @@ PHP_FUNCTION(readline_read_history)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* XXX from & to NYI */
|
||||
if (read_history(arg)) {
|
||||
/* If filename is NULL, then read from `~/.history' */
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* XXX from & to NYI
|
||||
If filename is NULL, then read from `~/.history' */
|
||||
RETURN_BOOL(!read_history(arg));
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -417,11 +413,7 @@ PHP_FUNCTION(readline_write_history)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (write_history(arg)) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
RETURN_BOOL(!write_history(arg));
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
Reference in New Issue
Block a user