don't deref in the macros
This commit is contained in:
parent
5a06b04a6a
commit
621bd9c9ab
|
@ -66,7 +66,7 @@ pub fn initialise_call_frame(stack: &mut Stack, init: uintptr_t, args: &[uintptr
|
||||||
.. Registers::new()
|
.. Registers::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
match into_fields!(regs { rdi, r13, r14, r15 } <- args.iter()) {
|
match into_fields!(regs { rdi, r13, r14, r15 } <- args.iter().cloned()) {
|
||||||
Some(mut args) => if args.next().is_some() {
|
Some(mut args) => if args.next().is_some() {
|
||||||
panic!("too many arguments")
|
panic!("too many arguments")
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@ macro_rules! __into_fields {
|
||||||
($x:ident { $field:ident } <- $iter:ident) => {
|
($x:ident { $field:ident } <- $iter:ident) => {
|
||||||
match $iter.next() {
|
match $iter.next() {
|
||||||
Some(value) => {
|
Some(value) => {
|
||||||
$x.$field = *value;
|
$x.$field = value;
|
||||||
Some($iter)
|
Some($iter)
|
||||||
}
|
}
|
||||||
None => None
|
None => None
|
||||||
|
@ -11,7 +11,7 @@ macro_rules! __into_fields {
|
||||||
($x:ident { $field:ident, $($fields_rest:ident),* } <- $iter:ident) => {
|
($x:ident { $field:ident, $($fields_rest:ident),* } <- $iter:ident) => {
|
||||||
match $iter.next() {
|
match $iter.next() {
|
||||||
Some(value) => {
|
Some(value) => {
|
||||||
$x.$field = *value;
|
$x.$field = value;
|
||||||
__into_fields!($x { $($fields_rest),* } <- $iter)
|
__into_fields!($x { $($fields_rest),* } <- $iter)
|
||||||
}
|
}
|
||||||
None => None
|
None => None
|
||||||
|
|
Loading…
Reference in New Issue