| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
seriously wrong. This started out by just fixing the docs, but then it
occurred to me that the doc confusion propagated into misleading vrbl names
too, so I also renamed those to match reality. As a result, INO the time
computations are much easier to understand now (within the limitations of
vast quantities of 3-character names <wink>).
|
| |
|
|
|
|
| |
to use assert stmts (was raising unexpected kinds of exceptions).
|
|
|
|
|
|
| |
+ The last index in the timing tuple is 4, not 5 (noted by Guido).
+ The poorly named trace_dispatch_i works with float return values too.
|
|
|
|
|
|
| |
This simplifies the rounding in _PyObject_VAR_SIZE, allows to restore the
pre-rounding calling sequence, and allows some nice little simplifications
in its callers. I'm still making it return a size_t, though.
|
|
|
|
|
| |
hasn't worked in years, docs were wrong, and they aren't interesting
anymore regardless.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Guido suggested, this makes the new subclassing code substantially
simpler. But the mechanics of doing it w/ C macro semantics are a mess,
and _PyObject_VAR_SIZE has a new calling sequence now.
Question: The PyObject_NEW_VAR macro appears to be part of the public API.
Regardless of what it expands to, the notion that it has to round up the
memory it allocates is new, and extensions containing the old
PyObject_NEW_VAR macro expansion (which was embedded in the
PyObject_NEW_VAR expansion) won't do this rounding. But the rounding
isn't actually *needed* except for new-style instances with dict pointers
after a variable-length blob of embedded data. So my guess is that we do
not need to bump the API version for this (as the rounding isn't needed
for anything an extension can do unless it's recompiled anyway). What's
your guess?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pad memory to properly align the __dict__ pointer in all cases.
gcmodule.c/objimpl.h, _PyObject_GC_Malloc:
+ Added a "padding" argument so that this flavor of malloc can allocate
enough bytes for alignment padding (it can't know this is needed, but
its callers do).
typeobject.c, PyType_GenericAlloc:
+ Allocated enough bytes to align the __dict__ pointer.
+ Sped and simplified the round-up-to-PTRSIZE logic.
+ Added blank lines so I could parse the if/else blocks <0.7 wink>.
|
|
|
|
|
|
| |
+ Use the _PyObject_VAR_SIZE macro to compute object size.
+ Break the computation into lines convenient for debugger inspection.
+ Speed the round-up-to-pointer-size computation.
|
|
|
|
|
| |
no way to talk the debugger into showing me how many bytes were being
allocated.
|
| |
|
|
|
|
|
| |
derive Profile subclasses. This patch repairs that, restoring
negative tuple indices. Yuck? You bet.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
objects. This is now simply a shim to give weakref.py access to the
underlying implementation.
|
|
|
|
| |
the implementation is in Objects/weakrefobject.c.
|
| |
|
| |
|
|
|
|
| |
It still needs to be here to preserve the API.
|
| |
|
|
|
|
|
| |
are moving into the core; with these changes, it will be possible for the
exception to be raised without the weakref module ever being imported.
|
|
|
|
| |
newline from a multifile part, it should also strip a trailing \r\n.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
many types were subclassable but had a xxx_dealloc function that
called PyObject_DEL(self) directly instead of deferring to
self->ob_type->tp_free(self). It is permissible to set tp_free in the
type object directly to _PyObject_Del, for non-GC types, or to
_PyObject_GC_Del, for GC types. Still, PyObject_DEL was a tad faster,
so I'm fearing that our pystone rating is going down again. I'm not
sure if doing something like
void xxx_dealloc(PyObject *self)
{
if (PyXxxCheckExact(self))
PyObject_DEL(self);
else
self->ob_type->tp_free(self);
}
is any faster than always calling the else branch, so I haven't
attempted that -- however those types whose own dealloc is fancier
(int, float, unicode) do use this pattern.
|
| |
|
|
|
|
| |
a hard-coded type check.
|
|
|
|
|
| |
in the gui.
Updated to include the new exe-file.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
foo\d
when it was clearly intended to render as
foo$
Fred, is this a right way to fix it? If not, the earlier place in the
same paragraph that does render as
foo$
is also wrong.
|
|
|
|
| |
so that it can be suppressed.
|
| |
|
|
|
|
| |
This closes SF patch #460737.
|
| |
|
|
|
|
| |
Give Fred his Jr.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows ConfigParser.getboolean() to interpret TRUE,
FALSE, YES, NO, ON and OFF instead just '0' and '1'.
While just allowing '0' and '1' sounds more correct users often
demand to use more descriptive directives in configuration
files. Instead of forcing every programmer do brew his own
solution a system should include the batteries for this.
[My modification to the patch is a slight rewording of the docstring
and use of lowercase instead of uppercase templates. The code is
still case sensitive. GvR.]
|
|
|
|
|
|
|
| |
error message.
run_unittest(): Provide the testclass to run_suite() so it can construct
the error message.
This closes SF bug #467763.
|
| |
|
|
|
|
|
| |
not other control characters string.rstrip() got rid of. This caters to
the \f thingies Barry likes putting in Python source files.
|
|
|
|
|
|
|
|
|
| |
The new profiler event stream includes a "return" event even when an
exception is being propogated, but the machinery that called the profile
hook did not save & restore the exception. In debug mode, the exception
was detected during the execution of the profile callback, which did not
have the proper internal flags set for the exception. Saving & restoring
the exception state solves the problem.
|
|
|
|
| |
"listify an iterator".
|
| |
|
|
|
|
| |
into tests/data/msg_*.txt files.
|
| |
|
| |
|