Skip to content

Add free() workaround that causes error when built with some compiler versions. #573

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

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Mar 29, 2021

Otherwise some building compilers will see errors:

error: value of optional type 'UnsafeMutablePointer<CChar>?' (aka 'Optional<UnsafeMutablePointer<Int8>>') must be unwrapped to a value of type 'UnsafeMutablePointer<CChar>' (aka 'UnsafeMutablePointer<Int8>')
  for ptr in cstrings { free(ptr) }

…er versions.

Otherwise some building compilers will see errors:
```
error: value of optional type 'UnsafeMutablePointer<CChar>?' (aka 'Optional<UnsafeMutablePointer<Int8>>') must be unwrapped to a value of type 'UnsafeMutablePointer<CChar>' (aka 'UnsafeMutablePointer<Int8>')
  for ptr in cstrings { free(ptr) }
```
@artemcm artemcm requested a review from nkcsgexi March 29, 2021 23:12
@artemcm
Copy link
Contributor Author

artemcm commented Mar 29, 2021

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Thanks!

@artemcm artemcm merged commit eb918de into swiftlang:main Mar 29, 2021
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