Commit dd144d81 authored by Monty's avatar Monty

Erikd: take care that added comments with detailed explanations are

actually correct.  The default callbacks in vorbisfile.h are not an
attempt to preserve ABI, they're due to peculiarities of Windows
linking strategies.


svn path=/trunk/vorbis/; revision=13643
parent 554be769
......@@ -53,18 +53,14 @@ static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){
return fseek(f,off,whence);
}
/* These structs below (OV_CALLBACKS_DEFAULT etc)are defined here as static
* data. That means that every file which includes this header will get its
* own copy of these structs whether it uses them or not.
*
* It would be *much* better to move these the vorbisfile.c, make them
* publicly available and then define them here as externs so that
* only one copy of them (the one in the library's vorbisfile.c) is ever
* created.
*
* Unfortunately this cannot be done at the moment because doing so would
* break the libvorbisfile ABI. A good time to do that would be at some
* other time when the ABI is being broken for some other reason. */
/* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as
* static data. That means that every file which includes this header
* will get its own copy of these structs whether it uses them or
* not. This is essential on platforms such as Windows on which
* several different versions of stdio support may be linked to by
* different DLLs, and we need to be certain we know which one we're
* using (the same one as the main application).
*/
static ov_callbacks OV_CALLBACKS_DEFAULT = {
(size_t (*)(void *, size_t, size_t, void *)) fread,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment