RESOLVED FIXED Bug 242409
[WPE][GTK] Decide on conditional name for new API versions
https://bugs.webkit.org/show_bug.cgi?id=242409
Summary [WPE][GTK] Decide on conditional name for new API versions
Michael Catanzaro
Reported 2022-07-06 12:54:41 PDT
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
Michael Catanzaro
Comment 1 2022-07-06 12:57:00 PDT
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
Comment 2 2022-07-13 10:01:04 PDT
(In reply to Michael Catanzaro from comment #0) > #if ENABLE(2022_GLIB_API) If nobody has a preference, I'll probably try this.
Note You need to log in before you can comment on or make changes to this bug.