| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
both mystrtoul.c and longobject.c. Share the table instead. Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).
|
| |
|
| |
|
| |
|
|
|
|
| |
this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
|
| |
|
|
|
|
|
|
| |
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for
Python 2.5 and also modified to retain the free_list to avoid the 67%
slow-down in pybench recursion test. 5% speed up in function call pybench.
|
| |
|
|
|
|
| |
for long repeats.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Warn-raise ImportWarning when importing would have picked up a directory
as package, if only it'd had an __init__.py. This swaps two tests (for
case-ness and __init__-ness), but case-test is not really more expensive,
and it's not in a speed-critical section.
- Test for the new warning by importing a common non-package directory on
sys.path: site-packages
- In regrtest.py, silence warnings generated by the build-environment
because Modules/ (which is added to sys.path for Setup-created modules)
has 'zlib' and '_ctypes' directories without __init__.py's.
|
| |
|
|
|
|
|
|
|
|
|
| |
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
|
| |
|
|
|
|
|
| |
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
|
| |
|
|
|
|
|
| |
_PyObject_Call(Function|Method)_SizeT into Include/abstract.h. This gets
them under the umbrella of the extern "C" { ... } block in that file.
|
|
|
|
|
|
|
| |
Py_VISIT: cast the `op` argument to PyObject* when calling
`visit()`. Else the caller has to pay too much attention to
this silly detail (e.g., frame_traverse needs to traverse
`struct _frame *` and `PyCodeObject *` pointers too).
|
|
|
|
|
|
|
| |
why it's important. Now there are ;-)
If someone else hasn't already, I'll add a Py_CLEAR cleanup
task to the TODO Wiki next.
|
|
|
|
| |
PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
|
| |
|
| |
|
| |
|
|
|
|
| |
pointer dereferences.
|
|
|
|
| |
in dicts and sets when computing the total number of references.
|
|
|
|
| |
Explicitly cast void* to int to cmpop_ty.
|
| |
|
|
|
|
|
|
|
|
| |
that are suspended outside of any try/except/finally blocks to be
garbage collected even if they are part of a cycle. Generators that
suspend inside of an active try/except or try/finally block (including
those created by a ``with`` statement) are still not GC-able if they
are part of a cycle, however.
|
| |
|
| |
|
| |
|
|
|
|
| |
(see buildbot)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tracing/line number table in except blocks.
Reflow long lines introduced by col_offset changes. Update test_ast
to handle new fields in excepthandler.
As note in Python.asdl says, we might want to rethink how attributes
are handled. Perhaps they should be the same as other fields, with
the primary difference being how they are defined for all types within
a sum.
Also fix asdl_c so that constructors with int fields don't fail when
passed a zero value.
|
| |
|
| |
|
|
|
|
|
| |
linux with gcc 4.0.2, after talking to Tim.
<ymmit> But it won't break anything anywhere, so don't worry :-)
|
|
|
|
|
|
| |
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update(). The latter two are considered non-public. Tests and
documentation (for the public API) are included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objimpl.h, pymem.h: Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE}
to PyObject_{Free, FREE} in a release build. They're aliases for the
system free() now.
_subprocess.c/sp_handle_dealloc(): Since the memory was originally
obtained via PyObject_NEW, it must be released via PyObject_FREE (or
_DEL).
pythonrun.c, tokenizer.c, parsermodule.c: I lost count of the number of
PyObject vs PyMem mismatches in these -- it's like the specific
function called at each site was picked at random, sometimes even with
memory obtained via PyMem getting released via PyObject. Changed most
to use PyObject uniformly, since the blobs allocated are predictably
small in most cases, and obmalloc is generally faster than system
mallocs then.
If extension modules in real life prove as sloppy as Python's front
end, we'll have to revert the objimpl.h + pymem.h part of this patch.
Note that no problems will show up in a debug build (all calls still go
thru obmalloc then). Problems will show up only in a release build, most
likely segfaults.
|
|
|
|
| |
wrt to ssize_t.
|
|
|
|
| |
comments in the file. (SF #1455641)
|
| |
|
|
|
|
|
| |
in pyport.h. Changed PyString_FromFormatV() to use it
instead of inlining its own maze of #if'ery.
|
|
|
|
|
|
|
| |
of tuple) that provides incremental decoders and encoders (a way to use
stateful codecs without the stream API). Functions
codecs.getincrementaldecoder() and codecs.getincrementalencoder() have
been added.
|
|
|
|
| |
Rename unicodedata.db* to unicodedata.ucd*
|
| |
|
|
|
|
|
|
| |
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
|
| |
|
|
|
|
| |
I tried to handle Win64 properly, but please review.
|
| |
|