data_structures
src
types
type_array.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* type_array.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2020/07/22 00:12:57 by unite #+# #+# */
10
/* Updated: 2020/09/04 22:54:47 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
types.h
"
15
#include "
array.h
"
16
17
void
*array_copy_wrapper(
const
void
*arr)
18
{
19
return
array_copy
(arr);
20
}
21
22
void
array_delete_wrapper(
void
*arr)
23
{
24
array_delete
(arr);
25
}
26
27
static
const
t_type
g_type_array_struct = {
28
.
name
=
"array"
,
29
.copy = &array_copy_wrapper,
30
.del = &array_delete_wrapper,
31
};
32
33
const
t_type
*
g_type_array
= &g_type_array_struct;
s_type::name
char * name
The name of a datatype as a string.
Definition:
types.h:49
types.h
array.h
array_copy
t_array * array_copy(const t_array *array)
Copies the array and all it contents.
Definition:
array_copy.c:16
s_type
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
Definition:
types.h:47
array_delete
void array_delete(t_array *array)
Deletes this array and free all its items and the associated data.
Definition:
array_delete.c:16
g_type_array
const t_type * g_type_array
A representation of the t_array data type.
Definition:
type_array.c:33
Generated by
1.8.16