Mercurial > cpython-lru_cache-weakref
comparison Python/exceptions.c @ 37597:2b2e9c388fbb legacy-trunk
low-hanging fruit in Python/ - g++ still hates all the enum_kind declarations
in Python/Python-ast.c. Not sure what to do about those.
| author | Anthony Baxter <anthonybaxter@gmail.com> |
|---|---|
| date | Tue, 11 Apr 2006 07:43:46 +0000 |
| parents | 9eb24f92a784 |
| children | 9b22d8b7bcaa |
comparison
equal
deleted
inserted
replaced
| 37596:1b078493d538 | 37597:2b2e9c388fbb |
|---|---|
| 891 if (have_filename || have_lineno) { | 891 if (have_filename || have_lineno) { |
| 892 Py_ssize_t bufsize = PyString_GET_SIZE(str) + 64; | 892 Py_ssize_t bufsize = PyString_GET_SIZE(str) + 64; |
| 893 if (have_filename) | 893 if (have_filename) |
| 894 bufsize += PyString_GET_SIZE(filename); | 894 bufsize += PyString_GET_SIZE(filename); |
| 895 | 895 |
| 896 buffer = PyMem_MALLOC(bufsize); | 896 buffer = (char *)PyMem_MALLOC(bufsize); |
| 897 if (buffer != NULL) { | 897 if (buffer != NULL) { |
| 898 if (have_filename && have_lineno) | 898 if (have_filename && have_lineno) |
| 899 PyOS_snprintf(buffer, bufsize, "%s (%s, line %ld)", | 899 PyOS_snprintf(buffer, bufsize, "%s (%s, line %ld)", |
| 900 PyString_AS_STRING(str), | 900 PyString_AS_STRING(str), |
| 901 my_basename(PyString_AS_STRING(filename)), | 901 my_basename(PyString_AS_STRING(filename)), |
