Loading...
Searching...
No Matches
Go to the documentation of this file.
6#define MAX_TYPE_NAME_LEN 256
7#define MAX_FUNC_NAME_LEN 512
8#define MAX_ERROR_MSG_LEN 1024
9#define MAX_MANGLED_NAME_LEN 512
10#define MAX_PATH_LEN 4096
13#define IS_INT_TYPE(t) ((t) && strcmp((t), "int") == 0)
14#define IS_BOOL_TYPE(t) ((t) && strcmp((t), "bool") == 0)
15#define IS_CHAR_TYPE(t) ((t) && strcmp((t), "char") == 0)
16#define IS_VOID_TYPE(t) ((t) && strcmp((t), "void") == 0)
17#define IS_FLOAT_TYPE(t) ((t) && strcmp((t), "float") == 0)
18#define IS_DOUBLE_TYPE(t) ((t) && strcmp((t), "double") == 0)
19#define IS_USIZE_TYPE(t) \
20 ((t) && (strcmp((t), "usize") == 0 || \
21 strcmp((t), "size_t") == 0))
25#define IS_STRING_TYPE(t) \
27 (strcmp((t), "string") == 0 || strcmp((t), "char*") == 0 || strcmp((t), "const char*") == 0))
33#define IS_BASIC_TYPE(t) \
34 ((t) && (IS_INT_TYPE(t) || IS_BOOL_TYPE(t) || IS_CHAR_TYPE(t) || IS_VOID_TYPE(t) || \
35 IS_FLOAT_TYPE(t) || IS_DOUBLE_TYPE(t) || IS_USIZE_TYPE(t) || \
36 strcmp((t), "ssize_t") == 0 || strcmp((t), "__auto_type") == 0))
41#define IS_NUMERIC_TYPE(t) \
42 ((t) && (IS_INT_TYPE(t) || IS_FLOAT_TYPE(t) || IS_DOUBLE_TYPE(t) || IS_USIZE_TYPE(t)))
45#define IS_PTR_TYPE(t) ((t) && strchr((t), '*') != NULL)
48#define IS_STRUCT_PREFIX(t) \
49 ((t) && strncmp((t), "struct ", 7) == 0)
50#define STRIP_STRUCT_PREFIX(t) \
51 (IS_STRUCT_PREFIX(t) ? ((t) + 7) : (t))
54#define IS_OPTION_TYPE(t) ((t) && strncmp((t), "Option_", 7) == 0)
55#define IS_RESULT_TYPE(t) ((t) && strncmp((t), "Result_", 7) == 0)
56#define IS_VEC_TYPE(t) ((t) && strncmp((t), "Vec_", 4) == 0)
57#define IS_SLICE_TYPE(t) ((t) && strncmp((t), "Slice_", 6) == 0)