Di_release

## Data Structures

struct | di_release
| Release file. More...
struct | di_release_file
| Release file - file entry. More...

## Functions

di_release * | di_release_alloc (void)
void | di_release_free (di_release *packages)

## Detailed Description

## Function Documentation

## di_release_alloc()

di_release * di_release_alloc | ( | void |  | ) |

Allocate di_release

{
di_release *ret;
ret = di_new0 (di_release, 1);
ret->sha256 = di_hash_table_new_full (di_rstring_hash, di_rstring_equal, NULL, internal_di_release_file_destroy_func);
ret->release_file_mem_chunk = di_mem_chunk_new (sizeof (di_release_file), 4096);
return ret;
}
di_hash_table_new_full
di_hash_table * di_hash_table_new_full(di_hash_func hash_func, di_equal_func key_equal_func, di_destroy_notify key_destroy_func, di_destroy_notify value_destroy_func)
Definition hash.c:113
di_mem_chunk_new
di_mem_chunk * di_mem_chunk_new(di_ksize_t atom_size, di_ksize_t area_size)
Definition mem_chunk.c:87
di_new0
#define di_new0(struct_type, n_structs)
Definition mem.h:79
di_release_file
Release file - file entry.
Definition release.h:51
di_release
Release file.
Definition release.h:39
di_release::release_file_mem_chunk
di_mem_chunk * release_file_mem_chunk
Definition release.h:44
di_release::sha256
di_hash_table * sha256
Definition release.h:43

References di_hash_table_new_full(), di_mem_chunk_new(), di_new0, di_release::release_file_mem_chunk, and di_release::sha256.

Referenced by di_release_read_file().

## di_release_free()

void di_release_free | ( | di_release * | release | ) |

Free di_release

{
di_free (release->origin);
di_free (release->suite);
di_free (release->codename);
di_hash_table_destroy (release->sha256);
di_mem_chunk_destroy (release->release_file_mem_chunk);
di_free (release);
}
di_hash_table_destroy
void di_hash_table_destroy(di_hash_table *hash_table)
Definition hash.c:134
di_free
void di_free(void *mem)
Definition mem.c:60
di_release::origin
char * origin
Definition release.h:40
di_release::suite
char * suite
Definition release.h:41
di_release::codename
char * codename
Definition release.h:42

References di_release::codename, di_free(), di_hash_table_destroy(), di_release::origin, di_release::release_file_mem_chunk, di_release::sha256, and di_release::suite.

Referenced by di_release_read_file().