Erikd: take care that added comments with detailed explanations are
authorMonty <xiphmont@xiph.org>
Tue, 28 Aug 2007 17:45:00 +0000 (17:45 +0000)
committerMonty <xiphmont@xiph.org>
Tue, 28 Aug 2007 17:45:00 +0000 (17:45 +0000)
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

include/vorbis/vorbisfile.h

index 809c632..c9c1af1 100644 (file)
@@ -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,