| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
(mistmatch found by clang).
|
|
|
|
| |
there is no need to emit co_lnotab item when both offsets are zeros.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.
Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.
The lnotab seems to be exactly the same as with python2.4.
|
|
|
|
|
| |
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
|
|
|
|
|
| |
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.
|
|
|
|
| |
Py_Initialize() and Py_Finalize().
|
| |
|
| |
|
|
|
|
| |
string.
|
| |
|
|
|
|
| |
creating an intermediate tuple).
|
|
|
|
| |
PyObject_FromString() to store a python string in a function level static var.
|
|
|
|
| |
leak test runs.
|
| |
|
| |
|
|
|
|
| |
Saves the unnecessary creation of a tuple as intermediate container.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
optimized the
whole construct away, even when an 'else' clause is present::
while 0:
print("no")
else:
print("yes")
did not generate any code at all.
Now the compiler emits the 'else' block, like it already does for 'if' statements.
Will backport.
|
| |
|
|
|
|
| |
The "can't load dll" message box on Windows is suppressed while an extension is loaded by calling SetErrorMode in dynload_win.c. The error is still reported properly.
|
|
|
|
| |
Patch by Angelo Mottola, reviewed by MvL, tests by me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyThreadState_Delete() to avoid an infinite loop when the tstate list
is messed up and has somehow becomes circular and does not contain the
current thread.
I don't know how this happens but it does, *very* rarely. On more than
one hardware platform. I have not been able to reproduce it manually.
Attaching to a process where its happening: it has always been in an
infinite loop over a single element tstate list that is not the tstate
we're looking to delete. It has been in t_bootstrap()'s call to
PyThreadState_DeleteCurrent() as a pthread is exiting.
|
|
|
|
| |
function is not called isfinite() but finite(). Sorry, my fault. :)
|
| |
|
|
|
|
|
| |
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
|
|
|
|
| |
Nikšić.
|
| |
|
|
|
|
|
|
| |
local_ptr_assign_local: Assigning address of stack variable "namebuf" to pointer "filename"
out_of_scope: Variable "namebuf" goes out of scope
use_invalid: Used "filename" pointing to out-of-scope variable "namebuf"
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
round included:
* Revert round to its 2.6 behavior (half away from 0).
* Because round, floor, and ceil always return float again, it's no
longer necessary to have them delegate to __xxx___, so I've ripped
that out of their implementations and the Real ABC. This also helps
in implementing types that work in both 2.6 and 3.0: you return int
from the __xxx__ methods, and let it get enabled by the version
upgrade.
* Make pow(-1, .5) raise a ValueError again.
|
|
|
|
| |
and adds errors for -0x.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, when import fails to load a dll module, the message says
"error code 193" instead of a more informative text.
It turns out that FormatMessage needs additional parameters for some error codes.
For example: 193 means "%1 is not a valid Win32 application".
Since it is impossible to know which parameter to pass, we use
FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better
than the number.
|
|
|
|
|
|
| |
imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
|
|
|
|
|
|
|
| |
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689.
|
|
|
|
|
| |
using a trick found in ifilter().
Feel free to backport to 2.5.
|
| |
|
| |
|
|
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
| |
|