History log of /external/python/cpython2/Objects/methodobject.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/methodobject.c
c83ea137d7e717f764e2f31fc2544f522de7d857 09-May-2010 Antoine Pitrou <solipsis@pitrou.net> Untabify C files. Will watch buildbots.
/external/python/cpython2/Objects/methodobject.c
1bf4765369d7a6d5f0a4ad616f8a887c8fc4af39 02-Jul-2009 Benjamin Peterson <benjamin@python.org> only order comparisons are removed in py3k #6119
/external/python/cpython2/Objects/methodobject.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/methodobject.c
593daf545bd9b7e7bcb27b498ecc6f36db9ae395 26-May-2008 Christian Heimes <christian@cheimes.de> Renamed PyString to PyBytes
/external/python/cpython2/Objects/methodobject.c
f19a7b90bd0cbdf40d02f125db3e39f077f3a89f 27-Apr-2008 Benjamin Peterson <benjamin@python.org> A little reformating of Py3k warnings
/external/python/cpython2/Objects/methodobject.c
9f4f48114fbf2df3803a44a30cd14e11679403fe 27-Apr-2008 Benjamin Peterson <benjamin@python.org> Use PyErr_WarnPy3k throughout
/external/python/cpython2/Objects/methodobject.c
d5b635f1969fdd609f0aff5669c9ec30e61be62e 25-Mar-2008 Georg Brandl <georg@python.org> Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.
/external/python/cpython2/Objects/methodobject.c
07e5681fd3a8c7169f569f6b70aa824f203f89d9 21-Mar-2008 Georg Brandl <georg@python.org> #2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
/external/python/cpython2/Objects/methodobject.c
6a644f92efb35e75f81d183aebfff3260b1454e2 18-Mar-2008 Steven Bethard <steven.bethard@gmail.com> Add py3k warnings for code and method inequality comparisons. This should resolve issue 2373. The codeobject.c and methodobject.c changes are both just backports of the Python 3 code.
/external/python/cpython2/Objects/methodobject.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/methodobject.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/methodobject.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/methodobject.c
e8954f8ce7d60d5d926f29511cde99f2f3ea0630 22-Nov-2007 Christian Heimes <christian@cheimes.de> Backport of the PCbuild9 directory from the py3k branch.
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)
/external/python/cpython2/Objects/methodobject.c
6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 21-Jul-2007 Martin v. Löwis <martin@v.loewis.de> PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
eb079f1c2533bcefcab3ef4c07b800e5bd37239f 16-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Use Py_ssize_t for counts and sizes.
Convert Py_ssize_t using PyInt_FromSsize_t
/external/python/cpython2/Objects/methodobject.c
18e165558b24d29e7e0ca501842b9236589b012a 15-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Merge ssize_t branch.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
8f5cdaa784f555149adf5e94fd2e989f99d6b1db 13-Dec-2003 Raymond Hettinger <python@rcn.com> * Added a new method flag, METH_COEXIST.

* Used the flag to optimize set.__contains__(), dict.__contains__(),
dict.__getitem__(), and list.__getitem__().
/external/python/cpython2/Objects/methodobject.c
6b29c0147b964e6afa6a09bb8d694bafc30cf7ad 18-Feb-2003 Guido van Rossum <guido@python.org> Make __module__ writable except in restricted mode (like for classic classes).
/external/python/cpython2/Objects/methodobject.c
ff71c98449c7fd2499d51474dbf690eb7f98dabf 18-Feb-2003 Jeremy Hylton <jeremy@alum.mit.edu> Make __module__ settable on functions and methods.
/external/python/cpython2/Objects/methodobject.c
4f0dcc9a9a4629607d4fff79912e8d0c86cd3914 31-Jan-2003 Jeremy Hylton <jeremy@alum.mit.edu> Provide __module__ attributes for functions defined in C and Python.

__module__ is the string name of the module the function was defined
in, just like __module__ of classes. In some cases, particularly for
C functions, the __module__ may be None.

Change PyCFunction_New() from a function to a macro, but keep an
unused copy of the function around so that we don't change the binary
API.

Change pickle's save_global() to use whichmodule() if __module__ is
None, but add the __module__ logic to whichmodule() since it might be
used outside of pickle.
/external/python/cpython2/Objects/methodobject.c
541ceec3e6e0b5b02c2d299ebf8af040d6193a5e 05-Jan-2003 Tim Peters <tim.peters@gmail.com> PyCFunction_Call(): Combined two switch cases w/ identical bodies.
/external/python/cpython2/Objects/methodobject.c
bf43f8af3500dfd98a46551942bf4a7ae4dad976 04-Jan-2003 Raymond Hettinger <python@rcn.com> SF Patch #661440: Refactor and streamline PyCFunction_Call

Refactor code in PyCFunction_Call giving a modest (tiny) speed boost,
a slight improvement in semantics (now detects invalid flag combinations),
and (arguably) improved clarity (making it blindingly clear which flag
combinations are allowed). All this comes at a cost of a few lines of
code duplication.

* Folded test for METH_KEYWORDS into the switch/case.
* Deferred testing for an empty dictionary until when and where needed.
* Make a similar deferral for filling the "size" variable.
* Inverted the dictionary test so that the common case falls though
instead of making a jump.
/external/python/cpython2/Objects/methodobject.c
7bf9715a8b794cb743fdac97a9014102985a3dd3 28-Mar-2002 Fred Drake <fdrake@acm.org> Introduce two new flag bits that can be set in a PyMethodDef method
descriptor, as used for the tp_methods slot of a type. These new flag
bits are both optional, and mutually exclusive. Most methods will not
use either. These flags are used to create special method types which
exist in the same namespace as normal methods without having to use
tedious construction code to insert the new special method objects in
the type's tp_dict after PyType_Ready() has been called.

If METH_CLASS is specified, the method will represent a class method
like that returned by the classmethod() built-in.

If METH_STATIC is specified, the method will represent a static method
like that returned by the staticmethod() built-in.

These flags may not be used in the PyMethodDef table for modules since
these special method types are not meaningful in that case; a
ValueError will be raised if these flags are found in that context.
/external/python/cpython2/Objects/methodobject.c
d91eec9df3d298a1ffb24b17241ee8af283abf2c 18-Mar-2002 Neil Schemenauer <nascheme@enme.ucalgary.ca> Re-enable GC of method objects.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
38b88c233a6706d3a84f372e4b20ab7700f6d79b 30-Aug-2001 Sjoerd Mullender <sjoerd@acm.org> Removed some unreachable break statements to silence SGI compiler.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
e3eb1f2b2320bceb10a763ec8691200b85ec287a 16-Aug-2001 Martin v. Löwis <martin@v.loewis.de> Patch #427190: Implement and use METH_NOARGS and METH_O.
/external/python/cpython2/Objects/methodobject.c
910d7d46dce571fa81428718e9be5307a56adeee 12-Aug-2001 Jeremy Hylton <jeremy@alum.mit.edu> Remove much dead code from ceval.c

The descr changes moved the dispatch for calling objects from
call_object() in ceval.c to PyObject_Call() in abstract.c.
call_object() and the many functions it used in ceval.c were no longer
used, but were not removed.

Rename meth_call() as PyCFunction_Call() so that it can be called by
the CALL_FUNCTION opcode in ceval.c.

Also, fix error message that referred to PyEval_EvalCodeEx() by its
old name eval_code2(). (I'll probably refer to it by its old name,
too.)
/external/python/cpython2/Objects/methodobject.c
6d6c1a35e08b95a83dbe47dbd9e6474daff00354 02-Aug-2001 Tim Peters <tim.peters@gmail.com> Merge of descr-branch back into trunk.
/external/python/cpython2/Objects/methodobject.c
10c66927742269936ce51b21c790efb8bcbc67dc 12-Jul-2001 Neil Schemenauer <nascheme@enme.ucalgary.ca> GC for method objects.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
ee238b977fb7a58a4b88bdab087579d067df6451 09-Jul-2000 Fred Drake <fdrake@acm.org> ANSI-fication of the sources.
/external/python/cpython2/Objects/methodobject.c
ffcc3813d82e6b96db79f518f4e67b940a13ce64 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice - 2nd try.
/external/python/cpython2/Objects/methodobject.c
fd71b9e9d496caa510dec56a9b69966558d6ba5d 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice.
/external/python/cpython2/Objects/methodobject.c
9a15c211cffefa2da5bda345ac162a6bbe0d69b7 01-Jul-2000 Guido van Rossum <guido@python.org> Fix an error on AIX by using a proper cast.
/external/python/cpython2/Objects/methodobject.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/methodobject.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/methodobject.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/methodobject.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/methodobject.c
13fdf5e9170929671ab1ab7e58ecc141b07dceca 04-Dec-1998 Guido van Rossum <guido@python.org> When comparing bound methods, use identity test on the objects,
not equality test.
/external/python/cpython2/Objects/methodobject.c
9223351617793f0674b8410d39ff5437b2a29879 10-Jul-1998 Guido van Rossum <guido@python.org> Marc-Andre Lemburg's patch to move the typedef for PyCFunctionObject
to the .h file and add macros there for inlined access to the fields.
/external/python/cpython2/Objects/methodobject.c
8a92c627d96b3548cf0bdcc8ff895d9d4be7b0ff 27-Jun-1998 Guido van Rossum <guido@python.org> New feature: if the object's type has a non-NULL tp_doc field, that
is returned as the object's __doc__ attribute.

(If only the list of methods would be referenced from the type...)
/external/python/cpython2/Objects/methodobject.c
1f39c5c666ce8ede33b989aa816ed947affd1f7b 05-Aug-1997 Guido van Rossum <guido@python.org> Added separate free list for cfunction (builtin method) objects, for a
few percent speed up. Also add PyCFunction_Fini() to discard it.
/external/python/cpython2/Objects/methodobject.c
c0b618a2ccfb0fc39e07ee96dc09da77fbcce1b1 02-May-1997 Guido van Rossum <guido@python.org> Quickly renamed the last directory.
/external/python/cpython2/Objects/methodobject.c
d266eb460e20ded087d01a29da0a230e235afc40 25-Oct-1996 Guido van Rossum <guido@python.org> New permission notice, includes CNRI.
/external/python/cpython2/Objects/methodobject.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/methodobject.c
69785032358a007fbcf56e62c0acea59db79431f 26-Jan-1995 Guido van Rossum <guido@python.org> added findmethodinchain and methodchain data types
/external/python/cpython2/Objects/methodobject.c
10393b170863799bbfa785410828e468c84d4937 10-Jan-1995 Guido van Rossum <guido@python.org> add restrictions in restricted mode
/external/python/cpython2/Objects/methodobject.c
cab650db8ebad141ee495bb0e8ca1dd631eb2353 07-Jan-1995 Guido van Rossum <guido@python.org> * Objects/methodobject.c: changed drastically, the object now
contains a pointer to the struct methodlist (which must be
static); added attributes __name__, __doc__ and __self__
/external/python/cpython2/Objects/methodobject.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/methodobject.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/methodobject.c
1d5735e84621a7fe68d361fa0e289fa2c3310836 30-Aug-1994 Guido van Rossum <guido@python.org> Merge back to main trunk
/external/python/cpython2/Objects/methodobject.c
b73cc04e625511f41c63b880b418338af70dc8bd 01-Nov-1993 Guido van Rossum <guido@python.org> * ceval.c, longobject.c, methodobject.c, listnode.c, arraymodule.c,
pythonrun.c: added static forward declarations
* pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of
static routines
/external/python/cpython2/Objects/methodobject.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/methodobject.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/methodobject.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/methodobject.c
bab9d0385585fcddf6ee96a4ca38dd18e3517f54 05-Apr-1992 Guido van Rossum <guido@python.org> Copyright for 1992 added
/external/python/cpython2/Objects/methodobject.c
eec181ae887470b707bf8c06c9ff8c980f7b3ce9 27-Mar-1992 Guido van Rossum <guido@python.org> Lint
./
/external/python/cpython2/Objects/methodobject.c
c06022966f58b7130e0a8b7150d1955865c84dc8 16-Dec-1991 Guido van Rossum <guido@python.org> Add "varargs" attribute.
/external/python/cpython2/Objects/methodobject.c
bd3a2e6b11816ad32ded60eb0f6e8bc36846a840 10-Dec-1991 Guido van Rossum <guido@python.org> Use AttributeError.
/external/python/cpython2/Objects/methodobject.c
e9c430fd3be0e28f89333893c166a1b1b109d90e 20-Oct-1991 Guido van Rossum <guido@python.org> Implemented __methods__ attribute
/external/python/cpython2/Objects/methodobject.c
909336104b70cae29c0c4fde4477d508e1d709ac 07-Jun-1991 Guido van Rossum <guido@python.org> printobject now returns an error code
/external/python/cpython2/Objects/methodobject.c
f70e43a073b36c6f6e9894c01025243a77a452d4 19-Feb-1991 Guido van Rossum <guido@python.org> Added copyright notice.
/external/python/cpython2/Objects/methodobject.c
3f5da24ea304e674a9abbdcffc4d671e32aa70f1 20-Dec-1990 Guido van Rossum <guido@python.org> "Compiling" version
/external/python/cpython2/Objects/methodobject.c
2a9096b5f9d90c6d90a9386c82214237ffc69167 21-Oct-1990 Guido van Rossum <guido@python.org> New errors.
/external/python/cpython2/Objects/methodobject.c
85a5fbbdfea617f6cc8fae82c9e8c2b5c424436d 14-Oct-1990 Guido van Rossum <guido@python.org> Initial revision
/external/python/cpython2/Objects/methodobject.c