summaryrefslogtreecommitdiffstats
path: root/Include/classobject.h
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions ↵Christian Heimes2008-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60751,60753,60756-60757,60759-60761,60763-60764,60766,60769-60770,60774-60784,60787-60845 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60790 | raymond.hettinger | 2008-02-14 10:32:45 +0100 (Thu, 14 Feb 2008) | 4 lines Add diagnostic message to help figure-out why SocketServer tests occasionally crash when trying to remove a pid that in not in the activechildren list. ........ r60791 | raymond.hettinger | 2008-02-14 11:46:57 +0100 (Thu, 14 Feb 2008) | 1 line Add fixed-point examples to the decimal FAQ ........ r60792 | raymond.hettinger | 2008-02-14 12:01:10 +0100 (Thu, 14 Feb 2008) | 1 line Improve rst markup ........ r60794 | raymond.hettinger | 2008-02-14 12:57:25 +0100 (Thu, 14 Feb 2008) | 1 line Show how to remove exponents. ........ r60795 | raymond.hettinger | 2008-02-14 13:05:42 +0100 (Thu, 14 Feb 2008) | 1 line Fix markup. ........ r60797 | christian.heimes | 2008-02-14 13:47:33 +0100 (Thu, 14 Feb 2008) | 1 line Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. ........ r60798 | raymond.hettinger | 2008-02-14 13:49:37 +0100 (Thu, 14 Feb 2008) | 1 line Simplify moneyfmt() recipe. ........ r60810 | raymond.hettinger | 2008-02-14 20:02:39 +0100 (Thu, 14 Feb 2008) | 1 line Fix markup ........ r60811 | raymond.hettinger | 2008-02-14 20:30:30 +0100 (Thu, 14 Feb 2008) | 1 line No need to register subclass of ABCs. ........ r60814 | thomas.heller | 2008-02-14 22:00:28 +0100 (Thu, 14 Feb 2008) | 1 line Try to correct a markup error that does hide the following paragraph. ........ r60822 | christian.heimes | 2008-02-14 23:40:11 +0100 (Thu, 14 Feb 2008) | 1 line Use a static and interned string for __subclasscheck__ and __instancecheck__ as suggested by Thomas Heller in #2115 ........ r60827 | christian.heimes | 2008-02-15 07:57:08 +0100 (Fri, 15 Feb 2008) | 1 line Fixed repr() and str() of complex numbers. Complex suffered from the same problem as floats but I forgot to test and fix them. ........ r60830 | christian.heimes | 2008-02-15 09:20:11 +0100 (Fri, 15 Feb 2008) | 2 lines Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ Thanks to Thomas Herve for the fix. ........ r60835 | eric.smith | 2008-02-15 13:14:32 +0100 (Fri, 15 Feb 2008) | 1 line In PyNumber_ToBase, changed from an assert to returning an error when PyObject_Index() returns something other than an int or long. It should never be possible to trigger this, as PyObject_Index checks to make sure it returns an int or long. ........ r60837 | skip.montanaro | 2008-02-15 20:03:59 +0100 (Fri, 15 Feb 2008) | 8 lines Two new functions: * place_summary_first copies the regrtest summary to the front of the file making it easier to scan quickly for problems. * count_failures gets the actual count of the number of failing tests, not just a 1 (some failures) or 0 (no failures). ........ r60840 | raymond.hettinger | 2008-02-15 22:21:25 +0100 (Fri, 15 Feb 2008) | 1 line Update example to match the current syntax. ........ r60841 | amaury.forgeotdarc | 2008-02-15 22:22:45 +0100 (Fri, 15 Feb 2008) | 8 lines Issue #2115: __slot__ attributes setting was 10x slower. Also correct a possible crash using ABCs. This change is exactly the same as an optimisation done 5 years ago, but on slot *access*: http://svn.python.org/view?view=rev&rev=28297 ........ r60842 | amaury.forgeotdarc | 2008-02-15 22:27:44 +0100 (Fri, 15 Feb 2008) | 2 lines Temporarily let these tests pass ........ r60843 | kurt.kaiser | 2008-02-15 22:56:36 +0100 (Fri, 15 Feb 2008) | 2 lines ScriptBinding event handlers weren't returning 'break'. Patch 2050, Tal Einat. ........ r60844 | kurt.kaiser | 2008-02-15 23:25:09 +0100 (Fri, 15 Feb 2008) | 4 lines Configured selection highlighting colors were ignored; updating highlighting in the config dialog would cause non-Python files to be colored as if they were Python source; improve use of ColorDelagator. Patch 1334. Tal Einat. ........ r60845 | amaury.forgeotdarc | 2008-02-15 23:44:20 +0100 (Fri, 15 Feb 2008) | 9 lines Re-enable tests, they were failing since gc.collect() clears the various freelists. They still remain fragile. For example, a call to assertEqual currently does not make any allocation (which surprised me at first). But this can change when gc.collect also deletes the numerous "zombie frames" attached to each function. ........
* Issue #1587: Added instancemethod wrapper for PyCFunctions. The Python C APIChristian Heimes2007-12-111-0/+18
| | | | | | has gained a new type *PyInstanceMethod_Type* and the functions *PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)* and *PyInstanceMethod_Function(im)*.
* Cleanups and documentation updates related to the removal of unbound methods.Christian Heimes2007-11-301-1/+0
|
* Removed the API to create unbound methods and simplified the API for bound ↵Christian Heimes2007-11-271-6/+3
| | | | | | | methods. The signature is PyMethod_New(func, instance). Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__. I've also updated some parts of the documenation.
* Completely get rid of PyClass and PyInstance.Guido van Rossum2006-08-171-42/+2
| | | | | | | | (classobject.[ch] aren't empty yet because they also define PyMethod.) This breaks lots of stuff, notably cPickle. But it's a step in the right direction. I'll clean it up later. (Also a few unrelated changes, e.g. T_NONE to define a "struct member" that is always None, and simplification of __hash__ -- these are unfinished.)
* Typo repair.Tim Peters2003-04-081-2/+2
|
* New private API function _PyInstance_Lookup. gc will use this to figureTim Peters2003-04-071-0/+12
| | | | out whether __del__ exists, without executing any Python-level code.
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-9/+9
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* PyMethodObject(): Update the comment about im_class based upon aGuido van Rossum2001-12-071-1/+1
| | | | conversation with Robin Dunn in SF patch #490402.
* Add PyMethod_Function(), PyMethod_Self(), PyMethod_Class() back.Guido van Rossum2001-09-051-0/+4
| | | | | | 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.
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-4/+0
|
* Add the necessary field for weak reference support to the function andFred Drake2001-03-231-0/+1
| | | | method types.
* PEP 205, Weak References -- initial checkin.Fred Drake2001-02-011-0/+1
|
* Added prototype for PyInstance_NewRaw().Fred Drake2001-01-281-0/+1
|
* Remove PyInstance_*BinOp functions.Neil Schemenauer2001-01-041-8/+0
|
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* The real suport for augmented assignment: new opcodes, new PyNumber andThomas Wouters2000-08-241-0/+4
| | | | PySequence methods and functions, new tokens.
* ANSI-fication and Py_PROTO extermination.Fred Drake2000-07-091-32/+33
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum1998-12-041-8/+8
|
* Move the definition of PyMethodObject to classobject.h, so it can defineGuido van Rossum1998-07-101-0/+16
| | | | macros for more efficient access to the fields.
* Remove redundant references to thread stuff -- long, long ago, thereGuido van Rossum1997-03-141-6/+0
| | | | was some locking code in this file that needed it...
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* changes for keyword args to built-in functions and classesGuido van Rossum1995-07-261-1/+1
|
* make the type a parameter of the DL_IMPORT macro, for Borland CGuido van Rossum1995-02-271-1/+1
|
* corrected two unconverted namesGuido van Rossum1995-01-201-1/+1
|
* The great renaming, phase two: all header files have been updated toGuido van Rossum1995-01-121-25/+27
| | | | | | | use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
* add 5th arg to instancebinopGuido van Rossum1995-01-071-1/+2
|
* Added 1995 copyright.Guido van Rossum1995-01-041-2/+2
| | | | | | object.h: made sizes and refcnts signed ints. stringobject.h: make getstrsize() signed int. methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
* ceval.h: added Py_MakePendingCalls()Guido van Rossum1994-09-281-0/+2
| | | | | | classobject.h: added instancebinop() modsupport.h: added newgetargs() rename1.h: removed Py_FPROTO
* Define cl_{get,set,del}attr members in classobjectGuido van Rossum1994-09-061-6/+4
|
* Changes for dynamic linking under NTGuido van Rossum1994-08-181-1/+1
|
* * Objects/classobject.c, Include/classobject.h: added __getattr__Guido van Rossum1994-08-121-0/+12
| | | | | | | | 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
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-1/+1
|
* * timemodule.c: Add hack for Solaris 2.Guido van Rossum1993-11-231-2/+0
| | | | | | | | | | | | | | | * 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.
* * Added support for X11 modules.Guido van Rossum1993-07-281-0/+11
| | | | | | | * Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++.
* * Lots of small changes related to access.Guido van Rossum1993-05-211-5/+7
| | | | | | | * 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!)
* Access checks now work, at least for instance data (not for methodsGuido van Rossum1993-05-201-1/+11
| | | | | | | 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.
* Several changes in one:Guido van Rossum1993-05-191-1/+1
| | | | | | | | | | | | | | | | (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.)
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-2/+2
| | | | | | | | | | | | | | | | | * 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
* * classobject.[ch], {float,long,int}object.c, bltinmodule.c:Guido van Rossum1992-08-141-1/+0
| | | | | | 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.
* Changes so that user-defined classes can implement operations invokedGuido van Rossum1992-08-121-0/+3
| | | | | by special syntax: you can now define your own numbers, sequences and mappings.
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* newclassobject gets a third parameter (optional class name)Guido van Rossum1991-10-201-1/+1
|
* Renamed class members to instances and class methods to instance methodsGuido van Rossum1991-05-051-6/+6
| | | | ,.
* Changed 'class member' to 'instance'.Guido van Rossum1991-04-041-3/+3
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* "Compiling" versionGuido van Rossum1990-12-201-1/+1
|
* Initial revisionGuido van Rossum1990-10-141-0/+20