Conversation
The Thats also the only way to get a hold of analysis structure. |
Should also expose the other fields, read-only |
Updated. |
src/item.rs
Outdated
use Item; | ||
|
||
impl Item { | ||
pub fn offset(&self) -> c_int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to use proper Rust types here instead of the libc ones (i32
)
src/item.rs
Outdated
} | ||
|
||
pub fn analysis(&self) -> Analysis { | ||
unsafe { Analysis::from_c((*self.to_glib_none().0).analysis) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you simply return a reference here instead (The from_c()
above must be taking new references to all the pointers inside otherwise?)
&*((*self.to_glib_none().0).analysis as *const Analysis)
and put repr(C)
on the Analysis
struct
Updated. |
Looks good but IMHO need some squash. |
I'll squash once reviews are done to make your lifes easier. ;) |
ad6a20c
to
13b23dd
Compare
Squashed and tests passed. Merge time! |
Fixes #74.
I don't think we can yet generate
LogAttr
struct for the moment but except for this one, we now have a new one.cc @sdroege @EPashkin