aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-16 16:27:09 +0100
committergingerBill <bill@gingerbill.org>2024-05-16 16:27:09 +0100
commitc9b1c99a4057b7e3f6caee3fb37cf85ca29a7fc9 (patch)
treebb00cdb51a5c3120eb2a7cf5aa48e6ece3e7dcb6 /src/types.cpp
parent32245e93a106c5cb1ee9b448789f623a4dbef717 (diff)
Fix `soa_zip` and `soa_unzip`
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 47ed86f7a..390ee842a 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -988,6 +988,16 @@ gb_internal Type *alloc_type_soa_pointer(Type *elem) {
return t;
}
+gb_internal Type *alloc_type_pointer_to_multi_pointer(Type *ptr) {
+ Type *original_type = ptr;
+ ptr = base_type(ptr);
+ if (ptr->kind == Type_Pointer) {
+ return alloc_type_multi_pointer(ptr->Pointer.elem);
+ } else if (ptr->kind != Type_MultiPointer) {
+ GB_PANIC("Invalid type: %s", type_to_string(original_type));
+ }
+ return original_type;
+}
gb_internal Type *alloc_type_array(Type *elem, i64 count, Type *generic_count = nullptr) {
if (generic_count != nullptr) {