You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus avoiding temporary variables and making code more type safe (if we type by accident wrap : ::libc::c_void it will cause type error. Note that mutability should still work, only with slightly different syntax:
let y: i32 = 10;
let mut z: i32 = 20;
let x: i32 = cpp!([y as "int32_t", &mut z as "int32_t &"] -> i32 as "int32_t" {
z++;
return y + z;
});
The text was updated successfully, but these errors were encountered:
I'm noticing that 99% of my errors are type errors during calling
cpp!
macro:This compiles but segfaults. Correct way is:
My code is littered with
_ptr
variables and other casting. It might be nice to have following syntax:Thus avoiding temporary variables and making code more type safe (if we type by accident
wrap : ::libc::c_void
it will cause type error. Note that mutability should still work, only with slightly different syntax:The text was updated successfully, but these errors were encountered: