[speex-dev] hmm, howabout a typedef instead of void *

Christian Buchner Christian.Buchner1 at epost.de
Fri Jun 6 02:09:22 PDT 2003



Hey,

can we make the pointers to the encoder and decoder state variables
somewhat more strongly typed? ;) I made a mistake where I basically
wrote

 speex_decode(&st, ...

instead of

 speex_decode(st, ...

That is why my decoder blew up all the time. The compiler wouldn't
complain. I suspected a corrupt speex bitstream, a corrupted stack
frame, etc... So much time wasted because of an ampersand character.

If we had a datatype other than void* for these things, these goofs
couldn't happen so easily ;) void* is evil.

This could be implemented in future codec versions without breaking
code compatibility (assuming no one is willfully casting his speex
handles to void*).

Oh, I got my domain and hosting for www.openacm.org - The site should
be up in 2-3 days.

Christian

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list