@@ -5,6 +5,8 @@ use std::ffi::{CString, CStr};
5
5
use std:: error;
6
6
use std:: iter:: FromIterator ;
7
7
8
+ use std:: os:: raw:: c_char;
9
+
8
10
use redisql_error as err;
9
11
10
12
pub use community_statement;
@@ -197,13 +199,13 @@ impl<'a> FromIterator<Cursor<'a>> for Cursor<'a> {
197
199
for cursor in cursors {
198
200
match cursor {
199
201
Cursor :: OKCursor { to_replicate } => {
200
- to_replicate_acc & = to_replicate;
202
+ to_replicate_acc | = to_replicate;
201
203
}
202
204
Cursor :: DONECursor { to_replicate, .. } => {
203
- to_replicate_acc & = to_replicate;
205
+ to_replicate_acc | = to_replicate;
204
206
}
205
207
Cursor :: RowsCursor { to_replicate, .. } => {
206
- to_replicate_acc & = to_replicate;
208
+ to_replicate_acc | = to_replicate;
207
209
result = Some ( cursor) ;
208
210
}
209
211
}
@@ -282,14 +284,14 @@ impl<'a> Iterator for Cursor<'a> {
282
284
}
283
285
EntityType :: Text => {
284
286
let value = unsafe {
285
- CStr :: from_ptr ( ffi:: sqlite3_column_text ( stmt. get_raw_stmt ( ) , i) as * const i8 ) . to_string_lossy ( ) . into_owned ( )
287
+ CStr :: from_ptr ( ffi:: sqlite3_column_text ( stmt. get_raw_stmt ( ) , i) as * const c_char ) . to_string_lossy ( ) . into_owned ( )
286
288
} ;
287
289
debug ! ( "Got text: {:?}" , value) ;
288
290
Entity :: Text { text : value }
289
291
}
290
292
EntityType :: Blob => {
291
293
let value = unsafe {
292
- CStr :: from_ptr ( ffi:: sqlite3_column_blob ( stmt. get_raw_stmt ( ) , i) as * const i8 ) . to_string_lossy ( ) . into_owned ( )
294
+ CStr :: from_ptr ( ffi:: sqlite3_column_blob ( stmt. get_raw_stmt ( ) , i) as * const c_char ) . to_string_lossy ( ) . into_owned ( )
293
295
} ;
294
296
debug ! ( "Got blob: {:?}" , value) ;
295
297
Entity :: Blob { blob : value }
0 commit comments