[Python] Fix isfinite() check to work with GCC6
Fixes https://github.com/swig/swig/issues/615 reported by jplesnik.
This commit is contained in:
parent
fa5f3abf4d
commit
5733cc1d2a
2 changed files with 6 additions and 1 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 3.0.9 (in progress)
|
Version 3.0.9 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2016-03-01: olly
|
||||||
|
[Python] Fix isfinite() check to work with GCC6. Fixes
|
||||||
|
https://github.com/swig/swig/issues/615 reported by jplesnik.
|
||||||
|
|
||||||
2016-02-17: olly
|
2016-02-17: olly
|
||||||
[Python] Add missing keywords 'as' and 'with' to pythonkw.swg.
|
[Python] Add missing keywords 'as' and 'with' to pythonkw.swg.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,8 @@
|
||||||
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
|
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
|
||||||
/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
|
/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
|
||||||
#ifndef SWIG_isfinite
|
#ifndef SWIG_isfinite
|
||||||
# if defined(isfinite)
|
/* isfinite() is a macro for C99, but a function for C++11. */
|
||||||
|
# if defined(isfinite) || (defined __cplusplus && __cplusplus >= 201103L)
|
||||||
# define SWIG_isfinite(X) (isfinite(X))
|
# define SWIG_isfinite(X) (isfinite(X))
|
||||||
# elif defined(_MSC_VER)
|
# elif defined(_MSC_VER)
|
||||||
# define SWIG_isfinite(X) (_finite(X))
|
# define SWIG_isfinite(X) (_finite(X))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue