History log of /external/python/cpython2/Objects/classobject.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
646b528467b171148143980452d2aa4294cbe5c8 22-Jun-2016 Martin Panter <vadmium+py@gmail.com> Issue #22463: Backport compiler warning fixes and workarounds

* Set but unused variable in Parser/pgen.c in non-debug builds. Patch by
Christian Heimes.
* Unused static function in Modules/readline.c. Patch by Georg Brandl.
* main_window unused in Modules/tkappinit.c. Patch by Gregory P. Smith.
* Dead assignment in Modules/_ctypes/cfield.c. Extracted from patch by Brett
Cannon.
* Expression result unused in PyObject_INIT macro expansions. Based on
patches by Christian Heimes.
* Load expat_config.h and therefore pyconfig.h before C stdlib headers are
loaded. This silences pre-processor warnings including '_POSIX_C_SOURCE
redefined'. Extracted from patch by Christian Heimes.
/external/python/cpython2/Objects/classobject.c
9376c8b5e3de2dc6b6c6d7bcf28480d41374de36 02-Aug-2014 Raymond Hettinger <python@rcn.com> Fix typo in comment.
/external/python/cpython2/Objects/classobject.c
dbc52f8a0d3c496e642dbc92c684f873e67f3127 16-Mar-2012 Benjamin Peterson <benjamin@python.org> check for string attribute names in old-style classes (closes #14334)
/external/python/cpython2/Objects/classobject.c
a7b0976c3e183397a648598d96a7e1fa965cbd90 15-Oct-2011 Benjamin Peterson <benjamin@python.org> PyEval_CallObject requires a tuple of args (closes #13186)
/external/python/cpython2/Objects/classobject.c
c83ea137d7e717f764e2f31fc2544f522de7d857 09-May-2010 Antoine Pitrou <solipsis@pitrou.net> Untabify C files. Will watch buildbots.
/external/python/cpython2/Objects/classobject.c
a57df2cf1d627840dff505e8487fbd5f42414c7b 31-Mar-2010 Antoine Pitrou <solipsis@pitrou.net> Issue #8268: Old-style classes (not just instances) now support weak
references.
/external/python/cpython2/Objects/classobject.c
6fcf9b50bc13d757096822ba996fa3c122b70c6b 02-Sep-2009 Benjamin Peterson <benjamin@python.org> remove the check that classmethod's argument is a callable
/external/python/cpython2/Objects/classobject.c
712ee923092ef1b47c72914c5e2950be2f05f527 24-Aug-2008 Benjamin Peterson <benjamin@python.org> generate py3k warnings on __getslice__, __delslice__, and __setslice__

Reviewer: Brett Cannon
/external/python/cpython2/Objects/classobject.c
dd96db63f689e2f0d8ae5a1436b3b3395eec7de5 09-Jun-2008 Gregory P. Smith <greg@mad-scientist.com> This reverts r63675 based on the discussion in this thread:

http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
/external/python/cpython2/Objects/classobject.c
593daf545bd9b7e7bcb27b498ecc6f36db9ae395 26-May-2008 Christian Heimes <christian@cheimes.de> Renamed PyString to PyBytes
/external/python/cpython2/Objects/classobject.c
b1d3d96374294904a13717403c80035718331092 18-Mar-2008 Neal Norwitz <nnorwitz@gmail.com> Issue 2332: add new attribute names for instance method objects
/external/python/cpython2/Objects/classobject.c
3b718a79af900fdacaf0b825137f69eadc753765 14-Feb-2008 Christian Heimes <christian@cheimes.de> Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation.
/external/python/cpython2/Objects/classobject.c
5b970ad483332dc6c5f3e84a238317d45f844421 06-Feb-2008 Christian Heimes <christian@cheimes.de> Unified naming convention for free lists and their limits. All free lists
in Object/ are named ``free_list``, the counter ``numfree`` and the upper
limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.

The chances should make it easier to adjust Python for platforms with
less memory, e.g. mobile phones.
/external/python/cpython2/Objects/classobject.c
6075a82243c7646dcdd45b424cf3e5c676f31ccf 06-Feb-2008 Christian Heimes <christian@cheimes.de> Limit free list of method and builtin function objects to 256 entries each.
/external/python/cpython2/Objects/classobject.c
a26cf9b7609fc1c08fd1a69ddf5e44dc98a70dce 04-Feb-2008 Jeffrey Yasskin <jyasskin@gmail.com> Make int() and long() fall back to __trunc__(). See issue 2002.
/external/python/cpython2/Objects/classobject.c
9ff1a449732277c340fdf426e89d8460d2d8dd87 18-Jan-2008 Guido van Rossum <guido@python.org> Fix an edge case whereby the __del__() method of a classic class could
create a new weakref to the object.
/external/python/cpython2/Objects/classobject.c
abe1d48d2068ef0fea36a9b370a8b159ab267430 07-May-2007 Kristján Valur Jónsson <kristjan@ccpgames.com> As per Armin Rigo's suggestion, remove special handing from intobject.c to deal with the peculiarities of classobject's implementation of the number protocol. The nb_long method of classobject now falls back to nb_int if there is no __long__ attribute present.
/external/python/cpython2/Objects/classobject.c
3a62404264e02acbee83994c411e292bccd4e8f2 08-Nov-2006 Martin v. Löwis <martin@v.loewis.de> Correctly forward exception in instance_contains().
Fixes #1591996. Patch contributed by Neal Norwitz.
Will backport.
/external/python/cpython2/Objects/classobject.c
5d59c0983431b0b7d3929dd2851b00e20e1d8c15 30-Sep-2006 Georg Brandl <georg@python.org> Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
/external/python/cpython2/Objects/classobject.c
6cbb72653919e64a1b33b11a18604d42a928dcb4 19-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Move initialization of interned strings to before allocating the
object so we don't leak op. (Fixes an earlier patch to this code)

Klockwork #350
/external/python/cpython2/Objects/classobject.c
af33f2d57191985a9bf13b40549b6294873de68b 14-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Can't return NULL from a void function. If there is a memory error,
about the best we can do is call PyErr_WriteUnraisable and go on.
We won't be able to do the call below either, so verify delstr is valid.
/external/python/cpython2/Objects/classobject.c
b09f4f578f1e60cf15dde1f5cbdec8a50a9af67b 13-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Handle a whole lot of failures from PyString_FromInternedString().

Should fix most of Klocwork 234-272.
/external/python/cpython2/Objects/classobject.c
1872b1c01f343f4cbfa7696ce95beae8278ce210 12-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c) In reviewing the code for classic
classes, there were 2 problems. Any negative value return could be returned.
Always return -1 if there was an error. Also make the checks similar
with the new-style classes. I believe this is correct for 32 and 64 bit
boxes, including Windows64.

Add a test of classic classes too.
/external/python/cpython2/Objects/classobject.c
8a87f5d37e6aab91ddc4c6491877b6cbd48a12cf 12-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Patch #1538606, Patch to fix __index__() clipping.

I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
/external/python/cpython2/Objects/classobject.c
ab2f8f7bd556c16a2b30aa8ec05d4c9d8c50d311 09-Aug-2006 Martin v. Löwis <martin@v.loewis.de> __hash__ may now return long int; the final hash
value is obtained by invoking hash on the long int.
Fixes #1536021.
/external/python/cpython2/Objects/classobject.c
ea3912b0da71e16b8a37e04fcf3969dc85c27fa1 13-Jun-2006 Brett Cannon <bcannon@gmail.com> If a classic class defined a __coerce__() method that just returned its two
arguments in reverse, the interpreter would infinitely recourse trying to get a
coercion that worked. So put in a recursion check after a coercion is made and
the next call to attempt to use the coerced values.

Fixes bug #992017 and closes crashers/coerce.py .
/external/python/cpython2/Objects/classobject.c
fd01d7933bc3e9fd64d81961fbb7eabddcc82bc3 08-Jun-2006 Armin Rigo <arigo@tunes.org> (arre, arigo) SF bug #1350060

Give a consistent behavior for comparison and hashing of method objects
(both user- and built-in methods). Now compares the 'self' recursively.
The hash was already asking for the hash of 'self'.
/external/python/cpython2/Objects/classobject.c
2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06 29-May-2006 Georg Brandl <georg@python.org> Correct some value converting strangenesses.
/external/python/cpython2/Objects/classobject.c
e4e023c4d3104cbf144437d25e6906e828a28993 26-May-2006 Georg Brandl <georg@python.org> Simplify calling.
/external/python/cpython2/Objects/classobject.c
684fd0c8ec0bad54d3ff39ae15873f80e119478b 25-May-2006 Georg Brandl <georg@python.org> Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
/external/python/cpython2/Objects/classobject.c
6685128b973981ff57b577f09b0a38e0071d272e 22-Apr-2006 Martin v. Löwis <martin@v.loewis.de> Fix more ssize_t issues.
/external/python/cpython2/Objects/classobject.c
c6e55068cad6f2178981eec4f0a0a583b8bba21a 15-Apr-2006 Thomas Wouters <thomas@python.org> Use Py_VISIT in all tp_traverse methods, instead of traversing manually or
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
/external/python/cpython2/Objects/classobject.c
377be11ee1fab015f4cc77975374f86cf436536e 11-Apr-2006 Anthony Baxter <anthonybaxter@gmail.com> More C++-compliance. Note especially listobject.c - to get C++ to accept the
PyTypeObject structures, I had to make prototypes for the functions, and
move the structure definition ahead of the functions. I'd dearly like a better
way to do this - to change this would make for a massive set of changes to
the codebase.

There's still some warnings - this is purely to get rid of errors first.
/external/python/cpython2/Objects/classobject.c
347b30042b68e80b245a03b23cb616024ecb1f1e 30-Mar-2006 Georg Brandl <georg@python.org> Remove unnecessary casts in type object initializers.
/external/python/cpython2/Objects/classobject.c
badc086543e13be82958b8162d3fc5e5b65f283a 23-Mar-2006 Neal Norwitz <nnorwitz@gmail.com> Stop duplicating code and handle slice indices consistently and correctly
wrt to ssize_t.
/external/python/cpython2/Objects/classobject.c
2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14 20-Mar-2006 Neal Norwitz <nnorwitz@gmail.com> Use macro versions instead of function versions when we already know the type.
This will hopefully get rid of some Coverity warnings, be a hint to
developers, and be marginally faster.

Some asserts were added when the type is currently known, but depends
on values from another function.
/external/python/cpython2/Objects/classobject.c
38fff8c4e4276e4e57660a78f305e68bfa87874b 07-Mar-2006 Guido van Rossum <guido@python.org> Checking in the code for PEP 357.
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
/external/python/cpython2/Objects/classobject.c
15e62742fad688b026ba80bf17d1345c4cbd423b 27-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Revert backwards-incompatible const changes.
/external/python/cpython2/Objects/classobject.c
dde99d2633d7d744730d4464521e936bf1b6b411 17-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Remove size constraints in SLICE opcodes.
/external/python/cpython2/Objects/classobject.c
18e165558b24d29e7e0ca501842b9236589b012a 15-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Merge ssize_t branch.
/external/python/cpython2/Objects/classobject.c
af68c874a6803b4e90b616077a602c0593719a1d 10-Dec-2005 Jeremy Hylton <jeremy@alum.mit.edu> Add const to several API functions that take char *.

In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
/external/python/cpython2/Objects/classobject.c
630db60a5533a3267e2cc07047498fad604e3c91 20-Sep-2005 Guido van Rossum <guido@python.org> - On 64-bit platforms, when __len__() returns a value that cannot be
represented as a C int, raise OverflowError.

(Forward port from 2.4.2; the patch to classobject.c was already in
but needed a correction in the error message text.)
/external/python/cpython2/Objects/classobject.c
ba3e6ec0c9928000e796090b6df70cccd0d6f385 20-Sep-2005 Guido van Rossum <guido@python.org> A minor fix for 64-bit platforms: when __len__() returns Python int
containing a value that doesn't fit in a C int, raise OverflowError
rather than truncating silently (and having 50% chance of hitting the
"it should be >= 0" error).
/external/python/cpython2/Objects/classobject.c
bff60aeb938fc6947823b3fdea9c74898057ce98 19-Jun-2005 Raymond Hettinger <python@rcn.com> Insert missing flag.
/external/python/cpython2/Objects/classobject.c
e2749cb264576d97533a85fba1396099606bc986 30-Mar-2005 Michael W. Hudson <mwh@python.net> Fix for rather inaccurately titled bug

[ 1165306 ] Property access with decorator makes interpreter crash

Don't allow the creation of unbound methods with NULL im_class, because
attempting to call such crashes.

Backport candidate.
/external/python/cpython2/Objects/classobject.c
f4aca755bc9f26b51b6820a162a3f76c2a1a1abc 23-Sep-2004 Tim Peters <tim.peters@gmail.com> A static swapped_op[] array was defined in 3 different C files, & I think
I need to define it again. Bite the bullet and define it once as an
extern, _Py_SwappedOp[].
/external/python/cpython2/Objects/classobject.c
3f3b66823f899868b86722d586a6cd00df4cbad9 03-Aug-2004 Michael W. Hudson <mwh@python.net> Repair the same thinko in two places about handling of _Py_RefTotal in
the case of __del__ resurrecting an object.
This makes the apparent reference leaks in test_descr go away (which I
expected) and also kills off those in test_gc (which is more surprising
but less so once you actually think about it a bit).
/external/python/cpython2/Objects/classobject.c
baf0f8f24da7a541a403cd9848cebc451beb069d 23-Nov-2003 Guido van Rossum <guido@python.org> - When method objects have an attribute that can be satisfied either
by the function object or by the method object, the function
object's attribute usually wins. Christian Tismer pointed out that
that this is really a mistake, because this only happens for special
methods (like __reduce__) where the method object's version is
really more appropriate than the function's attribute. So from now
on, all method attributes will have precedence over function
attributes with the same name.
/external/python/cpython2/Objects/classobject.c
2b3eb4062c5e50abf854f7e68038243ca7c07217 28-Oct-2003 Armin Rigo <arigo@tunes.org> Deleting cyclic object comparison.
SF patch 825639
http://mail.python.org/pipermail/python-dev/2003-October/039445.html
/external/python/cpython2/Objects/classobject.c
8ae468965700fd9900efc28bff8fa2015dae2bef 12-Oct-2003 Raymond Hettinger <python@rcn.com> Simplify and speedup uses of Py_BuildValue():

* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
/external/python/cpython2/Objects/classobject.c
a9e14b70150d5bc064afd3144097ec0095869f10 16-Sep-2003 Raymond Hettinger <python@rcn.com> Fix leak in classobject.c. The leak surfaced on the error exit when
hashing a class that does not define __hash__ but does define a
comparison.
/external/python/cpython2/Objects/classobject.c
2fb9fdc96a59984539d49cb45d4f87fe9490a0e1 09-Apr-2003 Guido van Rossum <guido@python.org> Make it possible to call instancemethod() with 2 arguments.
/external/python/cpython2/Objects/classobject.c
df875b99fcb69c18168fb761ddaa722a034175dd 07-Apr-2003 Tim Peters <tim.peters@gmail.com> New private API function _PyInstance_Lookup. gc will use this to figure
out whether __del__ exists, without executing any Python-level code.
/external/python/cpython2/Objects/classobject.c
6bae46d8c14fc312f38a1087803c559b119c9bb5 11-Feb-2003 Guido van Rossum <guido@python.org> Refactor instancemethod_descr_get() to (a) be more clear, (b) be safe
in the light of weird args, and (c) not to expect None (which is now
changed to NULL by slot_tp_descr_get()).
/external/python/cpython2/Objects/classobject.c
ea3fdf44a29accd666a3b5f058539c351d921657 29-Dec-2002 Raymond Hettinger <python@rcn.com> SF patch #659536: Use PyArg_UnpackTuple where possible.

Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
/external/python/cpython2/Objects/classobject.c
7e5c6a02eba1a6f5e93bfa1241ceff39bec9f3c9 12-Dec-2002 Walter Dörwald <walter@livinglogic.de> Change issubclass() so that recursive tuples (directly or indirectly
containing class objects) are allowed as the second argument.
This makes issubclass() more similar to isinstance() where recursive
tuples are allowed too.
/external/python/cpython2/Objects/classobject.c
d9a6ad3bebc2b451482db152171fca3144b2cd97 12-Dec-2002 Walter Dörwald <walter@livinglogic.de> Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.

This closes SF patch #649608.
/external/python/cpython2/Objects/classobject.c
f740bdf3379046701d23c8849d51aadd8377dc17 29-Oct-2002 Guido van Rossum <guido@python.org> Since properties are supported here, is possible that
instance_getattr2() raises an exception. Fix all code that made this
assumption.

Backport candidate.
/external/python/cpython2/Objects/classobject.c
617080b6cfc291661312825a9332e086d4c5bc74 18-Oct-2002 Guido van Rossum <guido@python.org> Fix (real! :-) memory leaks in half_cmp and half_binop.
Perhaps found by NealN and valgrind. Will forward port.
/external/python/cpython2/Objects/classobject.c
75585d4ec18c3b4d42d033c0004a61b6d0704d30 20-Aug-2002 Tim Peters <tim.peters@gmail.com> getinstclassname(): Squash new compiler wng in assert (comparison of
signed vs unsigned).
/external/python/cpython2/Objects/classobject.c
45ec02aed14685c353e55841b5acbc0dadee76f8 19-Aug-2002 Guido van Rossum <guido@python.org> SF patch 576101, by Oren Tirosh: alternative implementation of
interning. I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged. Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.
/external/python/cpython2/Objects/classobject.c
3459251d5a2b9589e03e818effc357e5e60ee4a9 11-Jul-2002 Tim Peters <tim.peters@gmail.com> object.h special-build macro minefield: renamed all the new lexical
helper macros to something saner, and used them appropriately in other
files too, to reduce #ifdef blocks.

classobject.c, instance_dealloc(): One of my worst Python Memories is
trying to fix this routine a few years ago when COUNT_ALLOCS was defined
but Py_TRACE_REFS wasn't. The special-build code here is way too
complicated. Now it's much simpler. Difference: in a Py_TRACE_REFS
build, the instance is no longer in the doubly-linked list of live
objects while its __del__ method is executing, and that may be visible
via sys.getobjects() called from a __del__ method. Tough -- the object
is presumed dead while its __del__ is executing anyway, and not calling
_Py_NewReference() at the start allows enormous code simplification.

typeobject.c, call_finalizer(): The special-build instance_dealloc()
pain apparently spread to here too via cut-'n-paste, and this is much
simpler now too. In addition, I didn't understand why this routine
was calling _PyObject_GC_TRACK() after a resurrection, since there's no
plausible way _PyObject_GC_UNTRACK() could have been called on the
object by this point. I suspect it was left over from pasting the
instance_delloc() code. Instead asserted that the object is still
tracked. Caution: I suspect we don't have a test that actually
exercises the subtype_dealloc() __del__-resurrected-me code.
/external/python/cpython2/Objects/classobject.c
943382c8e5009da895679798e1e740a0661fbf7e 07-Jul-2002 Tim Peters <tim.peters@gmail.com> Removed WITH_CYCLE_GC #ifdef-ery. Holes:

+ I'm not sure what to do about configure.in. Left it alone.

+ Ditto pyexpat.c. Fred or Martin will know what to do.
/external/python/cpython2/Objects/classobject.c
b1e8154013feaa42d08e3a9b992357c365129126 18-Jun-2002 Michael W. Hudson <mwh@python.net> About the new but unreferenced new_class, Guido sez:

> Looks like an experiment by Oren Tirosh that didn't get nuked. I
> think you can safely lose it.

It's gone.
/external/python/cpython2/Objects/classobject.c
bea18ccde6bc12e061c21bb6b944379d8b123845 14-Jun-2002 Guido van Rossum <guido@python.org> SF patch 568629 by Oren Tirosh: types made callable.

These built-in functions are replaced by their (now callable) type:

slice()
buffer()

and these types can also be called (but have no built-in named
function named after them)

classobj (type name used to be "class")
code
function
instance
instancemethod (type name used to be "instance method")

The module "new" has been replaced with a small backward compatibility
placeholder in Python.

A large portion of the patch simply removes the new module from
various platform-specific build recipes. The following binary Mac
project files still have references to it:

Mac/Build/PythonCore.mcp
Mac/Build/PythonStandSmall.mcp
Mac/Build/PythonStandalone.mcp

[I've tweaked the code layout and the doc strings here and there, and
added a comment to types.py about StringTypes vs. basestring. --Guido]
/external/python/cpython2/Objects/classobject.c
e7b8ecf196f5d20eb9189fb9930335a2bebe1cc7 13-Jun-2002 Guido van Rossum <guido@python.org> Major cleanup operation: whenever there's a call that looks for an
optional attribute, only clear the exception when the internal getattr
operation raised AttributeError. Many places in this file already had
that policy; but just as many didn't, and there didn't seem to be any
rhyme or reason to it. Be consistently cautious.

Question: should I backport this? On the one hand it's a bugfix. On
the other hand it's a change in behavior. Certain forms of buggy or
just weird code would work in the past but raise an exception under
the new rules; e.g. if you define a __getattr__ method that raises a
non-AttributeError exception.
/external/python/cpython2/Objects/classobject.c
16b93b3d0e2bf8dc22d11e8625af6d9cc913ec88 13-Jun-2002 Guido van Rossum <guido@python.org> Fix for SF bug 532646. This is a little simpler than what Neal
suggested there, based upon a better analysis (__getattr__ is a red
herring). Will backport to 2.2.
/external/python/cpython2/Objects/classobject.c
c916f5a390b0ca559de54a15d4014e18792674ea 26-Oct-2001 Fred Drake <fdrake@acm.org> Be smarter about clearing the weakref lists for instances, instance methods,
and functions: we only need to call PyObject_ClearWeakRefs() if the weakref
list is non-NULL. Since these objects are common but weakrefs are still
unusual, saving the call at deallocation time makes a lot of sense.
/external/python/cpython2/Objects/classobject.c
56ff387a7e625a692851e2e5ffdea096b72831f7 22-Oct-2001 Guido van Rossum <guido@python.org> Fix for SF bug #472940: can't getattr() attribute shown by dir()

There really isn't a good reason for instance method objects to have
their own __dict__, __doc__ and __name__ properties that just delegate
the request to the function (callable); the default attribute behavior
already does this.

The test suite had to be fixed because the error changes from
TypeError to AttributeError.
/external/python/cpython2/Objects/classobject.c
915f0eb212f62f10611180ed2d7874dae5bc66e3 17-Oct-2001 Guido van Rossum <guido@python.org> Protect references to tp_descr_get and tp_dict with the appropriate test:
PyType_HasFeature(t, Py_TPFLAGS_HAVE_CLASS).
/external/python/cpython2/Objects/classobject.c
8b13b3ede270bf6f7bf3427675e335ab0bd0f75b 30-Sep-2001 Tim Peters <tim.peters@gmail.com> SF bug [#466173] unpack TypeError unclear
Replaced 3 instances of "iter() of non-sequence" with
"iteration over non-sequence".
Restored "unpack non-sequence" for stuff like "a, b = 1".
/external/python/cpython2/Objects/classobject.c
32d34c809f5971f79462dcb7d0f536d46e624acc 20-Sep-2001 Guido van Rossum <guido@python.org> Add optional docstrings to getset descriptors. Fortunately, there's
no backwards compatibility to worry about, so I just pushed the
'closure' struct member to the back -- it's never used in the current
code base (I may eliminate it, but that's more work because the getter
and setter signatures would have to change.)

As examples, I added actual docstrings to the getset attributes of a
few types: file.closed, xxsubtype.spamdict.state.
/external/python/cpython2/Objects/classobject.c
6f7993765ac0989b5d13084240797913627a31d8 20-Sep-2001 Guido van Rossum <guido@python.org> Add optional docstrings to member descriptors. For backwards
compatibility, this required all places where an array of "struct
memberlist" structures was declared that is referenced from a type's
tp_members slot to change the type of the structure to PyMemberDef;
"struct memberlist" is now only used by old code that still calls
PyMember_Get/Set. The code in PyObject_GenericGetAttr/SetAttr now
calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef
argument.

As examples, I added actual docstrings to the attributes of a few
types: file, complex, instance method, super, and xxsubtype.spamlist.

Also converted the symtable to new style getattr.
/external/python/cpython2/Objects/classobject.c
cf95f9cacbbd8706537e75613690bb6d5997eef3 18-Sep-2001 Martin v. Löwis <martin@v.loewis.de> Properly repr classes without module names.
/external/python/cpython2/Objects/classobject.c
f0b35e1501f279aba1b97df068c6bc7384e2ab1a 18-Sep-2001 Guido van Rossum <guido@python.org> Redo the PyMethod attributes using a dir()-friendly approach, creating
descriptors for each attribute. The getattr() implementation is
similar to PyObject_GenericGetAttr(), but delegates to im_self instead
of looking in __dict__; I couldn't do this as a wrapper around
PyObject_GenericGetAttr().

XXX A problem here is that this is a case of *delegation*. dir()
doesn't see exactly the same attributes that are actually defined;
e.g. if the delegate is a Python function object, it supports
attributes like func_code etc., but these are not visible to dir(); on
the other hand, dynamic function attributes (stored in the function's
__dict__) *are* visible to dir(). Maybe we need a mechanism to tell
dir() about the delegation mechanism? I vaguely recall seeing a
request in the newsgroup for a more formal definition of attribute
delegation too. Sigh, time for a new PEP.
/external/python/cpython2/Objects/classobject.c
16a77adfbd745c202878fabb0b921514fec7ca16 08-Sep-2001 Tim Peters <tim.peters@gmail.com> Generalize operator.indexOf (PySequence_Index) to work with any
iterable object. I'm not sure how that got overlooked before!

Got rid of the internal _PySequence_IterContains, introduced a new
internal _PySequence_IterSearch, and rewrote all the iteration-based
"count of", "index of", and "is the object in it or not?" routines to
just call the new function. I suppose it's slower this way, but the
code duplication was getting depressing.
/external/python/cpython2/Objects/classobject.c
28d80b1058c73b296f41861ac9f39534c7a3ee4b 07-Sep-2001 Guido van Rossum <guido@python.org> PyClass_New(): put the extended Don Beaudry hook back in. When one of
the base classes is not a classic class, and its class (the metaclass)
is callable, call the metaclass to do the deed.

One effect of this is that, when mixing classic and new-style classes
amongst the bases of a class, it doesn't matter whether the first base
class is a classic class or not: you will always get the error
"TypeError: metatype conflict among bases". (Formerly, with a classic
class first, you'd get "TypeError: PyClass_New: base must be a class".)

Another effect is that multiple inheritance from ExtensionClass.Base,
with a classic class as the first class, transfers control to the
ExtensionClass.Base class. This is what we need for SF #443239 (and
also for running Zope under 2.2a4, before ExtensionClass is replaced).
/external/python/cpython2/Objects/classobject.c
b479dc561c1e778c892f04d1e9673400e95d7e78 06-Sep-2001 Guido van Rossum <guido@python.org> Add PyMethod_Function(), PyMethod_Self(), PyMethod_Class() back.
While not even documented, they were clearly part of the C API,
there's no great difficulty to support them, and it has the cool
effect of not requiring any changes to ExtensionClass.c.
/external/python/cpython2/Objects/classobject.c
e83c00efd06dc8380d481f6c5f92d8c274ce6bd2 30-Aug-2001 Neil Schemenauer <nascheme@enme.ucalgary.ca> Use new GC API.
/external/python/cpython2/Objects/classobject.c
a15dece51975ddc94b488a64c1326d3e39566c59 24-Aug-2001 Guido van Rossum <guido@python.org> Improve the error message issued when an unbound method is called with
an inappropriate first argument. Now that there are more ways for
this to fail, make sure to report the name of the class of the
expected instance and of the actual instance.
/external/python/cpython2/Objects/classobject.c
7ce3694a527afe425a2b9df65c049b0ef4e75960 24-Aug-2001 Barry Warsaw <barry@python.org> repr's converted to using PyString_FromFormat() instead of sprintf'ing
into a hardcoded char* buffer.

Closes patch #454743.
/external/python/cpython2/Objects/classobject.c
4066769b91797f2442df67a097231e3ca6e2139b 17-Aug-2001 Guido van Rossum <guido@python.org> Fix core dump in repr() of instancemethod whose class==NULL.
/external/python/cpython2/Objects/classobject.c
f23c41d56a6ae0565619258895a321998328326e 17-Aug-2001 Guido van Rossum <guido@python.org> instance_getattr2(): rewritten to remove unnecessary stuff and
streamlined a bit.

instancemethod_descr_get(): don't bind an unbound method of a class
that's not a base class of the argument class.
/external/python/cpython2/Objects/classobject.c
cdf0d75897ddde0b27bad24aac4845824578f5ee 17-Aug-2001 Guido van Rossum <guido@python.org> Instance methods: allow a NULL value for im_class.
/external/python/cpython2/Objects/classobject.c
501c7c7d0eb8c8fb1a9384092efed0141052f324 16-Aug-2001 Guido van Rossum <guido@python.org> classobject.c:instancemethod_descr_get(): when a bound method is
assigned to a class variable and then accessed via an instance, it
should not be rebound.

test_descr.py:methods(): test for the condition above.
/external/python/cpython2/Objects/classobject.c
23cc2b4991001b79f0b87deef554ee7b66e8bbc4 15-Aug-2001 Guido van Rossum <guido@python.org> PyMethod_Type: add a tp_descr_get slot function to ensure proper
binding of unbound methods.
/external/python/cpython2/Objects/classobject.c
4668b000a1d9113394941ad39875c827634feb49 08-Aug-2001 Guido van Rossum <guido@python.org> Implement PEP 238 in its (almost) full glory.

This introduces:

- A new operator // that means floor division (the kind of division
where 1/2 is 0).

- The "future division" statement ("from __future__ import division)
which changes the meaning of the / operator to implement "true
division" (where 1/2 is 0.5).

- New overloadable operators __truediv__ and __floordiv__.

- New slots in the PyNumberMethods struct for true and floor division,
new abstract APIs for them, new opcodes, and so on.

I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.

Not yet implemented are warnings (default off) when / is used with int
or long arguments.

This has been on display since 7/31 as SF patch #443474.

Flames to /dev/null.
/external/python/cpython2/Objects/classobject.c
5962cbf5baa2fb4bf5817b1e272acc3512e49027 02-Aug-2001 Tim Peters <tim.peters@gmail.com> Fix the test_weakref.py failure. Introduced by resolving "a conflict"
(which didn't actually exist!) incorrectly.
/external/python/cpython2/Objects/classobject.c
6d6c1a35e08b95a83dbe47dbd9e6474daff00354 02-Aug-2001 Tim Peters <tim.peters@gmail.com> Merge of descr-branch back into trunk.
/external/python/cpython2/Objects/classobject.c
0ba9e3ac27d814bde97bbec212a4877e73d59c64 22-May-2001 Guido van Rossum <guido@python.org> init_name_op(): add (void) to the argument list to make it a valid
prototype, for gcc -Wstrict-prototypes.
/external/python/cpython2/Objects/classobject.c
1b0feb4ada9b1ff604f9d3100254f9071a96713f 11-May-2001 Jeremy Hylton <jeremy@alum.mit.edu> Variant of SF patch 423181

For rich comparisons, use instance_getattr2() when possible to avoid
the expense of setting an AttributeError. Also intern the name_op[]
table and use the interned strings rather than creating a new string
and interning it each time through.
/external/python/cpython2/Objects/classobject.c
cb8d368b824a38a0b04598ba2bcd107d6aae3595 05-May-2001 Tim Peters <tim.peters@gmail.com> Reimplement PySequence_Contains() and instance_contains(), so they work
safely together and don't duplicate logic (the common logic was factored
out into new private API function _PySequence_IterContains()).
Visible change:
some_complex_number in some_instance
no longer blows up if some_instance has __getitem__ but neither
__contains__ nor __iter__. test_iter changed to ensure that remains true.
/external/python/cpython2/Objects/classobject.c
4dcb85b81756fb4b93c296831646c0d015ad38aa 03-May-2001 Fred Drake <fdrake@acm.org> Since Py_TPFLAGS_HAVE_WEAKREFS is set in Py_TPFLAGS_DEFAULT, it does not
need to be specified in the type structures independently. The flag
exists only for binary compatibility.

This is a "source cleanliness" issue and introduces no behavioral changes.
/external/python/cpython2/Objects/classobject.c
82c690f11ac93f5a3055f614ddd7f1cd29793136 30-Apr-2001 Guido van Rossum <guido@python.org> Well darnit! The innocuous fix I made to PyObject_Print() caused
printing of instances not to look for __str__(). Fix this.
/external/python/cpython2/Objects/classobject.c
213c7a6aa5889f42495352199715a1c1a0833a00 23-Apr-2001 Guido van Rossum <guido@python.org> Mondo changes to the iterator stuff, without changing how Python code
sees it (test_iter.py is unchanged).

- Added a tp_iternext slot, which calls the iterator's next() method;
this is much faster for built-in iterators over built-in types
such as lists and dicts, speeding up pybench's ForLoop with about
25% compared to Python 2.1. (Now there's a good argument for
iterators. ;-)

- Renamed the built-in sequence iterator SeqIter, affecting the C API
functions for it. (This frees up the PyIter prefix for generic
iterator operations.)

- Added PyIter_Check(obj), which checks that obj's type has a
tp_iternext slot and that the proper feature flag is set.

- Added PyIter_Next(obj) which calls the tp_iternext slot. It has a
somewhat complex return condition due to the need for speed: when it
returns NULL, it may not have set an exception condition, meaning
the iterator is exhausted; when the exception StopIteration is set
(or a derived exception class), it means the same thing; any other
exception means some other error occurred.
/external/python/cpython2/Objects/classobject.c
59d1d2b434e8cf79e8b1321f148254c68f56c1f7 20-Apr-2001 Guido van Rossum <guido@python.org> Iterators phase 1. This comprises:

new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER
new C API PyObject_GetIter(), calls tp_iter
new builtin iter(), with two forms: iter(obj), and iter(function, sentinel)
new internal object types iterobject and calliterobject
new exception StopIteration
new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py)
new magic number for .pyc files
new special method for instances: __iter__() returns an iterator
iteration over dictionaries: "for x in dict" iterates over the keys
iteration over files: "for x in file" iterates over lines

TODO:

documentation
test suite
decide whether to use a different way to spell iter(function, sentinal)
decide whether "for key in dict" is a good idea
use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?)
speed tuning (make next() a slot tp_next???)
/external/python/cpython2/Objects/classobject.c
db81e8ddf8953359e8c2ed9569dd2e774d78ae95 23-Mar-2001 Fred Drake <fdrake@acm.org> Add support for weak references to the function and method types.
/external/python/cpython2/Objects/classobject.c
4e262a963190b201578b0b5d972035b1637f6bd5 22-Mar-2001 Fred Drake <fdrake@acm.org> A small change to the C API for weakly-referencable types: Such types
must now initialize the extra field used by the weak-ref machinery to
NULL themselves, to avoid having to require PyObject_INIT() to check
if the type supports weak references and do it there. This causes less
work to be done for all objects (the type object does not need to be
consulted to check for the Py_TPFLAGS_HAVE_WEAKREFS bit).
/external/python/cpython2/Objects/classobject.c
b60654bc15597f4b08fb6d97774d655ae5176ca4 26-Feb-2001 Fred Drake <fdrake@acm.org> The return value from PyObject_ClearWeakRefs() is no longer meaningful,
so make it void.
/external/python/cpython2/Objects/classobject.c
4f9b13bac8335d4614499673a3349b2c97401f12 26-Feb-2001 Barry Warsaw <barry@python.org> instancemethod_setattro(): Raise TypeError if an attempt is made to
set a function attribute on a method (either bound or unbound). This
reverts to Python 2.0 behavior that no attributes of the method are
writable, but provides a more informative error message.
/external/python/cpython2/Objects/classobject.c
41deb1efc2f969b58e49af669cc20d15ccdb04c6 01-Feb-2001 Fred Drake <fdrake@acm.org> PEP 205, Weak References -- initial checkin.
/external/python/cpython2/Objects/classobject.c
3202c6fac875615efae017c6f6219a498f6fc90e 30-Jan-2001 Guido van Rossum <guido@python.org> Rename dubiously named local variable 'cmpfunc' -- this is also a
typedef, and at least one compiler choked on this.

(SF patch #103457, by bquinlan)
/external/python/cpython2/Objects/classobject.c
09ac89ae78a4977af6eda4b0e0c396f577220bd2 29-Jan-2001 Jeremy Hylton <jeremy@alum.mit.edu> fix indentation glitch
/external/python/cpython2/Objects/classobject.c
5cc2c8c3c8d9809c45fee8d638dae431b56e773d 28-Jan-2001 Fred Drake <fdrake@acm.org> Re-factored PyInstance_New() into PyInstance_New() and PyInstance_NewRaw().
/external/python/cpython2/Objects/classobject.c
65e8bd7fd5af5de8e6354832d5c00e7cc9dff7ab 19-Jan-2001 Guido van Rossum <guido@python.org> Rich comparisons fallout: instance_hash() should check for both
__cmp__ and __eq__ absent before deciding to do a quickie
based on the object address. (Tim Peters discovered this.)
/external/python/cpython2/Objects/classobject.c
24f67d568cf878f53c647356aa4e446f7ae9de61 18-Jan-2001 Guido van Rossum <guido@python.org> Fix a leak in instance_coerce(). This was introduced by Neil's
earlier coercion changes, not by rich comparisons. When a coercion
function returns 1 (meaning it cannot do it), it should not INCREF the
arguments. When no __coerce__() method was found, instance_coerce()
originally returned 0, pretending it did it. Neil changed the return
value to 1, more accurately reflecting that it didn't do anything, but
forgot to take out the two INCREF calls.
/external/python/cpython2/Objects/classobject.c
8998b4f691db9bf1efcdd1fd496aaea64200a957 17-Jan-2001 Guido van Rossum <guido@python.org> Rich comparisons.

- Got rid of instance_cmp(); refactored instance_compare().

- Added instance_richcompare() which calls __lt__() etc.

Some unrelated stuff mixed in:

- Aligned comments in various large struct initializers.

- Better test to avoid recursion if __coerce__ returns self as the
first argument (this is an unrelated fix by Neil Schemenauer!).

- Style nit: don't use Py_DECREF(Py_NotImplemented); use
Py_DECREF(result) -- it just looks better. :-)
/external/python/cpython2/Objects/classobject.c
d6a9e84c8193076e776a1b419148f3043e2f6330 15-Jan-2001 Barry Warsaw <barry@python.org> Committing PEP 232, function attribute feature, approved by Guido.
Closes SF patch #103123.

funcobject.h:

PyFunctionObject: add the func_dict slot.

funcobject.c:

PyFunction_New(): Initialize the func_dict slot to NULL.

func_getattr(): Rename to func_getattro() and change the
signature. It's more efficient to use attro methods and dig the C
string out than it is to re-convert a C string to a PyString.

Also, add support for getting the __dict__ (a.k.a. func_dict)
attribute, and for getting an arbitrary function attribute.

func_setattr(): Rename to func_setattro() and change the signature
for the same reason. Also add support for setting __dict__
(a.k.a. func_dict) and any arbitrary function attribute.

func_dealloc(): Be sure to DECREF the func_dict slot.

func_traverse(): Be sure to traverse func_dict too.

PyFunction_Type: make the necessary func_?etattro() changes.

classobject.c:

instancemethod_memberlist: Add __dict__

instancemethod_setattro(): New method to set arbitrary attributes
on methods (really the underlying im_func). Raise TypeError when
the instance is bound or when you're trying to set one of the
reserved im_* attributes.

instancemethod_getattr(): Renamed to instancemethod_getattro()
since that's what it really is. Also, added support fo getting
arbitrary attributes through the im_func.

PyMethod_Type: Do the ?etattr{,o} dance.
/external/python/cpython2/Objects/classobject.c
29bfc071838d8aa02272af70ae88aaf7ea90db27 04-Jan-2001 Neil Schemenauer <nascheme@enme.ucalgary.ca> Make instances a new style number type. See PEP 208 for details. Instance
types no longer get special treatment from abstract.c so more number number
methods have to be implemented.
/external/python/cpython2/Objects/classobject.c
661ea26b3d8621ad0acc0ed2f2036ab29355f8ff 24-Oct-2000 Fred Drake <fdrake@acm.org> Ka-Ping Yee <ping@lfw.org>:
Changes to error messages to increase consistency & clarity.

This (mostly) closes SourceForge patch #101839.
/external/python/cpython2/Objects/classobject.c
e3550a65eb0380b6026947d5ad8f4db272d99e55 04-Oct-2000 Neil Schemenauer <nascheme@enme.ucalgary.ca> - fix a GC bug caused by malloc() failing
/external/python/cpython2/Objects/classobject.c
6b184918f6611654d8501ecd467209ddcb33f027 17-Sep-2000 Tim Peters <tim.peters@gmail.com> Fix for SF bug 110688: Instance deallocation neglected to account for
that Py_INCREF boosts global _Py_RefTotal when Py_REF_DEBUG is defined
but Py_TRACE_REFS isn't.

There are, IMO, way too many preprocessor gimmicks in use for refcount
debugging (at least 3 distinct true/false symbols, but not all 8 combos
are supported by the code, etc etc), and no coherent documentation of
this stuff -- 'twas too painful to track this one down.
/external/python/cpython2/Objects/classobject.c
ce20967c2c4d1aa1333bcda5a3d8a86587af70b0 15-Sep-2000 Neil Schemenauer <nascheme@enme.ucalgary.ca> Don't remove instance objects from the GC container set until we are
they are dead. Fixes bug #113812.
/external/python/cpython2/Objects/classobject.c
8586991099e4ace18ee94163a96b8ea1bed77ebe 02-Sep-2000 Guido van Rossum <guido@python.org> REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
/external/python/cpython2/Objects/classobject.c
b709df381034b6055f03644a8f2eb35cfc6cb411 01-Sep-2000 Jeremy Hylton <jeremy@alum.mit.edu> refactor __del__ exception handler into PyErr_WriteUnraisable
add sanity check to gc: if an exception occurs during GC, call
PyErr_WriteUnraisable and then call Py_FatalEror.
/external/python/cpython2/Objects/classobject.c
1de2a79a481d4d9e449734ab51e08b30549cf07e 25-Aug-2000 Thomas Wouters <thomas@python.org> Call PyErr_Clear() to clear the AttributeError raised by GetAttr.
/external/python/cpython2/Objects/classobject.c
e289e0bd0c3db9755bb2ddd49b08091049bc301d 24-Aug-2000 Thomas Wouters <thomas@python.org> Support for the in-place operations introduced by augmented assignment. Only
the list object supports this currently, but other candidates are
gladly accepted (like arraymodule and such.)
/external/python/cpython2/Objects/classobject.c
dc55d715bbe23ccda3942da667211ff796f31ed2 18-Aug-2000 Barry Warsaw <barry@python.org> PyInstance_DoBinOp(): When comparing the pointers, they must be cast
to integer types (i.e. Py_uintptr_t, our spelling of C9X's uintptr_t).
ANSI specifies that pointer compares other than == and != to
non-related structures are undefined. This quiets an Insure
portability warning.
/external/python/cpython2/Objects/classobject.c
1d75a79c009e500923128716a02efbe86135e64e 18-Aug-2000 Thomas Wouters <thomas@python.org> Apply SF patch #101029: call __getitem__ with a proper slice object if there
is no __getslice__ available. Also does the same for C extension types.
Includes rudimentary documentation (it could use a cross reference to the
section on slice objects, I couldn't figure out how to do that) and a test
suite for all Python __hooks__ I could think of, including the new
behaviour.
/external/python/cpython2/Objects/classobject.c
c307352027ba146150a8f5a56be0ed317fcd4323 24-Jul-2000 Thomas Wouters <thomas@python.org> ANSIfy functions that were hiding inside a macro.
/external/python/cpython2/Objects/classobject.c
7e47402264cf87b9bbb61fc9ff610af08add7c7b 16-Jul-2000 Thomas Wouters <thomas@python.org> Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
/external/python/cpython2/Objects/classobject.c
799124718ddfbb95440470037d8d7760b821646f 09-Jul-2000 Fred Drake <fdrake@acm.org> ANSI-fication of the sources.
/external/python/cpython2/Objects/classobject.c
dbd9ba6a6c19c3d06f5684b3384a934f740038db 09-Jul-2000 Tim Peters <tim.peters@gmail.com> Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
/external/python/cpython2/Objects/classobject.c
4ca150bdb219a0039277808e760ed8e4fcdc592f 08-Jul-2000 Skip Montanaro <skip@pobox.com> _Py_RefTotal should only be declared here when Py_TRACE_REFS are #define'd
/external/python/cpython2/Objects/classobject.c
4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe 01-Jul-2000 Guido van Rossum <guido@python.org> Neil Schemenauer: small fixes for GC
/external/python/cpython2/Objects/classobject.c
ffcc3813d82e6b96db79f518f4e67b940a13ce64 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice - 2nd try.
/external/python/cpython2/Objects/classobject.c
fd71b9e9d496caa510dec56a9b69966558d6ba5d 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice.
/external/python/cpython2/Objects/classobject.c
a44d353e2b6d947d36ab9d36c1fc84335a0878fe 30-Jun-2000 Fred Drake <fdrake@acm.org> Trent Mick <trentm@activestate.com>:

The common technique for printing out a pointer has been to cast to a long
and use the "%lx" printf modifier. This is incorrect on Win64 where casting
to a long truncates the pointer. The "%p" formatter should be used instead.

The problem as stated by Tim:
> Unfortunately, the C committee refused to define what %p conversion "looks
> like" -- they explicitly allowed it to be implementation-defined. Older
> versions of Microsoft C even stuck a colon in the middle of the address (in
> the days of segment+offset addressing)!

The result is that the hex value of a pointer will maybe/maybe not have a 0x
prepended to it.


Notes on the patch:

There are two main classes of changes:
- in the various repr() functions that print out pointers
- debugging printf's in the various thread_*.h files (these are why the
patch is large)


Closes SourceForge patch #100505.
/external/python/cpython2/Objects/classobject.c
c5007aa5c3d64109578cf12b026ca6305acff97b 30-Jun-2000 Jeremy Hylton <jeremy@alum.mit.edu> final patches from Neil Schemenauer for garbage collection
/external/python/cpython2/Objects/classobject.c
13634cf7a407202777285172a57cfcddb20a2047 29-Jun-2000 Fred Drake <fdrake@acm.org> This patch addresses two main issues: (1) There exist some non-fatal
errors in some of the hash algorithms. For exmaple, in float_hash and
complex_hash a certain part of the value is not included in the hash
calculation. See Tim's, Guido's, and my discussion of this on
python-dev in May under the title "fix float_hash and complex_hash for
64-bit *nix"

(2) The hash algorithms that use pointers (e.g. func_hash, code_hash)
are universally not correct on Win64 (they assume that sizeof(long) ==
sizeof(void*))

As well, this patch significantly cleans up the hash code. It adds the
two function _Py_HashDouble and _PyHash_VoidPtr that the various
hashing routine are changed to use.

These help maintain the hash function invariant: (a==b) =>
(hash(a)==hash(b))) I have added Lib/test/test_hash.py and
Lib/test/output/test_hash to test this for some cases.
/external/python/cpython2/Objects/classobject.c
d7823f264570fb94f179e453330ea12f6158e2e5 29-Jun-2000 Guido van Rossum <guido@python.org> Vladimir Marangozov:

Avoid calling the dealloc function, previously triggered with
DECREF(inst). This caused a segfault in PyDict_GetItem, called with a
NULL dict, whenever inst->in_dict fails under low-memory conditions.
/external/python/cpython2/Objects/classobject.c
ad89bbcd887724a1b199671dce9ae7c7718f6866 28-Jun-2000 Guido van Rossum <guido@python.org> Trent Mick: change a few casts for Win64 compatibility.
/external/python/cpython2/Objects/classobject.c
d08b4c4524a31695d7e63768c02f472c9cb54fbd 23-Jun-2000 Jeremy Hylton <jeremy@alum.mit.edu> part 2 of Neil Schemenauer's GC patches:

This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
/external/python/cpython2/Objects/classobject.c
d22162bac7e42ccf90571ee2607c9c42ed2df3fe 23-Jun-2000 Jeremy Hylton <jeremy@alum.mit.edu> traverse functions should return 0 on success
/external/python/cpython2/Objects/classobject.c
8caad49c30d2f9ecd09c8838bb691360e40c2665 23-Jun-2000 Jeremy Hylton <jeremy@alum.mit.edu> Round 1 of Neil Schemenauer's GC patches:

This patch adds the type methods traverse and clear necessary for GC
implementation.
/external/python/cpython2/Objects/classobject.c
b18618dab7b6b85bb05b084693706e59211fa180 04-May-2000 Guido van Rossum <guido@python.org> Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
/external/python/cpython2/Objects/classobject.c
9e392e2412308c7923195f226510bb1f174be215 26-Apr-2000 Jeremy Hylton <jeremy@alum.mit.edu> potentially useless optimization

The previous checkin (2.84) added a PyErr_Format call that made the
cost of raising an AttributeError much more expensive. In general
this doesn't matter, except that checks for __init__ and
__del__ methods, where exceptions are caught and cleared in C, also
got much more expensive.

The fix is to split instance_getattr1 into two calls:

instance_getattr2 checks the instance and the class for the attribute
and returns it or returns NULL on error. It does not raise an
exception.

instance_getattr1 does rexec checks, then calls instance_getattr2. It
raises an exception if instance_getattr2 returns NULL.

PyInstance_New and instance_dealloc now call instance_getattr2
directly.
/external/python/cpython2/Objects/classobject.c
5f8b12f27e1cce4ff7e5fd3594a83855db350784 10-Apr-2000 Guido van Rossum <guido@python.org> Mark Hammond:

In line with a similar checkin to object.c a while ago, this patch
gives a more descriptive error message for an attribute error on a
class instance. The message now looks like:

AttributeError: 'Descriptor' instance has no attribute 'GetReturnType'
/external/python/cpython2/Objects/classobject.c
ee28c3a5eae41a9b349ebbe7c4583d6a36a1984c 28-Feb-2000 Guido van Rossum <guido@python.org> Patch by Mozhe Zadka, for __contains__ (overloading 'in'). This adds
an instance method instance_contains as sq_contains. It looks for
__contains__ and if not found falls back to previous behaviour.
Done.
/external/python/cpython2/Objects/classobject.c
bffd683f7356d92d4504b2bcaa7221fab3f52f4e 20-Jan-2000 Guido van Rossum <guido@python.org> The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha. Mostly added casts etc.
/external/python/cpython2/Objects/classobject.c
42636dc64d098ab034980e7c3e2bb2e056db3fb7 11-Oct-1999 Guido van Rossum <guido@python.org> Fix for PR#98 (Adrian Eyre) -- in instancemethod_repr, the funcname
object is DECREFed too early.
/external/python/cpython2/Objects/classobject.c
152d8173a3844d00d7511484d3c1bfd1b8725613 04-Aug-1998 Guido van Rossum <guido@python.org> Fix a memory leak -- the cached values of __getattr__ etc. were never
freed.
/external/python/cpython2/Objects/classobject.c
d4ba73c75bd4a0f049d8fb45859ddee1a2393b4f 10-Jul-1998 Guido van Rossum <guido@python.org> Move the definition of PyMethodObject to classobject.h, so it can define
macros for more efficient access to the fields.
/external/python/cpython2/Objects/classobject.c
7859f87fdbcc0679aa6ed9c181ee3826002ac5ca 08-Jul-1998 Guido van Rossum <guido@python.org> Marc-Andre Lemburg's patch to support instance methods with other
callable objects than regular Pythonm functions as their im_func.
/external/python/cpython2/Objects/classobject.c
7ba30431ec821ba00c833d451abe047a9ae60aba 08-Jul-1998 Guido van Rossum <guido@python.org> Recompute the special getattr/setattr/delattr cache slots after
changing __dict__ *or* __bases__.
/external/python/cpython2/Objects/classobject.c
e0fdf6f1a8066272de01ce02500ea53738b28f90 12-Jun-1998 Guido van Rossum <guido@python.org> Keep Microsoft's compiler happy.
/external/python/cpython2/Objects/classobject.c
a63eff6e6aac8325cb3542a2d678cfc69fa8597e 29-May-1998 Guido van Rossum <guido@python.org> Allow assignments to special class attributes -- with typechecks, and
not in restricted mode.

__dict__ can be set to any dictionary; the cl_getattr, cl_setattr and
cl_delattr slots are refreshed.

__name__ can be set to any string.

__bases__ can be set to to a tuple of classes, provided they are not
subclasses of the class whose attribute is being assigned.

__getattr__, __setattr__ and __delattr__ can be set to anything, or
deleted; the appropriate slot (cl_getattr, cl_setattr, cl_delattr) is
refreshed.

(Note: __name__ really doesn't need to be a special attribute, but
that would be more work.)
/external/python/cpython2/Objects/classobject.c
617c1b0116891c3cbb6b10865e86d48e93fefdf0 28-May-1998 Guido van Rossum <guido@python.org> Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().
/external/python/cpython2/Objects/classobject.c
4180cf16499b3e5398e0cd9dc7b027b885a01db3 14-May-1998 Guido van Rossum <guido@python.org> Remove a redundant statement from halfbinop().
/external/python/cpython2/Objects/classobject.c
b7f1afe4a84c6ca6ecb3005e1ba3ef801a0257e7 03-Dec-1997 Guido van Rossum <guido@python.org> Change the default repr() and str() of class instance objects to look
like <modulename.classname instance at ...> (to match the repr() of
class objects.
/external/python/cpython2/Objects/classobject.c
3931df92506c60a8060c78709f05ee1afad2e788 18-Nov-1997 Guido van Rossum <guido@python.org> Undo another glitch of the automatic not-so-Grand Renaming; some local
variables called 'coerce' were accidentally renamed to
'PyNumber_Coerce'. Rename them back to coercefunc.
/external/python/cpython2/Objects/classobject.c
4a2a621907679f74d2c8f255902f0565e997f333 21-Oct-1997 Guido van Rossum <guido@python.org> Write a str() function for class objects that returns
"modulename.classname" instead of returning the same as repr().
/external/python/cpython2/Objects/classobject.c
04d73c495ef132a898af997d33fac0badfc3c519 07-Oct-1997 Guido van Rossum <guido@python.org> Check that all base classes are indeed class objects, rather than
expecting the caller to do so.
/external/python/cpython2/Objects/classobject.c
7cc56eb524dd83e3ba9d76accec3b0fe4010a48a 12-Sep-1997 Guido van Rossum <guido@python.org> When creating a class, set its __module__ attribute to the module
whose name is in the current globals' __name__ variable. If __name__
is not set, ignore this.
/external/python/cpython2/Objects/classobject.c
b2173c3146e945100ba53bfe6343d20ec3c9a333 25-Aug-1997 Guido van Rossum <guido@python.org> Allow assignments to instance.__dict__ and instance.__class__. The
former lets you give an instance a set of new instance vars. The
latter lets you give it a new class. Both are typechecked and
disallowed in restricted mode.

For classes, the check for read-only special attributes is tightened
so that only assignments to __dict__, __bases__, __name__,
__getattr__, __setattr__, and __delattr__ (these could be made to work
as well, but I don't know if that's useful -- let's see first whether
mucking with instances will help).
/external/python/cpython2/Objects/classobject.c
a0d349f46ab1655aa0ab671061f3c2770562eca4 05-Aug-1997 Guido van Rossum <guido@python.org> Added separate free list for instance method objects, for a few
percent speed up. Also add PyMethod_Fini() to discard it.
/external/python/cpython2/Objects/classobject.c
c8b6df90045a3f419e6fab272d93ad4159e54ccc 23-May-1997 Guido van Rossum <guido@python.org> PyObject_Compare can raise an exception now.
/external/python/cpython2/Objects/classobject.c
0add15f6a5daceda1972746d2263aba8525c34c4 09-May-1997 Guido van Rossum <guido@python.org> removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits.
/external/python/cpython2/Objects/classobject.c
c0b618a2ccfb0fc39e07ee96dc09da77fbcce1b1 02-May-1997 Guido van Rossum <guido@python.org> Quickly renamed the last directory.
/external/python/cpython2/Objects/classobject.c
a412d24be056bebb77f54681c4490954759739fe 18-Jan-1997 Guido van Rossum <guido@python.org> Intern the various string objects created to speed up lookups.
/external/python/cpython2/Objects/classobject.c
cbd1e4eb5f7ce78300387ae872d89153c2b4dd66 05-Dec-1996 Guido van Rossum <guido@python.org> Yet more elaborate message for exception in __del__.
Make gcc -Wall happy.
/external/python/cpython2/Objects/classobject.c
d266eb460e20ded087d01a29da0a230e235afc40 25-Oct-1996 Guido van Rossum <guido@python.org> New permission notice, includes CNRI.
/external/python/cpython2/Objects/classobject.c
8bcf369cf9890ef7cfeb6f199d46932b7c249662 21-Oct-1996 Guido van Rossum <guido@python.org> Support passing in an empty dictionary of keywords to newinstanceobject.
/external/python/cpython2/Objects/classobject.c
22a85e5308499cef3dc6171b9697bbf43ef4f0f1 12-Sep-1996 Guido van Rossum <guido@python.org> More detailed error message about exception in __del__
/external/python/cpython2/Objects/classobject.c
e5920bc4c67ca8c12b3dd87b1047e144c2f3b3c3 26-Aug-1996 Guido van Rossum <guido@python.org> Use getstringsize where available instead of strlen.
/external/python/cpython2/Objects/classobject.c
ad8997887b5300caef0f347a07f39b3ff94b034a 23-Aug-1996 Guido van Rossum <guido@python.org> Be a bit more careful with printing a warning for a failed __del__.
/external/python/cpython2/Objects/classobject.c
019f424a0a88e97e3df2e83ea6b66aa50943702f 21-Aug-1996 Guido van Rossum <guido@python.org> More efficient handling of "__doc__" lookup.
/external/python/cpython2/Objects/classobject.c
89227eb0f50af9c18eaf7d1edc8036d0dd5ccb62 20-Aug-1996 Guido van Rossum <guido@python.org> Write warning about exception in __del__ to stderr, not stdout.
/external/python/cpython2/Objects/classobject.c
0dfcf753ad75892c0ad2a68713841402183514d4 13-Aug-1996 Guido van Rossum <guido@python.org> Disable support for access statement
/external/python/cpython2/Objects/classobject.c
2878a69922548c9f663779e8c0087b24530d203e 09-Aug-1996 Guido van Rossum <guido@python.org> Optimizations by Sjoerd:
- define tp_getattro, tp_setattro
- use precreated string objects for most common exceptions and method names
/external/python/cpython2/Objects/classobject.c
3cb486879a8ca504a61b747fae389bbc01756388 21-Jul-1996 Guido van Rossum <guido@python.org> Only __dict__ and __class__ are read-only instance attributes
/external/python/cpython2/Objects/classobject.c
441e4ab802cadf2543d2c9af1e4070c59f03a08c 24-May-1996 Guido van Rossum <guido@python.org> new debugger symbol names
/external/python/cpython2/Objects/classobject.c
6dabc984005c02c0289a17d8d173dc800214b44f 14-May-1996 Guido van Rossum <guido@python.org> Added __name__ attribute to class instance method objects.
Removed im_doc attribute; __name__ and __doc__ are now handled by
special casing in instancemethodgetattr(). This saves a few bytes and
INCREF/DECREF calls per i.m. object allocation/deallocation.
/external/python/cpython2/Objects/classobject.c
6f011d7ad5671f320ace1502669469af7b4051f0 18-Sep-1995 Sjoerd Mullender <sjoerd@acm.org> Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise
may get inc_count sanity check abort).
/external/python/cpython2/Objects/classobject.c
740f357363edce210347aed9e4a869a03e8befec 28-Aug-1995 Sjoerd Mullender <sjoerd@acm.org> Fixed calling of __del__ method with TRACE_REFS defined.
/external/python/cpython2/Objects/classobject.c
ac21f6a5797286e97136723a094f5b86070cde55 04-Aug-1995 Guido van Rossum <guido@python.org> class objects are read-only in restricted mode
/external/python/cpython2/Objects/classobject.c
a83f270a4ba3a8e3fcc38fa1bdf7f62dd723cfb8 26-Jul-1995 Guido van Rossum <guido@python.org> changes for keyword args to built-in functions and classes
/external/python/cpython2/Objects/classobject.c
1311e3ce73263854e3899d14cc636ccfa166eebf 12-Jul-1995 Guido van Rossum <guido@python.org> args to call_object must be tuple or NULL
/external/python/cpython2/Objects/classobject.c
e9df727176faca694b5ef4daf1f423acdc683c3d 06-Apr-1995 Guido van Rossum <guido@python.org> change comparing instance methods
/external/python/cpython2/Objects/classobject.c
e95d92b65e0d524448e3b481d400867c4cb4aa05 26-Jan-1995 Guido van Rossum <guido@python.org> removed unused vars
/external/python/cpython2/Objects/classobject.c
879c581826ec9c0356dbf137cface7a27f51810c 10-Jan-1995 Guido van Rossum <guido@python.org> implement coercions involving instances properly
/external/python/cpython2/Objects/classobject.c
10393b170863799bbfa785410828e468c84d4937 10-Jan-1995 Guido van Rossum <guido@python.org> add restrictions in restricted mode
/external/python/cpython2/Objects/classobject.c
e7d444f7855af80d928ba8ba20f57e59c602e2ac 07-Jan-1995 Guido van Rossum <guido@python.org> * Objects/classobject.c: added 5th (function) parameter to
instancebinop, to support things like Rational * float; added
documentation strings to classes and methods
/external/python/cpython2/Objects/classobject.c
6610ad9d6bfe484a026f1fd34ebdcdf9924f9114 04-Jan-1995 Guido van Rossum <guido@python.org> Added 1995 to copyright message.
floatobject.c: fix hash().
methodobject.c: support METH_FREENAME flag bit.
/external/python/cpython2/Objects/classobject.c
d7047b395e392ce9e46f9a83480ade8b37f6d5b0 02-Jan-1995 Guido van Rossum <guido@python.org> Lots of minor changes. Note for mappingobject.c: the hash table pointer
can now be NULL.
/external/python/cpython2/Objects/classobject.c
bb3c5f74069df670eba656e891b59553fc66019a 10-Nov-1994 Guido van Rossum <guido@python.org> fix comparison of instances without _-cmp__
/external/python/cpython2/Objects/classobject.c
b9a6d1249894c60eb38d3cc8ce4c1b808482b377 19-Oct-1994 Sjoerd Mullender <sjoerd@acm.org> Comparison of two class instances without __cmp__ or __rcmp__ methods
was broken.
/external/python/cpython2/Objects/classobject.c
03093a248d4ef3af23a5906dea276c01e0c1ae2c 28-Sep-1994 Guido van Rossum <guido@python.org> * Include/classobject.h, Objects/classobject.c, Python/ceval.c:
entirely redone operator overloading. The rules for class
instances are now much more relaxed than for other built-in types
(whose coerce must still return two objects of the same type)

* Objects/floatobject.c: add overflow check when converting float
to int and implement truncation towards zero using ceil/float

* Objects/longobject.c: change ValueError to OverflowError when
converting to int

* Objects/rangeobject.c: modernized

* Objects/stringobject.c: use HAVE_LIMITS instead of __STDC__

* Objects/xxobject.c: changed to use new style (not finished?)
/external/python/cpython2/Objects/classobject.c
52ca98a39003cf977200cb5011bbde5271b1b1c0 05-Sep-1994 Guido van Rossum <guido@python.org> Yet another version (by me) of __getattr__ etc.
/external/python/cpython2/Objects/classobject.c
e773754ae54fc22510ace44a96252d3cae8f2f04 05-Sep-1994 Guido van Rossum <guido@python.org> Mods (really diffs to 2.29) by Michael Scharf for alternative __getattr__ etc.
/external/python/cpython2/Objects/classobject.c
91ab4a8353447f265a7559a4769ac5404bb0b157 17-Aug-1994 Guido van Rossum <guido@python.org> If an attribute is deleted, __setattr__ is called with 2 instead of 3
arguments (adding __delattr__ was deemed too much overhead)
/external/python/cpython2/Objects/classobject.c
e149fa2a1e34d18497579fff198c7ac2feb19096 12-Aug-1994 Guido van Rossum <guido@python.org> * Objects/classobject.c, Include/classobject.h: added __getattr__
and __setattr__ support to override getattr(x, name) and
setattr(x, name, value) for class instances. This uses a special
hack whereby the class is supposed to be static: the __getattr__
and __setattr__ methods are looked up only once and saved in the
instance structure for speed
/external/python/cpython2/Objects/classobject.c
b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af 01-Aug-1994 Guido van Rossum <guido@python.org> Merge alpha100 branch back to main trunk
/external/python/cpython2/Objects/classobject.c
b376a4ad1848d1319245f440c85ef265e1fef401 23-Nov-1993 Guido van Rossum <guido@python.org> * timemodule.c: Add hack for Solaris 2.
* posixmodule.c: don't prototype getcwd() -- it's not portable...
* mappingobject.c: double-check validity of last_name_char in
dict{lookup,insert,remove}.
* arraymodule.c: need memmove only for non-STDC Suns.
* Makefile: comment out HTML_LIBS and XT_USE by default
* pythonmain.c: don't prototype getopt() -- it's not standardized
* socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to
recvfrom() to (ANY*).
* pythonrun.c (initsigs): fix prototype, make it static
* intobject.c (LONG_BIT): only #define it if not already defined
* classobject.[ch]: remove all references to unused instance_convert()
* mappingobject.c (getmappingsize): Don't return NULL in int function.
/external/python/cpython2/Objects/classobject.c
3bb8a05947fb67ed827dd1e8d7c0a982a1ff989e 22-Oct-1993 Sjoerd Mullender <sjoerd@acm.org> Several optimizations and speed improvements.
cstubs: Use Matrix type instead of float[4][4].
/external/python/cpython2/Objects/classobject.c
21d335ed9ef6fbb16341809fe224b45a3f41243f 15-Oct-1993 Guido van Rossum <guido@python.org> Makefile, import.c: Lance's alternative module search (allow .pyc file
without .py file); Bill's dynamic loading for SunOS using shared
libraries.

pwdmodule.c (mkgrent): remove DECREF of uninitialized variable.

classobject.c (instance_getattr): Fix case when class lookup returns
unbound method instead of function.
/external/python/cpython2/Objects/classobject.c
eb6b33a837a180221b635331e005f990024bdb30 25-May-1993 Guido van Rossum <guido@python.org> * classobject.c: in instance_getattr, don't make a method out of a
function found as instance data.
* socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite
argument parsing in send/recv.
* More changes related to access (terminology change: owner instead of
class; allow any object as owner; local/global variables are owned
by their dictionary, only class/instance data is owned by the class;
"from...import *" now only imports objects with public access; etc.)
/external/python/cpython2/Objects/classobject.c
b3f7258f14cb2f3e52236a4087ed82541a173e7b 21-May-1993 Guido van Rossum <guido@python.org> * Lots of small changes related to access.
* Added "access *: ...", made access work for class methods.
* Introduced subclass check: make sure that when calling
ClassName.methodname(instance, ...), the instance is an instance of
ClassName or of a subclass thereof (this might break some old code!)
/external/python/cpython2/Objects/classobject.c
81daa32c15cfa9f05eda037916cdbfd5b4323431 20-May-1993 Guido van Rossum <guido@python.org> Access checks now work, at least for instance data (not for methods
yet). The class is now passed to eval_code and stored in the current
frame. It is also stored in instance method objects. An "unbound"
instance method is now returned when a function is retrieved through
"classname.funcname", which when called passes the class to eval_code.
/external/python/cpython2/Objects/classobject.c
25831652fd4c03323066d4cafdc0551c396a993e 19-May-1993 Guido van Rossum <guido@python.org> Several changes in one:

(1) dictionaries/mappings now have attributes values() and items() as
well as keys(); at the C level, use the new function mappinggetnext()
to iterate over a dictionary.

(2) "class C(): ..." is now illegal; you must write "class C: ...".

(3) Class objects now know their own name (finally!); and minor
improvements to the way how classes, functions and methods are
represented as strings.

(4) Added an "access" statement and semantics. (This is still
experimental -- as long as you don't use the keyword 'access' nothing
should be changed.)
/external/python/cpython2/Objects/classobject.c
8a0c3456c2020d1a1f87619c4651e4eab831938a 08-Apr-1993 Guido van Rossum <guido@python.org> Fix bug in class instance hash (forgot to clear error condition).
/external/python/cpython2/Objects/classobject.c
9bfef44d97d1ae24e03717e3d59024b44626a9de 29-Mar-1993 Guido van Rossum <guido@python.org> * Changed all copyright messages to include 1993.
* Stubs for faster implementation of local variables (not yet finished)
* Added function name to code object. Print it for code and function
objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
number has changed accordingly)
* Print address of self for built-in methods
* New internal functions getattro and setattro (getattr/setattr with
string object arg)
* Replaced "dictobject" with more powerful "mappingobject"
* New per-type functio tp_hash to implement arbitrary object hashing,
and hashobject() to interface to it
* Added built-in functions hash(v) and hasattr(v, 'name')
* classobject: made some functions static that accidentally weren't;
added __hash__ special instance method to implement hash()
* Added proper comparison for built-in methods and functions
/external/python/cpython2/Objects/classobject.c
e537240c252ff678d49451ee6f80fa934653a724 16-Mar-1993 Guido van Rossum <guido@python.org> * Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file.
* modsupport.[ch]: added vmkvalue().
* intobject.c: use mkvalue().
* stringobject.c: added "formatstring"; renamed string* to string_*;
ceval.c: call formatstring for string % value.
* longobject.c: close memory leak in divmod.
* parsetok.c: set result node to NULL when returning an error.
/external/python/cpython2/Objects/classobject.c
9e51f9bec85ac8bc167c2fb8d3956968ef8311af 12-Feb-1993 Guido van Rossum <guido@python.org> bltinmodule.c: added round(x, [n]); coerce() of two class instances
will try to coerce anyway.
classobject.c: instance 'nonzero' should first try __nonzero__
only then __len__.
/external/python/cpython2/Objects/classobject.c
d014ea6b5efbfb3d143fc8aacf8bee733cf4c8f0 26-Nov-1992 Guido van Rossum <guido@python.org> * classobject.c: in instance_lenth, test result of call_object
for exception before using it. Fixed a few other places where the
outcome of calling sq_length wasn't tested for exceptions
(bltinmodule.c, ceval.c).
/external/python/cpython2/Objects/classobject.c
7066dd75c5ee8385135541d03fb8edd8939ad740 17-Sep-1992 Guido van Rossum <guido@python.org> * Makefile: added IMGFILE; moved some stuff around.
* flmodule.c: added some missing functions; changed readonly flags of
some data members based upon FORMS documentation.
* listobject.c: fixed int/long arg lint bug (bites PC compilers).
* several: removed redundant print methods (repr is good enough).
* posixmodule.c: added (still experimental) process group functions.
/external/python/cpython2/Objects/classobject.c
1899c2e0550fa025080e35bb3ec25aeff0118dc7 12-Sep-1992 Guido van Rossum <guido@python.org> Made builtins int(), long(), float(), oct() and hex() more generic.
/external/python/cpython2/Objects/classobject.c
94472a0374f68fc7c746671eb87dc32253b02f05 04-Sep-1992 Guido van Rossum <guido@python.org> classobject.c moduleobject.c stdwinmodule.c xxobject.c:
raise AttributeError, not KeyError, when attribute deletion fails.
sunaudiodevmodule.c: check for deletion before calling setmember.
/external/python/cpython2/Objects/classobject.c
ebc8c51cde0432b5c70079f5fa05295224e8cb78 03-Sep-1992 Guido van Rossum <guido@python.org> Compare instance methods by comparing the object and the function.
/external/python/cpython2/Objects/classobject.c
6d946f98bd233efa676b7a05cb01cd0ca92549c0 14-Aug-1992 Guido van Rossum <guido@python.org> * macmodule.c: include allobjects.h, not .c
* timemodule.c: the mac has no unistd.h
* classobject.c: fixed several cases of return NULL that should be
return -1 !!!
/external/python/cpython2/Objects/classobject.c
e6eefc22313e7f2da5918ecd608fbb0b7a7a1610 14-Aug-1992 Guido van Rossum <guido@python.org> * classobject.[ch], {float,long,int}object.c, bltinmodule.c:
coercion is now completely generic.
* ceval.c: for instances, don't coerce for + and *; * reverses
arguments if left one is non-instance numeric and right one sequence.
/external/python/cpython2/Objects/classobject.c
04691fc1c1bb737c0db772f5c1ea697a351a01d9 12-Aug-1992 Guido van Rossum <guido@python.org> Changes so that user-defined classes can implement operations invoked
by special syntax: you can now define your own numbers, sequences and
mappings.
/external/python/cpython2/Objects/classobject.c
8dd79cf788d23bb2abdd5a6fd8557431e80cfe43 05-Apr-1992 Guido van Rossum <guido@python.org> Don't allow assignment to attributes named __*__
/external/python/cpython2/Objects/classobject.c
85998fa069b735b30ccf696898b9118d9bbc8b21 27-Mar-1992 Guido van Rossum <guido@python.org> Silence lint
/external/python/cpython2/Objects/classobject.c
e2966a63625283baab8ef5fd3aa4427e9fc70d24 10-Dec-1991 Guido van Rossum <guido@python.org> The cl_bases member of a class object is now never NULL.
/external/python/cpython2/Objects/classobject.c
670ceb30d3c7e093c31d9155e5a0548154b17d86 19-Nov-1991 Guido van Rossum <guido@python.org> Deleted unused local variable.
/external/python/cpython2/Objects/classobject.c
9430839accd5920b3a503a8ac02c5de1ae2449a8 20-Oct-1991 Guido van Rossum <guido@python.org> Add several secret __*__ attributes
/external/python/cpython2/Objects/classobject.c
e8122f19a09a761c563229098b14abfdcd8674d0 05-May-1991 Guido van Rossum <guido@python.org> Renamed class methods to instance methods (which they are)
/external/python/cpython2/Objects/classobject.c
569fce79010a4567af30b5e2523102f9e6983f98 16-Apr-1991 Guido van Rossum <guido@python.org> Rename class methods to instance methods (at least where user-visible)
/external/python/cpython2/Objects/classobject.c
21ed88cfe22c2c93ca0f044386bde0c5e435c4c3 04-Apr-1991 Guido van Rossum <guido@python.org> Change ugly 'class member' to more normal 'instance'.
/external/python/cpython2/Objects/classobject.c
f70e43a073b36c6f6e9894c01025243a77a452d4 19-Feb-1991 Guido van Rossum <guido@python.org> Added copyright notice.
/external/python/cpython2/Objects/classobject.c
3f5da24ea304e674a9abbdcffc4d671e32aa70f1 20-Dec-1990 Guido van Rossum <guido@python.org> "Compiling" version
/external/python/cpython2/Objects/classobject.c
2a9096b5f9d90c6d90a9386c82214237ffc69167 21-Oct-1990 Guido van Rossum <guido@python.org> New errors.
/external/python/cpython2/Objects/classobject.c
3cf0ddfd94fb683ba265c40f60bd1e329848f1c6 14-Oct-1990 Guido van Rossum <guido@python.org> (Some) new error handling.
/external/python/cpython2/Objects/classobject.c
85a5fbbdfea617f6cc8fae82c9e8c2b5c424436d 14-Oct-1990 Guido van Rossum <guido@python.org> Initial revision
/external/python/cpython2/Objects/classobject.c