summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-05-25 20:44:08 (GMT)
committerBrett Cannon <bcannon@gmail.com>2006-05-25 20:44:08 (GMT)
commit0ed05875b24191c53a36520e4727c2c18c160f0e (patch)
treeca5d03efe801fbfd78dc6a2d16b60e32683d4263
parent9d67d5e9f78f33da616be9e839b987deda7e6c07 (diff)
downloadcpython-0ed05875b24191c53a36520e4727c2c18c160f0e.zip
cpython-0ed05875b24191c53a36520e4727c2c18c160f0e.tar.gz
cpython-0ed05875b24191c53a36520e4727c2c18c160f0e.tar.bz2
Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .
-rw-r--r--Python/pystrtod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index db4cad1..8a71c28 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -101,7 +101,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
char *copy, *c;
/* We need to convert the '.' to the locale specific decimal point */
- copy = (char *)malloc(end - nptr + 1 + decimal_point_len);
+ copy = (char *)PyMem_MALLOC(end - nptr + 1 + decimal_point_len);
c = copy;
memcpy(c, nptr, decimal_point_pos - nptr);
@@ -122,7 +122,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
fail_pos = (char *)nptr + (fail_pos - copy);
}
- free(copy);
+ PyMem_FREE(copy);
}
else {