xref: /PHP-8.3/ext/readline/readline_arginfo.h (revision b4ec3e9b)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 64d630be9ea75d584a4a999dd4d4c6bc769f5aca */
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 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 #endif
41 
42 #if HAVE_RL_CALLBACK_READ_CHAR
43 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_callback_read_char, 0, 0, IS_VOID, 0)
44 ZEND_END_ARG_INFO()
45 #endif
46 
47 #if HAVE_RL_CALLBACK_READ_CHAR
48 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_callback_handler_remove, 0, 0, _IS_BOOL, 0)
49 ZEND_END_ARG_INFO()
50 #endif
51 
52 #if HAVE_RL_CALLBACK_READ_CHAR
53 #define arginfo_readline_redisplay arginfo_readline_callback_read_char
54 #endif
55 
56 #if HAVE_RL_CALLBACK_READ_CHAR && HAVE_RL_ON_NEW_LINE
57 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_readline_on_new_line, 0, 0, IS_VOID, 0)
58 ZEND_END_ARG_INFO()
59 #endif
60 
61 
62 ZEND_FUNCTION(readline);
63 ZEND_FUNCTION(readline_info);
64 ZEND_FUNCTION(readline_add_history);
65 ZEND_FUNCTION(readline_clear_history);
66 #if defined(HAVE_HISTORY_LIST)
67 ZEND_FUNCTION(readline_list_history);
68 #endif
69 ZEND_FUNCTION(readline_read_history);
70 ZEND_FUNCTION(readline_write_history);
71 ZEND_FUNCTION(readline_completion_function);
72 #if HAVE_RL_CALLBACK_READ_CHAR
73 ZEND_FUNCTION(readline_callback_handler_install);
74 #endif
75 #if HAVE_RL_CALLBACK_READ_CHAR
76 ZEND_FUNCTION(readline_callback_read_char);
77 #endif
78 #if HAVE_RL_CALLBACK_READ_CHAR
79 ZEND_FUNCTION(readline_callback_handler_remove);
80 #endif
81 #if HAVE_RL_CALLBACK_READ_CHAR
82 ZEND_FUNCTION(readline_redisplay);
83 #endif
84 #if HAVE_RL_CALLBACK_READ_CHAR && HAVE_RL_ON_NEW_LINE
85 ZEND_FUNCTION(readline_on_new_line);
86 #endif
87 
88 
89 static const zend_function_entry ext_functions[] = {
90 	ZEND_FE(readline, arginfo_readline)
91 	ZEND_FE(readline_info, arginfo_readline_info)
92 	ZEND_FE(readline_add_history, arginfo_readline_add_history)
93 	ZEND_FE(readline_clear_history, arginfo_readline_clear_history)
94 #if defined(HAVE_HISTORY_LIST)
95 	ZEND_FE(readline_list_history, arginfo_readline_list_history)
96 #endif
97 	ZEND_FE(readline_read_history, arginfo_readline_read_history)
98 	ZEND_FE(readline_write_history, arginfo_readline_write_history)
99 	ZEND_FE(readline_completion_function, arginfo_readline_completion_function)
100 #if HAVE_RL_CALLBACK_READ_CHAR
101 	ZEND_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install)
102 #endif
103 #if HAVE_RL_CALLBACK_READ_CHAR
104 	ZEND_FE(readline_callback_read_char, arginfo_readline_callback_read_char)
105 #endif
106 #if HAVE_RL_CALLBACK_READ_CHAR
107 	ZEND_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove)
108 #endif
109 #if HAVE_RL_CALLBACK_READ_CHAR
110 	ZEND_FE(readline_redisplay, arginfo_readline_redisplay)
111 #endif
112 #if HAVE_RL_CALLBACK_READ_CHAR && HAVE_RL_ON_NEW_LINE
113 	ZEND_FE(readline_on_new_line, arginfo_readline_on_new_line)
114 #endif
115 	ZEND_FE_END
116 };
117 
register_readline_symbols(int module_number)118 static void register_readline_symbols(int module_number)
119 {
120 	REGISTER_STRING_CONSTANT("READLINE_LIB", READLINE_LIB, CONST_PERSISTENT);
121 }
122