aboutsummaryrefslogtreecommitdiff
path: root/core/sys/darwin/Foundation/NSData.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/sys/darwin/Foundation/NSData.odin')
-rw-r--r--core/sys/darwin/Foundation/NSData.odin24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/sys/darwin/Foundation/NSData.odin b/core/sys/darwin/Foundation/NSData.odin
new file mode 100644
index 000000000..04c1ce25d
--- /dev/null
+++ b/core/sys/darwin/Foundation/NSData.odin
@@ -0,0 +1,24 @@
+package objc_Foundation
+
+@(objc_class="NSData")
+Data :: struct {using _: Copying(Data)}
+
+@(objc_type=Data, objc_name="alloc", objc_is_class_method=true)
+Data_alloc :: proc "c" () -> ^Data {
+ return msgSend(^Data, Data, "alloc")
+}
+
+@(objc_type=Data, objc_name="init")
+Data_init :: proc "c" (self: ^Data) -> ^Data {
+ return msgSend(^Data, self, "init")
+}
+
+@(objc_type=Data, objc_name="mutableBytes")
+Data_mutableBytes :: proc "c" (self: ^Data) -> rawptr {
+ return msgSend(rawptr, self, "mutableBytes")
+}
+
+@(objc_type=Data, objc_name="length")
+Data_length :: proc "c" (self: ^Data) -> UInteger {
+ return msgSend(UInteger, self, "length")
+} \ No newline at end of file