-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Foundation fixes for 32-bit systems and more #264
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
Changes from all commits
be85d0a
d5baea5
598bb50
54e15e4
fae5a12
8955678
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 |
---|---|---|
|
@@ -33,7 +33,11 @@ public struct CGFloat { | |
public var native: NativeType | ||
|
||
private var hash: Int { | ||
#if arch(i386) || arch(arm) | ||
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. I wish we had a #if 32bit or some sort of equiv; ala the discussion on swift-evolution. 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. YES!! I agree. I'd also love an endianness flag. :) 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. I have my tree where I have done endian([big|little]) and intsize(nn) but reading the discussion I decided to postpone the submission. :) |
||
return Int(Float(self.native)._toBitPattern()) | ||
#else | ||
return Int(self.native._toBitPattern()) | ||
#endif | ||
} | ||
} | ||
|
||
|
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.
Interesting, this seems to work just fine on 32 bit linked processes; I will have to do some digging to verify that...
The change listed here actually looks more correct.
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.
On Linux/arm the alignment is different, the _pad is found at 24, while CFRuntimeBase is 20 bytes long leading to an awful heap overflow.