1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: 7b72b1af4217ac8647096cb7e2c239466949cbd2 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_readline, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
5 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, prompt, IS_STRING, 1, "null")
6 ZEND_END_ARG_INFO()
7
8 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_info, 0, 0, IS_MIXED, 0)
9 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, var_name, IS_STRING, 1, "null")
10 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, value, "null")
11 ZEND_END_ARG_INFO()
12
13 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_add_history, 0, 1, _IS_BOOL, 0)
14 ZEND_ARG_TYPE_INFO(0, prompt, IS_STRING, 0)
15 ZEND_END_ARG_INFO()
16
17 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_clear_history, 0, 0, _IS_BOOL, 0)
18 ZEND_END_ARG_INFO()
19
20 #if defined(HAVE_HISTORY_LIST)
21 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_list_history, 0, 0, IS_ARRAY, 0)
22 ZEND_END_ARG_INFO()
23 #endif
24
25 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_read_history, 0, 0, _IS_BOOL, 0)
26 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
27 ZEND_END_ARG_INFO()
28
29 #define arginfo_readline_write_history arginfo_readline_read_history
30
31 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_completion_function, 0, 1, _IS_BOOL, 0)
32 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
33 ZEND_END_ARG_INFO()
34
35 #if defined(HAVE_RL_CALLBACK_READ_CHAR)
36 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_callback_handler_install, 0, 2, _IS_BOOL, 0)
37 ZEND_ARG_TYPE_INFO(0, prompt, IS_STRING, 0)
38 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
39 ZEND_END_ARG_INFO()
40
41 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_callback_read_char, 0, 0, IS_VOID, 0)
42 ZEND_END_ARG_INFO()
43
44 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_callback_handler_remove, 0, 0, _IS_BOOL, 0)
45 ZEND_END_ARG_INFO()
46
47 #define arginfo_readline_redisplay arginfo_readline_callback_read_char
48 #endif
49
50 #if defined(HAVE_RL_CALLBACK_READ_CHAR) && defined(HAVE_RL_ON_NEW_LINE)
51 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_on_new_line, 0, 0, IS_VOID, 0)
52 ZEND_END_ARG_INFO()
53 #endif
54
55 ZEND_FUNCTION(readline);
56 ZEND_FUNCTION(readline_info);
57 ZEND_FUNCTION(readline_add_history);
58 ZEND_FUNCTION(readline_clear_history);
59 #if defined(HAVE_HISTORY_LIST)
60 ZEND_FUNCTION(readline_list_history);
61 #endif
62 ZEND_FUNCTION(readline_read_history);
63 ZEND_FUNCTION(readline_write_history);
64 ZEND_FUNCTION(readline_completion_function);
65 #if defined(HAVE_RL_CALLBACK_READ_CHAR)
66 ZEND_FUNCTION(readline_callback_handler_install);
67 ZEND_FUNCTION(readline_callback_read_char);
68 ZEND_FUNCTION(readline_callback_handler_remove);
69 ZEND_FUNCTION(readline_redisplay);
70 #endif
71 #if defined(HAVE_RL_CALLBACK_READ_CHAR) && defined(HAVE_RL_ON_NEW_LINE)
72 ZEND_FUNCTION(readline_on_new_line);
73 #endif
74
75 static const zend_function_entry ext_functions[] = {
76 ZEND_FE(readline, arginfo_readline)
77 ZEND_FE(readline_info, arginfo_readline_info)
78 ZEND_FE(readline_add_history, arginfo_readline_add_history)
79 ZEND_FE(readline_clear_history, arginfo_readline_clear_history)
80 #if defined(HAVE_HISTORY_LIST)
81 ZEND_FE(readline_list_history, arginfo_readline_list_history)
82 #endif
83 ZEND_FE(readline_read_history, arginfo_readline_read_history)
84 ZEND_FE(readline_write_history, arginfo_readline_write_history)
85 ZEND_FE(readline_completion_function, arginfo_readline_completion_function)
86 #if defined(HAVE_RL_CALLBACK_READ_CHAR)
87 ZEND_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install)
88 ZEND_FE(readline_callback_read_char, arginfo_readline_callback_read_char)
89 ZEND_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove)
90 ZEND_FE(readline_redisplay, arginfo_readline_redisplay)
91 #endif
92 #if defined(HAVE_RL_CALLBACK_READ_CHAR) && defined(HAVE_RL_ON_NEW_LINE)
93 ZEND_FE(readline_on_new_line, arginfo_readline_on_new_line)
94 #endif
95 ZEND_FE_END
96 };
97
register_readline_symbols(int module_number)98 static void register_readline_symbols(int module_number)
99 {
100 REGISTER_STRING_CONSTANT("READLINE_LIB", READLINE_LIB, CONST_PERSISTENT);
101 }
102