Skip to content

DaMSL/libdynamic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libdynamic

Dynamic C containers for C, with a focus on simplicy and performance.

Where appropriate containers are modelled (roughly) after the stdc++ equivalents.

Currently implemented types are:

  • vector - modelled after std::vector
  • string - modelled after std::string
  • map_int - modelled after std::unordered_map
  • map_str - modelled after std::unordered_map

The library also contains a C port of the Google Farmhash hash function.

Installation

./autogen.sh
./configure
make
sudo make install

Tests

Requires cmocka (http://cmocka.org/) to be installed, as well as valgrind (http://valgrind.org/) for memory tests.

make check

The tests require 100% code coverage to succeed.

$ cat test/test_coverage.sh.log 
[buffer]
File 'src/buffer.c'
Lines executed:100.00% of 70
Branches executed:100.00% of 14
Taken at least once:100.00% of 14
Calls executed:100.00% of 7
[vector]
File 'src/vector.c'
Lines executed:100.00% of 59
Branches executed:100.00% of 6
Taken at least once:100.00% of 6
Calls executed:100.00% of 25
[string]
File 'src/string.c'
Lines executed:100.00% of 94
Branches executed:100.00% of 24
Taken at least once:100.00% of 24
Calls executed:100.00% of 48

About

Dynamic C containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.7%
  • Shell 1.3%