mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
27 lines
557 B
Text
27 lines
557 B
Text
|
/********************************************************************
|
||
|
Get number of elements in vector. */
|
||
|
UNIV_INLINE
|
||
|
ulint
|
||
|
ib_vector_size(
|
||
|
/*===========*/
|
||
|
/* out: number of elements in vector */
|
||
|
ib_vector_t* vec) /* in: vector */
|
||
|
{
|
||
|
return(vec->used);
|
||
|
}
|
||
|
|
||
|
/********************************************************************
|
||
|
Get n'th element. */
|
||
|
UNIV_INLINE
|
||
|
void*
|
||
|
ib_vector_get(
|
||
|
/*==========*/
|
||
|
/* out: n'th element */
|
||
|
ib_vector_t* vec, /* in: vector */
|
||
|
ulint n) /* in: element index to get */
|
||
|
{
|
||
|
ut_a(n < vec->used);
|
||
|
|
||
|
return(vec->data[n]);
|
||
|
}
|