disable the RGB API by default#121
Open
dloebl wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the experimental RGB API opt-in (disabled by default) by moving its public declarations out of cgif.h into a dedicated cgif_rgb.h header and guarding compilation/installation via a Meson option, while keeping internal RGB tests/fuzzing building against an RGB-enabled internal library.
Changes:
- Introduce
-Dexperimental_rgbMeson option to control whether RGB code (src/cgif_rgb.c) and header (inc/cgif_rgb.h) are built/installed with the public library. - Move RGB API declarations (types, flags, prototypes) out of
inc/cgif.hinto newinc/cgif_rgb.h, and update callers to include it explicitly. - Adjust tests/fuzz build wiring so RGB tests/fuzzers continue to build against an internal RGB-enabled library even when the public RGB API is disabled.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/rgb_single_color.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_noise.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_noise_animated.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_no_dithering.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_interlaced.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_all_colors.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_256digit.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_256colors.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/rgb_255colors.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| tests/meson.build | Splits indexed vs RGB tests so RGB tests link against the internal RGB-enabled dependency. |
| tests/ealloc_rgb.c | Includes cgif_rgb.h explicitly for RGB API usage in malloc-failure test. |
| src/cgif_rgb.c | Includes cgif_rgb.h for RGB API declarations after moving them out of cgif.h. |
| README.md | Documents RGB API as experimental, in separate header, and disabled by default unless opted in. |
| meson.build | Makes RGB sources/headers conditional on experimental_rgb; adds internal RGB-enabled test library dep. |
| meson_options.txt | Adds experimental_rgb boolean option (default false). |
| inc/cgif.h | Removes RGB API declarations to keep the stable public header RGB-free by default. |
| inc/cgif_rgb.h | Adds new experimental RGB public header containing moved declarations. |
| fuzz/meson.build | Links RGB standalone fuzzer against internal RGB-enabled dependency to keep building when RGB is disabled publicly. |
| fuzz/cgif_rgb_fuzzer.c | Includes cgif_rgb.h explicitly for RGB API types/prototypes. |
| fuzz/cgif_rgb_create_fuzz_seed.c | Includes cgif_rgb.h explicitly for RGB API types/prototypes. |
| examples/cgif_rgb_example.c | Includes cgif_rgb.h explicitly for RGB API usage. |
| examples/cgif_rgb_example_video.c | Includes cgif_rgb.h explicitly for RGB API usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
6
to
8
| #include <cgif.h> | ||
| #include <cgif_rgb.h> | ||
|
|
Comment on lines
6
to
8
| #include <cgif.h> | ||
| #include <cgif_rgb.h> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disable the RGB API by default, as it's not yet ready for production/experimental. This unblocks making releases directly from
mainagain.