@@ -135,7 +135,7 @@ the true length after compression for setting the length.
135
135
~~~~ {.xfail-test}
136
136
pub fn compress(src: &[u8]) -> ~[u8] {
137
137
#[fixed_stack_segment]; #[inline(never)];
138
-
138
+
139
139
unsafe {
140
140
let srclen = src.len() as size_t;
141
141
let psrc = vec::raw::to_ptr(src);
@@ -157,7 +157,7 @@ format and `snappy_uncompressed_length` will retrieve the exact buffer size requ
157
157
~~~~ {.xfail-test}
158
158
pub fn uncompress(src: &[u8]) -> Option<~[u8]> {
159
159
#[fixed_stack_segment]; #[inline(never)];
160
-
160
+
161
161
unsafe {
162
162
let srclen = src.len() as size_t;
163
163
let psrc = vec::raw::to_ptr(src);
@@ -236,7 +236,7 @@ use std::libc::size_t;
236
236
unsafe fn snappy_max_compressed_length(source_length: size_t) -> size_t {
237
237
#[fixed_stack_segment]; #[inline(never)];
238
238
return snappy_max_compressed_length(source_length);
239
-
239
+
240
240
#[link_args = "-lsnappy"]
241
241
extern {
242
242
fn snappy_max_compressed_length(source_length: size_t) -> size_t;
@@ -259,9 +259,9 @@ check that one of the following conditions holds:
259
259
2 . The call occurs inside of an ` extern fn ` ;
260
260
3 . The call occurs within a stack closure created by some other
261
261
safe fn.
262
-
262
+
263
263
All of these conditions ensure that you are running on a large stack
264
- segmented . However, they are sometimes too strict. If your application
264
+ segment . However, they are sometimes too strict. If your application
265
265
will be making many calls into C, it is often beneficial to promote
266
266
the ` #[fixed_stack_segment] ` attribute higher up the call chain. For
267
267
example, the Rust compiler actually labels main itself as requiring a
@@ -298,7 +298,7 @@ impl<T: Send> Unique<T> {
298
298
pub fn new(value: T) -> Unique<T> {
299
299
#[fixed_stack_segment];
300
300
#[inline(never)];
301
-
301
+
302
302
unsafe {
303
303
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
304
304
assert!(!ptr::is_null(ptr));
@@ -324,7 +324,7 @@ impl<T: Send> Drop for Unique<T> {
324
324
fn drop(&mut self) {
325
325
#[fixed_stack_segment];
326
326
#[inline(never)];
327
-
327
+
328
328
unsafe {
329
329
let x = intrinsics::init(); // dummy value to swap in
330
330
// moving the object out is needed to call the destructor
0 commit comments