~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/ut0vec.ic

Tags: innodb-plugin-1.0.1
Imported 1.0.1 with clean - with no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
Get number of elements in vector. */
 
3
UNIV_INLINE
 
4
ulint
 
5
ib_vector_size(
 
6
/*===========*/
 
7
                                /* out: number of elements in vector */
 
8
        ib_vector_t*    vec)    /* in: vector */
 
9
{
 
10
        return(vec->used);
 
11
}
 
12
 
 
13
/********************************************************************
 
14
Get n'th element. */
 
15
UNIV_INLINE
 
16
void*
 
17
ib_vector_get(
 
18
/*==========*/
 
19
                                /* out: n'th element */
 
20
        ib_vector_t*    vec,    /* in: vector */
 
21
        ulint           n)      /* in: element index to get */
 
22
{
 
23
        ut_a(n < vec->used);
 
24
 
 
25
        return(vec->data[n]);
 
26
}