diff --git a/src/array.h b/src/array.h index cd52e94d..53459188 100644 --- a/src/array.h +++ b/src/array.h @@ -58,8 +58,13 @@ typedef struct { data_integer *data_integer_init(void); array *array_init(void); + +__attribute_cold__ array *array_init_array(const array *a); + void array_free(array *a); + +__attribute_cold__ void array_reset(array *a); __attribute_hot__ diff --git a/src/data_array.c b/src/data_array.c index 21ad2507..225a910d 100644 --- a/src/data_array.c +++ b/src/data_array.c @@ -5,6 +5,7 @@ #include #include +__attribute_cold__ static data_unset *data_array_copy(const data_unset *s) { data_array *src = (data_array *)s; data_array *ds = data_array_init(); @@ -24,6 +25,7 @@ static void data_array_free(data_unset *d) { free(d); } +__attribute_cold__ static void data_array_reset(data_unset *d) { data_array *ds = (data_array *)d; @@ -32,6 +34,7 @@ static void data_array_reset(data_unset *d) { array_reset(ds->value); } +__attribute_cold__ static int data_array_insert_dup(data_unset *dst, data_unset *src) { UNUSED(dst); @@ -40,6 +43,7 @@ static int data_array_insert_dup(data_unset *dst, data_unset *src) { return 0; } +__attribute_cold__ static void data_array_print(const data_unset *d, int depth) { data_array *ds = (data_array *)d; diff --git a/src/data_config.c b/src/data_config.c index 9cf62fba..fce66fe5 100644 --- a/src/data_config.c +++ b/src/data_config.c @@ -12,6 +12,7 @@ #include #endif +__attribute_cold__ static data_unset *data_config_copy(const data_unset *s) { data_config *src = (data_config *)s; data_config *ds = data_config_init(); @@ -25,6 +26,7 @@ static data_unset *data_config_copy(const data_unset *s) { return (data_unset *)ds; } +__attribute_cold__ static void data_config_free(data_unset *d) { data_config *ds = (data_config *)d; @@ -45,6 +47,7 @@ static void data_config_free(data_unset *d) { free(d); } +__attribute_cold__ static void data_config_reset(data_unset *d) { data_config *ds = (data_config *)d; @@ -55,6 +58,7 @@ static void data_config_reset(data_unset *d) { array_reset(ds->value); } +__attribute_cold__ static int data_config_insert_dup(data_unset *dst, data_unset *src) { UNUSED(dst); @@ -63,6 +67,7 @@ static int data_config_insert_dup(data_unset *dst, data_unset *src) { return 0; } +__attribute_cold__ static void data_config_print(const data_unset *d, int depth) { data_config *ds = (data_config *)d; array *a = (array *)ds->value; diff --git a/src/data_integer.c b/src/data_integer.c index 4bdedd06..a600777c 100644 --- a/src/data_integer.c +++ b/src/data_integer.c @@ -6,6 +6,7 @@ #include #include +__attribute_cold__ static data_unset *data_integer_copy(const data_unset *s) { data_integer *src = (data_integer *)s; data_integer *ds = data_integer_init(); @@ -23,6 +24,7 @@ static void data_integer_free(data_unset *d) { free(d); } +__attribute_cold__ static void data_integer_reset(data_unset *d) { data_integer *ds = (data_integer *)d; @@ -31,6 +33,7 @@ static void data_integer_reset(data_unset *d) { ds->value = 0; } +__attribute_cold__ static int data_integer_insert_dup(data_unset *dst, data_unset *src) { UNUSED(dst); @@ -39,6 +42,7 @@ static int data_integer_insert_dup(data_unset *dst, data_unset *src) { return 0; } +__attribute_cold__ static void data_integer_print(const data_unset *d, int depth) { data_integer *ds = (data_integer *)d; UNUSED(depth); diff --git a/src/data_string.c b/src/data_string.c index 6a2d5cea..ecf3567d 100644 --- a/src/data_string.c +++ b/src/data_string.c @@ -6,6 +6,7 @@ #include #include +__attribute_cold__ static data_unset *data_string_copy(const data_unset *s) { data_string *src = (data_string *)s; data_string *ds = data_string_init(); @@ -24,6 +25,7 @@ static void data_string_free(data_unset *d) { free(d); } +__attribute_cold__ static void data_string_reset(data_unset *d) { data_string *ds = (data_string *)d; @@ -32,6 +34,7 @@ static void data_string_reset(data_unset *d) { buffer_reset(ds->value); } +__attribute_cold__ static int data_string_insert_dup(data_unset *dst, data_unset *src) { data_string *ds_dst = (data_string *)dst; data_string *ds_src = (data_string *)src; @@ -48,6 +51,7 @@ static int data_string_insert_dup(data_unset *dst, data_unset *src) { return 0; } +__attribute_cold__ static void data_string_print(const data_unset *d, int depth) { data_string *ds = (data_string *)d; size_t i, len;