From 89a39461bff04b80bb4857790350e1ab30ff2df9 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 28 Oct 2004 16:32:00 +0000 Subject: Wrote down the invariants of some common objects whose structure is exposed in header files. Fixed a few comments in these headers. As we might have expected, writing down invariants systematically exposed a (minor) bug. In this case, function objects have a writeable func_code attribute, which could be set to code objects with the wrong number of free variables. Calling the resulting function segfaulted the interpreter. Added a corresponding test. --- Include/rangeobject.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Include/rangeobject.h') diff --git a/Include/rangeobject.h b/Include/rangeobject.h index b6f571ba32..50aa0619e1 100644 --- a/Include/rangeobject.h +++ b/Include/rangeobject.h @@ -7,6 +7,9 @@ extern "C" { #endif +/* This is about the type 'xrange', not the built-in function range(), which + returns regular lists. */ + /* A range object represents an integer range. This is an immutable object; a range cannot change its value after creation. -- cgit v1.2.1