7 Commits

Author SHA1 Message Date
Neal Norwitz
6b5140f992 backport:
revision 1.11
date: 2002/12/18 23:20:39;  author: nnorwitz;  state: Exp;  lines: +6 -2
SF # 654974, fix unchecked return values in structseq

Check return values after memory allocation.
2003-02-02 19:25:22 +00:00
Michael W. Hudson
a374b6f469 backport my checkin of
revision 1.6 of structseq.c

Guido pointed out that I was missing a couple decrefs.
2002-03-07 15:16:07 +00:00
Michael W. Hudson
aa3fd6f3df After some thinking, I decided to move all of this across onto
the branch.  I don't think it can break code, so the only risk
is introducing new bugs.  In that vein, can I ask -checkins readers
who have time to carefully look this over, check my refcounts &c?
TIA.

backport my checkin of
    revision 1.5 of structseq.c

Apply (my) patch:

[ 526072 ] pickling os.stat results round II

structseq's constructors can now take "invisible" fields in a dict.
Gave the constructors better error messages.
their __reduce__ method puts these fields in a dict.

(this is all in aid of getting os.stat_result's to pickle portably)

Also fixes

[ 526039 ] devious code can crash structseqs

Thought needed about how much of this counts as a bugfix.  Certainly
#526039 needs to be fixed.
2002-03-07 10:16:43 +00:00
Michael W. Hudson
5660b8e396 backport my checkin of
revision 1.4 of structseq.c

A fix & test for

[ 496873 ] structseqs unpicklable

by adding a __reduce__ method to structseqs.

Will also commit this to the 2.2.1 branch momentarily.
2002-03-05 14:00:52 +00:00
Barry Warsaw
312af42b47 structseq_new(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.
2001-11-28 20:56:44 +00:00
Tim Peters
c2fe618575 Fix bad bug in structseq slicing (NULL pointers in result). Reported by
Jack Jansen on python-dev.
Add simple test case.
Move vereq() from test_descr to test_support (it's handy!).
2001-10-30 23:20:46 +00:00
Guido van Rossum
e82f75aa20 Missing file structseq.c for SF patch #462296 2001-10-18 20:47:51 +00:00