error(msg = aprintf("'{}' is not a valid section name.", stripped_section_name));
}
- active_item_ptr = cast(&u8) output.data + member.offset;
+ active_item_ptr = cast([&] u8) output.data + member.offset;
active_item_type = member.type;
parse_method := info.get_struct_method(active_item_type, "parse_ini");
assert(r->read_byte() == #char "=", "expected =");
field := info.get_struct_member(active_item_type, string.strip_whitespace(field_name));
- target := cast(&u8) active_item_ptr + field.offset;
+ target := cast([&] u8) active_item_ptr + field.offset;
value_string := r->read_until(#char "\n", allocator=context.temp_allocator);
parsed_successfully := conv.parse_any(target, field.type, value_string);
member_info := cast(&info.Type_Info_Struct) info.get_type_info(it.type);
if member_info.kind != .Struct do continue;
- member_data := cast(&u8) output.data + it.offset;
+ member_data := cast([&] u8) output.data + it.offset;
if write_method := info.get_struct_method(it.type, "write_ini"); write_method != null {
wm := *cast(&(rawptr, &io.Writer) -> bool) write_method.data;
}
case .Pointer do return "i32"; // This will also have to depend on the pointer size...
+ case .Multi_Pointer do return "i32"; // This will also have to depend on the pointer size...
case .Function do assert(false, "Passing functions between wasm and c is not yet supported.");
case .Array do return "i32";
case .Slice do assert(false, "ASDFASDF");
}
case .Pointer do return "WASM_I32"; // This will also have to depend on the pointer size...
+ case .Multi_Pointer do return "WASM_I32"; // This will also have to depend on the pointer size...
case .Function do assert(false, "Passing functions between wasm and c is not yet supported.");
case .Array do return "WASM_I32";
case .Slice do return "WASM_I32,WASM_I32";
is_pointer :: (t: type_expr) -> bool {
if t == rawptr do return true;
info := get_type_info(t);
- return info.kind == .Pointer;
+ return info.kind == .Pointer || info.kind == .Multi_Pointer;
}
size_of :: (t: type_expr) -> u32 {