Commit 905c67ee authored by mle's avatar mle Committed by Jean-Marc Valin
Browse files

Patch : Make speex_bits_read_from and speex_bits_read_whole_bytes const correct

Jean-Marc,

The following patch makes the above two read functions const correct.

Cheers,
Erik
parent 9063dd27
......@@ -77,7 +77,7 @@ void speex_bits_reset(SpeexBits *bits);
void speex_bits_rewind(SpeexBits *bits);
/** Initializes the bit-stream from the data in an area of memory */
void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
void speex_bits_read_from(SpeexBits *bits, const char *bytes, int len);
/** Append bytes to the bit-stream
*
......@@ -85,7 +85,7 @@ void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
* @param bytes pointer to the bytes what will be appended
* @param len Number of bytes of append
*/
void speex_bits_read_whole_bytes(SpeexBits *bits, char *bytes, int len);
void speex_bits_read_whole_bytes(SpeexBits *bits, const char *bytes, int len);
/** Write the content of a bit-stream to an area of memory
*
......
......@@ -106,7 +106,7 @@ EXPORT void speex_bits_rewind(SpeexBits *bits)
bits->overflow=0;
}
EXPORT void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
EXPORT void speex_bits_read_from(SpeexBits *bits, const char *chars, int len)
{
int i;
int nchars = len / BYTES_PER_CHAR;
......@@ -153,7 +153,7 @@ static void speex_bits_flush(SpeexBits *bits)
bits->charPtr=0;
}
EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes)
EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, const char *chars, int nbytes)
{
int i,pos;
int nchars = nbytes/BYTES_PER_CHAR;
......
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