Navigation Menu

Skip to content
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

[SR-576] kIOReturn* error codes are not imported to Swift #43193

Closed
swift-ci opened this issue Jan 18, 2016 · 5 comments
Closed

[SR-576] kIOReturn* error codes are not imported to Swift #43193

swift-ci opened this issue Jan 18, 2016 · 5 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SDKOverlay standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-576
Radar rdar://problem/24247779
Original Reporter mattrajca (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 7.2 GM / Swift 2.1

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, SDKOverlay
Assignee @belkadan
Priority Medium

md5: f38839ed1894dd9c68d8e2ce1fdf8835

Issue Description:

IOKit's kIOReturn* error codes (declared in iokit/IOKit/IOReturn.h) are not imported to Swift, presumably because they're defined in terms of a macro. For example:

#define iokit_common_err(return)          (sys_iokit|sub_iokit_common|return)
...
#define kIOReturnNoMemory        iokit_common_err(0x2bd) // can't allocate memory

The Objective-C IOBluetooth API uses these error codes, so they're useful even outside of IOKit development. Perhaps they could be re-defined in Swift, much like Mach Error.

@belkadan
Copy link
Contributor

The overlay files are owned by the framework owners at Apple, even though they need to be distributed with Swift. I'll try to get in touch with someone from IOKit.

@swift-ci
Copy link
Collaborator Author

Comment by Matt Rajca (JIRA)

Okay, I'd be happy to send a pull request otherwise.

@belkadan
Copy link
Contributor

The IOKit people say they're fine with an overlay solution, so please feel free to send that pull request! (You can assign it directly to me.)

@swift-ci
Copy link
Collaborator Author

Comment by Matt Rajca (JIRA)

#1096

@belkadan
Copy link
Contributor

Matt's pull request landed in 0795970 (quite a while ago, sorry for neither of us updating the bug).

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SDKOverlay standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants