mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
26 lines
557 B
Text
26 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]);
|
|
}
|