mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Make an Error.h that declares the public ABI for errors.
NFC except that I added swift_errorRetain and swift_errorRelease functions on non-ObjC targets so that we have consistent functions to call in the runtime. I have not changed everywhere in the runtime to use these, nor have I changed the compiler to call them.
This commit is contained in:
@@ -106,4 +106,12 @@ swift::swift_getErrorValue(const SwiftError *errorObject,
|
||||
out->errorConformance = errorObject->errorConformance;
|
||||
}
|
||||
|
||||
SwiftError *swift::swift_errorRetain(SwiftError *error) {
|
||||
return static_cast<SwiftError*>(swift_retain(error));
|
||||
}
|
||||
|
||||
void swift::swift_errorRelease(SwiftError *error) {
|
||||
swift_release(error);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user