aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-06-14 11:43:35 +0100
committergingerBill <bill@gingerbill.org>2021-06-14 11:43:35 +0100
commit3e7aabe6d83797f7451300a5c8e6fb4a5c1804d2 (patch)
tree1d478a40ae1ac927846700c1d130ab4ce639607e /core
parentd4df325e0a2cfe1d6de90667099d9ac43e269029 (diff)
Change uses for parapoly records to use `$` always
Diffstat (limited to 'core')
-rw-r--r--core/container/array.odin2
-rw-r--r--core/container/map.odin4
-rw-r--r--core/container/priority_queue.odin2
-rw-r--r--core/container/queue.odin2
-rw-r--r--core/container/ring.odin2
-rw-r--r--core/container/small_array.odin2
-rw-r--r--core/math/fixed/fixed.odin2
-rw-r--r--core/mem/allocators.odin2
-rw-r--r--core/reflect/map.odin2
-rw-r--r--core/runtime/core_builtin.odin2
-rw-r--r--core/slice/map.odin4
-rw-r--r--core/sync/channel.odin2
12 files changed, 14 insertions, 14 deletions
diff --git a/core/container/array.odin b/core/container/array.odin
index 1f2cdc58c..74dcd847f 100644
--- a/core/container/array.odin
+++ b/core/container/array.odin
@@ -3,7 +3,7 @@ package container
import "core:mem"
import "core:runtime"
-Array :: struct(T: typeid) {
+Array :: struct($T: typeid) {
data: ^T,
len: int,
cap: int,
diff --git a/core/container/map.odin b/core/container/map.odin
index 959fc19f8..c4795e996 100644
--- a/core/container/map.odin
+++ b/core/container/map.odin
@@ -4,12 +4,12 @@ import "intrinsics"
_ :: intrinsics;
-Map :: struct(Key, Value: typeid) where intrinsics.type_is_valid_map_key(Key) {
+Map :: struct($Key, $Value: typeid) where intrinsics.type_is_valid_map_key(Key) {
hash: Array(int),
entries: Array(Map_Entry(Key, Value)),
}
-Map_Entry :: struct(Key, Value: typeid) where intrinsics.type_is_valid_map_key(Key) {
+Map_Entry :: struct($Key, $Value: typeid) where intrinsics.type_is_valid_map_key(Key) {
hash: uintptr,
next: int,
key: Key,
diff --git a/core/container/priority_queue.odin b/core/container/priority_queue.odin
index 8f3f6bb32..f1ceac3a4 100644
--- a/core/container/priority_queue.odin
+++ b/core/container/priority_queue.odin
@@ -1,6 +1,6 @@
package container
-Priority_Queue :: struct(T: typeid) {
+Priority_Queue :: struct($T: typeid) {
data: Array(T),
len: int,
priority: proc(item: T) -> int,
diff --git a/core/container/queue.odin b/core/container/queue.odin
index 2664b9a08..b4ca0ae8f 100644
--- a/core/container/queue.odin
+++ b/core/container/queue.odin
@@ -1,6 +1,6 @@
package container
-Queue :: struct(T: typeid) {
+Queue :: struct($T: typeid) {
data: Array(T),
len: int,
offset: int,
diff --git a/core/container/ring.odin b/core/container/ring.odin
index d0e7d9b52..fca2db6f9 100644
--- a/core/container/ring.odin
+++ b/core/container/ring.odin
@@ -1,7 +1,7 @@
package container
-Ring :: struct(T: typeid) {
+Ring :: struct($T: typeid) {
next, prev: ^Ring(T),
value: T,
}
diff --git a/core/container/small_array.odin b/core/container/small_array.odin
index 235c42a77..014837631 100644
--- a/core/container/small_array.odin
+++ b/core/container/small_array.odin
@@ -1,6 +1,6 @@
package container
-Small_Array :: struct(N: int, T: typeid) where N >= 0 {
+Small_Array :: struct($N: int, $T: typeid) where N >= 0 {
data: [N]T,
len: int,
}
diff --git a/core/math/fixed/fixed.odin b/core/math/fixed/fixed.odin
index 115df177a..df6659ff5 100644
--- a/core/math/fixed/fixed.odin
+++ b/core/math/fixed/fixed.odin
@@ -6,7 +6,7 @@ import "core:strconv"
import "intrinsics"
_ :: intrinsics;
-Fixed :: struct($Backing: typeid, Fraction_Width: uint)
+Fixed :: struct($Backing: typeid, $Fraction_Width: uint)
where
intrinsics.type_is_integer(Backing),
0 <= Fraction_Width,
diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin
index 282fff48c..258aea3a5 100644
--- a/core/mem/allocators.odin
+++ b/core/mem/allocators.odin
@@ -919,7 +919,7 @@ tracking_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
// Small_Allocator primary allocates memory from its local buffer of size BUFFER_SIZE
// If that buffer's memory is exhausted, it will use the backing allocator (a scratch allocator is recommended)
// Memory allocated with Small_Allocator cannot be freed individually using 'free' and must be freed using 'free_all'
-Small_Allocator :: struct(BUFFER_SIZE: int)
+Small_Allocator :: struct($BUFFER_SIZE: int)
where
BUFFER_SIZE >= 2*size_of(uintptr),
BUFFER_SIZE & (BUFFER_SIZE-1) == 0 {
diff --git a/core/reflect/map.odin b/core/reflect/map.odin
index 169370726..a2fc0d789 100644
--- a/core/reflect/map.odin
+++ b/core/reflect/map.odin
@@ -5,7 +5,7 @@ import "core:mem"
_ :: runtime;
_ :: mem;
-Map_Entry_Info :: struct(Key, Value: typeid) {
+Map_Entry_Info :: struct($Key, $Value: typeid) {
hash: uintptr,
key: Key,
value: Value,
diff --git a/core/runtime/core_builtin.odin b/core/runtime/core_builtin.odin
index a74043f95..29c84a59e 100644
--- a/core/runtime/core_builtin.odin
+++ b/core/runtime/core_builtin.odin
@@ -3,7 +3,7 @@ package runtime
import "intrinsics"
@builtin
-Maybe :: union(T: typeid) #maybe {T};
+Maybe :: union($T: typeid) #maybe {T};
@thread_local global_default_temp_allocator_data: Default_Temp_Allocator;
diff --git a/core/slice/map.odin b/core/slice/map.odin
index b9ec795a5..a92697f14 100644
--- a/core/slice/map.odin
+++ b/core/slice/map.odin
@@ -27,12 +27,12 @@ map_values :: proc(m: $M/map[$K]$V, allocator := context.allocator) -> (values:
return;
}
-Map_Entry :: struct(Key, Value: typeid) {
+Map_Entry :: struct($Key, $Value: typeid) {
key: Key,
value: Value,
}
-Map_Entry_Info :: struct(Key, Value: typeid) {
+Map_Entry_Info :: struct($Key, $Value: typeid) {
hash: uintptr,
key: Key,
value: Value,
diff --git a/core/sync/channel.odin b/core/sync/channel.odin
index 7eddbfaf0..551413651 100644
--- a/core/sync/channel.odin
+++ b/core/sync/channel.odin
@@ -13,7 +13,7 @@ Channel_Direction :: enum i8 {
Recv = -1,
}
-Channel :: struct(T: typeid, Direction := Channel_Direction.Both) {
+Channel :: struct($T: typeid, $Direction := Channel_Direction.Both) {
using _internal: ^Raw_Channel,
}