-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Lines 123 to 135 in f356ed0
| fn descCopyHelper(src: *anyopaque, dst: *anyopaque) callconv(.c) void { | |
| const real_src: *Context = @ptrCast(@alignCast(src)); | |
| const real_dst: *Context = @ptrCast(@alignCast(dst)); | |
| inline for (captures_info.fields) |field| { | |
| if (field.type == objc.c.id) { | |
| _Block_object_assign( | |
| @ptrCast(&@field(real_dst, field.name)), | |
| @field(real_src, field.name), | |
| .object, | |
| ); | |
| } | |
| } | |
| } |
this function must correspond to the signature of
Line 260 in f356ed0
| copy_helper: *const fn (dst: *anyopaque, src: *anyopaque) callconv(.c) void, |
(as per
void (*copy_helper)(void *dst, void *src)
Its signature is instead fn (src: *anyopaque, dst: *anyopaque) callconv(.c) void – the parameters are swapped.
I could not find the definition of _Block_object_assign, but in its uses, the first argument does come from dst, the second comes from src, so the call in descCopyHelper seems to be correct.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels