3 ms·
If you move fields around in a struct that is passed between a library and library-consumer it will cause ABI breakage typedef struct { char name[50];
by DanielHB 2y ago
If you move fields around in a struct that is passed between a library and library-consumer it will cause ABI breakage
typedef struct {
char name[50];
int age;
} Person;
vs
typedef struct {
int age;
char name[50];
} Person;
Basically anything that moves bytes around in memory for data structures that are passed around. Of course any API breakage is also an ABI breakage.
- pests 2y ago> Of course any API breakage is also an ABI breakage. I don't think this is true. You can change things on a superficial level in a source language that still compiles down to the same representation in the end.
- DanielHB 2y agoYeah true, renaming a field in a struct is an API breakage but not an ABI breakage as long as you don't move it around or change its type.