[glibmm] gmmproc: _WRAP_METHOD: Use G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS



commit c570362cfc1f46e85b66093567a3f925741cb1c2
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed Jun 17 18:29:37 2015 +0200

    gmmproc: _WRAP_METHOD: Use G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS
    
    * tools/m4/method.m4: Put G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS around
    deprecated code. In most cases it's then not necessary to undef
    [G|GDK|GTK]_DISABLE_DEPRECATED and define
    [GLIB|GDK]_DISABLE_DEPRECATION_WARNINGS. Bug #750379.

 tools/m4/method.m4 |   47 +++++++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 22 deletions(-)
---
diff --git a/tools/m4/method.m4 b/tools/m4/method.m4
index 3c48b3e..7becc7c 100644
--- a/tools/m4/method.m4
+++ b/tools/m4/method.m4
@@ -1,22 +1,24 @@
-dnl $Id$
-
 dnl
 dnl
 dnl  Code generation sections for making a method.
 dnl
 dnl
 
-
 dnl
 dnl method
-dnl           $1       $2     $3         $4       $5        $6        $7         $8          $9     $10      
 $11       $12         $13       $14         $15               $16        $17              $18        $19     
   $20         $21
-dnl  
_METHOD(cppname,cname,cpprettype,crettype,arglist,cdeclarations,cargs,cinitializations,const,refreturn,errthrow,deprecated,constversion,ifdef,arglist_without_types,out_param,out_param_cpptype,slot_type,slot_name,no_slot_copy,wrap_line)
+dnl           $1       $2     $3         $4       $5        $6        $7         $8
+dnl  _METHOD(cppname,cname,cpprettype,crettype,arglist,cdeclarations,cargs,cinitializations,
+dnl           $9     $10       $11       $12         $13             $14             $15
+dnl          const,refreturn,errthrow,deprecated,constversion,arglist_without_types,ifdef,
+dnl             $16        $17              $18        $19        $20         $21
+dnl          out_param,out_param_cpptype,slot_type,slot_name,no_slot_copy,wrap_line)
 define(`_METHOD',`dnl
 _PUSH(SECTION_CC)
-ifelse(`$12',,,`_DEPRECATE_IFDEF_START
-')dnl
 ifelse(`$15',,,`#ifdef $15'
 )dnl
+ifelse(`$12',,,`_DEPRECATE_IFDEF_START`'dnl The expansion of _DEPRECATE_IFDEF_START ends with a newline
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+')dnl
 $3 __CPPNAME__::$1`'($5)ifelse(`$9',1,` const')
 {
 ifelse(`$13',,dnl
@@ -99,24 +101,27 @@ ifelse(`$3',void,,`  return retvalue;
 ',`  return const_cast<__CPPNAME__*>(this)->$1($14);
 ')dnl
 }
-
-ifelse(`$15',,,`
-#endif // $15
-')dnl
-ifelse(`$12',,,`_DEPRECATE_IFDEF_END
-')dnl
+ifelse(`$12',,,`G_GNUC_END_IGNORE_DEPRECATIONS
+_DEPRECATE_IFDEF_END')`'dnl The expansion of _DEPRECATE_IFDEF_END ends with a newline
+ifelse(`$15',,,`#endif // $15
+')
 _POP()')
 
 dnl
 dnl static method
-dnl                  $1       $2     $3         $4      $5        $6         $7         $8            $9     
 $10         $11       $12     $13        $14         $15      $16          $17       $18
-dnl  
_STATIC_METHOD(cppname,cname,cpprettype,crettype,arglist,cdeclarations,cargs,cinitializations,refreturn,errthrow,deprecated,ifdef,out_param,out_param_type,slot_type,slot_name,no_slot_copy,wrap_line)
+dnl                  $1       $2     $3         $4      $5        $6         $7
+dnl  _STATIC_METHOD(cppname,cname,cpprettype,crettype,arglist,cdeclarations,cargs,
+dnl                        $8            $9      $10         $11    $12     $13
+dnl                 cinitializations,refreturn,errthrow,deprecated,ifdef,out_param,
+dnl                       $14          $15      $16          $17       $18
+dnl                 out_param_type,slot_type,slot_name,no_slot_copy,wrap_line)
 define(`_STATIC_METHOD',`dnl
 _PUSH(SECTION_CC)
-ifelse(`$11',,,`_DEPRECATE_IFDEF_START
-')dnl
 ifelse(`$12',,,`#ifdef $12'
 )dnl
+ifelse(`$11',,,`_DEPRECATE_IFDEF_START`'dnl The expansion of _DEPRECATE_IFDEF_START ends with a newline
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+')dnl
 $3 __CPPNAME__::$1($5)
 {
 ifelse(`$9'`$10',,dnl
@@ -185,10 +190,8 @@ ifelse(`$3',void,,`  return retvalue;
 ')dnl
 ')dnl
 }
-
-ifelse(`$12',,,`
-#endif // $12
-')dnl
-ifelse(`$11',,,`_DEPRECATE_IFDEF_END
+ifelse(`$11',,,`G_GNUC_END_IGNORE_DEPRECATIONS
+_DEPRECATE_IFDEF_END')`'dnl The expansion of _DEPRECATE_IFDEF_END ends with a newline
+ifelse(`$12',,,`#endif // $12
 ')
 _POP()')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]