Skip to content

Commit

Permalink
Merge pull request #418 from thetarnav/raw_data
Browse files Browse the repository at this point in the history
Add `raw_data` proc to `builtin/builtin.odin`
  • Loading branch information
DanielGavin authored Jul 1, 2024
2 parents 9fc36bf + 4c882df commit ee368d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builtin/builtin.odin
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ conj :: proc(value: Complex_Or_Quaternion) -> Complex_Or_Quaternion ---

@builtin unreachable :: proc() -> ! ---

@(private="file") _raw_data_slice :: proc(value: []$E) -> [^]E ---
@(private="file") _raw_data_dynamic :: proc(value: [dynamic]$E) -> [^]E ---
@(private="file") _raw_data_array :: proc(value: ^[$N]$E) -> [^]E ---
@(private="file") _raw_data_simd :: proc(value: ^#simd[$N]$E) -> [^]E ---
@(private="file") _raw_data_string :: proc(value: string) -> [^]byte ---
// raw_data is a built-in procedure which returns the underlying data of a built-in data type as a Multi-Pointer.
@builtin raw_data :: proc{_raw_data_slice, _raw_data_dynamic, _raw_data_array, _raw_data_simd, _raw_data_string}

/*
This is interally from the compiler
*/
Expand Down

0 comments on commit ee368d4

Please sign in to comment.