Skip to content

Commit

Permalink
fix harmony create_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed May 14, 2024
1 parent 6c65946 commit b31d89a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GaiaXStretch/bindings/harmony/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub unsafe extern "C" fn stretch_node_compute_layout(
node: *mut c_void,
width: f32,
height: f32,
create_layout: fn(*const f32) -> *mut c_void,
create_layout: fn(*const f32, i32) -> *mut c_void,
) -> *mut c_void {
let mut stretch = Box::from_raw(stretch as *mut Stretch);
let node = Box::from_raw(node as *mut Node);
Expand All @@ -379,7 +379,7 @@ pub unsafe extern "C" fn stretch_node_compute_layout(
Box::leak(node);
Box::leak(stretch);

create_layout(output.as_ptr())
create_layout(output.as_ptr(), output.len() as i32)
}

fn copy_output(stretch: &Stretch, node: Node, output: &mut Vec<f32>) {
Expand Down

0 comments on commit b31d89a

Please sign in to comment.