Mir 1.0
Mir application programming interface

Functions

mirkl_error_tmir_bigintc_instance_create_str (mirkl_object_t **obj, char *str, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_bigintc_instance_create_mpz (mirkl_object_t **obj, mpz_t val, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_bigintc_set_data_str (mirkl_object_t *obj, char *str)
 
mirkl_error_tmir_bigintc_set_data_mpz (mirkl_object_t *obj, mpz_t val)
 
int mir_mpz_import_int64 (mpz_t big_v, mirkl_int64_t v)
 
int mir_mpz_export_int64 (mpz_t big_v, mirkl_int64_t *v)
 

Variables

mirkl_object_t * MirBigIntegerClass
 

Detailed Description

Function Documentation

◆ mir_bigintc_instance_create_mpz()

mirkl_error_t * mir_bigintc_instance_create_mpz ( mirkl_object_t **  obj,
mpz_t  val,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of BigInteger object.

Parameters
[out]objReference to the created object.
valMPZ value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_bigintc_instance_create_str()

mirkl_error_t * mir_bigintc_instance_create_str ( mirkl_object_t **  obj,
char *  str,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of BigInteger object.

Parameters
[out]objReference to the created object.
strString with value for initialization.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_bigintc_set_data_mpz()

mirkl_error_t * mir_bigintc_set_data_mpz ( mirkl_object_t *  obj,
mpz_t  val 
)

Sets the value from GMPs mpz_t type variable.

Parameters
objReference to the object.
valMPZ value to set.

◆ mir_bigintc_set_data_str()

mirkl_error_t * mir_bigintc_set_data_str ( mirkl_object_t *  obj,
char *  str 
)

Setting value for BigInteger object.

Parameters
objReference to the object.
strString with value to set.

◆ mir_mpz_export_int64()

int mir_mpz_export_int64 ( mpz_t  big_v,
mirkl_int64_t *  v 
)

Exports GMP's mpz_t into signed int64 number.

Parameters
[in]big_vValue to be exported. Should be initialized befor using this function.
[out]vContains exported value.
Returns
zero in case of error, otherwise non-zero.

◆ mir_mpz_import_int64()

int mir_mpz_import_int64 ( mpz_t  big_v,
mirkl_int64_t  v 
)

Imports signed int64 number into GMP's mpz_t variable.

Parameters
[in,out]big_vContaints imported value on output. Should be initialized befor using this function.
[in]vValue to be imported.
Returns
zero in case of error, otherwise non-zero.

Variable Documentation

◆ MirBigIntegerClass

mirkl_object_t* MirBigIntegerClass
extern

BigInteger Class Object