#include <inttypes.h>
#include "array.h"
Go to the source code of this file.
Data Structures | |
struct | struct_uint32_array_list_t |
Defines a list of uint32_array_t . More... | |
struct | struct_mpz_array_list_t |
Defines a list of mpz_array_t . More... | |
Defines | |
#define | _TIFA_X_ARRAY_LIST_H_ |
Typedefs | |
typedef struct struct_uint32_array_list_t | uint32_array_list_t |
Equivalent to struct struct_uint32_array_list_t . | |
typedef struct struct_mpz_array_list_t | mpz_array_list_t |
Equivalent to struct struct_mpz_array_list_t . | |
Functions | |
uint32_array_list_t * | alloc_uint32_array_list (uint32_t alloced) |
Allocates and returns a new uint32_array_list_t . | |
static void | add_entry_in_uint32_array_list (uint32_array_t *const entry, uint32_array_list_t *const list) |
Adds an entry to a uint32_array_list_t . | |
void | free_uint32_array_list (uint32_array_list_t *const list) |
Clears a uint32_array_list_t . | |
void | print_uint32_array_list (const uint32_array_list_t *const list) |
Prints a uint32_array_list_t . | |
mpz_array_list_t * | alloc_mpz_array_list (uint32_t alloced) |
Allocates and returns a new mpz_array_list_t . | |
static void | add_entry_in_mpz_array_list (mpz_array_t *const entry, mpz_array_list_t *const list) |
Adds an entry to a mpz_array_list_t . | |
void | free_mpz_array_list (mpz_array_list_t *const list) |
Clears a mpz_array_list_t . | |
void | print_mpz_array_list (const mpz_array_list_t *const list) |
Prints a mpz_array_list_t . |
Definition in file x_array_list.h.
#define _TIFA_X_ARRAY_LIST_H_ |
Standard include guard.
Definition at line 37 of file x_array_list.h.
static void add_entry_in_mpz_array_list | ( | mpz_array_t *const | entry, | |
mpz_array_list_t *const | list | |||
) | [inline, static] |
Adds an entry to a mpz_array_list_t
.
Adds the entry
pointer to list
and increments its length
field.
mpz_array_t
pointed to by entry
to list
. This means that any client code should not clear any mpz_array_t
that has been added to a mpz_array_list_t
since this is the exclusive responsability of the mpz_array_list_t
.[in] | entry | A pointer to the mpz_array_t to add in the list. |
[in] | list | A pointer to the mpz_array_list_t . |
mpz_array_list_t
structure. Definition at line 225 of file x_array_list.h.
References struct_mpz_array_list_t::data, and struct_mpz_array_list_t::length.
static void add_entry_in_uint32_array_list | ( | uint32_array_t *const | entry, | |
uint32_array_list_t *const | list | |||
) | [inline, static] |
Adds an entry to a uint32_array_list_t
.
Adds the entry
pointer to list
and increments its length
field.
uint32_array_t
pointed to by entry
to list
. This means that any client code should not clear any uint32_array_t
that has been added to a uint32_array_list_t
since this is the exclusive responsability of the uint32_array_list_t
.[in] | entry | A pointer to the array to add. |
[in] | list | A pointer to the uint32_array_list_t . |
uint32_array_list_t
structure. Definition at line 117 of file x_array_list.h.
References struct_uint32_array_list_t::alloced, struct_uint32_array_list_t::data, and struct_uint32_array_list_t::length.
mpz_array_list_t* alloc_mpz_array_list | ( | uint32_t | alloced | ) |
Allocates and returns a new mpz_array_list_t
.
Allocates and returns a new mpz_array_list_t
such that:
alloced
field is set to the parameter alloced. length
field set to zero. data
array is left uninitialized.[in] | alloced | The allocated length of the mpz_array_list_t to allocate. |
mpz_array_list_t
structure. uint32_array_list_t* alloc_uint32_array_list | ( | uint32_t | alloced | ) |
Allocates and returns a new uint32_array_list_t
.
Allocates and returns a new uint32_array_list_t
such that:
alloced
field is set to the parameter alloced. length
field set to zero. data
array is left uninitialized.[in] | alloced | The allocated length of the uint32_array_list_t to allocate. |
uint32_array_list_t
structure. void free_mpz_array_list | ( | mpz_array_list_t *const | list | ) |
Clears a mpz_array_list_t
.
Clears a mpz_array_list_t
, or, more precisely, clears the memory space used by the array pointed by the data
field of a mpz_array_list_t
. Also set its alloced
and length
fields to zero.
[in] | list | A pointer to the mpz_array_list_t to clear. |
void free_uint32_array_list | ( | uint32_array_list_t *const | list | ) |
Clears a uint32_array_list_t
.
Clears a uint32_array_list_t
, or, more precisely, clears the memory space used by the array pointed by the data
field of a uint32_array_list_t
. Also set its alloced
and length
fields to zero.
[in] | list | A pointer to the uint32_array_list_t to clear. |
void print_mpz_array_list | ( | const mpz_array_list_t *const | list | ) |
Prints a mpz_array_list_t
.
Prints a mpz_array_list_t
on the standard output.
[in] | list | A pointer to the mpz_array_list_t to print. |
void print_uint32_array_list | ( | const uint32_array_list_t *const | list | ) |
Prints a uint32_array_list_t
.
Prints a uint32_array_list_t
on the standard output.
[in] | list | A pointer to the uint32_array_list_t to print. |