File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -959,6 +959,14 @@ pub mod raw {
959
959
:: cast:: transmute ( v)
960
960
}
961
961
962
+ #[ lang="strdup_uniq" ]
963
+ #[ cfg( not( test) ) ]
964
+ #[ allow( missing_doc) ]
965
+ #[ inline]
966
+ pub unsafe fn strdup_uniq ( ptr : * u8 , len : uint ) -> ~str {
967
+ from_buf_len ( ptr, len)
968
+ }
969
+
962
970
/// Create a Rust string from a null-terminated C string
963
971
pub unsafe fn from_c_str ( buf : * libc:: c_char ) -> ~str {
964
972
let mut curr = buf;
Original file line number Diff line number Diff line change @@ -93,12 +93,6 @@ pub unsafe fn check_not_borrowed(a: *u8,
93
93
borrowck:: check_not_borrowed ( a, file, line)
94
94
}
95
95
96
- #[ lang="strdup_uniq" ]
97
- #[ inline]
98
- pub unsafe fn strdup_uniq ( ptr : * c_uchar , len : uint ) -> ~str {
99
- str:: raw:: from_buf_len ( ptr, len)
100
- }
101
-
102
96
#[ lang="annihilate" ]
103
97
pub unsafe fn annihilate ( ) {
104
98
:: cleanup:: annihilate ( )
You can’t perform that action at this time.
0 commit comments