core: add wp_core_get_own_bound_id() method

This allows retrieving the bound-id of our own client
This commit is contained in:
George Kiagiadakis
2023-10-17 18:07:32 +03:00
parent e88fa840f2
commit a6bea40172
3 changed files with 33 additions and 0 deletions

View File

@@ -174,6 +174,15 @@ core_get_vm_type (lua_State *L)
return 1;
}
static int
core_get_own_bound_id (lua_State *L)
{
WpCore * core = get_wp_core (L);
guint32 id = wp_core_get_own_bound_id (core);
lua_pushinteger (L, id);
return 1;
}
static int
core_idle_add (lua_State *L)
{
@@ -270,6 +279,7 @@ core_require_api (lua_State *L)
static const luaL_Reg core_funcs[] = {
{ "get_info", core_get_info },
{ "get_vm_type", core_get_vm_type },
{ "get_own_bound_id", core_get_own_bound_id },
{ "idle_add", core_idle_add },
{ "timeout_add", core_timeout_add },
{ "sync", core_sync },