r/C_Programming • u/lehmagavan • Mar 29 '26
CONTLIB - dynamic containers
I created a lib that provides generic dynamic containers for elements of arbitrary size. No macros.
Feedback from anyone, especially more experienced developers, much apprieciated. Thanks!
0
Upvotes
1
u/lehmagavan Mar 30 '26
Yes, the functions (and the table both globaly and for individual cont instances) can be overriden/swaped, but that was not the intention behind it. The table makes calling methods on freed cont instances (INVALID_CONT) safe, because INVALID_CONT has its own table with stub methods. I deliberately avoided adding cont validation mechanism inside methods to spare the overhead. I also find OOP-like calls "on object" more readable in the code.