Skip to content

Commit

Permalink
[Python] Fix isfinite() check to work with GCC6
Browse files Browse the repository at this point in the history
Fixes swig#615 reported by jplesnik.
  • Loading branch information
ojwb committed Mar 1, 2016
1 parent fa5f3ab commit 5733cc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.current
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
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
[Python] Add missing keywords 'as' and 'with' to pythonkw.swg.

Expand Down
3 changes: 2 additions & 1 deletion Lib/typemaps/fragments.swg
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@
%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. */
#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))
# elif defined(_MSC_VER)
# define SWIG_isfinite(X) (_finite(X))
Expand Down

0 comments on commit 5733cc1

Please sign in to comment.