| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
platforms).
The patch unifies float("inf") and repr(float("inf")) on all platforms.
|
|
|
|
|
|
|
|
|
|
|
| |
Allows dictionaries to be pre-sized (upto 255 elements) saving time lost
to re-sizes with their attendant mallocs and re-insertions.
Has zero effect on small dictionaries (5 elements or fewer), a slight
benefit for dicts upto 22 elements (because they had to resize once
anyway), and more benefit for dicts upto 255 elements (saving multiple
resizes during the build-up and reducing the number of collisions on
the first insertions). Beyond 255 elements, there is no addional benefit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New opcode, STORE_MAP saves the compiler from awkward stack manipulations
and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem.
Old disassembly:
0 BUILD_MAP 0
3 DUP_TOP
4 LOAD_CONST 1 (1)
7 ROT_TWO
8 LOAD_CONST 2 ('x')
11 STORE_SUBSCR
12 DUP_TOP
13 LOAD_CONST 3 (2)
16 ROT_TWO
17 LOAD_CONST 4 ('y')
20 STORE_SUBSCR
New disassembly:
0 BUILD_MAP 0
3 LOAD_CONST 1 (1)
6 LOAD_CONST 2 ('x')
9 STORE_MAP
10 LOAD_CONST 3 (2)
13 LOAD_CONST 4 ('y')
16 STORE_MAP
|
| |
|
| |
|
|
|
|
|
| |
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
|
| |
|
| |
|