-
Notifications
You must be signed in to change notification settings - Fork 95
Add more iterators on Group #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d9587cd
to
dfd4c71
Compare
dfd4c71
to
b3e1d30
Compare
b3e1d30
to
d8ffaf3
Compare
d8ffaf3
to
ca10fab
Compare
@aldanor This should be good to go now |
@mulimoen Looks good overall. I started writing review but figured it would be easier to fix myself - I'll open a PR to your PR on your fork. |
One minor point - why the manual |
|
For reference: mulimoen#11 |
@aldanor Looks good to me now. I forgot how big this release is, I thought we already published attributes, but apparently not |
Hm, with times not being filled out, that's not good - but I'll open a separate PR to quickly fix that. This one - let's merge then. |
} | ||
} | ||
|
||
pub enum IterationOrder { |
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.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
?
) -> herr_t { | ||
panic::catch_unwind(|| { | ||
let other_data: &mut Vec<String> = unsafe { &mut *(op_data.cast::<Vec<String>>()) }; | ||
pub enum TraversalOrder { |
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.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
?
let name = unsafe { std::ffi::CStr::from_ptr(name) }; | ||
let info = unsafe { info.as_ref().unwrap() }; | ||
let handle = Handle::try_new(id).unwrap(); | ||
handle.incref(); |
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 could probably do Group::from_id(id).expect("invalid group id")
, no?
The only difference would be it doesn't incref the handle there, wonder why it's increfed manually here?
src/hl/group.rs
Outdated
let vtable = op_data.cast::<Vtable<F, G>>(); | ||
let vtable = unsafe { vtable.as_mut().expect("op_data is always non-null") }; | ||
let name = unsafe { std::ffi::CStr::from_ptr(name) }; | ||
let info = unsafe { info.as_ref().unwrap() }; |
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.
Replace all unwraps within ffi code with .expect()
?
This adds
groups
,datasets
, anddatatypes
toGroup
. This also adds the generaliter_visit
, which can be adapted by users to fully use the capabilities ofH5Literate
(sans iteration resumption).