diff options
| author | 2022-08-30 19:07:05 +0200 | |
|---|---|---|
| committer | 2022-08-30 19:07:05 +0200 | |
| commit | dd3b12d8114176d8433f961a11b7f53c1083ade0 (patch) | |
| tree | e4f88b460a0e3193922d0fb04566f484b5007576 /src/cffc.hff | |
| parent | 25987b70e70713213a9ea91bf753130fd051ce33 (diff) | |
interntype by ref
Diffstat (limited to 'src/cffc.hff')
| -rw-r--r-- | src/cffc.hff | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cffc.hff b/src/cffc.hff index 06e87fb..4d57d3d 100644 --- a/src/cffc.hff +++ b/src/cffc.hff @@ -441,7 +441,7 @@ extern static ty_void *const Type, ty_c_llong *const Type, ty_c_ullong *const Type, ty_c_valist *const Type; -extern fn interntype(Type) *const Type; +extern fn interntype(*Type) *const Type; extern fn putprimtypes(env *Env) void; fn constify(ty *const Type) *const Type { if ty.konst or ty.u.#tag == :Fn { @@ -449,7 +449,7 @@ fn constify(ty *const Type) *const Type { } let ty2 = *ty; ty2.konst = #t; - return interntype(ty2); + return interntype(&ty2); } fn unconstify(ty *const Type) *const Type { if !ty.konst { @@ -457,17 +457,17 @@ fn unconstify(ty *const Type) *const Type { } let ty2 = *ty; ty2.konst = #f; - return interntype(ty2); + return interntype(&ty2); } fn mkarrtype(len i64, konst bool, child *const Type) *const Type { - return interntype({ + return interntype(&Type { len * child.size, child.align, .u: :Arr { konst ? constify(child) : child, len } }); } fn mkptrtype(child *const Type) *const Type { - return interntype({ + return interntype(&Type { g_targ.ptrsize, .u: :Ptr(child) }); |