Skip to content

Commit 36f5582

Browse files
authored
move extension_loaded to runtime-common (#1479)
1 parent 716575f commit 36f5582

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ function escapeshellcmd($cmd ::: string): string;
5757

5858
function exec($command ::: string, &$output ::: mixed = [], int &$result_code = TODO): string|false;
5959

60+
function extension_loaded(string $extension): bool;
61+
6062
// === UNSUPPORTED ===
6163

6264
/** @kphp-extern-func-info stub generation-required */

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
string f$escapeshellarg(const string& arg) noexcept;
1010

1111
string f$escapeshellcmd(const string& cmd) noexcept;
12+
13+
inline bool f$extension_loaded(const string& /*extension*/) noexcept {
14+
return true;
15+
}

runtime/interface.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,3 @@ int64_t f$numa_get_bound_node() {
25122512
}
25132513
return numa.get_worker_numa_node(logname_id);
25142514
}
2515-
2516-
bool f$extension_loaded(const string& /*extension*/) {
2517-
return true;
2518-
}

runtime/interface.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,3 @@ inline void f$kphp_extended_instance_cache_metrics_init(F&& callback) {
240240
}
241241

242242
int64_t f$numa_get_bound_node();
243-
244-
bool f$extension_loaded(const string& extension);

0 commit comments

Comments
 (0)