Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/speexdsp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Castro Lopo <mle+la@mega-nerd.com>2008-11-08 01:49:11 +0300
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-11-09 18:59:55 +0300
commit905c67eebb46e83135a515b615549b55bdbc166a (patch)
tree608447273a9a0539942107e9dc8d89f495a70817
parent9063dd27f45382ede3bfbdad19e557f57423d2df (diff)
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
-rw-r--r--include/speex/speex_bits.h4
-rw-r--r--libspeex/bits.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/speex/speex_bits.h b/include/speex/speex_bits.h
index a26fb4c..234ec53 100644
--- a/include/speex/speex_bits.h
+++ b/include/speex/speex_bits.h
@@ -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
*
diff --git a/libspeex/bits.c b/libspeex/bits.c
index 8e5e6b6..95adbfd 100644
--- a/libspeex/bits.c
+++ b/libspeex/bits.c
@@ -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;