Merge branch 'master' into sysinfo

This commit is contained in:
Jeroen van Rijn
2022-09-04 19:08:31 +02:00
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -1615,6 +1615,7 @@ void lb_generate_code(lbGenerator *gen) {
}
if (is_foreign) {
LLVMSetLinkage(g.value, LLVMExternalLinkage);
LLVMSetDLLStorageClass(g.value, LLVMDLLImportStorageClass);
LLVMSetExternallyInitialized(g.value, true);
lb_add_foreign_library_path(m, e->Variable.foreign_library);
+1 -1
View File
@@ -146,7 +146,7 @@ reflect_args_structure :: proc(ctx: ^Flag_Context, v: any) -> Flag_Error {
type := types[i];
if named_type, ok := type.variant.(Type_Info_Named); ok {
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && union_type.maybe && len(union_type.variants) == 1 {
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && len(union_type.variants) == 1 {
flag.optional = true;
flag.tag_ptr = rawptr(uintptr(union_type.tag_offset) + uintptr(v.data) + uintptr(offsets[i]));
type = union_type.variants[0];
+1 -1
View File
@@ -70,7 +70,7 @@ walk_files :: proc(info: os.File_Info, in_err: os.Errno) -> (err: os.Errno, skip
}
main :: proc() {
init_global_temporary_allocator(mem.megabytes(100));
init_global_temporary_allocator(mem.Megabyte * 100)
args: Args;