harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 93915b44e10389de89eb7378ac9f418994131f69
parent 17e06988a8edf1437010971c5cb5c89bb10d82b9
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 24 Dec 2020 09:40:15 -0500

type store: expand support for pointers

Diffstat:
Msrc/type_store.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/type_store.c b/src/type_store.c @@ -233,6 +233,8 @@ type_eq_atype(struct type_store *store, } return true; case TYPE_STORAGE_POINTER: + return type->pointer.flags == atype->pointer.flags && + type_eq_atype(store, type->pointer.referent, atype->pointer.referent); case TYPE_STORAGE_SLICE: case TYPE_STORAGE_STRING: case TYPE_STORAGE_STRUCT: @@ -297,6 +299,10 @@ type_init_from_atype(struct type_store *store, } break; case TYPE_STORAGE_POINTER: + type->pointer.flags = atype->pointer.flags; + type->pointer.referent = type_store_lookup_atype( + store, atype->pointer.referent); + break; case TYPE_STORAGE_SLICE: case TYPE_STORAGE_STRING: case TYPE_STORAGE_STRUCT: