Format code.
This commit is contained in:
13
src/value.c
13
src/value.c
@@ -1,19 +1,22 @@
|
||||
#include "value.h"
|
||||
#include "parsetype.h"
|
||||
|
||||
void libab_value_init_ref(libab_value* value, libab_ref* data, libab_ref* type) {
|
||||
void libab_value_init_ref(libab_value* value, libab_ref* data,
|
||||
libab_ref* type) {
|
||||
libab_ref_copy(data, &value->data);
|
||||
libab_ref_copy(type, &value->type);
|
||||
}
|
||||
|
||||
libab_result libab_value_init_raw(libab_value* value, void* data, libab_ref* type) {
|
||||
libab_result libab_value_init_raw(libab_value* value, void* data,
|
||||
libab_ref* type) {
|
||||
libab_result result = LIBAB_SUCCESS;
|
||||
libab_ref tmp_ref;
|
||||
|
||||
result = libab_ref_new(&tmp_ref, data,
|
||||
((libab_parsetype*) libab_ref_get(type))->data_u.base->free_function);
|
||||
result = libab_ref_new(
|
||||
&tmp_ref, data,
|
||||
((libab_parsetype*)libab_ref_get(type))->data_u.base->free_function);
|
||||
|
||||
if(result == LIBAB_SUCCESS) {
|
||||
if (result == LIBAB_SUCCESS) {
|
||||
libab_value_init_ref(value, &tmp_ref, type);
|
||||
libab_ref_free(&tmp_ref);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user