I once built classes using structs and function pointers, but this sounds different?
Show HN: C library of generic, reference-counted data structures
11–20 of 42 posts
Re: Show HN: C library of generic, reference-counted data structures
#12* only a header file * has hash, array, string, list, implementations
Re: Show HN: C library of generic, reference-counted data structures
#13I think your project looks very interesting. Reference counted datastructures is a great convenience.
Thanks, and Good Luck further.
Re: Show HN: C library of generic, reference-counted data structures
#14I strongly advise against putting identifiers like release() and getCString() in the global namespace, that's probably not the wisest idea if you plan to use libraries other than your own.
Re: Show HN: C library of generic, reference-counted data structures
#15Re: Show HN: C library of generic, reference-counted data structures
#16It's nice that you made these available. You might also want to look at queue.h from BSD (see http://fxr.watson.org/fxr/source/sys/queue.h ) and tree.h ( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/tree.h ), single-file "libraries" that can generate a few different kinds of linked list and binary tree. These don't require typecasting at all, since they generate functions for your particular type. They are also…
Re: Show HN: C library of generic, reference-counted data structures
#17nice. it's heartwarming to see things like this in c. in my spare time i am working on struct-sql mapping. it sometimes feels like the popular c libraries don't try hard enough to provide the convenience we get in other languages. with a little imagination (as here) i think we can push things a little further...
Re: Show HN: C library of generic, reference-counted data structures
#18I think this is pretty cool. I like the presence of the tests as well.
Re: Show HN: C library of generic, reference-counted data structures
#19It's nice that you made these available. You might also want to look at queue.h from BSD (see http://fxr.watson.org/fxr/source/sys/queue.h ) and tree.h ( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/tree.h ), single-file "libraries" that can generate a few different kinds of linked list and binary tree. These don't require typecasting at all, since they generate functions for your particular type. They are also…
Re: Show HN: C library of generic, reference-counted data structures
#20It's nice that you made these available. You might also want to look at queue.h from BSD (see http://fxr.watson.org/fxr/source/sys/queue.h ) and tree.h ( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/tree.h ), single-file "libraries" that can generate a few different kinds of linked list and binary tree. These don't require typecasting at all, since they generate functions for your particular type. They are also…
CPP macros, entirely. No, thanks.