CUBRID Engine  latest
dynamic_array.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * dynamic_array.h
21  */
22 
23 #ifndef DYNAMIC_ARRAY_H_
24 #define DYNAMIC_ARRAY_H_
25 
28 {
29  int count;
30  int len;
31  int max;
32  unsigned char *array;
33 };
34 
35 extern dynamic_array *da_create (int count, size_t len);
36 extern int da_add (dynamic_array * da, void *data);
37 extern int da_put (dynamic_array * da, int pos, void *data);
38 extern int da_get (dynamic_array * da, int pos, void *data);
39 extern int da_size (dynamic_array * da);
40 extern int da_destroy (dynamic_array * da);
41 
42 #endif /* DYNAMIC_ARRAY_H_ */
dynamic_array * da_create(int count, size_t len)
Definition: dynamic_array.c:30
unsigned char * array
Definition: dynamic_array.h:32
int da_destroy(dynamic_array *da)
int da_size(dynamic_array *da)
int da_put(dynamic_array *da, int pos, void *data)
Definition: dynamic_array.c:89
int da_add(dynamic_array *da, void *data)
Definition: dynamic_array.c:82
int da_get(dynamic_array *da, int pos, void *data)