Commit Graph

9 Commits

Author SHA1 Message Date
Tim Peters c9d78aa470 Years in the making.
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.
2006-03-26 23:27:58 +00:00
Neal Norwitz 1ac754fa10 Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-01-19 06:09:39 +00:00
Fredrik Lundh e515293567 added TerminateProcess support to _subprocess driver 2005-12-18 21:06:46 +00:00
Fredrik Lundh 63168a52f4 added PSF licensing blurbs to relevant files 2005-12-14 22:29:34 +00:00
Fredrik Lundh 3a49e92d7d r858@spiff: Fredrik | 2005-11-10 23:40:04 +0100
#1346547

 added basic error checking to the STARTUPINFO code
 in CreateProcess.
2005-11-12 10:15:14 +00:00
Fredrik Lundh bb4692b6f2 r849@spiff: Fredrik | 2005-11-09 10:00:04 +0100
fixed resource leak in _subprocess.CreateProcess when using
 explicit environments
2005-11-12 10:15:03 +00:00
Peter Astrand c1d6536d60 When using shell=True on Windows, don't display a shell window by default. Fixes #1057061. 2004-11-07 14:30:34 +00:00
Tim Peters f3250b0b0b Before this turns into an unreadable mess, follow PEP 7 by using
hard tab indents in C code.
2004-10-12 21:38:22 +00:00
Fredrik Lundh 5b3687df2e Added Peter Astrand's subprocess module. 2004-10-12 15:26:28 +00:00