Skip to content

Commit 4ffc971

Browse files
readline: inline _readline_long_zval() function (#15840)
Unneeded wrapper around the `ZVAL_LONG()` macro
1 parent 0d9b039 commit 4ffc971

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ext/readline/readline.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,14 @@ static void _readline_string_zval(zval *ret, const char *str)
453453
}
454454
}
455455

456-
static void _readline_long_zval(zval *ret, long l)
457-
{
458-
ZVAL_LONG(ret, l);
459-
}
460-
461456
char **php_readline_completion_cb(const char *text, int start, int end)
462457
{
463458
zval params[3];
464459
char **matches = NULL;
465460

466461
_readline_string_zval(&params[0], text);
467-
_readline_long_zval(&params[1], start);
468-
_readline_long_zval(&params[2], end);
462+
ZVAL_LONG(&params[1], start);
463+
ZVAL_LONG(&params[2], end);
469464

470465
if (call_user_function(NULL, NULL, &_readline_completion, &_readline_array, 3, params) == SUCCESS) {
471466
if (Z_TYPE(_readline_array) == IS_ARRAY) {

0 commit comments

Comments
 (0)