Commit graph

34 commits

Author SHA1 Message Date
Rylee Lyman
8113ef70e0 fix!: avoid "comptime var" error by returning array instead of slice
this changes the semantics of `comptimeEncode`; users will need to,
e.g. use

```zig
const encoding = comptimeEncode(T);
passToObjc(&encoding)
```

to pass the encoding by pointer rather than by value.
2024-04-12 10:01:04 +01:00
Mitchell Hashimoto
0a89cc09da
update zig 2024-03-22 11:05:40 -07:00
Mitchell Hashimoto
83a52ce8e3
update to latest zig 2024-03-13 09:12:10 -07:00
Mitchell Hashimoto
f6ed382b6d
msgSend on x86_64 supports enums 2024-01-16 10:20:56 -08:00
Mitchell Hashimoto
294e0f3765
Merge pull request #6 from ritalin/main
Supports retain/release for Object.
2024-01-05 20:43:13 -08:00
Mitchell Hashimoto
56dc708c7a
style changes 2024-01-05 20:43:01 -08:00
Mitchell Hashimoto
9c45d36673
change pointer type to workaround zig bug 2024-01-05 20:34:36 -08:00
Ritalin
74dc09dda8 Add method comment 2023-12-30 23:00:49 +09:00
Ritalin
353986763c Supports retain/release for Object. 2023-12-30 22:43:35 +09:00
Mitchell Hashimoto
10e552bd37
update zig 2023-11-20 19:30:16 -08:00
Mitchell Hashimoto
a38331cb6e
block: descriptor can be statically allocated 2023-10-21 11:31:45 -07:00
Mitchell Hashimoto
38835ef322
block: we don't need to free the signature anymore, its static 2023-10-21 11:23:02 -07:00
Mitchell Hashimoto
62bcb951b8
block: only free the descriptor once 2023-10-21 11:22:44 -07:00
Mitchell Hashimoto
337ec0a630
handle i8/bool result in ci 2023-10-21 10:24:50 -07:00
Mitchell Hashimoto
87aae5f5ad
add dedicated encoder, use writer, support comptime encoding 2023-10-21 10:21:13 -07:00
Mitchell Hashimoto
cec54ac452
Revert "fix: convert addMethod bool to zig error"
This reverts commit 3607c36967.
2023-10-21 08:50:43 -07:00
Rylee Lyman
3607c36967 fix: convert addMethod bool to zig error 2023-10-21 08:58:19 -04:00
Rylee Lyman
bca05e03d3 fix!: addMethod now passes errors it receives; added test 2023-10-21 08:51:58 -04:00
Mitchell Hashimoto
77b9ccfe04
more Ziggy blocks 2023-10-20 22:19:40 -07:00
Mitchell Hashimoto
25194cfc23
msgSend/msgSendSuper can accept anytype for sel to accept strings 2023-10-20 20:48:11 -07:00
Mitchell Hashimoto
75ae7627cb
share a lot more logic for msgSend/msgSendSuper 2023-10-20 20:45:04 -07:00
Mitchell Hashimoto
1179c94083
MsgSendFn can construct the proper type for msgSendSuper 2023-10-20 20:28:19 -07:00
Mitchell Hashimoto
7110b7c5f2
fix return type mismatch when cross-compiling with macos sdk 2023-10-20 15:51:23 -07:00
Mitchell Hashimoto
e94d728f47
minor stylistic tweaks 2023-10-20 15:46:16 -07:00
Rylee Lyman
8c434525fe
fix: addMethod should correctly process strings 2023-10-20 15:37:37 -07:00
Rylee Lyman
83156e7e6d
feat: implement Objective-C calling Zig
feat: add `msgSendSuper`
feat: add protocols,
feat: add `allocateClasspair` and `replaceMethod`
feat: add ivars,
feat: add `addMethod`
feat: add blocks
2023-10-20 15:37:37 -07:00
Mitchell Hashimoto
0b75865239
link CoreFoundation for tests
Fixes #2
2023-10-20 15:36:55 -07:00
Mitchell Hashimoto
e8686c3457
Revert "remove failing tests for macOS Sonoma"
This reverts commit 0d3a6d4b58.
2023-10-20 15:36:04 -07:00
Mitchell Hashimoto
0d3a6d4b58
remove failing tests for macOS Sonoma
Annoying, these functions do work in the right situation but some are
failing due to macOS SDK changes.
2023-10-20 15:35:29 -07:00
Mitchell Hashimoto
51584a2f78
update zig 2023-06-30 09:49:12 -07:00
Mitchell Hashimoto
49593794da
fallback get/setProperty if the class doesn't formally declare the prop 2023-03-20 14:43:32 -07:00
Mitchell Hashimoto
079d8eb420
update to latest Zig, new for loops 2023-02-27 21:41:58 -08:00
Mitchell Hashimoto
5eeac3a7c6
update README, comments 2023-01-02 15:03:07 -08:00
Mitchell Hashimoto
e8c63c795e
initial import 2023-01-02 14:48:21 -08:00