summaryrefslogtreecommitdiff
path: root/Include/classobject.h
AgeCommit message (Collapse)AuthorLines
2003-04-08More backporting of gc-vs-__del__ fixes. It should be fixed for instancesTim Peters-1/+1
of classic classes now. Alas, new-style classes are still a problem, and didn't need to be fixed in 2.3 (they were already immune in 2.3 due to the new-in-2.3 tp_del slot).
2003-04-08Added private API function _PyInstance_Lookup(). This is part ofTim Peters-0/+12
backporting fixes so that garbage collection doesn't have to trigger execution of arbitrary Python code just to figure out whether an object has a __del__ method.
2001-12-07PyMethodObject(): Update the comment about im_class based upon aGuido van Rossum-1/+1
conversation with Robin Dunn in SF patch #490402.
2001-09-05Add PyMethod_Function(), PyMethod_Self(), PyMethod_Class() back.Guido van Rossum-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.
2001-08-02Merge of descr-branch back into trunk.Tim Peters-4/+0
2001-03-23Add the necessary field for weak reference support to the function andFred Drake-0/+1
method types.
2001-02-01PEP 205, Weak References -- initial checkin.Fred Drake-0/+1
2001-01-28Added prototype for PyInstance_NewRaw().Fred Drake-0/+1
2001-01-04Remove PyInstance_*BinOp functions.Neil Schemenauer-8/+0
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-08-24The real suport for augmented assignment: new opcodes, new PyNumber andThomas Wouters-0/+4
PySequence methods and functions, new tokens.
2000-07-09ANSI-fication and Py_PROTO extermination.Fred Drake-32/+33
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
1998-12-04Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum-8/+8
1998-07-10Move the definition of PyMethodObject to classobject.h, so it can defineGuido van Rossum-0/+16
macros for more efficient access to the fields.
1997-03-14Remove redundant references to thread stuff -- long, long ago, thereGuido van Rossum-6/+0
was some locking code in this file that needed it...
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1995-07-26changes for keyword args to built-in functions and classesGuido van Rossum-1/+1
1995-02-27make the type a parameter of the DL_IMPORT macro, for Borland CGuido van Rossum-1/+1
1995-01-20corrected two unconverted namesGuido van Rossum-1/+1
1995-01-12The great renaming, phase two: all header files have been updated toGuido van Rossum-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".
1995-01-07add 5th arg to instancebinopGuido van Rossum-1/+2
1995-01-04Added 1995 copyright.Guido van Rossum-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.
1994-09-28ceval.h: added Py_MakePendingCalls()Guido van Rossum-0/+2
classobject.h: added instancebinop() modsupport.h: added newgetargs() rename1.h: removed Py_FPROTO
1994-09-06Define cl_{get,set,del}attr members in classobjectGuido van Rossum-6/+4
1994-08-18Changes for dynamic linking under NTGuido van Rossum-1/+1
1994-08-12 * Objects/classobject.c, Include/classobject.h: added __getattr__Guido van Rossum-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
1994-08-01Merge alpha100 branch back to main trunkGuido van Rossum-1/+1
1993-11-23* timemodule.c: Add hack for Solaris 2.Guido van Rossum-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.
1993-07-28* Added support for X11 modules.Guido van Rossum-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++.
1993-05-21* Lots of small changes related to access.Guido van Rossum-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!)
1993-05-20Access checks now work, at least for instance data (not for methodsGuido van Rossum-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.
1993-05-19Several changes in one:Guido van Rossum-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.)
1993-03-29* Changed all copyright messages to include 1993.Guido van Rossum-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
1992-08-14* classobject.[ch], {float,long,int}object.c, bltinmodule.c:Guido van Rossum-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.
1992-08-12Changes so that user-defined classes can implement operations invokedGuido van Rossum-0/+3
by special syntax: you can now define your own numbers, sequences and mappings.
1992-04-05Copyright for 1992 addedGuido van Rossum-1/+1
1991-10-20newclassobject gets a third parameter (optional class name)Guido van Rossum-1/+1
1991-05-05Renamed class members to instances and class methods to instance methodsGuido van Rossum-6/+6
,.
1991-04-04Changed 'class member' to 'instance'.Guido van Rossum-3/+3
1991-02-19Added copyright notice.Guido van Rossum-0/+24
1990-12-20"Compiling" versionGuido van Rossum-1/+1
1990-10-14Initial revisionGuido van Rossum-0/+20