This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::libc::{c_int, c_long, c_schar, c_uchar, c_void, ptrdiff_t, size_t}; | |
use std::libc::{c_longlong, c_ulonglong, c_uint, c_ushort, c_double, c_float}; | |
use std::libc::{c_short}; | |
#[allow(non_camel_case_types)] | |
pub type nc_type = c_int; | |
#[allow(dead_code)] | |
#[allow(non_camel_case_types)] | |
pub struct nc_vlen_t { | |
len: size_t, | |
p: *mut c_void, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/test-fs.c b/test/test-fs.c | |
index f0ff824..837d251 100644 | |
--- a/test/test-fs.c | |
+++ b/test/test-fs.c | |
@@ -732,6 +732,39 @@ TEST_IMPL(fs_file_sync) { | |
return 0; | |
} | |
+TEST_IMPL(fs_large_write) { | |
+ int r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* cannot index a value of type `std::vec::Vec<T>` | |
Rust's vector type doesn't implement whatever-it-needs to be able to use the standard indexing operator ("[]") with it. Use .get(idx) or .get_mut(idx) instead. | |
* error: cannot move out of dereference of `&`-pointer | |
The thing rust is highlighting is used in a context where it must be 'moved'. "moved" seems to imply the same semantics as C++'s 'std::move'. | |
One fix is to make the receiver accept a &T of whatever T it wants, and fix the call site appropriately. A better fix is to just rewrite the code so that the receiver isn't used at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
#include <stdio.h> | |
// The gateway function | |
int callOnMeGo_cgo(int* in) | |
{ | |
return callOnMeGo(in); | |
} |