Merge branch 'main' into feature/new-object-system
This commit is contained in:
@@ -11,6 +11,7 @@ typedef enum b_serial_format {
|
||||
B_SERIAL_FORMAT_NONE = 0,
|
||||
B_SERIAL_FORMAT_BITCODE,
|
||||
B_SERIAL_FORMAT_JSON,
|
||||
B_SERIAL_FORMAT_TOML,
|
||||
} b_serial_format;
|
||||
|
||||
typedef enum b_serial_flags {
|
||||
|
||||
@@ -2978,7 +2978,7 @@ static enum b_status serialise_dict(const struct b_dsref *object, cJSON **out)
|
||||
return status;
|
||||
}
|
||||
|
||||
cJSON_AddItemToObject(json_dict, it.key, child);
|
||||
cJSON_AddItemToObject(json_dict, b_string_ptr(it.key), child);
|
||||
}
|
||||
|
||||
*out = json_dict;
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
|
||||
extern const struct b_serial_format_ops z__b_bitcode_format_ops;
|
||||
extern const struct b_serial_format_ops z__b_json_format_ops;
|
||||
extern const struct b_serial_format_ops z__b_toml_format_ops;
|
||||
|
||||
static const struct b_serial_format_ops *format_ops[] = {
|
||||
[B_SERIAL_FORMAT_NONE] = NULL,
|
||||
[B_SERIAL_FORMAT_BITCODE] = &z__b_bitcode_format_ops,
|
||||
[B_SERIAL_FORMAT_JSON] = &z__b_json_format_ops,
|
||||
[B_SERIAL_FORMAT_TOML] = &z__b_toml_format_ops,
|
||||
};
|
||||
static const size_t nr_format_ops = sizeof format_ops / sizeof format_ops[0];
|
||||
|
||||
|
||||
2275
serial/toml.c
Normal file
2275
serial/toml.c
Normal file
File diff suppressed because it is too large
Load Diff
4
serial/toml.h
Normal file
4
serial/toml.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef TOML_H_
|
||||
#define TOML_H_
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user