Skip to content

Commit

Permalink
Fix the name of the symbol in objc2-exception-helper
Browse files Browse the repository at this point in the history
I've changed the name to also no longer include the extra "exception",
so that a future `objc2-exception-helper v0.2.0` won't conflict with the
symbol from the existing `objc2-exception-helper v0.1.0`.
  • Loading branch information
madsmtm committed Sep 12, 2024
1 parent f1bde3e commit 0cd79ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions crates/objc2-exception-helper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

### Fixed
* Fixed the symbol name to include the correct SemVer version of the crate.


## 0.1.0 - 2024-06-02

Expand Down
2 changes: 1 addition & 1 deletion crates/objc2-exception-helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {
/// (using mechanisms like core::intrinsics::r#try) is not an option!
///
/// [manual-asm]: https://gitlab.com/objrs/objrs/-/blob/b4f6598696b3fa622e6fddce7aff281770b0a8c2/src/exception.rs
#[link_name = "objc2_exception_helper_0_2_try_catch_exception"]
#[link_name = "objc2_exception_helper_0_1_try_catch"]
pub fn try_catch(f: TryCatchClosure, context: *mut c_void, error: *mut *mut c_void) -> u8;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/objc2-exception-helper/src/try_catch.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// crate is present, so we make sure to version this symbol.
///
/// Return `unsigned char` since it is guaranteed to be `u8` on all platforms.
unsigned char objc2_exception_helper_0_2_try_catch_exception(void (*f)(void *), void *context, id *error) {
unsigned char objc2_exception_helper_0_1_try_catch(void (*f)(void *), void *context, id *error) {
@try {
f(context);
return 0;
Expand Down

0 comments on commit 0cd79ee

Please sign in to comment.