summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Christian Tismer -- total rewrite on trashcan code.Guido van Rossum2000-04-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improvements: - does no longer need any extra memory - has no relationship to tstate - works in debug mode - can easily be modified for free threading (hi Greg:) Side effects: Trashcan does change the order of object destruction. Prevending that would be quite an immense effort, as my attempts have shown. This version works always the same, with debug mode or not. The slightly changed destruction order should therefore be no problem. Algorithm: While the old idea of delaying the destruction of some obejcts at a certain recursion level was kept, we now no longer aloocate an object to hold these objects. The delayed objects are instead chained together via their ob_type field. The type is encoded via ob_refcnt. When it comes to the destruction of the chain of waiting objects, the topmost object is popped off the chain and revived with type and refcount 1, then it gets a normal Py_DECREF. I am confident that this solution is near optimum for minimizing side effects and code bloat.
* Jack Jansen: The GUSI 2.0 I/O library (which is used on the Mac)Guido van Rossum2000-04-241-1/+1
| | | | doesn't use the special header file for select anymore.
* Fix PR#7 comparisons of recursive objectsJeremy Hylton2000-04-141-0/+3
| | | | | Note that comparisons of deeply nested objects can still dump core in extreme cases.
* Marc-Andre Lemburg:Guido van Rossum2000-04-111-1/+1
| | | | | | | Changed PyUnicode_Splitlines() maxsplit argument to keepends. The maxsplit functionality was replaced by the keepends functionality which allows keeping the line end markers together with the string.
* Marc-Andre Lemburg: New exported API PyUnicode_Resize().Guido van Rossum2000-04-101-0/+19
|
* Bump version to 1.6a2 -- to be released one of these days.Guido van Rossum2000-04-061-3/+3
|
* Marc-Andre's third try at this bulk patch seems to work (except thatGuido van Rossum2000-04-054-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | his copy of test_contains.py seems to be broken -- the lines he deleted were already absent). Checkin messages: New Unicode support for int(), float(), complex() and long(). - new APIs PyInt_FromUnicode() and PyLong_FromUnicode() - added support for Unicode to PyFloat_FromString() - new encoding API PyUnicode_EncodeDecimal() which converts Unicode to a decimal char* string (used in the above new APIs) - shortcuts for calls like int(<int object>) and float(<float obj>) - tests for all of the above Unicode compares and contains checks: - comparing Unicode and non-string types now works; TypeErrors are masked, all other errors such as ValueError during Unicode coercion are passed through (note that PyUnicode_Compare does not implement the masking -- PyObject_Compare does this) - contains now works for non-string types too; TypeErrors are masked and 0 returned; all other errors are passed through Better testing support for the standard codecs. Misc minor enhancements, such as an alias dbcs for the mbcs codec. Changes: - PyLong_FromString() now applies the same error checks as does PyInt_FromString(): trailing garbage is reported as error and not longer silently ignored. The only characters which may be trailing the digits are 'L' and 'l' -- these are still silently ignored. - string.ato?() now directly interface to int(), long() and float(). The error strings are now a little different, but the type still remains the same. These functions are now ready to get declared obsolete ;-) - PyNumber_Int() now also does a check for embedded NULL chars in the input string; PyNumber_Long() already did this (and still does) Followed by: Looks like I've gone a step too far there... (and test_contains.py seem to have a bug too). I've changed back to reporting all errors in PyUnicode_Contains() and added a few more test cases to test_contains.py (plus corrected the join() NameError).
* Make it version 1.6a1.Guido van Rossum2000-03-301-3/+3
|
* Add PyDict_Copy() function to C API for dicts. It returns a newJeremy Hylton2000-03-301-0/+2
| | | | dictionary that contains the same key/value pairs as p.
* Version updated to 1.6; API version to 1009.Guido van Rossum2000-03-292-7/+9
|
* remove reference to CALL_FUNCTION_STAR in commentJeremy Hylton2000-03-291-1/+1
|
* slightly modified version of Greg Ewing's extended call syntax patchJeremy Hylton2000-03-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | executive summary: Instead of typing 'apply(f, args, kwargs)' you can type 'f(*arg, **kwargs)'. Some file-by-file details follow. Grammar/Grammar: simplify varargslist, replacing '*' '*' with '**' add * & ** options to arglist Include/opcode.h & Lib/dis.py: define three new opcodes CALL_FUNCTION_VAR CALL_FUNCTION_KW CALL_FUNCTION_VAR_KW Python/ceval.c: extend TypeError "keyword parameter redefined" message to include the name of the offending keyword reindent CALL_FUNCTION using four spaces add handling of sequences and dictionaries using extend calls fix function import_from to use PyErr_Format
* Marc-Andre Lemburg:Guido van Rossum2000-03-281-1/+7
| | | | | | | | | | | | | | | The attached patch set includes a workaround to get Python with Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause is a bug in the BSDI wchar.h header file) and Python interfaces for the MBCS codec donated by Mark Hammond. Also included are some minor corrections w/r to the docs of the new "es" and "es#" parser markers (use PyMem_Free() instead of free(); thanks to Mark Hammond for finding these). The unicodedata tests are now in a separate file (test_unicodedata.py) to avoid problems if the module cannot be found.
* Prototypes added for MBCS codecs. (Win32 only.)Guido van Rossum2000-03-281-0/+20
|
* Updated comment: in PyTypeObject:Fred Drake2000-03-211-1/+1
| | | | | | | | | | /* More standard operations (at end for binary compatibility) */ should now be: /* More standard operations (here for binary compatibility) */ since they're no longer at the end!
* On 17-Mar-2000, Marc-Andre Lemburg said:Barry Warsaw2000-03-201-7/+9
| | | | | | | | | | | | | Attached you find an update of the Unicode implementation. The patch is against the current CVS version. I would appreciate if someone with CVS checkin permissions could check the changes in. The patch contains all bugs and patches sent this week and also fixes a leak in the codecs code and a bug in the free list code for Unicode objects (which only shows up when compiling Python with Py_DEBUG; thanks to MarkH for spotting this one).
* Marc-Andre Lemburg: add declaration for PyUnicode_Contains().Guido van Rossum2000-03-131-0/+11
|
* Christian Tismer's "trashcan" patch:Guido van Rossum2000-03-131-0/+47
| | | | | | | | Added wrapping macros to dictobject.c, listobject.c, tupleobject.c, frameobject.c, traceback.c that safely prevends core dumps on stack overflow. Macros and functions in object.c, object.h. The method is an "elevator destructor" that turns cascading deletes into tail recursive behavior when some limit is hit.
* Marc-Andre Lemburg: added declarations for PyObject_AsCharBuffer,Guido van Rossum2000-03-101-0/+46
| | | | PyObject_AsReadBuffer, PyObject_AsWriteBuffer.
* Marc-Andre Lemburg: include unicodeobject.h and codecs.hGuido van Rossum2000-03-101-0/+2
|
* Marc-Andre Lemburg: add PyExc_UnicodeErrorGuido van Rossum2000-03-101-0/+1
|
* Unicode implementation by Marc-Andre Lemburg based on original code by ↵Guido van Rossum2000-03-101-0/+754
| | | | Fredrik Lundh.
* Python Codec Registry and support functions, by Marc-Andre Lemburg.Guido van Rossum2000-03-101-0/+55
|
* Got rid of silly "123456789-..." lines in comments.Guido van Rossum2000-03-015-22/+0
|
* Patch by Mozhe Zadka, for __contains__ (overloading 'in'). This addsGuido van Rossum2000-02-281-1/+7
| | | | | | a new proc type (objobjproc), a new slot sq_contains to PySequenceMethods, and a new flag Py_TPFLAGS_HAVE_SEQUENCE_IN to Py_TPFLAGS_DEFAULT. More to follow.
* Declarations related to new WindowsError exception.Guido van Rossum2000-02-171-0/+7
|
* The rest of the changes by Trent Mick and Dale Nagata for warning-freeGuido van Rossum2000-01-201-0/+1
| | | | compilation on NT Alpha. Mostly added casts etc.
* Mainlining the string_methods branch. See branch revision logBarry Warsaw1999-10-122-0/+2
| | | | messages for specific changes.
* Patch by Tim Peters:Guido van Rossum1999-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new builtin exception, UnboundLocalError, raised when ceval.c tries to retrieve or delete a local name that isn't bound to a value. Currently raises NameError, which makes this behavior a FAQ since the same error is raised for "missing" global names too: when the user has a global of the same name as the unbound local, NameError makes no sense to them. Even in the absence of shadowing, knowing whether a bogus name is local or global is a real aid to quick understanding. Example: D:\src\PCbuild>type local.py x = 42 def f(): print x x = 13 return x f() D:\src\PCbuild>python local.py Traceback (innermost last): File "local.py", line 8, in ? f() File "local.py", line 4, in f print x UnboundLocalError: x D:\src\PCbuild> Note that UnboundLocalError is a subclass of NameError, for compatibility with existing class-exception code that may be trying to catch this as a NameError. Unfortunately, I see no way to make this wholly compatible with -X (see comments in bltinmodule.c): under -X, [UnboundLocalError is an alias for NameError --GvR]. [The ceval.c patch differs slightly from the second version that Tim submitted; I decided not to raise UnboundLocalError for DELETE_NAME, only for DELETE_LOCAL. DELETE_NAME is only generated at the module level, and since at that level a NameError is raised for referencing an undefined name, it should also be raised for deleting one.]
* Set PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ toGuido van Rossum1999-06-091-2/+2
| | | | | | indicate to those that are using the CVS access that they are using a newer-than-1.2.5 version, without committing to a particular version number or patch level.
* Prepare for final release.Guido van Rossum1999-04-131-4/+5
|
* Release 1.5.2c1Guido van Rossum1999-04-081-4/+4
|
* Add the possibility of a gamma release (release candidate).Guido van Rossum1999-04-071-2/+3
| | | | Add '+' to string version number to indicate we're beyond b2 now.
* Conform to standard boilerplate.Guido van Rossum1999-03-241-3/+34
|
* Adding thread.h -- unused but for b/w compatibility.Guido van Rossum1999-03-221-0/+62
| | | | As requested by Bill Janssen.
* Add DLL level b/w compat for PySequence_In and PyEval_CallObjectGuido van Rossum1999-03-172-0/+10
|
* Add PyModule_GetFilename().Guido van Rossum1999-02-151-0/+1
|
* There's a macro PycString_IMPORT which the documentation listed asGuido van Rossum1999-01-251-1/+1
| | | | | | PycStringIO_IMPORT. While arguably the name used in the documentation is more consistent, I think it's probably safer not to change the macro definition and instead fix the doco.
* Changes for long file support by Steve Clift.Guido van Rossum1999-01-061-0/+19
|
* Chris Herborth writes:Guido van Rossum1999-01-041-5/+0
| | | | Donn Cave tells me the PyImport_BeImageID() function isn't needed anymore.
* New version identification scheme.Guido van Rossum1999-01-033-4/+74
| | | | | The version numbers are now exported by Python.h. Also rolled back the API version change -- it's back to 1007!
* I can't seem to do anything right :-)Guido van Rossum1998-12-211-1/+1
| | | | | As Chris H. points out, I should have added 'extern' to the declaration of _PyThreadState_Current. Here it is.
* Thanks to Chris Herborth, the thread primitives now have proper Py*Guido van Rossum1998-12-211-55/+21
| | | | | names in the source code (they already had those for the linker, through some smart macros; but the source still had the old, un-Py names).
* Add macro version of PyThreadState_GET(). This usesGuido van Rossum1998-12-211-0/+11
| | | | _PyThreadState_Current, defined in pystate.c.
* Add prototypes for PyOS_strto[u]l -- Chris Herborth.Guido van Rossum1998-12-101-0/+9
|
* Undo the change here -- there's no point in declaring a staticGuido van Rossum1998-12-081-1/+1
| | | | function as DL_IMPORT()!
* Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum1998-12-0444-400/+403
|
* New API version (enough has changed!).Guido van Rossum1998-12-031-3/+5
|
* Added PyExc_NotImplementedErrorBarry Warsaw1998-12-011-0/+1
|
* Metrowerks PRO4 finally fixes the hypot snafu. (Jack Jansen)Guido van Rossum1998-11-021-1/+1
|