Skip to content

Commit

Permalink
Declare inbuffer const
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Aug 13, 2015
1 parent 6421f91 commit 5213272
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jdatasrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
3 changes: 2 additions & 1 deletion jpeglib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5213272

Please sign in to comment.