mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
Revise comment about RocStr.init ownership
This commit is contained in:
parent
e8b86ad887
commit
77d68491fb
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ const RocStr = extern struct {
|
||||||
str_bytes: ?[*]u8,
|
str_bytes: ?[*]u8,
|
||||||
str_len: usize,
|
str_len: usize,
|
||||||
|
|
||||||
// This takes ownership of the pointed-to bytes if they won't fit in a
|
// This clones the pointed-to bytes if they won't fit in a
|
||||||
// small string, and returns a (pointer, len) tuple which points to them.
|
// small string, and returns a (pointer, len) tuple which points to them.
|
||||||
pub fn init(allocator: *Allocator, bytes_ptr: [*]const u8, length: usize) RocStr {
|
pub fn init(allocator: *Allocator, bytes_ptr: [*]const u8, length: usize) RocStr {
|
||||||
const rocStrSize = @sizeOf(RocStr);
|
const rocStrSize = @sizeOf(RocStr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue