-
Notifications
You must be signed in to change notification settings - Fork 805
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
Get all the tests building and passing! #1189
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -249,7 +249,7 @@ impl<'a> Container<'a> { | |||||||||||||||||||||
let self_ty = &self.path; | ||||||||||||||||||||||
let mut fields: Punctuated<TokenStream, syn::Token![,]> = Punctuated::new(); | ||||||||||||||||||||||
for i in 0..len { | ||||||||||||||||||||||
fields.push(quote!(slice[#i].extract()?)); | ||||||||||||||||||||||
fields.push(quote!(s.get_item(#i).extract()?)); | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the memory layout different for Lines 84 to 93 in 2ec1c3b
It probably won't have a measurable impact anyways, just curious.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They can be, which is the whole point of the limited ABI :-) |
||||||||||||||||||||||
} | ||||||||||||||||||||||
let msg = if self.is_enum_variant { | ||||||||||||||||||||||
quote!(format!( | ||||||||||||||||||||||
|
@@ -265,7 +265,6 @@ impl<'a> Container<'a> { | |||||||||||||||||||||
if s.len() != #len { | ||||||||||||||||||||||
return Err(::pyo3::exceptions::PyValueError::new_err(#msg)) | ||||||||||||||||||||||
} | ||||||||||||||||||||||
let slice = s.as_slice(); | ||||||||||||||||||||||
Ok(#self_ty(#fields)) | ||||||||||||||||||||||
) | ||||||||||||||||||||||
} | ||||||||||||||||||||||
|
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.
What is the problem with this?
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.
subclasses a builtin type which isn't support on abi3 (and I don't know how to make a doc test
no_run
only in some cfgs)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.
OK, though I'll have to modify this when it is changed to raise a compile error.