1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

api: add function line_search_by_id

This commit is contained in:
Sébastien Helleu
2024-06-27 07:03:55 +02:00
parent 0e9ed21edf
commit f076db4767
26 changed files with 448 additions and 3 deletions
+21
View File
@@ -3976,6 +3976,27 @@ API_FUNC(buffer_match_list)
API_RETURN_INT(result);
}
API_FUNC(line_search_by_id)
{
zend_string *z_buffer;
zend_long z_id;
struct t_gui_buffer *buffer;
int id;
const char *result;
API_INIT_FUNC(1, "line_search_by_id", API_RETURN_EMPTY);
if (zend_parse_parameters (ZEND_NUM_ARGS(), "Sl", &z_buffer,
&z_id) == FAILURE)
API_WRONG_ARGS(API_RETURN_EMPTY);
buffer = (struct t_gui_buffer *)API_STR2PTR(ZSTR_VAL(z_buffer));
id = (int)z_id;
result = API_PTR2STR(weechat_line_search_by_id (buffer, id));
API_RETURN_STRING(result);
}
API_FUNC(current_window)
{
const char *result;
+1
View File
@@ -183,6 +183,7 @@ PHP_FUNCTION(weechat_buffer_get_pointer);
PHP_FUNCTION(weechat_buffer_set);
PHP_FUNCTION(weechat_buffer_string_replace_local_var);
PHP_FUNCTION(weechat_buffer_match_list);
PHP_FUNCTION(weechat_line_search_by_id);
PHP_FUNCTION(weechat_current_window);
PHP_FUNCTION(weechat_window_search_with_buffer);
PHP_FUNCTION(weechat_window_get_integer);
+1
View File
@@ -241,6 +241,7 @@ const zend_function_entry weechat_functions[] = {
PHP_FE(weechat_buffer_set, arginfo_weechat_buffer_set)
PHP_FE(weechat_buffer_string_replace_local_var, arginfo_weechat_buffer_string_replace_local_var)
PHP_FE(weechat_buffer_match_list, arginfo_weechat_buffer_match_list)
PHP_FE(weechat_line_search_by_id, arginfo_weechat_line_search_by_id)
PHP_FE(weechat_current_window, arginfo_weechat_current_window)
PHP_FE(weechat_window_search_with_buffer, arginfo_weechat_window_search_with_buffer)
PHP_FE(weechat_window_get_integer, arginfo_weechat_window_get_integer)
+1
View File
@@ -149,6 +149,7 @@ function weechat_buffer_get_pointer(string $p0, string $p1): string {}
function weechat_buffer_set(string $p0, string $p1, string $p2): int {}
function weechat_buffer_string_replace_local_var(string $p0, string $p1): string {}
function weechat_buffer_match_list(string $p0, string $p1): int {}
function weechat_line_search_by_id(string $p0, int $p1): string {}
function weechat_current_window(): string {}
function weechat_window_search_with_buffer(string $p0): string {}
function weechat_window_get_integer(string $p0, string $p1): int {}
+3 -1
View File
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: cf4a06ff974bca04f671e75e22f7d16534ca643f */
* Stub hash: ac17ccd00483eea80bd3dc22ec07ab3bf41dec88 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_weechat_register, 0, 7, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, p0, IS_STRING, 0)
@@ -439,6 +439,8 @@ ZEND_END_ARG_INFO()
#define arginfo_weechat_buffer_match_list arginfo_weechat_string_has_highlight
#define arginfo_weechat_line_search_by_id arginfo_weechat_list_get
#define arginfo_weechat_current_window arginfo_weechat_list_new
#define arginfo_weechat_window_search_with_buffer arginfo_weechat_plugin_get_name
+3 -1
View File
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: cf4a06ff974bca04f671e75e22f7d16534ca643f */
* Stub hash: ac17ccd00483eea80bd3dc22ec07ab3bf41dec88 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_weechat_register, 0, 0, 7)
ZEND_ARG_INFO(0, p0)
@@ -313,6 +313,8 @@ ZEND_END_ARG_INFO()
#define arginfo_weechat_buffer_match_list arginfo_weechat_iconv_to_internal
#define arginfo_weechat_line_search_by_id arginfo_weechat_iconv_to_internal
#define arginfo_weechat_current_window arginfo_weechat_list_new
#define arginfo_weechat_window_search_with_buffer arginfo_weechat_plugin_get_name