Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 1) Remove claim of an input invariant that is only true for static mpd_t. | Stefan Krah | 2012-04-10 | 2 | -4/+2 |
| | | | | | | | | | | | | | | | | | | Resizing is used _inside_ libmpdec functions, and it is permitted to change x->alloc several times while setting x->len at the end of the function. Therefore, for dynamic mpd_t x->alloc can _temporarily_ drop below x->len. Of course the final result always has x->len <= x->alloc. For static mpd_t this cannot happen, since resizing to a smaller coefficient is a no-op. 2) Remove micro optimization in mpd_switch_to_dyn(): Previously only the valid initialized part of the existing coefficient up to x->len was copied to the new dynamic memory area. Now copying does the same as realloc() and the entire old memory area is copied. The rationale for this change is that it is no longer needed to memorize the explanation given in 1). | ||||
* | Fix stale comment. | Stefan Krah | 2012-04-10 | 1 | -3/+4 |
| | |||||
* | Issue #14478: Cache the hash of a Decimal in the C version. | Stefan Krah | 2012-04-10 | 1 | -1/+14 |
| | |||||
* | Issue #14520: Add __sizeof__() method to the Decimal object. | Stefan Krah | 2012-04-09 | 1 | -0/+14 |
| | |||||
* | Resize the coefficient to MPD_MINALLOC also if the requested size is below | Stefan Krah | 2012-04-09 | 1 | -11/+15 |
| | | | | MPD_MINALLOC. Previously the resize was skipped as a micro optimization. | ||||
* | Speed up _decimal by 30-40% for numerical workloads by improving the cache | Stefan Krah | 2012-04-09 | 1 | -16/+18 |
| | | | | locality for regularly sized coefficients. | ||||
* | Use the MPD() accessor macro. | Stefan Krah | 2012-04-09 | 1 | -2/+2 |
| | |||||
* | Remove unused variable from gcmodule.c. The code no longer tests for the | Kristján Valur Jónsson | 2012-04-08 | 1 | -9/+0 |
| | | | | presence of a __del__ attribute on objects, rather it uses the tp_del slot. | ||||
* | struct timeval.tv_usec is 4 bytes on 64-bit OS X as it should be, but | Brett Cannon | 2012-04-07 | 1 | -1/+5 |
| | | | | | is defined as an int while everyone else expects a long regardless of length. | ||||
* | Merge. | Stefan Krah | 2012-04-07 | 2 | -8/+67 |
|\ | |||||
| * | Issue #14310: inter-process socket duplication for windows | Kristján Valur Jónsson | 2012-04-07 | 1 | -7/+66 |
| | | |||||
| * | Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder. | Ross Lagerwall | 2012-04-07 | 1 | -1/+1 |
| | | | | | | | | Found with Clang's Static Analyzer. | ||||
* | | 1) Fix comment. | Stefan Krah | 2012-04-07 | 1 | -15/+12 |
|/ | | | | | | | | 2) Assert that the source operand is not special. Prevent resulting assert failure (harmless) by initializing flags before calling mpd_qshiftr_inplace. 3) Save a couple of instructions (mpd_zerocoeff already sets digits and len). Reorder initialization to match the order in the mpd_t struct. | ||||
* | Whitespace. | Stefan Krah | 2012-04-05 | 1 | -1/+1 |
| | |||||
* | Reduce array size. | Stefan Krah | 2012-04-05 | 1 | -1/+1 |
| | |||||
* | Formatting. | Stefan Krah | 2012-04-05 | 1 | -2/+2 |
| | |||||
* | Allow printing a leading '-' and the maximum number of exponent digits | Stefan Krah | 2012-04-05 | 1 | -2/+2 |
| | | | | | rather than raising RuntimeError (allocated space is sufficient for the additional character). | ||||
* | Raise InvalidOperation if exponents of zeros are clamped during exact | Stefan Krah | 2012-04-05 | 2 | -2/+3 |
| | | | | | conversion in the Decimal constructor. Exact here refers to the representation and not to the value (clamping does not change the value). | ||||
* | Replace bootstrap imports with real C API calls. | Eli Bendersky | 2012-04-05 | 1 | -8/+9 |
| | |||||
* | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵ | Antoine Pitrou | 2012-04-04 | 1 | -1/+1 |
| | | | | the stable ABI. | ||||
* | Fix Windows compilation errors | Eli Bendersky | 2012-04-04 | 1 | -2/+4 |
| | |||||
* | Fixes and enhancements to _elementtree: | Eli Bendersky | 2012-04-03 | 1 | -21/+44 |
| | | | | | | * Fixed refleak problems when GC collection is run (see messages in issue #14065) * Added weakref support to Element objects | ||||
* | Issue #14288: Serialization support for builtin iterators. | Kristján Valur Jónsson | 2012-04-03 | 3 | -56/+957 |
| | |||||
* | Expose clock_settime() as time.clock_settime() | Victor Stinner | 2012-04-02 | 1 | -0/+30 |
| | |||||
* | Add time.CLOCK_HIGHRES constant, needed on Solaris | Victor Stinner | 2012-04-02 | 1 | -0/+3 |
| | |||||
* | Improve comments. | Stefan Krah | 2012-04-02 | 1 | -5/+5 |
| | |||||
* | merge 3.2 | Benjamin Peterson | 2012-04-02 | 1 | -0/+3 |
|\ | |||||
| * | prevent writing to stderr from messing up the exception state (closes #14474) | Benjamin Peterson | 2012-04-02 | 1 | -0/+3 |
| | | |||||
| * | Issue #14437: Fix building the _io module under Cygwin. | Antoine Pitrou | 2012-03-31 | 1 | -1/+1 |
| | | |||||
* | | Clear the context flags if a context is initialized from the DefaultContext. | Stefan Krah | 2012-04-02 | 1 | -0/+8 |
| | | |||||
* | | Fix Overflow exception in the bignum factorial benchmark that is due to | Stefan Krah | 2012-04-01 | 1 | -1/+4 |
| | | | | | | | | the recent change of the default value for context.Emax. | ||||
* | | Issue #14300: Under Windows, sockets created using socket.dup() now allow ↵ | Antoine Pitrou | 2012-03-31 | 1 | -1/+1 |
| | | | | | | | | | | | | overlapped I/O. Patch by sbt. | ||||
* | | fix issue #5136: deprecate old unused functions from tkinter. | Andrew Svetlov | 2012-03-31 | 1 | -1/+18 |
| | | | | | | | | These functions are not documnted, so no documentation update. | ||||
* | | Fix warning when compiling socketmodule.c with VS2010 | Kristján Valur Jónsson | 2012-03-31 | 1 | -0/+1 |
| | | | | | | | | VS2010 defineds the old errno constants in addition to the WSA* ones. | ||||
* | | Issue #14065: Added cyclic GC support to ET.Element | Eli Bendersky | 2012-03-30 | 1 | -15/+48 |
| | | |||||
* | | Merge. | Stefan Krah | 2012-03-30 | 1 | -0/+8 |
|\ \ | |||||
| * | | #14416: conditionally add LOG_AUTHPRIV facility and LOG_ODELAY to syslog. | R David Murray | 2012-03-29 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the other facilities, we don't use a fallback for AUTHPRIV if it doesn't exist. Because it is intended for logging sensitive log messages, it is better that a program trying to log such messages fail than that it log them insecurely. Initial patch by Federico Reghenzani. | ||||
* | | | Use abort() rather than exit() to appease tools like rpmlint. abort() is used | Stefan Krah | 2012-03-30 | 1 | -1/+1 |
|/ / | | | | | | | | | | | in libmpdec to prevent undefined behavior if an invalid context is used. This cannot occur for the _decimal module since user input for the context is validated. | ||||
* | | time.time() now uses clock_gettime(CLOCK_REALTIME) if available | Victor Stinner | 2012-03-28 | 1 | -0/+11 |
| | | | | | | | | | | | | clock_gettime(CLOCK_REALTIME) has a better resolution than gettimeofday(). time.time() falls back on gettimeofday() (and then on other functions) on error. | ||||
* | | Document the fact that mach_timebase_info() cannot fail | Victor Stinner | 2012-03-28 | 1 | -4/+8 |
| | | | | | | | | And call mach_absolute_time() after mach_timebase_info(). | ||||
* | | Issue #11826: Fix memory leak in atexitmodule. | Stefan Krah | 2012-03-27 | 1 | -1/+9 |
| | | |||||
* | | Fix time.steady(strict=True): don't use CLOCK_REALTIME | Victor Stinner | 2012-03-26 | 1 | -7/+28 |
| | | |||||
* | | Issue #14368: _PyTime_gettimeofday() cannot fail | Victor Stinner | 2012-03-26 | 1 | -7/+1 |
| | | | | | | | | floattime() must not raise an error if the current time is 1970.1.1 at 00:00. | ||||
* | | Issue #3367: Merge fix from 3.2. | Stefan Krah | 2012-03-26 | 1 | -2/+4 |
|\ \ | |/ | |||||
| * | Issue #3367: NULL-terminate argv[] copies to prevent an invalid access | Stefan Krah | 2012-03-26 | 1 | -2/+4 |
| | | | | | | | | in sys_update_path(). | ||||
* | | Raise MemoryError instead of InvalidOperation/MallocError for compatibility | Stefan Krah | 2012-03-25 | 1 | -1/+8 |
| | | | | | | | | | | | | with decimal.py. The standard specifies InsufficientStorage (MallocError) as a sub-condition of InvalidOperation. This allows a calculation to continue with NaN results when allocation fails. | ||||
* | | Issue #14154: Reimplement the bigmem test memory watchdog as a subprocess. | Charles-François Natali | 2012-03-24 | 1 | -184/+0 |
| | | |||||
* | | Fix formatting after removing tabs. | Stefan Krah | 2012-03-23 | 2 | -4/+8 |
| | | |||||
* | | Whitespace. | Stefan Krah | 2012-03-23 | 2 | -102/+102 |
| | | |||||
* | | Use the same exception hierarchy as decimal.py. FloatOperation now also | Stefan Krah | 2012-03-23 | 1 | -20/+65 |
| | | | | | | | | | | inherits from TypeError. Cleanup in module initialization to make repeated import failures robust. |