Skip to content

Comments

Fixes issues #2, #7, #8, #9, #11#10

Open
tempelmann wants to merge 34 commits intoPedestrianSean:masterfrom
tempelmann:Fixing
Open

Fixes issues #2, #7, #8, #9, #11#10
tempelmann wants to merge 34 commits intoPedestrianSean:masterfrom
tempelmann:Fixing

Conversation

@tempelmann
Copy link

Also brings Lua's source code up-to-date

…r `setProperty:` raised an error, invoking longjmp and thereby skipping the call to objc_release.

This fix uses the __unsafe_unretained modifier to tell ARC not to call retain nor release at all in these functions, thereby circumventing the issue.

The code also now compiles properly with disabled ARC, which was mainly needed for debugging but can be left in there, just in case someone else feels the need for this.
@tempelmann
Copy link
Author

BTW, it might also be a smart move to update the version info (in the podspec) once the changes are merged. And maybe add the version number also to the README.md

@tempelmann
Copy link
Author

Yikes, hold on - there's still something wrong. Depending on the diagnostics settings in the Test scheme the code fails or succeeds. Need to debug that first.

It was wrong to use the `__unsafe_unretained` attribute on the value, as it's autoreleased and might get released too soon.
The proper way would be to manually add a retain and release call during its use, but my testing did confirm that I'd end up with a leak if I leave out the release call. And those values are getting autoreleased anyway, even with ARC enabled, and even with a forced error exit (thru longjmp), so the safest solution appears to be to revert my change and leave ARC handle this one.
@tempelmann
Copy link
Author

Okay, now it should be ready for merging.

@tempelmann
Copy link
Author

Now also includes fix for #11

@tempelmann tempelmann changed the title Fixes issues #2, #7, #8, #9 Fixes issues #2, #7, #8, #9, #11 Feb 1, 2022
Adding support for callable objects.

This also changes the min Xcode version to Xcode 11 and min macOS version to 10.13.
…so that it open again in Xcode 10.1 and builds for macOS 10.10 when used with Xcode 13.x or earlier.
…me LuaExport in order to allow the user to replace it with a custom type
…rray) index is now retrieved as an `integer` instead of a `number` type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants