]> granicus.if.org Git - libjpeg-turbo/commitdiff
Declare inbuffer const
authorKornel Lesiński <kornel@geekhood.net>
Thu, 8 Jan 2015 00:53:31 +0000 (00:53 +0000)
committerKornel Lesiński <kornel@geekhood.net>
Thu, 13 Aug 2015 21:44:51 +0000 (22:44 +0100)
jdatasrc.c
jpeglib.h

index bf70422ba4011a0c0b0c489d358493cfc2b033a3..22a09c8728f9889a23299cb5438ce9d5cad6f090 100644 (file)
@@ -254,7 +254,7 @@ jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
 
 GLOBAL(void)
 jpeg_mem_src (j_decompress_ptr cinfo,
-              unsigned char * inbuffer, unsigned long insize)
+              const unsigned char * inbuffer, unsigned long insize)
 {
   struct jpeg_source_mgr * src;
 
@@ -278,6 +278,6 @@ jpeg_mem_src (j_decompress_ptr cinfo,
   src->resync_to_restart = jpeg_resync_to_restart; /* use default method */
   src->term_source = term_source;
   src->bytes_in_buffer = (size_t) insize;
-  src->next_input_byte = (JOCTET *) inbuffer;
+  src->next_input_byte = (const JOCTET *) inbuffer;
 }
 #endif
index a41bec44c68318b6690cebc9c94a28acc51607cc..aec9180e9f129d60ea40168dc3c0b5556a6180aa 100644 (file)
--- a/jpeglib.h
+++ b/jpeglib.h
@@ -919,7 +919,8 @@ EXTERN(void) jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile);
 /* Data source and destination managers: memory buffers. */
 EXTERN(void) jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
                             unsigned long * outsize);
-EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * inbuffer,
+EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo,
+                           const unsigned char * inbuffer,
                            unsigned long insize);
 #endif