| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__module__ is the string name of the module the function was defined
in, just like __module__ of classes. In some cases, particularly for
C functions, the __module__ may be None.
Change PyCFunction_New() from a function to a macro, but keep an
unused copy of the function around so that we don't change the binary
API.
Change pickle's save_global() to use whichmodule() if __module__ is
None, but add the __module__ logic to whichmodule() since it might be
used outside of pickle.
|
|
|
|
|
|
|
|
|
| |
needs of pickling longs. Backed off to a definition that's much easier
to understand. The pickler will have to work a little harder, but other
uses are more likely to be correct <0.5 wink>.
_PyLong_Sign(): New teensy function to characterize a long, as to <0, ==0,
or >0.
|
|
|
|
|
|
|
| |
start for the C implemention of new pickle LONG1 and LONG4 opcodes (the
linear-time way to pickle a long is to call _PyLong_AsByteArray, but
the caller has no idea how big an array to allocate, and correct
calculation is a bit subtle).
|
|
|
|
| |
Gernot Hillier added more detail to the internal API documentation.
|
|
|
|
|
|
|
| |
the AEDesc data shouldn't be disposed when the Python object is.
Added a C call AEDesc_NewBorrowed() to create these objects and a Python
method old=AEDesc.AutoDispose(onoff) to change auto-dispose state.
|
| |
|
| |
|
|
|
|
| |
HASTZINFO() macro.
|
|
|
|
|
|
|
| |
hoped it would be, but not too bad. A test had to change:
time.__setstate__() can no longer add a non-None tzinfo member to a time
object that didn't already have one, since storage for a tzinfo member
doesn't exist in that case.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached patch enables shared extension
modules to build cleanly under Cygwin without
moving the static initialization of certain function
pointers (i.e., ones exported from the Python
DLL core) to a module initialization function.
Additionally, this patch fixes the modules that
have been changed in the past to accommodate
Cygwin.
|
|
|
|
| |
functions are here. Suggested by Skip.
|
| |
|
| |
|
|
|
|
|
|
| |
Initialize the small integers and __builtins__ in startup.
This removes some if conditions.
Change XDECREF to DECREF for values which shouldn't be NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- new import hooks in import.c, exposed in the sys module
- new module called 'zipimport'
- various changes to allow bootstrapping from zip files
I hope I didn't break the Windows build (or anything else for that
matter), but then again, it's been sitting on sf long enough...
Regarding the latest discussions on python-dev: zipimport sets
pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as
/path/to/Archive.zip/subdir/ are supported again.
|
|
|
|
|
|
|
| |
This can cause core dumps when Python runs. Python relies on the 754-
(and C99-) mandated default "non-stop" mode for FP exceptions. This
patch from Ben Laurie disables at least one FP exception on FreeBSD at
Python startup time.
|
| |
|
|
|
|
| |
It would be nice to support other compilers besides gcc.
|
|
|
|
|
| |
to others to argue about how to build it on other platforms (on Windows
it's in its own DLL).
|
| |
|
| |
|
|
|
|
|
|
|
| |
Most of these patches are from Thomas Heller, with long lines folded
by Tim. The change to test_descr.py is from Guido. See the bug report.
Not a bugfix candidate -- METH_CLASS is new in 2.3.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
system headers have two declarations for wchar_t, with different guard macros.
Not sure whether this is a bugfix candidate, that depends on what changed in the
curses module.
|
|
|
|
|
| |
reported by Michael Hudson in
http://mail.python.org/pipermail/python-dev/2002-November/030299.html
|
|
|
|
|
|
| |
Py_Init crash". refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.
|
|
|
|
|
|
|
|
| |
[ 617309 ] getframe hook (Psyco #1)
[ 617311 ] Tiny profiling info (Psyco #2)
[ 617312 ] debugger-controlled jumps (Psyco #3)
These are forward ports from 2.2.2.
|
| |
|
| |
|
|
|
|
| |
Use integers in stat tuple, optionally floats in named fields.
|
|
|
|
|
| |
Don't pollute the namespace when protecting against multiple header inclusion.
Prefix with Py_ and use standard naming convention Py_FILENAME_H.
|
| |
|
|
|
|
| |
platforms.
|
|
|
|
|
|
|
|
|
|
| |
the end, in the hope of saving some bytes on 64-bit machines. (Too
bad n_nchildren can't be made an unsigned short, but
test/test_longexp.py specifically tests for more than 2**16 subtrees
at one level.)
I don't expect any binary compatibility issues here, unless someone
has an old binary of parsermodule.so saved away.
|
|
|
|
| |
might use __attribute__ in other ways (e.g. CodeWarrior).
|
|
|
|
|
| |
This makes things a touch more like 2.2. Read the comments in
Python/ceval.c for more details.
|
|
|
|
| |
Bugfix candidate.
|
|
|
|
|
|
|
|
|
|
| |
globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's
shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the
test in the main loop to only test a single value.
The gory details are at
http://python.org/sf/602191
|
|
|
|
|
| |
UnicodeTranslateError doesn't have an encoding attribute.
(Spotted by Neal Norwitz)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use a slightly different strategy to determine when not to call the line
trace function. This removes the need for the RETURN_NONE opcode, so
that's gone again. Update docs and comments to match.
Thanks to Neal and Armin!
Also add a test suite. This should have come with the original patch...
|
|
|
|
|
|
|
|
| |
interning. I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged. Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.
|
|
|
|
| |
Should save 4% on slot lookups.
|
|
|
|
|
|
|
|
| |
[ 587993 ] SET_LINENO killer
Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab.
Many sundry changes to document and adapt to this change.
|
|
|
|
|
| |
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
|
|
|
|
|
| |
the future. Changed PEP 237 hex constant warnings from
DeprecationWarning to FutureWarning. Updated the documentation.
|
| |
|
| |
|