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

ffigen: Don't generate setters for constant globals #828

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

simolus3
Copy link
Contributor

ffigen always generates a getter/setter pair for global variables declared in C. But I think for variables declared const in C, writing to their address should be impossible in Dart, just like it is prevented in C.

Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

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

lgtm from my side! Thanks @simolus3!

@dcharkes
Copy link
Collaborator

PTAL as well @mannprerak2.

@coveralls
Copy link

Coverage Status

coverage: 92.677% (+0.008%) from 92.669%
when pulling 74a5df7 on simolus3:constant-globals
into 9f29edc on dart-lang:main.

Copy link
Contributor

@mannprerak2 mannprerak2 left a comment

Choose a reason for hiding this comment

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

Looks good @dcharkes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants