You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
358 B
Objective-C
25 lines
358 B
Objective-C
#include "Test.h"
|
|
|
|
#import <stdatomic.h>
|
|
|
|
@interface Dummy : Test
|
|
{
|
|
atomic_bool atomicBool;
|
|
}
|
|
@end
|
|
|
|
@implementation Dummy
|
|
- (void)test
|
|
{
|
|
int value = 1;
|
|
object_setIvar(self, class_getInstanceVariable(object_getClass(self), "atomicBool"), (__bridge id)(void*)(intptr_t)value);
|
|
}
|
|
@end
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
[[Dummy new] test];
|
|
return 0;
|
|
}
|