[waffle] [PATCH 02/17] include: Deprecate waffle_attrib_list funcs

Chad Versace chad.versace at intel.com
Sun Jan 4 14:02:55 PST 2015


It was a mistake when I decided to make Waffle's attribute lists 32-bit.
Instead, the lists should have had type intptr_t[] to allow pointer
input-output.  To correct that original mistake, I will soon introduce
some new public functions that have `intptr_t attrib_list[]` parameters.

I'm deprecating the waffle_attrib_list functionss because I don't want
to maintain two variants (int32_t and intptr_t) of each function. They
offer little utility to users, so I see little benefit in trying
maintain both variants.

Signed-off-by: Chad Versace <chad.versace at intel.com>
---
 include/waffle/waffle.h      |  8 ++++----
 man/waffle_attrib_list.3.xml | 14 ++++++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
index afec630..c242910 100644
--- a/include/waffle/waffle.h
+++ b/include/waffle/waffle.h
@@ -322,23 +322,23 @@ union waffle_native_window {
 // waffle_attrib_list
 // ---------------------------------------------------------------------------
 
-int32_t
+WAFFLE_DEPRECATED_1_06 int32_t
 waffle_attrib_list_length(const int32_t attrib_list[]);
 
-bool
+WAFFLE_DEPRECATED_1_06 bool
 waffle_attrib_list_get(
         const int32_t attrib_list[],
         int32_t key,
         int32_t *value);
 
-bool
+WAFFLE_DEPRECATED_1_06 bool
 waffle_attrib_list_get_with_default(
         const int32_t attrib_list[],
         int32_t key,
         int32_t *value,
         int32_t default_value);
 
-bool
+WAFFLE_DEPRECATED_1_06 bool
 waffle_attrib_list_update(
         int32_t *attrib_list,
         int32_t key,
diff --git a/man/waffle_attrib_list.3.xml b/man/waffle_attrib_list.3.xml
index 9b390ba..277fe26 100644
--- a/man/waffle_attrib_list.3.xml
+++ b/man/waffle_attrib_list.3.xml
@@ -44,19 +44,19 @@
       <funcsynopsisinfo>#include <waffle.h></funcsynopsisinfo>
 
       <funcprototype>
-        <funcdef>bool <function>waffle_attrib_list_length</function></funcdef>
+        <funcdef>DEPRECATED bool <function>waffle_attrib_list_length</function></funcdef>
         <paramdef>const int32_t <parameter>attrib_list</parameter>[]</paramdef>
       </funcprototype>
 
       <funcprototype>
-        <funcdef>bool <function>waffle_attrib_list_get</function></funcdef>
+        <funcdef>DEPRECATED bool <function>waffle_attrib_list_get</function></funcdef>
         <paramdef>const int32_t <parameter>attrib_list</parameter>[]</paramdef>
         <paramdef>int32_t <parameter>key</parameter></paramdef>
         <paramdef>int32_t *<parameter>value</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
-        <funcdef>bool <function>waffle_attrib_list_get_with_default</function></funcdef>
+        <funcdef>DEPRECATED bool <function>waffle_attrib_list_get_with_default</function></funcdef>
         <paramdef>const int32_t <parameter>attrib_list</parameter>[]</paramdef>
         <paramdef>int32_t <parameter>key</parameter></paramdef>
         <paramdef>int32_t *<parameter>value</parameter></paramdef>
@@ -64,13 +64,19 @@
       </funcprototype>
 
       <funcprototype>
-        <funcdef>bool <function>waffle_attrib_list_update</function></funcdef>
+        <funcdef>DEPRECATED bool <function>waffle_attrib_list_update</function></funcdef>
         <paramdef>int32_t <parameter>attrib_list</parameter>[]</paramdef>
         <paramdef>int32_t <parameter>key</parameter></paramdef>
         <paramdef>int32_t *<parameter>value</parameter></paramdef>
       </funcprototype>
 
     </funcsynopsis>
+
+    <refsect2>
+      <title>Deprecation</title>
+      <para>All functions above are deprecated in Waffle 1.6 and later.</para>
+    </refsect2>
+
   </refsynopsisdiv>
 
   <refsect1>
-- 
2.2.0



More information about the waffle mailing list