summaryrefslogtreecommitdiffstats
path: root/Python/structmember.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix SF bug #486144: Uninitialized __slot__ vrbl is None.Guido van Rossum2001-12-041-1/+8
| | | | | | | There's now a new structmember code, T_OBJECT_EX, which is used for all __slot__ variables (except __weakref__, which has special behavior anyway). This new code raises AttributeError when the variable is NULL rather than converting NULL to None.
* Put descr name in "bad memberdescr type" error message.Jeremy Hylton2001-10-161-1/+2
|
* Add optional docstrings to member descriptors. For backwardsGuido van Rossum2001-09-201-202/+213
| | | | | | | | | | | | | | | 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.
* Add support for restricting access based on restricted execution mode.Guido van Rossum2001-09-171-5/+16
| | | | | | Renamed the 'readonly' field to 'flags' and defined some new flag bits: READ_RESTRICTED and WRITE_RESTRICTED, as well as a shortcut RESTRICTED that means both.
* SF bug http://sourceforge.net/bugs/?func=detailbug&bug_id=130242&group_id=5470Tim Peters2001-01-271-0/+1
| | | | | | | | SF patch http://sourceforge.net/patch/?func=detailpatch&patch_id=103453&group_id=5470 PyMember_Set of T_CHAR always raises exception. Unfortunately, this is a use of a C API function that Python itself never makes, so there's no .py test I can check in to verify this stays fixed. But the fault in the code is obvious, and Dave Cole's patch just as obviously fixes it.
* 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.
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-221-11/+3
| | | | declarations yet, those come later.
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-21/+6
|
* Trivial little change: when setting a member to an object, hold theGuido van Rossum1998-05-201-1/+3
| | | | | | | old value in a temporary and XDECREF it only after then new value has been set. This prevents the (unlikely) case where the destructor of the member uses the containing object -- it would find it in an undefined state.
* Quickly renamed the remaining files -- this directory is done.Guido van Rossum1997-04-291-78/+88
|
* Tweaks to keep the Microsoft compiler quier.Guido van Rossum1997-04-091-6/+8
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-12/+19
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* - Added ability to get at strings embedded in the structJack Jansen1994-12-141-1/+23
| | | | - For the mac, added ability to get at pascal-style strings
* Merge back to main trunkGuido van Rossum1994-08-301-1/+6
|
* * 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
* Added new types to setattr() as well...Guido van Rossum1992-06-031-0/+52
|
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Use new exceptions.Guido van Rossum1991-12-101-3/+3
|
* Added __members__ secret attributeGuido van Rossum1991-10-201-0/+25
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* Return -1 for errors.Guido van Rossum1990-12-201-1/+1
|
* "Compiling" versionGuido van Rossum1990-12-201-0/+134