Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added python 2.3 patch to 0.9.4 release.

  • Loading branch information...
commit 6718010e16f63cf831a013282ca7d3208470a476 1 parent a0b249c
Travis Oliphant authored
Showing with 15 additions and 1 deletion.
  1. +7 −1 numpy/core/setup.py
  2. +8 −0 numpy/core/src/arraytypes.inc.src
View
8 numpy/core/setup.py
@@ -1,6 +1,7 @@
import imp
import os
+import sys
from os.path import join
from glob import glob
from distutils.dep_util import newer,newer_group
@@ -71,7 +72,12 @@ def generate_config_h(ext, build_dir):
moredefs.append('HAVE_ISNAN')
if config_cmd.check_func('isinf', **kws_args):
moredefs.append('HAVE_ISINF')
-
+
+ if sys.version[:3] < '2.4':
+ kws_args['headers'].append('stdlib.h')
+ if config_cmd.check_func('strtod', **kws_args):
+ moredefs.append(('PyOS_ascii_strtod', 'strtod'))
+
if moredefs:
target_f = open(target,'a')
for d in moredefs:
View
8 numpy/core/src/arraytypes.inc.src
@@ -760,6 +760,7 @@ static int
#func=(l,ul)*5#
#btype=(long,ulong)*5#
*/
+#if (PY_VERSION_HEX >= 0x02040000) || defined(PyOS_ascii_strtod)
static int
@fname@_fromstr(char *str, @type@ *ip, char **endptr, void *ignore)
{
@@ -769,12 +770,16 @@ static int
*ip = (@type@) result;
return 0;
}
+#else
+#define @fname@_fromstr NULL
+#endif
/**end repeat**/
/**begin repeat
#fname=FLOAT,DOUBLE,LONGDOUBLE#
#type=float,double,longdouble#
*/
+#if PY_VERSION_HEX >= 0x02040000
static int
@fname@_fromstr(char *str, @type@ *ip, char **endptr, void *ignore)
{
@@ -784,6 +789,9 @@ static int
*ip = (@type@) result;
return 0;
}
+#else
+#define @fname@_fromstr NULL
+#endif
/**end repeat**/
Please sign in to comment.
Something went wrong with that request. Please try again.