Bug 242409
| Summary: | [WPE][GTK] Decide on conditional name for new API versions | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Bug Depends on: | |||
| Bug Blocks: | 210100 | ||
Michael Catanzaro
I'm trying to decide on a single conditional I can use to distinguish between new API and old API. Example usage:
#if PLATFORM(GTK) && WEBKITGTK_API_VERSION >= 5.0 || PLATFORM(WPE) && WPE_API_VERSION >= 2.0
// do new thing
#else
// do old thing
#endif
Except that's too verbose, so we should have something much shorter, ideally with no && or || at all.
#if ENABLE(NEW_GLIB_APIS)
#if ENABLE(MODERN_WPE_GTK_API)
#if ENABLE(2022_API_VERSION)
#if ENABLE(2022_GLIB_API)
#if ENABLE(SOME_CODEWORD)
Ideas and/or votes welcome. This is a bikeshedding bug report.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
Another option, which works only if we drop older WPE API versions (see bug #242407):
#if WEBKITGTK_API_VERSION >= 5.0 || PLATFORM(WPE)
#if PLATFORM(WPE) WEBKITGTK_API_VERSION >= 5.0
which is slightly longer, but not too long.
Michael Catanzaro
(In reply to Michael Catanzaro from comment #0)
> #if ENABLE(2022_GLIB_API)
If nobody has a preference, I'll probably try this.