Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSData.d @ 60:62202ce0039f
Updated and fixed many modules to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 22 Dec 2008 15:10:19 +0100 |
parents | d8635bb48c7c |
children |
comparison
equal
deleted
inserted
replaced
59:83b0ad9d9238 | 60:62202ce0039f |
---|---|
36 | 36 |
37 public /*const*/void* bytes() { | 37 public /*const*/void* bytes() { |
38 return cast(/*const*/void*) OS.objc_msgSend(this.id, OS.sel_bytes); | 38 return cast(/*const*/void*) OS.objc_msgSend(this.id, OS.sel_bytes); |
39 } | 39 } |
40 | 40 |
41 public static NSData dataWithBytes(/*const*/void*, NSUInteger length) { | 41 public static NSData dataWithBytes(/*const*/void* bytes, NSUInteger length) { |
42 objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_length_, bytes, length); | 42 objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_length_, bytes, length); |
43 return result !is null ? new NSData(result) : null; | 43 return result !is null ? new NSData(result) : null; |
44 } | 44 } |
45 | 45 |
46 public void getBytes(void* buffer) { | 46 public void getBytes(void* buffer) { |
50 public void getBytes(void* buffer, NSUInteger length) { | 50 public void getBytes(void* buffer, NSUInteger length) { |
51 OS.objc_msgSend(this.id, OS.sel_getBytes_length_, buffer, length); | 51 OS.objc_msgSend(this.id, OS.sel_getBytes_length_, buffer, length); |
52 } | 52 } |
53 | 53 |
54 public NSUInteger length() { | 54 public NSUInteger length() { |
55 return OS.objc_msgSend(this.id, OS.sel_length); | 55 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_length); |
56 } | 56 } |
57 | 57 |
58 } | 58 } |