~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/ut/ut0vec.c

  • Committer: Monty Taylor
  • Date: 2009-03-20 04:49:49 UTC
  • mto: (950.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 958.
  • Revision ID: mordred@inaugust.com-20090320044949-nfx7ygyy89ojl6v5
RemovedĀ unusedĀ code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
13
You should have received a copy of the GNU General Public License along with
14
 
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
 
St, Fifth Floor, Boston, MA 02110-1301 USA
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
19
 
/*******************************************************************//**
20
 
@file ut/ut0vec.c
21
 
A vector of pointers to data items
22
 
 
23
 
Created 4/6/2006 Osku Salerma
24
 
************************************************************************/
25
 
 
26
19
#include "ut0vec.h"
27
20
#ifdef UNIV_NONINL
28
21
#include "ut0vec.ic"
29
22
#endif
30
23
#include <string.h>
31
24
 
32
 
/****************************************************************//**
33
 
Create a new vector with the given initial size.
34
 
@return vector */
 
25
/********************************************************************
 
26
Create a new vector with the given initial size. */
35
27
UNIV_INTERN
36
28
ib_vector_t*
37
29
ib_vector_create(
38
30
/*=============*/
39
 
        mem_heap_t*     heap,   /*!< in: heap */
40
 
        ulint           size)   /*!< in: initial size */
 
31
                                /* out: vector */
 
32
        mem_heap_t*     heap,   /* in: heap */
 
33
        ulint           size)   /* in: initial size */
41
34
{
42
35
        ib_vector_t*    vec;
43
36
 
53
46
        return(vec);
54
47
}
55
48
 
56
 
/****************************************************************//**
 
49
/********************************************************************
57
50
Push a new element to the vector, increasing its size if necessary. */
58
51
UNIV_INTERN
59
52
void
60
53
ib_vector_push(
61
54
/*===========*/
62
 
        ib_vector_t*    vec,    /*!< in: vector */
63
 
        void*           elem)   /*!< in: data element */
 
55
        ib_vector_t*    vec,    /* in: vector */
 
56
        void*           elem)   /* in: data element */
64
57
{
65
58
        if (vec->used >= vec->total) {
66
59
                void**  new_data;