Skip to content
/ ds Public

Generic typesafe datastructures for C99 and up.

Notifications You must be signed in to change notification settings

pithuene/ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ds

Generic typesafe datastructures for C99 and up.

Datastructures

There are also various utilities in /util.

Design and alternatives

This library implements most operations using macros which perform various index / pointer calculations behind the scenes and eventually perform typesafe array / pointer accesses. The only other library I found using this approach is stb_ds by Sean Barrett, which is also what initially inspired me to build this.

Most other libraries for generic typesafe datastructures in C use the preprocessor to instantiate implementations of specific datastructure and type parameter combinations. An example of this is tylov/STC. The downsides of that method are, that the symbols for each instantiation must be unique, so they usually contain the names of the type parameters (think map_int_long_put instead of map_put), and that the instantiation macro must explicitly be called for every type combination.

About

Generic typesafe datastructures for C99 and up.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published