summaryrefslogtreecommitdiff
path: root/Lib/swigrun.swg
diff options
context:
space:
mode:
authorMichel Zou <xantares09@hotmail.com>2013-02-25 09:53:45 +0100
committerMichel Zou <xantares09@hotmail.com>2013-02-25 09:53:45 +0100
commit7acf6b5fef128de8e9ded023870006b10b4a39a8 (patch)
treee55db7c44a4564e084dbb6f2033490109c3ec057 /Lib/swigrun.swg
parent8e340c158c41ee053fd2be2f30b47e9a060515c9 (diff)
downloadswig-7acf6b5fef128de8e9ded023870006b10b4a39a8.tar.gz
Revert "Fixed #1300 clang warning in SWIG_Python_ConvertPtrAndOwn."
This reverts commit 8e340c158c41ee053fd2be2f30b47e9a060515c9.
Diffstat (limited to 'Lib/swigrun.swg')
-rw-r--r--Lib/swigrun.swg11
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg
index 3f68d66d6..e5afb62c4 100644
--- a/Lib/swigrun.swg
+++ b/Lib/swigrun.swg
@@ -161,20 +161,13 @@
# endif
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCastInplace(int *r) {
- if (SWIG_IsOK(*r)) {
- *r = (SWIG_CastRank(*r) < SWIG_MAXCASTRANK) ? (*r + 1) : SWIG_ERROR;
- }
-}
-SWIGINTERNINLINE int SWIG_AddCast(int r) {
- SWIG_AddCastInplace(&r);
- return r;
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
-# define SWIG_AddCastInplace(r)
# define SWIG_AddCast
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif