summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Back out the previous change. It doesn't save any space on 64-bitGuido van Rossum2002-09-171-2/+2
| | | | platforms.
* Rearrange the members of struct _node to put shorter fields towardsGuido van Rossum2002-09-171-2/+2
| | | | | | | | | | the end, in the hope of saving some bytes on 64-bit machines. (Too bad n_nchildren can't be made an unsigned short, but test/test_longexp.py specifically tests for more than 2**16 subtrees at one level.) I don't expect any binary compatibility issues here, unless someone has an old binary of parsermodule.so saved away.
* Use Py_GCC_ATTRIBUTE instead of __attribute__. Compilers other than GCCNeil Schemenauer2002-09-155-10/+12
| | | | might use __attribute__ in other ways (e.g. CodeWarrior).
* A slight change to SET_LINENO-less tracing.Michael W. Hudson2002-09-111-0/+2
| | | | | This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.
* Added include guards and C++ extern "C" {} constructs. Partial fix for #607253.Jack Jansen2002-09-101-1/+3
| | | | Bugfix candidate.
* replace thread state objects' ticker and checkinterval fields with twoSkip Montanaro2002-09-032-2/+4
| | | | | | | | | | globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the test in the main loop to only test a single value. The gory details are at http://python.org/sf/602191
* Removed bogus PyUnicodeTranslateError_GetEncoding, asWalter Dörwald2002-09-021-1/+0
| | | | | UnicodeTranslateError doesn't have an encoding attribute. (Spotted by Neal Norwitz)
* PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald2002-09-022-0/+96
|
* Further SET_LINENO reomval fixes. See comments in patch #587933.Michael W. Hudson2002-08-301-3/+0
| | | | | | | | | | Use a slightly different strategy to determine when not to call the line trace function. This removes the need for the RETURN_NONE opcode, so that's gone again. Update docs and comments to match. Thanks to Neal and Armin! Also add a test suite. This should have come with the original patch...
* SF patch 576101, by Oren Tirosh: alternative implementation ofGuido van Rossum2002-08-192-4/+15
| | | | | | | | interning. I modified Oren's patch significantly, but the basic idea and most of the implementation is unchanged. Interned strings created with PyString_InternInPlace() are now mortal, and you must keep a reference to the resulting string around; use the new function PyString_InternImmortal() to create immortal interned strings.
* Make PyDescr_IsData() a macro. It's too simple to be a function.Guido van Rossum2002-08-191-1/+1
| | | | Should save 4% on slot lookups.
* This is my patchMichael W. Hudson2002-08-151-2/+3
| | | | | | | | [ 587993 ] SET_LINENO killer Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab. Many sundry changes to document and adapt to this change.
* provide less mysterious error messages when seeing end-of-line inSkip Montanaro2002-08-151-0/+2
| | | | | single-quoted strings or end-of-file in triple-quoted strings. closes patch 586561.
* Added a FutureWarning for constructs that will change semantically inBarry Warsaw2002-08-141-0/+1
| | | | | the future. Changed PEP 237 hex constant warnings from DeprecationWarning to FutureWarning. Updated the documentation.
* Patch #505705: Remove eval in pickle and cPickle.Martin v. Löwis2002-08-141-0/+4
|
* Correct PyAPI_FUNC to PyAPI_DATA - sorry Jack.Mark Hammond2002-08-121-2/+2
|