Skip to content

Commit 9136134

Browse files
looooocursoragent
authored andcommitted
Fix GifQuantizeBuffer signature conflict with system giflib
Update bundled giflib quantize.h and quantize.c to match the system giflib signature by adding const qualifiers to input buffer parameters (RedInput, GreenInput, BlueInput). This resolves compilation errors when the bundled quantize.h conflicts with the system gif_lib.h header which declares GifQuantizeBuffer with const input parameters. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3b9d218 commit 9136134

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

giflib/quantize.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ int
6161
GifQuantizeBuffer(unsigned int Width,
6262
unsigned int Height,
6363
int *ColorMapSize,
64-
GifByteType * RedInput,
65-
GifByteType * GreenInput,
66-
GifByteType * BlueInput,
64+
const GifByteType * RedInput,
65+
const GifByteType * GreenInput,
66+
const GifByteType * BlueInput,
6767
GifByteType * OutputBuffer,
6868
GifColorType * OutputColorMap) {
6969

giflib/quantize.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ SPDX-License-Identifier: MIT
1515
Color table quantization
1616
******************************************************************************/
1717
int GifQuantizeBuffer(unsigned int Width, unsigned int Height,
18-
int *ColorMapSize, GifByteType * RedInput,
19-
GifByteType * GreenInput, GifByteType * BlueInput,
18+
int *ColorMapSize, const GifByteType * RedInput,
19+
const GifByteType * GreenInput, const GifByteType * BlueInput,
2020
GifByteType * OutputBuffer,
2121
GifColorType * OutputColorMap);
2222

0 commit comments

Comments
 (0)