summaryrefslogtreecommitdiffstats
path: root/Python/structmember.c
Commit message (Collapse)AuthorAgeFilesLines
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-321/+321
|
* fix tabsBenjamin Peterson2010-04-041-1/+1
|
* give TypeError when trying to set T_STRING_INPLACEBenjamin Peterson2010-04-031-1/+5
|
* Fix incorrect error checks in structmember.c (backport of r78920 from py3k).Mark Dickinson2010-03-131-3/+4
|
* check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)Benjamin Peterson2009-12-301-5/+15
| | | | | Also, add a note to the docs about the better behavior of T_OBJECT_EX as compared to T_OBJECT.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-6/+6
| | | | | | | 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.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-6/+6
|
* Patch #1720595: add T_BOOL to the range of structmember types.Georg Brandl2008-01-211-0/+15
| | | | Patch by Angelo Mottola, reviewed by MvL, tests by me.
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-221-1/+1
| | | | | 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! :)
* Handle errors when generating a warning.Neal Norwitz2007-08-051-30/+31
| | | | | | | | The value is always written to the returned pointer if getting it was successful, even if a warning causes an error. (This probably doesn't matter as the caller will probably discard the value.) Will backport.
* Add T_PYSSIZET in structmember.h: This can be used forWalter Dörwald2007-06-131-0/+10
| | | | | | | | | Py_ssize_t members. Simplify the implementation of UnicodeError objects: start and end attributes are now stored directly as Py_ssize_t members, which simplifies various get and set functions.
* Patch #1733960: Allow T_LONGLONG to accept ints.Martin v. Löwis2007-06-091-24/+18
| | | | Will backport to 2.5.
* Patch #1549049: Rewrite type conversion in structmember.Martin v. Löwis2006-10-271-53/+91
| | | | Fixes #1545696 and #1566140. Will backport to 2.5.
* Fix a warning on ppc (debian)Neal Norwitz2006-04-281-4/+7
|
* const poisoning, spreading to fix new const warningsTim Peters2005-12-241-3/+3
| | | | in _winreg.c.
* Patch #1115086: support PY_LONGLONG in structmember.Martin v. Löwis2005-03-031-0/+32
|
* Getting rid of all the code inside #ifdef macintosh too.Jack Jansen2003-11-201-22/+1
|
* 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