On Wednesday, 23 May 2007 at 22:46, Giel van Schijndel wrote: > Christian Ohm schreef: > > Some g++ fixes again. "new" is a reserved keyword, a few casts, and I've > > moved OggVorbisDecoderState into oggvorbis.h, there was a linker error > > when it was typedeffed to void in some cases. Don't know why it was done > > that way, still works for me now. I've removed an #ifdef WZ_NOOGG, but > > ./configure --disable-ogg was broken before anyway. > > > That double typedef was done to encapsulate the OggVorbis decoding code, > compare it to a C++ pimpl if you wish. The linker error is caused by > C++'s function overloading, so the correct fix is not to expose details, > but disabling function overloading for that function: extern "C".
Hm, in C this looks quite inelegant to me; just because the struct is exposed to the outside doesn't mean you have to access it directly. In C++ the whole class is exposed as well, you just have the access control via private (unless you just use pointers to the class; I've thought about that as well but was too lazy to try to rewrite the code that way). -- Some books are to be tasted, others to be swallowed, and some few to be chewed and digested. -- Francis Bacon [As anyone who has ever owned a puppy already knows. Ed.] _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev