Skip to content

Commit b4d2fda

Browse files
committed
---
yaml --- r: 5620 b: refs/heads/master c: 5b6dbcb h: refs/heads/master v: v3
1 parent 10dce73 commit b4d2fda

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3be6cf7ab24ec496443a6fa4cb14cd463cf2f587
2+
refs/heads/master: 5b6dbcb0303c99c29bb8579abff7cee50befeb6c

trunk/src/lib/str.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ export eq, lteq, hash, is_empty, is_not_empty, is_whitespace, byte_len, index,
44
unshift_char, shift_char, pop_char, push_char, is_utf8, from_chars,
55
to_chars, char_len, char_at, bytes, is_ascii, shift_byte, pop_byte,
66
unsafe_from_byte, unsafe_from_bytes, from_char, char_range_at,
7-
str_from_cstr, sbuf, as_buf, push_byte, utf8_char_width, safe_slice,
8-
buf;
7+
str_from_cstr, sbuf, as_buf, push_byte, utf8_char_width, safe_slice;
98

109
native "rust" mod rustrt {
1110
fn rust_str_push(&s: str, ch: u8);
@@ -420,6 +419,8 @@ fn trim(s: str) -> str { trim_left(trim_right(s)) }
420419

421420
type sbuf = *u8;
422421

422+
// NB: This is intentionally unexported because it's easy to misuse (there's
423+
// no guarantee that the string is rooted). Instead, use as_buf below.
423424
fn buf(s: str) -> sbuf {
424425
let saddr = ptr::addr_of(s);
425426
let vaddr: *[u8] = unsafe::reinterpret_cast(saddr);

0 commit comments

Comments
 (0)