Skip to main content

luaur_vm/functions/
enumedge.rs

1use crate::functions::enumtopointer::enumtopointer;
2use crate::records::enum_context::EnumContext;
3use crate::records::gc_object::GCObject;
4use core::ffi::{c_char, c_void};
5
6#[allow(non_snake_case)]
7pub(crate) unsafe fn enumedge(
8    ctx: *mut EnumContext,
9    from: *mut GCObject,
10    to: *mut GCObject,
11    edgename: *const c_char,
12) {
13    let ctx_ref = &*ctx;
14    if let Some(edge_fn) = ctx_ref.edge {
15        edge_fn(
16            ctx_ref.context,
17            enumtopointer(from),
18            enumtopointer(to),
19            edgename,
20        );
21    }
22}