Mercurial > cpython-lru_cache-weakref
diff Python/pystrtod.c @ 38320:3d477d158401 legacy-trunk
Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Thu, 25 May 2006 20:44:08 +0000 |
| parents | 480a5625e286 |
| children | 19fd6141940d 9b001ebeaa5e |
line wrap: on
line diff
--- a/Python/pystrtod.c Thu May 25 20:28:10 2006 +0000 +++ b/Python/pystrtod.c Thu May 25 20:44:08 2006 +0000 @@ -101,7 +101,7 @@ 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 @@ fail_pos = (char *)nptr + (fail_pos - copy); } - free(copy); + PyMem_FREE(copy); } else {
