@@ -132,31 +132,33 @@ pub struct H5FD_class_t {
132132 pub fc_degree : H5F_close_degree_t ,
133133 #[ cfg( feature = "1.14.0" ) ]
134134 pub terminate : Option < extern "C" fn ( ) -> herr_t > ,
135- pub sb_size : Option < extern "C" fn ( file : * mut H5FD_t ) -> hsize_t > ,
136- pub sb_encode :
137- Option < extern "C" fn ( file : * mut H5FD_t , name : * mut c_char , p : * mut c_uchar ) -> herr_t > ,
138- pub sb_decode :
139- Option < extern "C" fn ( f : * mut H5FD_t , name : * const c_char , p : * const c_uchar ) -> herr_t > ,
135+ pub sb_size : Option < unsafe extern "C" fn ( file : * mut H5FD_t ) -> hsize_t > ,
136+ pub sb_encode : Option <
137+ unsafe extern "C" fn ( file : * mut H5FD_t , name : * mut c_char , p : * mut c_uchar ) -> herr_t ,
138+ > ,
139+ pub sb_decode : Option <
140+ unsafe extern "C" fn ( f : * mut H5FD_t , name : * const c_char , p : * const c_uchar ) -> herr_t ,
141+ > ,
140142 pub fapl_size : size_t ,
141- pub fapl_get : Option < extern "C" fn ( file : * mut H5FD_t ) -> * mut c_void > ,
142- pub fapl_copy : Option < extern "C" fn ( fapl : * const c_void ) -> * mut c_void > ,
143- pub fapl_free : Option < extern "C" fn ( fapl : * mut c_void ) -> herr_t > ,
143+ pub fapl_get : Option < unsafe extern "C" fn ( file : * mut H5FD_t ) -> * mut c_void > ,
144+ pub fapl_copy : Option < unsafe extern "C" fn ( fapl : * const c_void ) -> * mut c_void > ,
145+ pub fapl_free : Option < unsafe extern "C" fn ( fapl : * mut c_void ) -> herr_t > ,
144146 pub dxpl_size : size_t ,
145- pub dxpl_copy : Option < extern "C" fn ( dxpl : * const c_void ) -> * mut c_void > ,
146- pub dxpl_free : Option < extern "C" fn ( dxpl : * mut c_void ) -> herr_t > ,
147+ pub dxpl_copy : Option < unsafe extern "C" fn ( dxpl : * const c_void ) -> * mut c_void > ,
148+ pub dxpl_free : Option < unsafe extern "C" fn ( dxpl : * mut c_void ) -> herr_t > ,
147149 pub open : Option <
148- extern "C" fn (
150+ unsafe extern "C" fn (
149151 name : * const c_char ,
150152 flags : c_uint ,
151153 fapl : hid_t ,
152154 maxaddr : haddr_t ,
153155 ) -> * mut H5FD_t ,
154156 > ,
155- pub close : Option < extern "C" fn ( file : * mut H5FD_t ) -> herr_t > ,
156- pub cmp : Option < extern "C" fn ( f1 : * const H5FD_t , f2 : * const H5FD_t ) -> c_int > ,
157- pub query : Option < extern "C" fn ( f1 : * const H5FD_t , flags : * mut c_ulong ) -> herr_t > ,
157+ pub close : Option < unsafe extern "C" fn ( file : * mut H5FD_t ) -> herr_t > ,
158+ pub cmp : Option < unsafe extern "C" fn ( f1 : * const H5FD_t , f2 : * const H5FD_t ) -> c_int > ,
159+ pub query : Option < unsafe extern "C" fn ( f1 : * const H5FD_t , flags : * mut c_ulong ) -> herr_t > ,
158160 pub get_type_map :
159- Option < extern "C" fn ( file : * const H5FD_t , type_map : * mut H5FD_mem_t ) -> herr_t > ,
161+ Option < unsafe extern "C" fn ( file : * const H5FD_t , type_map : * mut H5FD_mem_t ) -> herr_t > ,
160162 pub alloc : Option <
161163 extern "C" fn (
162164 file : * mut H5FD_t ,
@@ -174,10 +176,10 @@ pub struct H5FD_class_t {
174176 size : hsize_t ,
175177 ) -> herr_t ,
176178 > ,
177- pub get_eoa : Option < extern "C" fn ( file : * const H5FD_t , type_ : H5FD_mem_t ) -> haddr_t > ,
179+ pub get_eoa : Option < unsafe extern "C" fn ( file : * const H5FD_t , type_ : H5FD_mem_t ) -> haddr_t > ,
178180 pub set_eoa :
179- Option < extern "C" fn ( file : * mut H5FD_t , type_ : H5FD_mem_t , addr : haddr_t ) -> herr_t > ,
180- pub get_eof : Option < extern "C" fn ( file : * const H5FD_t ) -> haddr_t > ,
181+ Option < unsafe extern "C" fn ( file : * mut H5FD_t , type_ : H5FD_mem_t , addr : haddr_t ) -> herr_t > ,
182+ pub get_eof : Option < unsafe extern "C" fn ( file : * const H5FD_t ) -> haddr_t > ,
181183 pub get_handle : Option <
182184 extern "C" fn ( file : * mut H5FD_t , fapl : hid_t , file_handle : * mut * mut c_void ) -> herr_t ,
183185 > ,
@@ -201,9 +203,10 @@ pub struct H5FD_class_t {
201203 buffer : * const c_void ,
202204 ) -> herr_t ,
203205 > ,
204- pub flush : Option < extern "C" fn ( file : * mut H5FD_t , dxpl_id : hid_t , closing : c_uint ) -> herr_t > ,
206+ pub flush :
207+ Option < unsafe extern "C" fn ( file : * mut H5FD_t , dxpl_id : hid_t , closing : c_uint ) -> herr_t > ,
205208 pub truncate :
206- Option < extern "C" fn ( file : * mut H5FD_t , dxpl_id : hid_t , closing : hbool_t ) -> herr_t > ,
209+ Option < unsafe extern "C" fn ( file : * mut H5FD_t , dxpl_id : hid_t , closing : hbool_t ) -> herr_t > ,
207210 pub lock : Option <
208211 extern "C" fn (
209212 file : * mut H5FD_t ,
@@ -213,9 +216,9 @@ pub struct H5FD_class_t {
213216 ) -> herr_t ,
214217 > ,
215218 pub unlock :
216- Option < extern "C" fn ( file : * mut H5FD_t , oid : * mut c_uchar , last : hbool_t ) -> herr_t > ,
219+ Option < unsafe extern "C" fn ( file : * mut H5FD_t , oid : * mut c_uchar , last : hbool_t ) -> herr_t > ,
217220 #[ cfg( feature = "1.14.0" ) ]
218- pub del : Option < extern "C" fn ( name : * const c_char , fapl : hid_t ) -> herr_t > ,
221+ pub del : Option < unsafe extern "C" fn ( name : * const c_char , fapl : hid_t ) -> herr_t > ,
219222 #[ cfg( feature = "1.14.0" ) ]
220223 pub ctl : Option <
221224 extern "C" fn (
@@ -316,8 +319,8 @@ pub struct H5FD_file_image_callbacks_t {
316319 udata : * mut c_void ,
317320 ) -> herr_t ,
318321 > ,
319- pub udata_copy : Option < extern "C" fn ( udata : * mut c_void ) -> * mut c_void > ,
320- pub udata_free : Option < extern "C" fn ( udata : * mut c_void ) -> herr_t > ,
322+ pub udata_copy : Option < unsafe extern "C" fn ( udata : * mut c_void ) -> * mut c_void > ,
323+ pub udata_free : Option < unsafe extern "C" fn ( udata : * mut c_void ) -> herr_t > ,
321324 pub udata : * mut c_void ,
322325}
323326
0 commit comments