Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: class-dump/src/CDLCUUID.m

Issue 7793008: Add the 3.3.3 sources for class-dump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « class-dump/src/CDLCUUID.h ('k') | class-dump/src/CDLCUnixThread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // -*- mode: ObjC -*-
2
3 // This file is part of class-dump, a utility for examining the Objective-C seg ment of Mach-O files.
4 // Copyright (C) 1997-1998, 2000-2001, 2004-2010 Steve Nygard.
5
6 #import "CDLCUUID.h"
7
8 #import "CDMachOFile.h"
9
10 @implementation CDLCUUID
11
12 - (id)initWithDataCursor:(CDDataCursor *)cursor machOFile:(CDMachOFile *)aMachOF ile;
13 {
14 unsigned int index;
15
16 if ([super initWithDataCursor:cursor machOFile:aMachOFile] == nil)
17 return nil;
18
19 uuidCommand.cmd = [cursor readInt32];
20 uuidCommand.cmdsize = [cursor readInt32];
21 for (index = 0; index < 16; index++) {
22 uuidCommand.uuid[index] = [cursor readByte];
23 }
24 // Lovely API
25 uuid = CFUUIDCreateWithBytes(kCFAllocatorDefault,
26 uuidCommand.uuid[0],
27 uuidCommand.uuid[1],
28 uuidCommand.uuid[2],
29 uuidCommand.uuid[3],
30 uuidCommand.uuid[4],
31 uuidCommand.uuid[5],
32 uuidCommand.uuid[6],
33 uuidCommand.uuid[7],
34 uuidCommand.uuid[8],
35 uuidCommand.uuid[9],
36 uuidCommand.uuid[10],
37 uuidCommand.uuid[11],
38 uuidCommand.uuid[12],
39 uuidCommand.uuid[13],
40 uuidCommand.uuid[14],
41 uuidCommand.uuid[15]);
42
43 return self;
44 }
45
46 - (void)dealloc;
47 {
48 CFRelease(uuid);
49
50 [super dealloc];
51 }
52
53 - (uint32_t)cmd;
54 {
55 return uuidCommand.cmd;
56 }
57
58 - (uint32_t)cmdsize;
59 {
60 return uuidCommand.cmdsize;
61 }
62
63 - (NSString *)uuidString;
64 {
65 return [NSMakeCollectable(CFUUIDCreateString(kCFAllocatorDefault, uuid)) aut orelease];
66 }
67
68 - (void)appendToString:(NSMutableString *)resultString verbose:(BOOL)isVerbose;
69 {
70 [super appendToString:resultString verbose:isVerbose];
71
72 [resultString appendString:@" uuid "];
73 [resultString appendString:[self uuidString]];
74 [resultString appendString:@"\n"];
75 }
76
77 @end
OLDNEW
« no previous file with comments | « class-dump/src/CDLCUUID.h ('k') | class-dump/src/CDLCUnixThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698