Skip to main content

GC_same_obj

Function GC_same_obj 

Source
pub unsafe extern "C" fn GC_same_obj(
    arg1: *mut c_void,
    arg2: *mut c_void,
) -> *mut c_void
Expand description

Check that p and q point to the same object. GC_same_obj_print_proc is called (fail by default) if they do not. Succeeds, as well, if neither p nor q points to the heap. (May succeed also if both p and q point to between heap objects.) Returns the first argument (p). (The returned value may be hard to use due to typing issues. But if we had a suitable preprocessor…) We assume this is somewhat performance critical (it should not be called by production code, of course, but it can easily make even debugging intolerably slow).