<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>242409</bug_id>
          
          <creation_ts>2022-07-06 12:54:41 -0700</creation_ts>
          <short_desc>[WPE][GTK] Decide on conditional name for new API versions</short_desc>
          <delta_ts>2022-07-14 15:11:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>210100</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1881051</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-07-06 12:54:41 -0700</bug_when>
    <thetext>I&apos;m trying to decide on a single conditional I can use to distinguish between new API and old API. Example usage:

#if PLATFORM(GTK) &amp;&amp; WEBKITGTK_API_VERSION &gt;= 5.0 || PLATFORM(WPE) &amp;&amp; WPE_API_VERSION &gt;= 2.0
// do new thing
#else
// do old thing
#endif

Except that&apos;s too verbose, so we should have something much shorter, ideally with no &amp;&amp; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881054</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-07-06 12:57:00 -0700</bug_when>
    <thetext>Another option, which works only if we drop older WPE API versions (see bug #242407):

#if WEBKITGTK_API_VERSION &gt;= 5.0 || PLATFORM(WPE)
#if PLATFORM(WPE) WEBKITGTK_API_VERSION &gt;= 5.0

which is slightly longer, but not too long.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1883127</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-07-13 10:01:04 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; #if ENABLE(2022_GLIB_API)

If nobody has a preference, I&apos;ll probably try this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>