Files
cpython/Modules
Raymond Hettinger f69d9f6818 SF bug #761337: datetime.strftime fails on trivial format string
The interning of short strings violates the refcnt==1 assumption for
_PyString_Resize().

A simple fix is to boost the initial value of "totalnew" by 1.
Combined with an NULL argument to PyString_FromStringAndSize(),
this assures that resulting format string is not interned.
This will remain true even if the implementation of
PyString_FromStringAndSize() changes because only the uninitialized
strings that can be interned are those of zero length.

Added a test case.
2003-06-27 08:14:17 +00:00
..
2003-02-02 17:08:33 +00:00
2000-06-30 16:09:01 +00:00
2003-05-09 10:45:20 +00:00
2002-07-17 16:30:39 +00:00
2003-06-18 19:25:37 +00:00
2003-06-11 00:18:09 +00:00
2002-12-06 12:48:53 +00:00
2003-03-01 15:19:41 +00:00
2002-08-07 16:21:51 +00:00
2002-10-30 21:08:34 +00:00
2002-07-17 16:30:39 +00:00
2003-05-23 14:35:24 +00:00
2003-06-16 18:51:28 +00:00
1996-01-26 21:10:22 +00:00
2003-02-13 18:44:57 +00:00