File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
branches/incoming/src/libcore Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9
- refs/heads/incoming: e9caa3fe2e291b7f2cea624bfd0dc879e95fe382
9
+ refs/heads/incoming: 07edf9036715bde27cc7bbc0feb3ee6e461130da
10
10
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -1869,11 +1869,6 @@ pub pure fn escape_unicode(s: &str) -> ~str {
1869
1869
move out
1870
1870
}
1871
1871
1872
- extern mod rustrt {
1873
- #[ rust_stack]
1874
- pure fn upcall_str_new_shared ( cstr : * libc:: c_char , len : size_t ) -> @str ;
1875
- }
1876
-
1877
1872
/// Unsafe operations
1878
1873
pub mod raw {
1879
1874
@@ -2221,10 +2216,10 @@ impl &str: StrSlice {
2221
2216
2222
2217
#[ inline]
2223
2218
pure fn to_managed ( ) -> @str {
2224
- do str :: as_buf ( self ) |p , _len | {
2225
- rustrt :: upcall_str_new_shared ( p as * libc :: c_char ,
2226
- self . len ( ) as size_t )
2227
- }
2219
+ let v = at_vec :: from_fn ( self . len ( ) + 1 , |i | {
2220
+ if i == self . len ( ) { 0 } else { self [ i ] }
2221
+ } ) ;
2222
+ unsafe { :: cast :: transmute ( v ) }
2228
2223
}
2229
2224
2230
2225
#[ inline]
You can’t perform that action at this time.
0 commit comments