Skip to main content

apply_fixes_c

Function apply_fixes_c 

Source
pub fn apply_fixes_c(source: &str, layouts: &[&StructLayout]) -> String
Expand description

Apply C/C++ struct reorderings in-place, returning the modified source. Each layout in layouts is looked up by name; matched structs are replaced with the optimally-ordered definition. Replacements are applied back-to-front so byte offsets remain valid.