9
9
use std:: ffi:: CStr ;
10
10
use std:: ffi:: CString ;
11
11
use std:: ffi:: NulError ;
12
+ use std:: os:: raw:: c_void as std_c_void;
12
13
use std:: ptr;
13
14
use std:: str:: Utf8Error ;
14
15
use std:: sync:: Arc ;
@@ -606,7 +607,7 @@ impl<'a> OperationDescription<'a> {
606
607
unsafe {
607
608
tf:: TF_SetAttrString ( self . inner ,
608
609
c_attr_name. as_ptr ( ) ,
609
- c_value. as_ptr ( ) as * const c_void ,
610
+ c_value. as_ptr ( ) as * const std_c_void ,
610
611
c_value. len ( ) as size_t ) ;
611
612
}
612
613
Ok ( ( ) )
@@ -625,7 +626,7 @@ impl<'a> OperationDescription<'a> {
625
626
unsafe {
626
627
tf:: TF_SetAttrStringList ( self . inner ,
627
628
c_attr_name. as_ptr ( ) ,
628
- ptrs. as_ptr ( ) ,
629
+ ptrs. as_ptr ( ) as * const * const std_c_void ,
629
630
lens. as_ptr ( ) ,
630
631
ptrs. len ( ) as c_int ) ;
631
632
}
@@ -821,7 +822,7 @@ impl<'a> OperationDescription<'a> {
821
822
unsafe {
822
823
tf:: TF_SetAttrTensorShapeProto ( self . inner ,
823
824
c_attr_name. as_ptr ( ) ,
824
- value. as_ptr ( ) as * const c_void ,
825
+ value. as_ptr ( ) as * const std_c_void ,
825
826
value. len ( ) as size_t ,
826
827
status. inner ( ) ) ;
827
828
}
@@ -843,7 +844,7 @@ impl<'a> OperationDescription<'a> {
843
844
unsafe {
844
845
tf:: TF_SetAttrTensorShapeProtoList ( self . inner ,
845
846
c_attr_name. as_ptr ( ) ,
846
- ptrs. as_ptr ( ) ,
847
+ ptrs. as_ptr ( ) as * const * const std_c_void ,
847
848
lens. as_ptr ( ) ,
848
849
ptrs. len ( ) as c_int ,
849
850
status. inner ( ) ) ;
@@ -893,7 +894,7 @@ impl<'a> OperationDescription<'a> {
893
894
unsafe {
894
895
tf:: TF_SetAttrValueProto ( self . inner ,
895
896
c_attr_name. as_ptr ( ) ,
896
- value. as_ptr ( ) as * const c_void ,
897
+ value. as_ptr ( ) as * const std_c_void ,
897
898
// Allow trivial_numeric_casts because usize is not
898
899
// necessarily size_t.
899
900
value. len ( ) as size_t ,
0 commit comments