Skip to content

Commit 46cde17

Browse files
authored
[k2] add missed doc comment for builtins stubs (#1488)
1 parent b168a45 commit 46cde17

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

builtin-functions/kphp-light/stdlib/server-functions.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ function memory_get_static_usage() ::: int;
102102
/** @kphp-extern-func-info stub */
103103
function kphp_extended_instance_cache_metrics_init(callable(string $key):string $normalization_function) ::: void;
104104

105-
105+
/** @kphp-extern-func-info stub */
106106
function register_kphp_on_warning_callback(callable(string $warning_message, string[] $stacktrace):void $stacktrace) ::: void;
107+
/** @kphp-extern-func-info stub */
107108
function register_kphp_on_oom_callback(callable():void $callback) ::: bool;
108109

109110
/** @kphp-extern-func-info stub */

runtime-light/stdlib/system/system-functions.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ auto exec(std::string_view cmd, const output_handler_type& output_handler = {})
7979

8080
template<typename F>
8181
bool f$register_kphp_on_oom_callback(F&& /*callback*/) {
82-
kphp::log::error("call to unsupported function");
82+
kphp::log::warning("called stub register_kphp_on_oom_callback");
8383
}
8484

8585
template<typename F>
@@ -237,12 +237,10 @@ inline Optional<string> f$exec(const string& cmd) noexcept {
237237
}
238238

239239
inline string f$get_engine_version() noexcept {
240-
kphp::log::warning("called stub get_engine_version");
241240
return {};
242241
}
243242

244243
inline string f$get_kphp_cluster_name() noexcept {
245-
kphp::log::warning("called stub get_kphp_cluster_name");
246244
return string{"adm512"};
247245
}
248246

0 commit comments

Comments
 (0)