Skip to main content

luaur_compile_cli/functions/
annotate_instruction.rs

1use core::ffi::c_void;
2
3use alloc::string::String;
4use luaur_bytecode::records::bytecode_builder::BytecodeBuilder;
5
6pub unsafe extern "C" fn annotate_instruction(
7    context: *mut c_void,
8    text: &mut String,
9    fid: i32,
10    instpos: i32,
11) {
12    let bcb = &*(context as *const BytecodeBuilder);
13    bcb.annotate_instruction(text, fid as u32, instpos as u32);
14}