Skip to content

Commit

Permalink
fix vcl param size
Browse files Browse the repository at this point in the history
  • Loading branch information
phcreery committed Dec 5, 2024
1 parent 5fb459d commit 562a1d6
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions vcl/kernel.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -107,34 +107,37 @@ fn (k &Kernel) set_args(args ...ArgumentType) ! {
fn (k &Kernel) set_arg(index int, arg ArgumentType) ! {
match arg {
u8 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
f32 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
i8 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
f64 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
u16 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
i16 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
}
i64 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
}
i8 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
int {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
}
u16 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
u32 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
i32 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
u64 {
return k.set_arg_unsafe(index, int(sizeof(arg)), unsafe { &arg })
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
i64 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
f32 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
f64 {
return k.set_arg_unsafe(index, int(sizeof(*arg)), *arg)
}
Buffer {
return k.set_arg_buffer(index, arg)
Expand Down

0 comments on commit 562a1d6

Please sign in to comment.