Skip to content

Commit 986c880

Browse files
steveklabnikalexcrichton
authored andcommitted
---
yaml --- r: 118965 b: refs/heads/master c: d58412b h: refs/heads/master i: 118963: 94f8ca2 v: v3
1 parent f958766 commit 986c880

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9e3d0b002a5c2e81d43351c9b8550a3f4ccfb8f9
2+
refs/heads/master: d58412bfa13a21718c629407939d08b8fca2edc7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 71fe44def9676d519f5ce5d7304e581a42cf2c70
55
refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f

trunk/src/librustrt/c_str.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ impl CString {
123123
}
124124

125125
/// Unwraps the wrapped `*libc::c_char` from the `CString` wrapper.
126-
/// Any ownership of the buffer by the `CString` wrapper is forgotten.
126+
///
127+
/// The original object is destructed after this method is called, and if
128+
/// the underlying pointer was previously allocated, care must be taken to
129+
/// ensure that it is deallocated properly.
127130
pub unsafe fn unwrap(self) -> *libc::c_char {
128131
let mut c_str = self;
129132
c_str.owns_buffer_ = false;

0 commit comments

Comments
 (0)