File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 33
33
Boston, MA 02110-1301, USA.
34
34
*/
35
35
36
+ #if !defined(_NONFRAGILE_ABI)
36
37
#define EXPOSE_NSThread_IVARS
38
+ #endif
37
39
38
40
#import < Foundation/NSGeometry.h>
39
41
#import < Foundation/NSString.h>
102
104
*/
103
105
NSThread *th = GSCurrentThread ();
104
106
107
+ # if defined(_NONFRAGILE_ABI)
108
+ return (NSGraphicsContext *)object_getIvar (th,
109
+ class_getInstanceVariable (object_getClass (th), " _gcontext" ));
110
+ # else
105
111
return (NSGraphicsContext *) th->_gcontext ;
112
+ # endif
106
113
#else
107
114
NSMutableDictionary *dict = [[NSThread currentThread ] threadDictionary ];
108
115
@@ -171,7 +178,12 @@ + (void) setCurrentContext: (NSGraphicsContext *)context
171
178
*/
172
179
NSThread *th = GSCurrentThread ();
173
180
181
+ # if defined(_NONFRAGILE_ABI)
182
+ object_setIvar (th,
183
+ class_getInstanceVariable (object_getClass (th), " _gcontext" ), context);
184
+ # else
174
185
ASSIGN (th->_gcontext , context);
186
+ # endif
175
187
#else
176
188
NSMutableDictionary *dict = [[NSThread currentThread ] threadDictionary ];
177
189
You can’t perform that action at this time.
0 commit comments