From b40c8462d0d5708b5665834ec726bebdf7edfcc1 Mon Sep 17 00:00:00 2001 From: Alexander Polyakov Date: Fri, 13 Dec 2024 19:22:34 +0300 Subject: [PATCH] Add default parameters to RPC send builtins --- builtin-functions/kphp-light/rpc.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/builtin-functions/kphp-light/rpc.txt b/builtin-functions/kphp-light/rpc.txt index 9ef432dd3a..53a1965a40 100644 --- a/builtin-functions/kphp-light/rpc.txt +++ b/builtin-functions/kphp-light/rpc.txt @@ -33,10 +33,19 @@ final class KphpRpcRequestsExtraInfo { } /** @kphp-extern-func-info interruptible */ -function rpc_send_requests($actor ::: string, $arr ::: array, $timeout ::: float, $ignore_answer ::: bool, \KphpRpcRequestsExtraInfo $requests_extra_info, $need_responses_extra_info ::: bool) ::: int[]; +function rpc_send_requests($actor ::: string, + $arr ::: array, + $timeout ::: float = -1.0, + $ignore_answer ::: bool = false, + \KphpRpcRequestsExtraInfo $requests_extra_info = null, + $need_responses_extra_info ::: bool = false) ::: int[]; /** @kphp-extern-func-info tl_common_h_dep interruptible */ -function rpc_send_typed_query_requests($actor ::: string, @tl\RpcFunction[] $query_functions, $timeout ::: float, $ignore_answer ::: bool, \KphpRpcRequestsExtraInfo $requests_extra_info, $need_responses_extra_info ::: bool) ::: int[]; +function rpc_send_typed_query_requests($actor ::: string, @tl\RpcFunction[] $query_functions, + $timeout ::: float = -1.0, + $ignore_answer ::: bool = false, + \KphpRpcRequestsExtraInfo $requests_extra_info = null, + $need_responses_extra_info ::: bool = false) ::: int[]; /** @kphp-extern-func-info interruptible */ function rpc_fetch_responses($query_ids ::: array) ::: mixed[][];