-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
Lines 37 to 43 in 57d23fa
| #define da_move(dst, src) \ | |
| do { \ | |
| free((dst)->items); \ | |
| (dst)->items = (src).items; \ | |
| (dst)->count = (src).count; \ | |
| (dst)->capacity = (src).capacity; \ | |
| } while (0) |
I think that we should "clear" src after moving it to dst (setting (src).items = NULL; and zeroing its count and capacity).
Since src still holds a pointer to items it could cause undesired side effects.
BillKek and TheDevConnor
Metadata
Metadata
Assignees
Labels
No labels