summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* New private API functions _PyFloat_{Pack,Unpack}(4,8}. This is aTim Peters2003-03-201-0/+42
| | | | | refactoring to get all the duplicates of this delicate code out of the cPickle and struct modules.
* Fixed SF bug #663074. The codec system was using global staticGustavo Niemeyer2003-03-191-0/+4
| | | | | | | | | variables to store internal data. As a result, any atempts to use the unicode system with multiple active interpreters, or successive interpreter executions, would fail. Now that information is stored into members of the PyInterpreterState structure.
* Renamed PyObject_GenericGetIter to PyObject_SelfIterRaymond Hettinger2003-03-171-1/+1
| | | | | | to more accurately describe what the function does. Suggested by Thomas Wouters.
* Created PyObject_GenericGetIter().Raymond Hettinger2003-03-171-0/+1
| | | | Factors out the common case of returning self.
* - The extended type structure used for heap types (new-styleGuido van Rossum2003-03-071-0/+22
| | | | | classes defined by Python code using a class statement) is now exported from object.h as PyHeapTypeObject. (SF patch #696193.)
* Fix SF bug #697256, PyMarshal_WriteShortToFile() documented, but not implementedNeal Norwitz2003-03-061-1/+0
| | | | Remove prototype and doc. Backport candidate.
* Moved the Apple workaround for the guard define for wchar_t out ofJack Jansen2003-02-281-1/+2
| | | | | the #ifdef HAVE_NCURSES_H: the same problem exists on OSX 10.1 with a fink-installed curses (which uses curses.h as the include file name).
* Fix spelling and grammar.Raymond Hettinger2003-02-281-5/+5
|
* Update PY_VERSION to indicate that we're beyond 2.3a2 now.Guido van Rossum2003-02-201-1/+1
|
* As far as I can tell PyEval_GetOwner was removed in 1997 (when it wasMichael W. Hudson2003-02-201-1/+0
| | | | | called something else!). I can't imagine removing the prototype is going to hurt, but put it back if *you* can.
* - PyEval_GetFrame() is now declared to return a PyFrameObject *Guido van Rossum2003-02-192-2/+6
| | | | instead of a plain PyObject *. (SF patch #686601 by Ben Laurie.)
* Bump version # to 2.3a2.Tim Peters2003-02-181-2/+2
|
* - Finally fixed the bug in compile() and exec where a string endingGuido van Rossum2003-02-132-0/+3
| | | | | | | | | with an indented code block but no newline would raise SyntaxError. This would have been a four-line change in parsetok.c... Except codeop.py depends on this behavior, so a compilation flag had to be invented that causes the tokenizer to revert to the old behavior; this required extra changes to 2 .h files, 2 .c files, and 2 .py files. (Fixes SF bug #501622.)
* Make comments agree with code (I think).Michael W. Hudson2003-02-101-3/+4
|
* patch #683515: "Add unicode support to compile(), eval() and exec"Just van Rossum2003-02-101-0/+1
| | | | Incorporated nnorwitz's comment re. Py__USING_UNICODE.
* Small function call optimization and special build option for call stats.Jeremy Hylton2003-02-052-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | -DCALL_PROFILE: Count the number of function calls executed. When this symbol is defined, the ceval mainloop and helper functions count the number of function calls made. It keeps detailed statistics about what kind of object was called and whether the call hit any of the special fast paths in the code. Optimization: When we take the fast_function() path, which seems to be taken for most function calls, and there is minimal frame setup to do, avoid call PyEval_EvalCodeEx(). The eval code ex function does a lot of work to handle keywords args and star args, free variables, generators, etc. The inlined version simply allocates the frame and copies the arguments values into the frame. The optimization gets a little help from compile.c which adds a CO_NOFREE flag to code objects that don't have free variables or cell variables. This change allows fast_function() to get into the fast path with fewer tests. I measure a couple of percent speedup in pystone with this change, but there's surely more that can be done.
* Provide __module__ attributes for functions defined in C and Python.Jeremy Hylton2003-01-312-1/+8
| | | | | | | | | | | | | | __module__ is the string name of the module the function was defined in, just like __module__ of classes. In some cases, particularly for C functions, the __module__ may be None. Change PyCFunction_New() from a function to a macro, but keep an unused copy of the function around so that we don't change the binary API. Change pickle's save_global() to use whichmodule() if __module__ is None, but add the __module__ logic to whichmodule() since it might be used outside of pickle.
* _PyLong_NumBits(): The definition of this was too specific to the quirkyTim Peters2003-01-311-5/+11
| | | | | | | | | needs of pickling longs. Backed off to a definition that's much easier to understand. The pickler will have to work a little harder, but other uses are more likely to be correct <0.5 wink>. _PyLong_Sign(): New teensy function to characterize a long, as to <0, ==0, or >0.
* Added new private API function _PyLong_NumBits. This will be used at theTim Peters2003-01-281-0/+11
| | | | | | | start for the C implemention of new pickle LONG1 and LONG4 opcodes (the linear-time way to pickle a long is to call _PyLong_AsByteArray, but the caller has no idea how big an array to allocate, and correct calculation is a bit subtle).
* SF bug #670229: doc improvement for cStringIO.hRaymond Hettinger2003-01-191-5/+12
| | | | Gernot Hillier added more detail to the internal API documentation.
* It turns out that some calls return AEDesc records that are "borrowed",Jack Jansen2003-01-171-0/+1
| | | | | | | the AEDesc data shouldn't be disposed when the Python object is. Added a C call AEDesc_NewBorrowed() to create these objects and a Python method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
* Update comment, QnewFlag will go away in 3.0, not 2.3Neal Norwitz2003-01-131-2/+2
|
* Got rid of the internal datetimetz type.Tim Peters2003-01-111-19/+19
|
* Minor fiddling to make the next part easier. Introduced an internalTim Peters2003-01-111-21/+41
| | | | HASTZINFO() macro.
* Got rid of the timetz type entirely. This was a bit trickier than ITim Peters2003-01-101-12/+17
| | | | | | | hoped it would be, but not too bad. A test had to change: time.__setstate__() can no longer add a non-None tzinfo member to a time object that didn't already have one, since storage for a tzinfo member doesn't exist in that case.
* Patch #661760: Cygwin auto-import module patchJason Tishler2003-01-061-1/+5
| | | | | | | | | | | | The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
* Move _PyInt_Init() into pythonrun.h, since all the other _Init()Neal Norwitz2003-01-012-1/+1
| | | | functions are here. Suggested by Skip.
* Since the *_Init() are private, prefix with _, suggested by SkipNeal Norwitz2002-12-312-2/+2
|
* Various updates to the version number, on the eve of the 2.3a1 release.Guido van Rossum2002-12-311-1/+1
|
* SF #561244, Micro optimizationsNeal Norwitz2002-12-302-0/+2
| | | | | | Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
* PEP 302 + zipimport:Just van Rossum2002-12-301-0/+1
| | | | | | | | | | | | | - new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.
* Apparently FreeBSD enables some HW floating-point exceptions by default.Tim Peters2002-12-281-5/+10
| | | | | | | This can cause core dumps when Python runs. Python relies on the 754- (and C99-) mandated default "non-stop" mode for FP exceptions. This patch from Ben Laurie disables at least one FP exception on FreeBSD at Python startup time.
* Update/correct commentNeal Norwitz2002-12-191-1/+1
|
* Provide mechanism to deprecate functions, types, and struct members.Neal Norwitz2002-12-191-0/+13
| | | | It would be nice to support other compilers besides gcc.
* datetime escapes the sandbox. The Windows build is all set. I leave itTim Peters2002-12-161-0/+125
| | | | | to others to argue about how to build it on other platforms (on Windows it's in its own DLL).
* Constify filenames and scripts. Fixes #651362.Martin v. Löwis2002-12-115-48/+49
|
* Constify char* API. Fixes #651363. 2.2 candidate.Martin v. Löwis2002-12-111-3/+3
|
* SF 548651: Fix the METH_CLASS implementation.Tim Peters2002-12-091-0/+1
| | | | | | | Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
* Patch #614055: Support OpenVMS.Martin v. Löwis2002-12-061-0/+3
|
* James Henstridge pointed out a misleading comment.Michael W. Hudson2002-11-251-10/+6
|
* Remove MALLOC_ZERO_RETURNS_NULL.Martin v. Löwis2002-11-231-9/+4
|
* Fix for #641455: curses module doesn't build on MacOSX. It turns out theJack Jansen2002-11-221-0/+9
| | | | | | | system headers have two declarations for wchar_t, with different guard macros. Not sure whether this is a bugfix candidate, that depends on what changed in the curses module.
* Fix PEP 293 related problems with --disable-unicode buildsWalter Dörwald2002-11-211-0/+3
| | | | | reported by Michael Hudson in http://mail.python.org/pipermail/python-dev/2002-November/030299.html
* Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makesNeil Schemenauer2002-11-171-1/+0
| | | | | | Py_Init crash". refchain cannot be cleared because objects can live across Py_Finalize() and Py_Initialize() if they are kept alive by circular references.
* Assorted patches from Armin Rigo:Michael W. Hudson2002-11-081-0/+5
| | | | | | | | [ 617309 ] getframe hook (Psyco #1) [ 617311 ] Tiny profiling info (Psyco #2) [ 617312 ] debugger-controlled jumps (Psyco #3) These are forward ports from 2.2.2.
* Patch #512981: Update readline input stream on sys.stdin/out change.Martin v. Löwis2002-10-261-2/+2
|
* Clean up some whitespace to be consistent with Python's C style.Fred Drake2002-10-171-4/+4
|
* Add PyStructSequence_UnnamedField. Add stat_float_times.Martin v. Löwis2002-10-161-0/+2
| | | | Use integers in stat tuple, optionally floats in named fields.
* SF # 607253, header file problems by Ralf W. Grosse-KunstleveNeal Norwitz2002-10-042-6/+6
| | | | | Don't pollute the namespace when protecting against multiple header inclusion. Prefix with Py_ and use standard naming convention Py_FILENAME_H.
* Patch 594001: PEP 277 - Unicode file name support for Windows NT.Mark Hammond2002-10-031-2/+23
|