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

Fix a compile error on Linux/x86 (implementation of i64 conversion) #8

Merged
merged 3 commits into from May 26, 2015

Conversation

Projects
None yet
2 participants
@sunnyone

sunnyone commented May 26, 2015

The current code of master causes a compile error on a Linux/x86 platform (see a log below).

I read that this is caused by lack of implementation converting to/from i64 for x86, then I create it from current u64 implementation.

Compile error on Linux/x86 (Ubuntu 14.04 x86, rust-nightly)

src/objects/num.rs:127:9: 134:10 error: the trait `conversion::ToPyObject<'_>` is not implemented for the type `i64` [E0277]
src/objects/num.rs:127         impl <'p> ToPyObject<'p> for $rust_type {
src/objects/num.rs:128             type ObjectType = <$larger_type as ToPyObject<'p>>::ObjectType;
src/objects/num.rs:129 
src/objects/num.rs:130             #[inline]
src/objects/num.rs:131             fn to_py_object(&self, py: Python<'p>) -> <$larger_type as ToPyObject<'p>>::ObjectType {
src/objects/num.rs:132                 (*self as $larger_type).to_py_object(py)
                       ...
src/objects/num.rs:125:1: 147:3 note: in expansion of int_fits_larger_int!
src/objects/num.rs:171:1: 171:34 note: expansion site
src/objects/num.rs:127:9: 134:10 error: the trait `conversion::ToPyObject<'_>` is not implemented for the type `i64` [E0277]
src/objects/num.rs:127         impl <'p> ToPyObject<'p> for $rust_type {
src/objects/num.rs:128             type ObjectType = <$larger_type as ToPyObject<'p>>::ObjectType;
src/objects/num.rs:129 
src/objects/num.rs:130             #[inline]
src/objects/num.rs:131             fn to_py_object(&self, py: Python<'p>) -> <$larger_type as ToPyObject<'p>>::ObjectType {
src/objects/num.rs:132                 (*self as $larger_type).to_py_object(py)
                       ...
src/objects/num.rs:125:1: 147:3 note: in expansion of int_fits_larger_int!
src/objects/num.rs:171:1: 171:34 note: expansion site
error: aborting due to 2 previous errors
Could not compile `cpython`.

dgrunwald added a commit that referenced this pull request May 26, 2015

Merge pull request #8 from sunnyone/feature/x86-non-windows
Fix a compile error on Linux/x86 (implementation of i64 conversion)

@dgrunwald dgrunwald merged commit 6b7b47d into dgrunwald:master May 26, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment