# HG changeset patch # User Bob Ippolito <bob@redivi.com> # Date 1223158024 0 # Sat Oct 04 22:07:04 2008 +0000 # Node ID 800c7e64290963286d4c548eacdd6665e52bc6ad # Parent c971a3dbca0861ec98c366c456b0aca803b1f902 Py_IS_FINITE for Python 2.4 git-svn-id: http://simplejson.googlecode.com/svn/trunk@138 a4795897-2c25-0410-b006-0d3caba88fa1 diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -10,6 +10,9 @@ #define PyInt_FromSsize_t PyInt_FromLong #define PyInt_AsSsize_t PyInt_AsLong #endif +#ifndef Py_IS_FINITE +#define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X)) +#endif #ifdef __GNUC__ #define UNUSED __attribute__((__unused__))