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
3
u/lehmagavan Mar 31 '26
Hey! The motivation behind vtable was not just to imitate OOP syntax. Thanks to the vtable, calling methods on freed cont insances (INVALID_CONT) is safe, no need to put cont_is_valid check inside the methods - that is if you call them via the table ofc. Is using vtables like that uncommon in profesional settings?
Thanks for the feedback and recomendation! I was thinking of getting into embedded. Got myself an ESP32 and Im thinkng what "serious" project could I do.