summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authorHartmel <hartmel@wheezy64>2013-05-27 17:49:06 +0200
committerStanislav Malyshev <stas@php.net>2013-06-16 23:42:43 -0700
commitca3e0862dbd7190f29e12dcc89e08e183e9077ce (patch)
treeac64e0c2728c7a7e856469d15529b36b5e9700d0 /ext/readline
parentcfb1ffb4fa9d8a8561ffa509e187808b09608074 (diff)
downloadphp-git-ca3e0862dbd7190f29e12dcc89e08e183e9077ce.tar.gz
Bug #55694: Expose attempted_completion_over variable from readline library
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/readline.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 3148f80db0..bd460696bd 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -259,6 +259,7 @@ PHP_FUNCTION(readline_info)
#endif
add_assoc_string(return_value,"library_version",(char *)SAFE_STRING(rl_library_version),1);
add_assoc_string(return_value,"readline_name",(char *)SAFE_STRING(rl_readline_name),1);
+ add_assoc_long(return_value,"attempted_completion_over",rl_attempted_completion_over);
} else {
if (!strcasecmp(what,"line_buffer")) {
oldstr = rl_line_buffer;
@@ -313,7 +314,14 @@ PHP_FUNCTION(readline_info)
rl_readline_name = strdup(Z_STRVAL_PP(value));;
}
RETVAL_STRING(SAFE_STRING(oldstr),1);
- }
+ } else if (!strcasecmp(what, "attempted_completion_over")) {
+ oldval = rl_attempted_completion_over;
+ if (value) {
+ convert_to_long_ex(value);
+ rl_attempted_completion_over = Z_LVAL_PP(value);
+ }
+ RETVAL_LONG(oldval);
+ }
}
}