Skip to content

Commit

Permalink
Avoid accessing instance variables in inline functions when compiling…
Browse files Browse the repository at this point in the history
… with msvc (#177)

* Rename `DPSshfill` to `DPSshfill_`

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

* DPSOperators.h: Use macros to define inline functions

* Don't access instance variables when compiling with Visual Studio
  • Loading branch information
qmfrederik authored Aug 24, 2023
1 parent 570f2b4 commit 7de3485
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 586 deletions.
4 changes: 2 additions & 2 deletions Headers/Additions/GNUstepGUI/GSMethodTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ typedef struct {
(NSGraphicsContext*, SEL, const char *, size_t);
void (*GSShowGlyphs__)
(NSGraphicsContext*, SEL, const NSGlyph *, size_t);
void (*GSShowGlyphsWithAdvances__)
void (*GSShowGlyphsWithAdvances___)
(NSGraphicsContext*, SEL, const NSGlyph *, const NSSize *, size_t);

/* ----------------------------------------------------------------------- */
Expand Down Expand Up @@ -313,7 +313,7 @@ typedef struct {
struct breaks apps that use PS* or DPS* functions and were compiled with
an earlier version, so it's here until we figure out how to handle that.
*/
void (*DPSshfill)
void (*DPSshfill_)
(NSGraphicsContext*, SEL, NSDictionary *);
} gsMethodTable;

Expand Down
Loading

0 comments on commit 7de3485

Please sign in to comment.