From e7f0c6d6ad995bf56b77b55726177e313ad8680f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 10 Oct 2017 07:41:51 +0100 Subject: [PATCH] Suppress Ruby std::wstring, std::string, std::basic_string warnings Lib/std/std_basic_string.i:235: Warning 365: operator+= ignored Lib/std/std_wstring.i:8: Warning 378: operator!= ignored Correct 801 warning suppressions (which are normally suppressed in the test-suite): Lib/std/std_wstring.i:13: Warning 801: Wrong class name (corrected to `Wstring') Similarly for std::string when including basic_string.i class. --- Lib/ruby/std_basic_string.i | 3 +++ Lib/ruby/std_string.i | 4 +--- Lib/ruby/std_wstring.i | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Lib/ruby/std_basic_string.i b/Lib/ruby/std_basic_string.i index a51333793..4435b220d 100644 --- a/Lib/ruby/std_basic_string.i +++ b/Lib/ruby/std_basic_string.i @@ -47,6 +47,9 @@ SWIGINTERNINLINE VALUE } } +%ignore std::basic_string::operator!=; +%ignore std::basic_string::operator+=; + %include %typemaps_asptrfromn(%checkcode(STRING), std::basic_string); diff --git a/Lib/ruby/std_string.i b/Lib/ruby/std_string.i index cac4324f0..f9ecd8e8a 100644 --- a/Lib/ruby/std_string.i +++ b/Lib/ruby/std_string.i @@ -1,7 +1,5 @@ -%warnfilter(801) std::string; // wrong class name -%warnfilter(378) std::basic_string::operator!=; - +%warnfilter(SWIGWARN_RUBY_WRONG_NAME) std::basic_string; AUTODOC(substr, "Return a portion of the String"); diff --git a/Lib/ruby/std_wstring.i b/Lib/ruby/std_wstring.i index f2487077b..2b633438e 100644 --- a/Lib/ruby/std_wstring.i +++ b/Lib/ruby/std_wstring.i @@ -45,6 +45,8 @@ static rb_encoding *swig_ruby_internal_encoding; swig_ruby_internal_encoding = rb_enc_find( SWIG_RUBY_INTERNAL_ENCODING ); } +%warnfilter(SWIGWARN_RUBY_WRONG_NAME) std::basic_string; + %include %include