diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-07-01 21:55:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 21:55:26 +0200 |
| commit | ee368d473146d33e89f9be9f754fd6d0ee08ecc6 (patch) | |
| tree | 9bd9b0c6fdd67b1c651c9c264519d68fe02359f6 | |
| parent | 9fc36bfa5c76bec6f890d744398169a8069ada5a (diff) | |
| parent | 4c882df90df73b0c6eba28e14c6813cd8244baa9 (diff) | |
Merge pull request #418 from thetarnav/raw_data
Add `raw_data` proc to `builtin/builtin.odin`
| -rw-r--r-- | builtin/builtin.odin | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/builtin/builtin.odin b/builtin/builtin.odin index e6a634c..b4a3e38 100644 --- a/builtin/builtin.odin +++ b/builtin/builtin.odin @@ -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 */ |