summaryrefslogtreecommitdiff
path: root/Python/structmember.c
AgeCommit message (Collapse)AuthorLines
2003-11-20Getting rid of all the code inside #ifdef macintosh too.Jack Jansen-22/+1
2001-12-04Fix SF bug #486144: Uninitialized __slot__ vrbl is None.Guido van Rossum-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.
2001-10-16Put descr name in "bad memberdescr type" error message.Jeremy Hylton-1/+2
2001-09-20Add optional docstrings to member descriptors. For backwardsGuido van Rossum-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.
2001-09-17Add support for restricting access based on restricted execution mode.Guido van Rossum-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.
2001-01-27SF bug http://sourceforge.net/bugs/?func=detailbug&bug_id=130242&group_id=5470Tim Peters-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.
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-07-22Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters-11/+3
declarations yet, those come later.
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
1998-05-20Trivial little change: when setting a member to an object, hold theGuido van Rossum-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.
1997-04-29Quickly renamed the remaining files -- this directory is done.Guido van Rossum-78/+88
1997-04-09Tweaks to keep the Microsoft compiler quier.Guido van Rossum-6/+8
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1995-01-04Added 1995 to copyright message.Guido van Rossum-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().
1994-12-14- Added ability to get at strings embedded in the structJack Jansen-1/+23
- For the mac, added ability to get at pascal-style strings
1994-08-30Merge back to main trunkGuido van Rossum-1/+6
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-06-03Added new types to setattr() as well...Guido van Rossum-0/+52
1992-04-05Copyright for 1992 addedGuido van Rossum-1/+1
1991-12-10Use new exceptions.Guido van Rossum-3/+3
1991-10-20Added __members__ secret attributeGuido van Rossum-0/+25
1991-02-19Added copyright notice.Guido van Rossum-0/+24
1990-12-20Return -1 for errors.Guido van Rossum-1/+1
1990-12-20"Compiling" versionGuido van Rossum-0/+134