Andrew M. Kuchling
8a28c16430
[Backport r50743 | neal.norwitz]
...
Handle allocation failures gracefully. Found with failmalloc.
Many (all?) of these could be backported.
2006-10-05 18:08:58 +00:00
Andrew M. Kuchling
fb369242bd
[Backport r51247 | neal.norwitz]
...
cpathname could be NULL if it was longer than MAXPATHLEN. Don't try
to write the .pyc to NULL.
Check results of PyList_GetItem() and PyModule_GetDict() are not NULL.
Klocwork 282, 283, 285
2006-10-05 17:19:30 +00:00
Andrew M. Kuchling
1c0d8f0fec
[Backport r50678 | neal.norwitz]
...
Fix memory leak under some conditions.
Reported by Klocwork, #98 .
2006-10-03 18:32:25 +00:00
Andrew M. Kuchling
e7031223e3
[Backport of rev. 42093 by neal.norwitz]
...
Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-09-27 19:17:32 +00:00
Neal Norwitz
2d0d6c9b82
Backport:
...
Fix SF bug #976608 , Unhelpful error message when mtime of a module is -1
2005-10-03 04:50:55 +00:00
Guido van Rossum
e2f5adbc78
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:15:03 +00:00
Georg Brandl
32cb7f080d
Backport of patch #1290454 : Fix reload() error message when parent is not
...
in sys.modules.
2005-09-14 06:56:51 +00:00
Raymond Hettinger
db29e0fe8c
SF patch #1035498 : -m option to run a module as a script
...
(Contributed by Nick Coghlan.)
2004-10-07 06:46:25 +00:00
Phillip J. Eby
7ec642a4d2
Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.
2004-09-23 04:37:36 +00:00
Raymond Hettinger
2c31a058eb
SF patch #1031667 : Fold tuples of constants into a single constant
...
Example:
>>> import dis
>>> dis.dis(compile('1,2,3', '', 'eval'))
0 0 LOAD_CONST 3 ((1, 2, 3))
3 RETURN_VALUE
2004-09-22 18:44:21 +00:00
Raymond Hettinger
fd2d1f7870
SF Patch #1013667 : Cleanup Peepholer Output
...
* Make a pass to eliminate NOPs. Produce code that is more readable,
more compact, and a tiny bit faster. Makes the peepholer more flexible
in the scope of allowable transformations.
* With Guido's okay, bumped up the magic number so that this patch gets
widely exercised before the alpha goes out.
2004-08-23 23:37:48 +00:00
Tim Peters
1cd701732f
PyImport_ExecCodeModuleEx(): remove module from sys.modules in error cases.
...
PyImport_ReloadModule(): restore the module to sys.modules in error cases.
load_package(): semantic-neutral refactoring from an earlier stab at
this patch; giving it a common error exit made the code
easier to follow, so retaining that part.
_RemoveModule(): new little utility to delete a key from sys.modules.
2004-08-02 03:52:12 +00:00
Tim Peters
a7c650934d
lock_held() docs: Use True/False instead of 1/0. The LaTeX docs were
...
already correct, so not changed here.
2004-08-01 23:26:05 +00:00
Tim Peters
86c7d2f220
Trimmed trailing whitespace.
2004-08-01 23:24:21 +00:00
Martin v. Löwis
ef82d2fdfe
Patch #923098 : Share interned strings in marshal.
2004-06-27 16:51:46 +00:00
Thomas Heller
25653242fe
Fix a refcount bug in an obscure code corner.
...
Already backported.
2004-06-07 15:04:10 +00:00
Fred Drake
8759090562
starting to add comments to explain what's here
2004-05-28 20:21:36 +00:00
Jeremy Hylton
d4ceb31664
Bump the magic number to avoid sharing bytecode between 2.3 and 2.4.
...
Revise the long comment that explained details of the magic number
in gory detail.
2004-04-01 02:45:22 +00:00
Armin Rigo
01ab279056
Marshal clean-up (SF patch #873224 )
2004-03-26 15:09:27 +00:00
Nicholas Bastin
e5662aedef
Changed random calls to PyThreadState_Get() to use the macro
2004-03-24 22:22:12 +00:00
Martin v. Löwis
83969eeeeb
Decref all if ensure_fromlist fails. Fixes #876533 .
...
Backported to 2.3.
2004-03-23 16:28:13 +00:00
Jeremy Hylton
ecd9129c94
Add comment to mollify Tim.
2004-01-02 23:25:32 +00:00
Jack Jansen
eddc1449ba
Getting rid of all the code inside #ifdef macintosh too.
2003-11-20 01:44:59 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Jason Tishler
6bc06eca70
Bug #794140 : cygwin builds do not embed
...
The embed2.diff patch solves the user's problem by exporting the missing
symbols from the Python core so Python can be embedded in another Cygwin
application (well, at lest vim).
2003-09-04 11:59:50 +00:00