| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Implements and closes SF patch #102106, with Guido's suggested
documentation changes.
|
|
|
|
|
| |
accepts. Clarify exception messages for isinstance() and
issubclass(). Closes bug #124106.
|
|
|
|
| |
buffer" replaced by "string or read-only character buffer".
|
|
|
|
|
|
| |
"..." in "from M import ..." was never DECREFed. Leak reported by
James Slaughter and nailed by Barry, who also provided an earlier
version of this patch.
|
|
|
|
|
|
| |
the bug report (for details, look at it), but agree there's no need for Python
to declare atof itself: we #include stdlib.h, and ANSI C sez atof is declared
there already.
|
|
|
|
| |
still in use, for Apple Mac OSX.
|
| |
|
|
|
|
|
|
|
|
|
| |
regardless of whether the system getopt() does what we want. This avoids the
hassle with prototypes and externs, and the check to see if the system
getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to
avoid name clashes. Add new include file to define the right symbols. Fix
Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on
Python to provide it.
|
|
|
|
|
|
|
|
|
| |
When a method is called with no regular arguments and * args, defer
the first arg is subclass check until after the * args have been
expanded.
N.B. The CALL_FUNCTION implementation is getting really hairy; should
review it to see if it can be simplified.
|
|
|
|
| |
BSDs) you need a leading underscore in the dlsym() lookup name.
|
|
|
|
|
|
| |
Changes to error messages to increase consistency & clarity.
This (mostly) closes SourceForge patch #101839.
|
|
|
|
| |
Eliminate unused variables to appease compiler.
|
|
|
|
|
| |
assuming here that the ANSI-C adjacent-string-concatenation technique is
allowable, now that Python requires an ANSI C compiler.
|
|
|
|
|
| |
Py_FatalError() instead, and clarify the message somewhat. As discussed on
python-dev.
|
|
|
|
|
|
| |
variable. w should be initialized before entering the bytecode
interpretation loop since we only need one initialization to satisfy the
compiler.
|
|
|
|
|
|
| |
by making the DUP_TOPX code utterly straightforward. This also gets rid
of all normal-case internal DUP_TOPX if/branches, and allows replacing one
POP() with TOP() in each case, so is a good idea regardless.
|
|
|
|
|
|
|
| |
these computations are required for their side effects in traversing the
variable arguments list.
Reported by Marc-Andre Lemburg <mal@lemburg.com>.
|
|
|
|
|
|
|
|
| |
Do not assume that all platforms using a MetroWorks compiler can use
POSIX threads; the assumption breaks on BeOS. This fix only helps
for BeOS.
This closes SourceForge patch #101772.
|
|
|
|
| |
Tkinter work under Cygwin. Accepted on faith & reasonableness.
|
|
|
|
| |
Patch #101676 ]
|
|
|
|
|
| |
Py_Initialize()/Py_Finalize() in a loop. _PyImport_Filetab needed to
be deallocated. Partial closure of SF #110681, Jitterbug PR#398.
|
|
|
|
|
|
|
|
| |
unintentionally caused them to get written in text mode under Windows.
As a result, when .pyc files were later read-- in binary mode --the
magic number was always wrong (note that .pyc magic numbers deliberately
include \r and \n characters, so this was "good" breakage, 100% across
all .pyc files, not random corruption in a subset). Fixed that.
|
|
|
|
|
|
|
|
| |
Add definitions of INT_MAX and LONG_MAX to pyport.h.
Remove includes of limits.h and conditional definitions of INT_MAX
and LONG_MAX elsewhere.
This closes SourceForge patch #101659 and bug #115323.
|
|
|
|
|
|
|
| |
Add three new convenience functions to the PyModule_*() family:
PyModule_AddObject(), PyModule_AddIntConstant(), PyModule_AddStringConstant().
This closes SourceForge patch #101233.
|
|
|
|
|
|
|
|
|
|
|
|
| |
"s#" will now return a pointer to the default encoded string data
of the Unicode object instead of a pointer to the raw UTF-16
data.
The latter is still available via PyObject_AsReadBuffer().
The patch also adds an optimization for string objects which is
based on the fact that string objects return the raw character data
for getreadbuffer access and are always single-segment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which implements the automatic conversion from Unicode to a string
object using the default encoding.
The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.
As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
|
|
|
|
|
|
|
|
| |
When reading a short, sign-extend on platforms where shorts are
bigger than 16 bits.
When reading a long, repair the unportable sign extension that was
being done for 64-bit machines (it assumed that signed right shift
sign-extends).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can't test this, so I'm just checking it in with blind faith in Andy.
I've tested that it doesn't broeak a non-Pth build on Linux.
Changes include:
- There's a --with-pth configure option.
- Instead of _GNU_PTH, we test for HAVE_PTH.
- Better signal handling.
- (The config.h.in file is regenerated in a slightly different order.)
|
|
|
|
|
|
| |
PyObject_Set/GetAttr() calls.
This patch fixes bug #113829.
|
|
|
|
| |
sigaction() (if HAVE_SIGACTION is defined).
|
|
|
|
| |
bgen-generated code work).
|
|
|
|
| |
B format char.
|
|
|
|
|
|
| |
in a try statement in a loop.
This is related to SourceForge bug #110830.
|
|
|
|
| |
PyArg_ParseTupleAndKeywords() and closes bug #113807.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
BeOpen.com added to the front.
(Even if maybe we won't print this long banner at startup, the string
must still be defined for sys.copyright.)
|
|
|
|
| |
for 8-bit strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can cause it to get called by multiple threads simultaneously.
Ditto for PyInterpreterState_Delete.
Of the former, the docs say "The interpreter lock need not be held, but may
be held if it is necessary to serialize calls to this function". This
kinda implies it both is and isn't thread-safe.
Of the latter, the docs merely say "The interpreter lock need not be
held.", and the clause about serializing is absent.
I expect it was *believed* these are both thread-safe, and the bit about
serializing via the global lock was meant as a permission rather than a
caution.
I also expect we've never seen a problem here because the Python core
(prior to the _PyPclose fix) only calls these functions once per run.
The Py_NewInterpreter subsystem exposed by the C API (but not used by
Python itself) also calls them, but that subsystem appears to be very
rarely used.
Whatever, they're both thread-safe now.
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
| |
|
|
|
|
|
| |
PyErr_Format computes size of buffer needed rather than relying on
static buffer.
|
|
|
|
|
| |
out again after we complete switching to C++ <wink>. Thanks to Greg Stein
for hitting me.
|
|
|
|
|
| |
add sanity check to gc: if an exception occurs during GC, call
PyErr_WriteUnraisable and then call Py_FatalEror.
|
|
|
|
| |
conservative.
|
|
|
|
|
|
|
| |
wngs;
un-analize Get's definition ("void" is needed only in declarations, not defns, &
is generally considered bad style in the latter).
|