21 lines
434 B
Odin
21 lines
434 B
Odin
package store
|
|
|
|
// Ini Reflection code
|
|
|
|
import "core:mem"
|
|
import "core:reflect"
|
|
import "core:encoding/ini"
|
|
import "core:encoding/json"
|
|
|
|
Ini_Unmarshal_Error :: union {
|
|
mem.Allocator_Error,
|
|
}
|
|
|
|
ini_unmarshal :: proc(data: string, v: ^$T, allocator := context.allocator) -> Ini_Unmarshal_Error {
|
|
m := ini.load_map_from_string(data, allocator) or_return
|
|
defer ini.delete_map(m)
|
|
|
|
fields := reflect.struct_fields_zipped(T)
|
|
|
|
}
|