Skip to main content

luaur_common/functions/
create_scope_data.rs

1//! Source: `Common/src/TimeTrace.cpp:263-266` (hand-ported)
2//! C++ `LUAU_NOINLINE uint16_t createScopeData(const char* name, const char* category)`:
3//! `return createToken(*Luau::TimeTrace::getGlobalContext(), name, category);`
4
5use core::ffi::c_char;
6
7use crate::functions::create_token::create_token;
8use crate::functions::get_global_context::get_global_context;
9
10pub fn create_scope_data(name: *const c_char, category: *const c_char) -> u16 {
11    let context = get_global_context();
12    create_token(&context, name, category)
13}