Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 34522:a4225cdc2047 legacy-trunk
More bug #1077106 stuff, sorry -- modem induced impatiece!
This should go on whatever bugfix branches the other fetches up on.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Mon, 31 Jan 2005 17:09:25 +0000 |
| parents | 10512ceba30c |
| children | 556f6f1056a8 |
line wrap: on
line diff
--- a/Objects/stringobject.c Mon Jan 31 17:01:59 2005 +0000 +++ b/Objects/stringobject.c Mon Jan 31 17:09:25 2005 +0000 @@ -52,6 +52,7 @@ PyString_FromStringAndSize(const char *str, int size) { register PyStringObject *op; + assert(size >= 0); if (size == 0 && (op = nullstring) != NULL) { #ifdef COUNT_ALLOCS null_strings++;
