libbtc
bitcoinclibrary
|
Go to the source code of this file.
Data Structures | |
struct | vector |
Macros | |
#define | vector_idx(vec, idx) ((vec)->data[(idx)]) |
Typedefs | |
typedef struct vector | vector |
Functions | |
LIBBTC_API vector * | vector_new (size_t res, void(*free_f)(void *)) |
LIBBTC_API void | vector_free (vector *vec, btc_bool free_array) |
LIBBTC_API btc_bool | vector_add (vector *vec, void *data) |
LIBBTC_API btc_bool | vector_remove (vector *vec, void *data) |
LIBBTC_API void | vector_remove_idx (vector *vec, size_t idx) |
LIBBTC_API void | vector_remove_range (vector *vec, size_t idx, size_t len) |
LIBBTC_API btc_bool | vector_resize (vector *vec, size_t newsz) |
LIBBTC_API ssize_t | vector_find (vector *vec, void *data) |
#define vector_idx | ( | vec, | |
idx | |||
) | ((vec)->data[(idx)]) |
Definition at line 59 of file vector.h.
Referenced by btc_script_is_multisig(), btc_script_is_pubkey(), btc_script_is_pubkeyhash(), btc_script_is_scripthash(), btc_tx_copy(), btc_tx_serialize(), btc_tx_sighash(), and ser_u256_vector().
LIBBTC_API btc_bool vector_add | ( | vector * | vec, |
void * | data | ||
) |
Definition at line 113 of file vector.c.
References vector::alloc, vector::data, vector::len, and vector_grow().
Referenced by btc_script_get_ops(), btc_tx_add_p2pkh_hash160_out(), btc_tx_add_p2sh_hash160_out(), btc_tx_copy(), btc_tx_deserialize(), and deser_u256_vector().
LIBBTC_API ssize_t vector_find | ( | vector * | vec, |
void * | data | ||
) |
Definition at line 101 of file vector.c.
References vector::data, and vector::len.
Referenced by vector_remove().
LIBBTC_API void vector_free | ( | vector * | vec, |
btc_bool | free_array | ||
) |
Definition at line 71 of file vector.c.
References vector_free_data().
Referenced by btc_tx_copy(), btc_tx_free(), btc_tx_sighash(), and deser_u256_vector().
LIBBTC_API vector* vector_new | ( | size_t | res, |
void(*)(void *) | free_f | ||
) |
Definition at line 31 of file vector.c.
References vector::alloc, vector::data, and vector::elem_free_f.
Referenced by btc_tx_copy(), btc_tx_new(), btc_tx_sighash(), and deser_u256_vector().
LIBBTC_API btc_bool vector_remove | ( | vector * | vec, |
void * | data | ||
) |
LIBBTC_API void vector_remove_idx | ( | vector * | vec, |
size_t | idx | ||
) |
Definition at line 139 of file vector.c.
References vector_remove_range().
Referenced by vector_remove().
LIBBTC_API void vector_remove_range | ( | vector * | vec, |
size_t | idx, | ||
size_t | len | ||
) |
Definition at line 124 of file vector.c.
References vector::data, vector::elem_free_f, const_buffer::len, and vector::len.
Referenced by btc_tx_sighash(), and vector_remove_idx().
LIBBTC_API btc_bool vector_resize | ( | vector * | vec, |
size_t | newsz | ||
) |
Definition at line 154 of file vector.c.
References vector::data, vector::elem_free_f, const_buffer::len, vector::len, and vector_grow().
Referenced by btc_tx_sighash().