mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Merge pull request #1696 from Despacito696969/master
Fix for `slice_to_components` compilation error
This commit is contained in:
+1
-1
@@ -172,7 +172,7 @@ slice_data_cast :: proc "contextless" ($T: typeid/[]$A, slice: $S/[]$B) -> T {
|
|||||||
|
|
||||||
slice_to_components :: proc "contextless" (slice: $E/[]$T) -> (data: ^T, len: int) {
|
slice_to_components :: proc "contextless" (slice: $E/[]$T) -> (data: ^T, len: int) {
|
||||||
s := transmute(Raw_Slice)slice
|
s := transmute(Raw_Slice)slice
|
||||||
return s.data, s.len
|
return (^T)(s.data), s.len
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_from_slice :: proc "contextless" (backing: $T/[]$E) -> [dynamic]E {
|
buffer_from_slice :: proc "contextless" (backing: $T/[]$E) -> [dynamic]E {
|
||||||
|
|||||||
Reference in New Issue
Block a user