[vorbis-dev] const char * question for vorbis API
Akos Maroy
darkeye at tyrell.hu
Sun Feb 9 05:05:06 PST 2003
Hi,
I just have a small question for the vorbis API, regarding the use of
const char pointers. For example, in the following function:
extern void vorbis_comment_add_tag(vorbis_comment *vc,
char *tag, char *contents);
which is in vorbis/codec.h, why are the tag and contents parameters not
represented as const char pointers? are they expected to be changed by
this function? (I suppose not.)
The way I found the problem is when I write in the darkice source:
vorbis_comment_add_tag( &vorbisComment, "TITLE", sink->getName());
I get a compiler warning of an implicit cast fron const char * to char
*, as sink->getName() returns a const char *, for obvious reasons. And
really, these string are not changed by the voribs API, are they? Thus
why aren't they const char pointers?
<p>Akos
--- >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 'vorbis-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 Vorbis-dev
mailing list