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

Fix NSNotFound definition to use NSInteger type #495

Merged
merged 3 commits into from
Mar 19, 2025
Merged

Conversation

triplef
Copy link
Member

@triplef triplef commented Mar 17, 2025

Fixes #494.

I’m guessing this is an ABI breaking change, not sure how this should be handled.

@triplef triplef requested a review from rfm as a code owner March 17, 2025 14:40
Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this is a clear bug, which should be fixed asap. While it's technically an ABI change/break, I think in practice it will only cure problems, not break working code.

@triplef
Copy link
Member Author

triplef commented Mar 17, 2025

Sounds good. There was one test failure, because in NSCalendar.h we have another int enum:

enum
{
  NSDateComponentUndefined = NSIntegerMax,
  NSUndefinedDateComponent = NSDateComponentUndefined
};

I updated it to use NS_ENUM(NSInteger).

@triplef
Copy link
Member Author

triplef commented Mar 17, 2025

Any idea whether this failure on Windows MinGW GCC could be related?

base/NSRunLoop/thread.m:
Failed test:     (2025-03-17 16:08:02.762 GMT) thread.m:192 ... A loop with no inputs or timers will exit

@triplef
Copy link
Member Author

triplef commented Mar 17, 2025

The failure seems to have been intermittent. Still ok to merge with the additional changes @rfm?

Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional changes look ok to me.

@hmelder hmelder merged commit 80b54d5 into master Mar 19, 2025
8 checks passed
@hmelder hmelder deleted the fix-nsnotfound branch March 19, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

NSNotFound defined as 32-bit int instead of NSInteger
3 participants