File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1154,12 +1154,13 @@ impl<'a> fmt::Debug for SwParams<'a> {
11541154const STATUS_SIZE : usize = 152 ;
11551155
11561156/// [snd_pcm_status_t](http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___status.html) wrapper
1157- pub struct Status ( [ u8 ; STATUS_SIZE ] ) ;
1157+ #[ derive( Debug ) ]
1158+ pub struct Status ( [ u64 ; ( STATUS_SIZE +7 ) /8 ] ) ;
11581159
11591160impl Status {
11601161 fn new ( ) -> Status {
11611162 assert ! ( unsafe { alsa:: snd_pcm_status_sizeof( ) } as usize <= STATUS_SIZE ) ;
1162- Status ( [ 0 ; STATUS_SIZE ] )
1163+ Status ( [ 0 ; ( STATUS_SIZE + 7 ) / 8 ] )
11631164 }
11641165
11651166 fn ptr ( & self ) -> * mut alsa:: snd_pcm_status_t { self . 0 . as_ptr ( ) as * const _ as * mut alsa:: snd_pcm_status_t }
@@ -1218,8 +1219,9 @@ impl StatusBuilder {
12181219 self
12191220 }
12201221
1221- pub fn build ( self , pcm : & PCM ) -> Result < Status > {
1222- acheck ! ( snd_pcm_status( pcm. 0 , self . 0 . ptr( ) ) ) . map ( |_| self . 0 )
1222+ pub fn build ( mut self , pcm : & PCM ) -> Result < Status > {
1223+ let p = self . 0 . 0 . as_mut_ptr ( ) as * mut alsa:: snd_pcm_status_t ;
1224+ acheck ! ( snd_pcm_status( pcm. 0 , p) ) . map ( |_| self . 0 )
12231225 }
12241226}
12251227
You can’t perform that action at this time.
0 commit comments