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

Avoid accessing instance variables in inline functions when compiling with msvc #205

Merged
merged 3 commits into from
Oct 1, 2023

Conversation

qmfrederik
Copy link
Contributor

DPSOperators.h exports various inline functions which access the methods variable of the NSGraphicsContext class. This will result in accessing instance variables across module boundaries if these functions are used in external libraries.

Accessing instance variables across module boundaries is not supported when building on Windows using the Visual Studio toolchain.

This patch adds a methods function on NSGraphicsContext which returns the variable, and reworks the inline functions to use the methods function instead of directly accessing the variable.

Re-submit of !177

This method takes one argument, so by convention, the name of the variable in the method table should end with a single underscore
@fredkiefer
Copy link
Member

As this was reviewed in detail in the last pull request I just trust you that this are the same changes. Hopefully we have more luck this time.

@fredkiefer fredkiefer merged commit bcc8011 into gnustep:master Oct 1, 2023
3 checks passed
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.

2 participants