@@ -289,14 +289,14 @@ pub struct SrValueSlice {
289
289
values : * mut sr_val_t ,
290
290
291
291
/// Length of this slice.
292
- len : u64 ,
292
+ len : usize ,
293
293
294
294
/// Owned flag.
295
295
owned : bool ,
296
296
}
297
297
298
298
impl SrValueSlice {
299
- pub fn new ( capacity : u64 , owned : bool ) -> Self {
299
+ pub fn new ( capacity : usize , owned : bool ) -> Self {
300
300
Self {
301
301
values : unsafe {
302
302
libc:: malloc ( mem:: size_of :: < sr_val_t > ( ) * capacity as usize ) as * mut sr_val_t
@@ -306,7 +306,7 @@ impl SrValueSlice {
306
306
}
307
307
}
308
308
309
- pub fn from ( values : * mut sr_val_t , len : u64 , owned : bool ) -> Self {
309
+ pub fn from ( values : * mut sr_val_t , len : usize , owned : bool ) -> Self {
310
310
Self {
311
311
values : values,
312
312
len : len,
@@ -328,7 +328,7 @@ impl SrValueSlice {
328
328
self . values
329
329
}
330
330
331
- pub fn len ( & self ) -> u64 {
331
+ pub fn len ( & self ) -> usize {
332
332
self . len
333
333
}
334
334
@@ -569,7 +569,7 @@ impl SrSession {
569
569
) -> Result < SrValueSlice , i32 > {
570
570
let xpath = str_to_cstring ( xpath) ?;
571
571
let timeout_ms = timeout. map_or ( 0 , |timeout| timeout. as_millis ( ) as u32 ) ;
572
- let mut values_count: u64 = 0 ;
572
+ let mut values_count: usize = 0 ;
573
573
let mut values: * mut sr_val_t = unsafe { zeroed :: < * mut sr_val_t > ( ) } ;
574
574
575
575
let rc = unsafe {
@@ -678,7 +678,7 @@ impl SrSession {
678
678
notif_type : sr_ev_notif_type_t ,
679
679
path : * const c_char ,
680
680
values : * const sr_val_t ,
681
- values_cnt : size_t ,
681
+ values_cnt : usize ,
682
682
timestamp : * mut timespec ,
683
683
private_data : * mut c_void ,
684
684
) where
@@ -749,11 +749,11 @@ impl SrSession {
749
749
sub_id : u32 ,
750
750
op_path : * const c_char ,
751
751
input : * const sr_val_t ,
752
- input_cnt : size_t ,
752
+ input_cnt : usize ,
753
753
event : sr_event_t ,
754
754
request_id : u32 ,
755
755
output : * mut * mut sr_val_t ,
756
- output_cnt : * mut u64 ,
756
+ output_cnt : * mut usize ,
757
757
private_data : * mut c_void ,
758
758
) -> i32
759
759
where
@@ -960,13 +960,13 @@ impl SrSession {
960
960
) -> Result < SrValueSlice , i32 > {
961
961
let path = str_to_cstring ( path) ?;
962
962
let ( input, input_cnt) = match input {
963
- Some ( mut input) => ( input. as_mut_ptr ( ) , input. len ( ) as u64 ) ,
963
+ Some ( mut input) => ( input. as_mut_ptr ( ) , input. len ( ) as usize ) ,
964
964
None => ( std:: ptr:: null_mut ( ) , 0 ) ,
965
965
} ;
966
966
let timeout = timeout. map_or ( 0 , |timeout| timeout. as_millis ( ) as u32 ) ;
967
967
968
968
let mut output: * mut sr_val_t = unsafe { zeroed :: < * mut sr_val_t > ( ) } ;
969
- let mut output_count: u64 = 0 ;
969
+ let mut output_count: usize = 0 ;
970
970
971
971
let rc = unsafe {
972
972
sr_rpc_send (
0 commit comments