mirror of https://github.com/m-labs/artiq.git
firmware/rpc: fixed typo
This commit is contained in:
parent
f78d673079
commit
eb28d7be3a
|
@ -49,7 +49,7 @@ unsafe fn recv_value<R, E>(reader: &mut R, tag: Tag, data: &mut *mut (),
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
Tag::List(it) | Tag::Array(it) => {
|
Tag::List(it) | Tag::Array(it) => {
|
||||||
#[repr(C)].
|
#[repr(C)]
|
||||||
struct List { elements: *mut (), length: u32 };
|
struct List { elements: *mut (), length: u32 };
|
||||||
consume_value!(List, |ptr| {
|
consume_value!(List, |ptr| {
|
||||||
(*ptr).length = reader.read_u32()?;
|
(*ptr).length = reader.read_u32()?;
|
||||||
|
@ -133,7 +133,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
Tag::List(it) | Tag::Array(it) => {
|
Tag::List(it) | Tag::Array(it) => {
|
||||||
#[repr(C)].
|
#[repr(C)]
|
||||||
struct List { elements: *const (), length: u32 };
|
struct List { elements: *const (), length: u32 };
|
||||||
consume_value!(List, |ptr| {
|
consume_value!(List, |ptr| {
|
||||||
writer.write_u32((*ptr).length)?;
|
writer.write_u32((*ptr).length)?;
|
||||||
|
@ -153,7 +153,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
Tag::Keyword(it) => {
|
Tag::Keyword(it) => {
|
||||||
#[repr(C)].
|
#[repr(C)]
|
||||||
struct Keyword<'a> { name: CSlice<'a, u8> };
|
struct Keyword<'a> { name: CSlice<'a, u8> };
|
||||||
consume_value!(Keyword, |ptr| {
|
consume_value!(Keyword, |ptr| {
|
||||||
writer.write_string(str::from_utf8((*ptr).name.as_ref()).unwrap())?;
|
writer.write_string(str::from_utf8((*ptr).name.as_ref()).unwrap())?;
|
||||||
|
@ -165,7 +165,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
||||||
// to accurately advance data.
|
// to accurately advance data.
|
||||||
}
|
}
|
||||||
Tag::Object => {
|
Tag::Object => {
|
||||||
#[repr(C)].
|
#[repr(C)]
|
||||||
struct Object { id: u32 };
|
struct Object { id: u32 };
|
||||||
consume_value!(*const Object, |ptr|
|
consume_value!(*const Object, |ptr|
|
||||||
writer.write_u32((**ptr).id))
|
writer.write_u32((**ptr).id))
|
||||||
|
|
Loading…
Reference in New Issue