add macros/names to avoid numeric warning codes. use them in tcl,perl,ruby and python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8274 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
87c038c82c
commit
ed53e75df6
13 changed files with 312 additions and 216 deletions
|
|
@ -38,14 +38,14 @@
|
|||
%rename(__call__) *::operator();
|
||||
|
||||
/* Ignored operators */
|
||||
%ignorewarn("361:operator! ignored") operator!;
|
||||
%ignorewarn("381:operator&& ignored") operator&&;
|
||||
%ignorewarn("382:operator|| ignored") operator||;
|
||||
%ignorewarn("362:operator= ignored") *::operator=;
|
||||
%ignorewarn("383:operator++ ignored") *::operator++;
|
||||
%ignorewarn("384:operator-- ignored") *::operator--;
|
||||
%ignorewarn("386:operator->* ignored") *::operator->*;
|
||||
%ignorewarn("389:operator[] ignored (consider using %extend)") *::operator[];
|
||||
%ignoreoperator(LNOT) operator!;
|
||||
%ignoreoperator(LAND) operator&&;
|
||||
%ignoreoperator(LOR) operator||;
|
||||
%ignoreoperator(EQ) *::operator=;
|
||||
%ignoreoperator(PLUSPLUS) *::operator++;
|
||||
%ignoreoperator(MINUSMINUS) *::operator--;
|
||||
%ignoreoperator(ARROWSTAR) *::operator->*;
|
||||
%ignoreoperator(INDEX) *::operator[];
|
||||
|
||||
/*
|
||||
Inplace operator declarations.
|
||||
|
|
@ -107,17 +107,18 @@
|
|||
|
||||
/* C++ operator aliases */
|
||||
|
||||
%ignorewarn("381:operator and ignored") operator and; // `and' `&&'
|
||||
%ignorewarn("361:operator not ignored") operator not; // `not' `!'
|
||||
%ignorewarn("382:operator or ignored") operator or; // `or' `||'
|
||||
%pyinplaceoper(__iand__, *::operator and_eq); // `and_eq' `&='
|
||||
%pybinoperator(__and__, *::operator bitand) // `bitand' `&'
|
||||
%pybinoperator(__or__, *::operator bitor); // `bitor' `|'
|
||||
%rename(__invert__) *::operator compl; // `compl' `~'
|
||||
%pybinoperator(__ne__, *::operator not_eq); // `not_eq' `!='
|
||||
%pyinplaceoper(__ior__, *::operator or_eq); // `or_eq' `|='
|
||||
%pybinoperator(__xor__, *::operator xor); // `xor' `^'
|
||||
%pyinplaceoper(__ixor__, *::operator xor_eq); // `xor_eq' `^='
|
||||
%ignoreoperator(LAND) operator and; // `and' `&&'
|
||||
%ignoreoperator(LNOT) operator not; // `not' `!'
|
||||
%ignoreoperator(LOR) operator or; // `or' `||'
|
||||
|
||||
%pyinplaceoper(__iand__, *::operator and_eq); // `and_eq' `&='
|
||||
%pybinoperator(__and__, *::operator bitand) // `bitand' `&'
|
||||
%pybinoperator(__or__, *::operator bitor); // `bitor' `|'
|
||||
%rename(__invert__) *::operator compl; // `compl' `~'
|
||||
%pybinoperator(__ne__, *::operator not_eq); // `not_eq' `!='
|
||||
%pyinplaceoper(__ior__, *::operator or_eq); // `or_eq' `|='
|
||||
%pybinoperator(__xor__, *::operator xor); // `xor' `^'
|
||||
%pyinplaceoper(__ixor__, *::operator xor_eq); // `xor_eq' `^='
|
||||
|
||||
|
||||
/* Finally, in python we need to mark the binary operations to fail as
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
Warnings for Python keywords, built-in names and bad names.
|
||||
*/
|
||||
|
||||
#define PYTHONKW(x) %namewarn("314:" `x` " is a python keyword, symbol will be renamed as '_" `x`"'", rename="_%s") `x`
|
||||
#define PYTHONBN(x) %namewarn("321:" `x` " conflicts with a built-in name in python") "::"`x`
|
||||
#define PYTHONKW(x) %keywordwarn(`x` " is a python keyword, symbol will be renamed as '_" `x`"'", rename="_%s") `x`
|
||||
#define PYTHONBN(x) %builtinwarn(`x` " conflicts with a built-in name in python") "::"`x`
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace swig {
|
|||
}
|
||||
}
|
||||
|
||||
%warnfilter(389) std::carray::operator[];
|
||||
%warnfilter(SWIGWARN_IGNORE_OPERATOR_INDEX) std::carray::operator[];
|
||||
|
||||
%extend std::carray {
|
||||
%fragment(SWIG_Traits_frag(std::carray<_Type, _Size >), "header",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue