include/vorbis/vorbisfile.h : Add comments about a desired change that cannot be...
authorerikd <erikd@xiph.org>
Sun, 26 Aug 2007 00:38:33 +0000 (00:38 +0000)
committererikd <erikd@xiph.org>
Sun, 26 Aug 2007 00:38:33 +0000 (00:38 +0000)
svn path=/trunk/vorbis/; revision=13630

include/vorbis/vorbisfile.h

index 552c80c..809c632 100644 (file)
@@ -53,6 +53,19 @@ 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. */
+
 static ov_callbacks OV_CALLBACKS_DEFAULT = {
   (size_t (*)(void *, size_t, size_t, void *))  fread,
   (int (*)(void *, ogg_int64_t, int))           _ov_header_fseek_wrap,