Skip to content

Commit

Permalink
Synthesize by default, and let these properties be atomic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nygard committed Sep 18, 2012
1 parent 0fd1bfa commit 04891bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
12 changes: 6 additions & 6 deletions Source/CDFatArch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
- (id)initWithMachOFile:(CDMachOFile *)machOFile;
- (id)initWithDataCursor:(CDDataCursor *)cursor;

@property (nonatomic, readonly) cpu_type_t cpuType;
@property (nonatomic, readonly) cpu_type_t maskedCPUType;
@property (nonatomic, readonly) cpu_subtype_t cpuSubtype;
@property (nonatomic, readonly) uint32_t offset;
@property (nonatomic, readonly) uint32_t size;
@property (nonatomic, readonly) uint32_t align;
@property (readonly) cpu_type_t cpuType;
@property (readonly) cpu_subtype_t cpuSubtype;
@property (readonly) uint32_t offset;
@property (readonly) uint32_t size;
@property (readonly) uint32_t align;

@property (nonatomic, readonly) cpu_type_t maskedCPUType;
@property (nonatomic, readonly) BOOL uses64BitABI;

@property (weak) CDFatFile *fatFile;
Expand Down
29 changes: 2 additions & 27 deletions Source/CDFatArch.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,42 +61,17 @@ - (id)initWithDataCursor:(CDDataCursor *)cursor;
- (NSString *)description;
{
return [NSString stringWithFormat:@"64 bit ABI? %d, cputype: 0x%08x, cpusubtype: 0x%08x, offset: 0x%08x (%8u), size: 0x%08x (%8u), align: 2^%u (%x), arch name: %@",
self.uses64BitABI, _cpuType, _cpuSubtype, _offset, _offset, _size, _size,
_align, 1 << _align, self.archName];
self.uses64BitABI, self.cpuType, self.cpuSubtype, self.offset, self.offset, self.size, self.size,
self.align, 1 << self.align, self.archName];
}

#pragma mark -

- (cpu_type_t)cpuType;
{
return _cpuType;
}

- (cpu_type_t)maskedCPUType;
{
return self.cpuType & ~CPU_ARCH_MASK;
}

- (cpu_subtype_t)cpuSubtype;
{
return _cpuSubtype;
}

- (uint32_t)offset;
{
return _offset;
}

- (uint32_t)size;
{
return _size;
}

- (uint32_t)align;
{
return _align;
}

- (BOOL)uses64BitABI;
{
return CDArchUses64BitABI(self.arch);
Expand Down

0 comments on commit 04891bd

Please sign in to comment.