Make md_info_t an opaque structure

- more freedom for us to change it in the future
- enforces hygiene
- performance impact of making accessors no longer inline should really be
  negligible
This commit is contained in:
Manuel Pégourié-Gonnard 2015-03-24 12:13:30 +01:00
parent 9325b26b42
commit ca878dbaa5
12 changed files with 117 additions and 100 deletions

View file

@ -60,8 +60,9 @@ static const md_info_t *md_info_by_size( size_t min_size )
for( md_alg = md_list(); *md_alg != 0; md_alg++ )
{
if( ( md_cur = md_info_from_type( (md_type_t) *md_alg ) ) == NULL ||
(size_t) md_cur->size < min_size ||
( md_picked != NULL && md_cur->size > md_picked->size ) )
(size_t) md_get_size( md_cur ) < min_size ||
( md_picked != NULL &&
md_get_size( md_cur ) > md_get_size( md_picked ) ) )
continue;
md_picked = md_cur;