-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.h
57 lines (48 loc) · 1.65 KB
/
types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* types.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgasc <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/14 17:39:23 by lgasc #+# #+# */
/* Updated: 2024/02/15 21:41:39 by lgasc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TYPES_H
# define TYPES_H
# include <stddef.h>
# include "constants.h"
// Indeed, `clang` seems to support no attribute...
# ifndef __clang__
# ifdef TEST
typedef struct __attribute__ ((designated_init)) s_int_array
{
size_t length;
int ints[];
} *t_int_array;
///TODO: Settle on a typedef name.
typedef t_int_array t_iarr;
typedef struct __attribute__ ((designated_init)) s_int_option
{
enum e_option_type type;
int value;
} t_int_option;
# define LIBFT_TYPES_H_ATTRIBUTES
# endif
# endif
# ifndef LIBFT_TYPES_H_ATTRIBUTES
typedef struct s_int_array
{
size_t length;
int ints[];
} *t_int_array;
///TODO: Settle on a typedef name.
typedef t_int_array t_iarr;
typedef struct s_int_option
{
enum e_option_type type;
int value;
} t_int_option;
# endif
#endif