summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macrosNeal Norwitz2003-07-012-2/+2
|
* Bump version string to "2.3b2+".Tim Peters2003-06-301-1/+1
|
* FreeBSD 5.x uses different wchar_t/win_t guards than earlier versionsAndrew MacIntyre2003-06-291-0/+12
|
* Bump release level to 2.3b2.Tim Peters2003-06-291-2/+2
|
* Add PyThreadState_SetAsyncExc(long, PyObject *).Guido van Rossum2003-06-281-0/+4
| | | | | | | | | A new API (only accessible from C) to interrupt a thread by sending it an exception. This is not always effective, but might help some people. Requested by Just van Rossum and Alex Martelli. It is intentional that you have to write your own C extension to call it from Python. Docs will have to wait.
* fix the curses module build failure on FreeBSD, reported in SF #740234.Andrew MacIntyre2003-06-111-0/+15
|
* Added functions CFObj_New and CFObj_Convert, general functions to convertJack Jansen2003-05-271-0/+2
| | | | between CF objects and their Python representation. Fixes 734695.
* After Raymond's remark, I changed the Stackless bits toChristian Tismer2003-05-231-2/+2
| | | | | two fixed bits, position 15 and 16. It is right, why should these be elsewhere.
* Generalized my type flags structure extension without being specific aboutChristian Tismer2003-05-231-4/+4
| | | | | | the purpose. Increased my claim to two bits, hoping that nobody will complain about it. I'm taking the highest two bits, whatever the integer word size may be.
* Fix for SF [ 734869 ] Lambda functions in list comprehensionsJeremy Hylton2003-05-211-1/+1
| | | | | | The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry. Bugfix candidate.
* Preserved one bit in type objects for Stackless.Christian Tismer2003-05-201-0/+8
| | | | | The presence of this bit controls, whether there are special fields for non-recursive calls.
* Fix broken API descriptions in comments.Fred Drake2003-05-121-8/+7
|
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-0/+1
| | | | riscospath.extsep, and use os.extsep throughout.
* Patch #612627: Add encoding attribute to file objects, and determineMartin v. Löwis2003-05-101-0/+2
| | | | the terminal encoding on Windows and Unix.
* Add a reference to dictnotes.txt. It does no good if you don't know it'sRaymond Hettinger2003-05-031-0/+6
| | | | there or where to find it.
* Mark CVS as 2.3b1+.Guido van Rossum2003-04-301-1/+1
|
* Bump version number to 2.3b1.Tim Peters2003-04-241-3/+3
|
* Revert the previous enhancement to the bytecode optimizer.Raymond Hettinger2003-04-241-2/+0
| | | | The additional code complexity and new NOP opcode were not worth it.
* Improved the bytecode optimizer.Raymond Hettinger2003-04-221-0/+2
| | | | | | | | | | | | | | * Can now test for basic blocks. * Optimize inverted comparisions. * Optimize unary_not followed by a conditional jump. * Added a new opcode, NOP, to keep code size constant. * Applied NOP to previous transformations where appropriate. Note, the NOP would not be necessary if other functions were added to re-target jump addresses and update the co_lnotab mapping. That would yield slightly faster and cleaner bytecode at the expense of optimizer simplicity and of keeping it decoupled from the line-numbering structure.
* New PyGILState_ API - implements pep 311, from patch 684256.Mark Hammond2003-04-192-0/+48
|
* _Py_PrintReferences(): Changed to print object address at start of eachTim Peters2003-04-171-0/+1
| | | | | | | | | | | | | | | new line. New pvt API function _Py_PrintReferenceAddresses(): Prints only the addresses and refcnts of the live objects. This is always safe to call, because it has no dependence on Python's C API. Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new) _Py_PrintReferenceAddresses() right before dumping final pymalloc stats. We can't print the reprs of the objects here because too much of the interpreter has been shut down. You need to correlate the addresses displayed here with the object reprs printed by the earlier PYTHONDUMPREFS call to _Py_PrintReferences().
* SF # 595026: support for masks in getargs.c.Thomas Heller2003-04-172-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions: unsigned long PyInt_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); New and changed format codes: b unsigned char 0..UCHAR_MAX B unsigned char none ** h unsigned short 0..USHRT_MAX H unsigned short none ** i int INT_MIN..INT_MAX I * unsigned int 0..UINT_MAX l long LONG_MIN..LONG_MAX k * unsigned long none L long long LLONG_MIN..LLONG_MAX K * unsigned long long none Notes: * New format codes. ** Changed from previous "range-and-a-half" to "none"; the range-and-a-half checking wasn't particularly useful. New test test_getargs2.py, to verify all this.
* - New C API PyGC_Collect(), same as calling gc.collect().Guido van Rossum2003-04-171-0/+3
| | | | | - Call this in Py_Finalize(). - Expand the Misc/NEWS text on PY_LONG_LONG.
* Changes from Jonathan Riehl to allow his pgen extension (PEP 269) toGuido van Rossum2003-04-172-0/+22
| | | | | | work. This includes some more code that used to be part of pgen in the main parser; I'm okay with that. I'll see if the Windows build needs work next.
* - New function sys.call_tracing() allows pdb to debug codeGuido van Rossum2003-04-091-0/+2
| | | | | | recursively. - pdb has a new command, "debug", which lets you step through arbitrary code from the debugger's (pdb) prompt.
* Typo repair.Tim Peters2003-04-081-2/+2
|
* New private API function _PyInstance_Lookup. gc will use this to figureTim Peters2003-04-071-0/+12
| | | | out whether __del__ exists, without executing any Python-level code.
* Rename LONG_LONG to PY_LONG_LONG. Fixes #710285.Martin v. Löwis2003-03-292-9/+9
|
* Improved new Py_TRACE_REFS gimmicks.Tim Peters2003-03-231-1/+1
| | | | | | | | | | | Arranged that all the objects exposed by __builtin__ appear in the list of all objects. I basically peed away two days tracking down a mystery leak in sys.gettotalrefcount() in a ZODB app (== tons of code), because the object leaking the references didn't appear in the sys.getobjects(0) list. The object happened to be False. Now False is in the list, along with other popular & previously missing leak candidates (like None). Alas, we still don't have a choke point covering *all* Python objects, so the list of all objects may still be incomplete.
* Refactored some of the Py_TRACE_REFS code. New private API functionTim Peters2003-03-231-0/+1
| | | | | | | _Py_AddToAllObjects() that simply inserts an object at the front of the doubly-linked list of all objects. Changed PyType_Ready() (the closest thing we've got to a choke point for type objects) to call that.
* 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.