You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

687 lines
20 KiB

Merged revisions 65012,65035,65037-65040,65048,65057,65077,65091-65095,65097-65099,65127-65128,65131,65133-65136,65139,65149-65151,65155,65158-65159,65176-65178,65183-65184,65187-65190,65192,65194 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65012 | jesse.noller | 2008-07-16 15:24:06 +0200 (Wed, 16 Jul 2008) | 2 lines Apply patch for issue 3090: ARCHFLAGS parsing incorrect ........ r65035 | georg.brandl | 2008-07-16 23:19:28 +0200 (Wed, 16 Jul 2008) | 2 lines #3045: fix pydoc behavior for TEMP path with spaces. ........ r65037 | georg.brandl | 2008-07-16 23:31:41 +0200 (Wed, 16 Jul 2008) | 2 lines #1608818: errno can get set by every call to readdir(). ........ r65038 | georg.brandl | 2008-07-17 00:04:20 +0200 (Thu, 17 Jul 2008) | 2 lines #3305: self->stream can be NULL. ........ r65039 | georg.brandl | 2008-07-17 00:09:17 +0200 (Thu, 17 Jul 2008) | 2 lines #3345: fix docstring. ........ r65040 | georg.brandl | 2008-07-17 00:33:18 +0200 (Thu, 17 Jul 2008) | 2 lines #3312: fix two sqlite3 crashes. ........ r65048 | georg.brandl | 2008-07-17 01:35:54 +0200 (Thu, 17 Jul 2008) | 2 lines #3388: add a paragraph about using "with" for file objects. ........ r65057 | gregory.p.smith | 2008-07-17 05:13:05 +0200 (Thu, 17 Jul 2008) | 2 lines news note for r63052 ........ r65077 | jesse.noller | 2008-07-17 23:01:05 +0200 (Thu, 17 Jul 2008) | 3 lines Fix issue 3395, update _debugInfo to be _debug_info ........ r65091 | ronald.oussoren | 2008-07-18 07:48:03 +0200 (Fri, 18 Jul 2008) | 2 lines Last bit of a fix for issue3381 (addon for my patch in r65061) ........ r65092 | vinay.sajip | 2008-07-18 10:59:06 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65093 | vinay.sajip | 2008-07-18 11:00:00 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65094 | vinay.sajip | 2008-07-18 11:00:35 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65095 | vinay.sajip | 2008-07-18 11:01:10 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65097 | georg.brandl | 2008-07-18 12:20:59 +0200 (Fri, 18 Jul 2008) | 2 lines Remove duplicate entry in __all__. ........ r65098 | georg.brandl | 2008-07-18 12:29:30 +0200 (Fri, 18 Jul 2008) | 2 lines Correct attribute name. ........ r65099 | georg.brandl | 2008-07-18 13:15:06 +0200 (Fri, 18 Jul 2008) | 3 lines Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. ........ r65127 | raymond.hettinger | 2008-07-19 02:42:03 +0200 (Sat, 19 Jul 2008) | 1 line Improve accuracy of gamma test function ........ r65128 | raymond.hettinger | 2008-07-19 02:43:00 +0200 (Sat, 19 Jul 2008) | 1 line Add recipe to the itertools docs. ........ r65131 | georg.brandl | 2008-07-19 12:08:55 +0200 (Sat, 19 Jul 2008) | 2 lines #3378: in case of no memory, don't leak even more memory. :) ........ r65133 | georg.brandl | 2008-07-19 14:39:10 +0200 (Sat, 19 Jul 2008) | 3 lines #3302: fix segfaults when passing None for arguments that can't be NULL for the C functions. ........ r65134 | georg.brandl | 2008-07-19 14:46:12 +0200 (Sat, 19 Jul 2008) | 2 lines #3303: fix crash with invalid Py_DECREF in strcoll(). ........ r65135 | georg.brandl | 2008-07-19 15:00:22 +0200 (Sat, 19 Jul 2008) | 3 lines #3319: don't raise ZeroDivisionError if number of rounds is so low that benchtime is zero. ........ r65136 | georg.brandl | 2008-07-19 15:09:42 +0200 (Sat, 19 Jul 2008) | 3 lines #3323: mention that if inheriting from a class without __slots__, the subclass will have a __dict__ available too. ........ r65139 | georg.brandl | 2008-07-19 15:48:44 +0200 (Sat, 19 Jul 2008) | 2 lines Add ordering info for findall and finditer. ........ r65149 | raymond.hettinger | 2008-07-20 01:21:57 +0200 (Sun, 20 Jul 2008) | 1 line Fix compress() recipe in docs to use itertools. ........ r65150 | raymond.hettinger | 2008-07-20 01:58:47 +0200 (Sun, 20 Jul 2008) | 1 line Clean-up itertools docs and recipes. ........ r65151 | gregory.p.smith | 2008-07-20 02:22:08 +0200 (Sun, 20 Jul 2008) | 9 lines fix issue3120 - don't truncate handles on 64-bit Windows. This is still messy, realistically PC/_subprocess.c should never cast pointers to python numbers and back at all. I don't have a 64-bit windows build environment because microsoft apparently thinks that should cost money. Time to watch the buildbots. It builds and passes tests on 32-bit windows. ........ r65155 | georg.brandl | 2008-07-20 13:50:29 +0200 (Sun, 20 Jul 2008) | 2 lines #926501: add info where to put the docstring. ........ r65158 | neal.norwitz | 2008-07-20 21:35:23 +0200 (Sun, 20 Jul 2008) | 1 line Fix a couple of names in error messages that were wrong ........ r65159 | neal.norwitz | 2008-07-20 22:39:36 +0200 (Sun, 20 Jul 2008) | 1 line Fix misspeeld method name (negative) ........ r65176 | amaury.forgeotdarc | 2008-07-21 23:36:24 +0200 (Mon, 21 Jul 2008) | 4 lines Increment version number in NEWS file, and move items that were added after 2.6b2. (I thought there was a script to automate this kind of updates) ........ r65177 | amaury.forgeotdarc | 2008-07-22 00:00:38 +0200 (Tue, 22 Jul 2008) | 5 lines Issue2378: pdb would delete free variables when stepping into a class statement. The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast ........ r65178 | benjamin.peterson | 2008-07-22 00:05:34 +0200 (Tue, 22 Jul 2008) | 1 line don't use assert statement ........ r65183 | ronald.oussoren | 2008-07-22 09:06:00 +0200 (Tue, 22 Jul 2008) | 2 lines Fix buglet in fix for issue3381 ........ r65184 | ronald.oussoren | 2008-07-22 09:06:33 +0200 (Tue, 22 Jul 2008) | 2 lines Fix build issue on OSX 10.4, somehow this wasn't committed before. ........ r65187 | raymond.hettinger | 2008-07-22 20:54:02 +0200 (Tue, 22 Jul 2008) | 1 line Remove out-of-date section on Exact/Inexact. ........ r65188 | raymond.hettinger | 2008-07-22 21:00:47 +0200 (Tue, 22 Jul 2008) | 1 line Tuples now have both count() and index(). ........ r65189 | raymond.hettinger | 2008-07-22 21:03:05 +0200 (Tue, 22 Jul 2008) | 1 line Fix credits for math.sum() ........ r65190 | raymond.hettinger | 2008-07-22 21:18:50 +0200 (Tue, 22 Jul 2008) | 1 line One more attribution. ........ r65192 | benjamin.peterson | 2008-07-23 01:44:37 +0200 (Wed, 23 Jul 2008) | 1 line remove unneeded import ........ r65194 | benjamin.peterson | 2008-07-23 15:25:06 +0200 (Wed, 23 Jul 2008) | 1 line use isinstance ........
18 years ago
Merged revisions 65012,65035,65037-65040,65048,65057,65077,65091-65095,65097-65099,65127-65128,65131,65133-65136,65139,65149-65151,65155,65158-65159,65176-65178,65183-65184,65187-65190,65192,65194 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65012 | jesse.noller | 2008-07-16 15:24:06 +0200 (Wed, 16 Jul 2008) | 2 lines Apply patch for issue 3090: ARCHFLAGS parsing incorrect ........ r65035 | georg.brandl | 2008-07-16 23:19:28 +0200 (Wed, 16 Jul 2008) | 2 lines #3045: fix pydoc behavior for TEMP path with spaces. ........ r65037 | georg.brandl | 2008-07-16 23:31:41 +0200 (Wed, 16 Jul 2008) | 2 lines #1608818: errno can get set by every call to readdir(). ........ r65038 | georg.brandl | 2008-07-17 00:04:20 +0200 (Thu, 17 Jul 2008) | 2 lines #3305: self->stream can be NULL. ........ r65039 | georg.brandl | 2008-07-17 00:09:17 +0200 (Thu, 17 Jul 2008) | 2 lines #3345: fix docstring. ........ r65040 | georg.brandl | 2008-07-17 00:33:18 +0200 (Thu, 17 Jul 2008) | 2 lines #3312: fix two sqlite3 crashes. ........ r65048 | georg.brandl | 2008-07-17 01:35:54 +0200 (Thu, 17 Jul 2008) | 2 lines #3388: add a paragraph about using "with" for file objects. ........ r65057 | gregory.p.smith | 2008-07-17 05:13:05 +0200 (Thu, 17 Jul 2008) | 2 lines news note for r63052 ........ r65077 | jesse.noller | 2008-07-17 23:01:05 +0200 (Thu, 17 Jul 2008) | 3 lines Fix issue 3395, update _debugInfo to be _debug_info ........ r65091 | ronald.oussoren | 2008-07-18 07:48:03 +0200 (Fri, 18 Jul 2008) | 2 lines Last bit of a fix for issue3381 (addon for my patch in r65061) ........ r65092 | vinay.sajip | 2008-07-18 10:59:06 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65093 | vinay.sajip | 2008-07-18 11:00:00 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65094 | vinay.sajip | 2008-07-18 11:00:35 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65095 | vinay.sajip | 2008-07-18 11:01:10 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65097 | georg.brandl | 2008-07-18 12:20:59 +0200 (Fri, 18 Jul 2008) | 2 lines Remove duplicate entry in __all__. ........ r65098 | georg.brandl | 2008-07-18 12:29:30 +0200 (Fri, 18 Jul 2008) | 2 lines Correct attribute name. ........ r65099 | georg.brandl | 2008-07-18 13:15:06 +0200 (Fri, 18 Jul 2008) | 3 lines Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. ........ r65127 | raymond.hettinger | 2008-07-19 02:42:03 +0200 (Sat, 19 Jul 2008) | 1 line Improve accuracy of gamma test function ........ r65128 | raymond.hettinger | 2008-07-19 02:43:00 +0200 (Sat, 19 Jul 2008) | 1 line Add recipe to the itertools docs. ........ r65131 | georg.brandl | 2008-07-19 12:08:55 +0200 (Sat, 19 Jul 2008) | 2 lines #3378: in case of no memory, don't leak even more memory. :) ........ r65133 | georg.brandl | 2008-07-19 14:39:10 +0200 (Sat, 19 Jul 2008) | 3 lines #3302: fix segfaults when passing None for arguments that can't be NULL for the C functions. ........ r65134 | georg.brandl | 2008-07-19 14:46:12 +0200 (Sat, 19 Jul 2008) | 2 lines #3303: fix crash with invalid Py_DECREF in strcoll(). ........ r65135 | georg.brandl | 2008-07-19 15:00:22 +0200 (Sat, 19 Jul 2008) | 3 lines #3319: don't raise ZeroDivisionError if number of rounds is so low that benchtime is zero. ........ r65136 | georg.brandl | 2008-07-19 15:09:42 +0200 (Sat, 19 Jul 2008) | 3 lines #3323: mention that if inheriting from a class without __slots__, the subclass will have a __dict__ available too. ........ r65139 | georg.brandl | 2008-07-19 15:48:44 +0200 (Sat, 19 Jul 2008) | 2 lines Add ordering info for findall and finditer. ........ r65149 | raymond.hettinger | 2008-07-20 01:21:57 +0200 (Sun, 20 Jul 2008) | 1 line Fix compress() recipe in docs to use itertools. ........ r65150 | raymond.hettinger | 2008-07-20 01:58:47 +0200 (Sun, 20 Jul 2008) | 1 line Clean-up itertools docs and recipes. ........ r65151 | gregory.p.smith | 2008-07-20 02:22:08 +0200 (Sun, 20 Jul 2008) | 9 lines fix issue3120 - don't truncate handles on 64-bit Windows. This is still messy, realistically PC/_subprocess.c should never cast pointers to python numbers and back at all. I don't have a 64-bit windows build environment because microsoft apparently thinks that should cost money. Time to watch the buildbots. It builds and passes tests on 32-bit windows. ........ r65155 | georg.brandl | 2008-07-20 13:50:29 +0200 (Sun, 20 Jul 2008) | 2 lines #926501: add info where to put the docstring. ........ r65158 | neal.norwitz | 2008-07-20 21:35:23 +0200 (Sun, 20 Jul 2008) | 1 line Fix a couple of names in error messages that were wrong ........ r65159 | neal.norwitz | 2008-07-20 22:39:36 +0200 (Sun, 20 Jul 2008) | 1 line Fix misspeeld method name (negative) ........ r65176 | amaury.forgeotdarc | 2008-07-21 23:36:24 +0200 (Mon, 21 Jul 2008) | 4 lines Increment version number in NEWS file, and move items that were added after 2.6b2. (I thought there was a script to automate this kind of updates) ........ r65177 | amaury.forgeotdarc | 2008-07-22 00:00:38 +0200 (Tue, 22 Jul 2008) | 5 lines Issue2378: pdb would delete free variables when stepping into a class statement. The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast ........ r65178 | benjamin.peterson | 2008-07-22 00:05:34 +0200 (Tue, 22 Jul 2008) | 1 line don't use assert statement ........ r65183 | ronald.oussoren | 2008-07-22 09:06:00 +0200 (Tue, 22 Jul 2008) | 2 lines Fix buglet in fix for issue3381 ........ r65184 | ronald.oussoren | 2008-07-22 09:06:33 +0200 (Tue, 22 Jul 2008) | 2 lines Fix build issue on OSX 10.4, somehow this wasn't committed before. ........ r65187 | raymond.hettinger | 2008-07-22 20:54:02 +0200 (Tue, 22 Jul 2008) | 1 line Remove out-of-date section on Exact/Inexact. ........ r65188 | raymond.hettinger | 2008-07-22 21:00:47 +0200 (Tue, 22 Jul 2008) | 1 line Tuples now have both count() and index(). ........ r65189 | raymond.hettinger | 2008-07-22 21:03:05 +0200 (Tue, 22 Jul 2008) | 1 line Fix credits for math.sum() ........ r65190 | raymond.hettinger | 2008-07-22 21:18:50 +0200 (Tue, 22 Jul 2008) | 1 line One more attribution. ........ r65192 | benjamin.peterson | 2008-07-23 01:44:37 +0200 (Wed, 23 Jul 2008) | 1 line remove unneeded import ........ r65194 | benjamin.peterson | 2008-07-23 15:25:06 +0200 (Wed, 23 Jul 2008) | 1 line use isinstance ........
18 years ago
Merged revisions 65012,65035,65037-65040,65048,65057,65077,65091-65095,65097-65099,65127-65128,65131,65133-65136,65139,65149-65151,65155,65158-65159,65176-65178,65183-65184,65187-65190,65192,65194 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65012 | jesse.noller | 2008-07-16 15:24:06 +0200 (Wed, 16 Jul 2008) | 2 lines Apply patch for issue 3090: ARCHFLAGS parsing incorrect ........ r65035 | georg.brandl | 2008-07-16 23:19:28 +0200 (Wed, 16 Jul 2008) | 2 lines #3045: fix pydoc behavior for TEMP path with spaces. ........ r65037 | georg.brandl | 2008-07-16 23:31:41 +0200 (Wed, 16 Jul 2008) | 2 lines #1608818: errno can get set by every call to readdir(). ........ r65038 | georg.brandl | 2008-07-17 00:04:20 +0200 (Thu, 17 Jul 2008) | 2 lines #3305: self->stream can be NULL. ........ r65039 | georg.brandl | 2008-07-17 00:09:17 +0200 (Thu, 17 Jul 2008) | 2 lines #3345: fix docstring. ........ r65040 | georg.brandl | 2008-07-17 00:33:18 +0200 (Thu, 17 Jul 2008) | 2 lines #3312: fix two sqlite3 crashes. ........ r65048 | georg.brandl | 2008-07-17 01:35:54 +0200 (Thu, 17 Jul 2008) | 2 lines #3388: add a paragraph about using "with" for file objects. ........ r65057 | gregory.p.smith | 2008-07-17 05:13:05 +0200 (Thu, 17 Jul 2008) | 2 lines news note for r63052 ........ r65077 | jesse.noller | 2008-07-17 23:01:05 +0200 (Thu, 17 Jul 2008) | 3 lines Fix issue 3395, update _debugInfo to be _debug_info ........ r65091 | ronald.oussoren | 2008-07-18 07:48:03 +0200 (Fri, 18 Jul 2008) | 2 lines Last bit of a fix for issue3381 (addon for my patch in r65061) ........ r65092 | vinay.sajip | 2008-07-18 10:59:06 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65093 | vinay.sajip | 2008-07-18 11:00:00 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65094 | vinay.sajip | 2008-07-18 11:00:35 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65095 | vinay.sajip | 2008-07-18 11:01:10 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65097 | georg.brandl | 2008-07-18 12:20:59 +0200 (Fri, 18 Jul 2008) | 2 lines Remove duplicate entry in __all__. ........ r65098 | georg.brandl | 2008-07-18 12:29:30 +0200 (Fri, 18 Jul 2008) | 2 lines Correct attribute name. ........ r65099 | georg.brandl | 2008-07-18 13:15:06 +0200 (Fri, 18 Jul 2008) | 3 lines Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. ........ r65127 | raymond.hettinger | 2008-07-19 02:42:03 +0200 (Sat, 19 Jul 2008) | 1 line Improve accuracy of gamma test function ........ r65128 | raymond.hettinger | 2008-07-19 02:43:00 +0200 (Sat, 19 Jul 2008) | 1 line Add recipe to the itertools docs. ........ r65131 | georg.brandl | 2008-07-19 12:08:55 +0200 (Sat, 19 Jul 2008) | 2 lines #3378: in case of no memory, don't leak even more memory. :) ........ r65133 | georg.brandl | 2008-07-19 14:39:10 +0200 (Sat, 19 Jul 2008) | 3 lines #3302: fix segfaults when passing None for arguments that can't be NULL for the C functions. ........ r65134 | georg.brandl | 2008-07-19 14:46:12 +0200 (Sat, 19 Jul 2008) | 2 lines #3303: fix crash with invalid Py_DECREF in strcoll(). ........ r65135 | georg.brandl | 2008-07-19 15:00:22 +0200 (Sat, 19 Jul 2008) | 3 lines #3319: don't raise ZeroDivisionError if number of rounds is so low that benchtime is zero. ........ r65136 | georg.brandl | 2008-07-19 15:09:42 +0200 (Sat, 19 Jul 2008) | 3 lines #3323: mention that if inheriting from a class without __slots__, the subclass will have a __dict__ available too. ........ r65139 | georg.brandl | 2008-07-19 15:48:44 +0200 (Sat, 19 Jul 2008) | 2 lines Add ordering info for findall and finditer. ........ r65149 | raymond.hettinger | 2008-07-20 01:21:57 +0200 (Sun, 20 Jul 2008) | 1 line Fix compress() recipe in docs to use itertools. ........ r65150 | raymond.hettinger | 2008-07-20 01:58:47 +0200 (Sun, 20 Jul 2008) | 1 line Clean-up itertools docs and recipes. ........ r65151 | gregory.p.smith | 2008-07-20 02:22:08 +0200 (Sun, 20 Jul 2008) | 9 lines fix issue3120 - don't truncate handles on 64-bit Windows. This is still messy, realistically PC/_subprocess.c should never cast pointers to python numbers and back at all. I don't have a 64-bit windows build environment because microsoft apparently thinks that should cost money. Time to watch the buildbots. It builds and passes tests on 32-bit windows. ........ r65155 | georg.brandl | 2008-07-20 13:50:29 +0200 (Sun, 20 Jul 2008) | 2 lines #926501: add info where to put the docstring. ........ r65158 | neal.norwitz | 2008-07-20 21:35:23 +0200 (Sun, 20 Jul 2008) | 1 line Fix a couple of names in error messages that were wrong ........ r65159 | neal.norwitz | 2008-07-20 22:39:36 +0200 (Sun, 20 Jul 2008) | 1 line Fix misspeeld method name (negative) ........ r65176 | amaury.forgeotdarc | 2008-07-21 23:36:24 +0200 (Mon, 21 Jul 2008) | 4 lines Increment version number in NEWS file, and move items that were added after 2.6b2. (I thought there was a script to automate this kind of updates) ........ r65177 | amaury.forgeotdarc | 2008-07-22 00:00:38 +0200 (Tue, 22 Jul 2008) | 5 lines Issue2378: pdb would delete free variables when stepping into a class statement. The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast ........ r65178 | benjamin.peterson | 2008-07-22 00:05:34 +0200 (Tue, 22 Jul 2008) | 1 line don't use assert statement ........ r65183 | ronald.oussoren | 2008-07-22 09:06:00 +0200 (Tue, 22 Jul 2008) | 2 lines Fix buglet in fix for issue3381 ........ r65184 | ronald.oussoren | 2008-07-22 09:06:33 +0200 (Tue, 22 Jul 2008) | 2 lines Fix build issue on OSX 10.4, somehow this wasn't committed before. ........ r65187 | raymond.hettinger | 2008-07-22 20:54:02 +0200 (Tue, 22 Jul 2008) | 1 line Remove out-of-date section on Exact/Inexact. ........ r65188 | raymond.hettinger | 2008-07-22 21:00:47 +0200 (Tue, 22 Jul 2008) | 1 line Tuples now have both count() and index(). ........ r65189 | raymond.hettinger | 2008-07-22 21:03:05 +0200 (Tue, 22 Jul 2008) | 1 line Fix credits for math.sum() ........ r65190 | raymond.hettinger | 2008-07-22 21:18:50 +0200 (Tue, 22 Jul 2008) | 1 line One more attribution. ........ r65192 | benjamin.peterson | 2008-07-23 01:44:37 +0200 (Wed, 23 Jul 2008) | 1 line remove unneeded import ........ r65194 | benjamin.peterson | 2008-07-23 15:25:06 +0200 (Wed, 23 Jul 2008) | 1 line use isinstance ........
18 years ago
  1. /*
  2. * support routines for subprocess module
  3. *
  4. * Currently, this extension module is only required when using the
  5. * subprocess module on Windows, but in the future, stubs for other
  6. * platforms might be added here as well.
  7. *
  8. * Copyright (c) 2004 by Fredrik Lundh <fredrik@pythonware.com>
  9. * Copyright (c) 2004 by Secret Labs AB, http://www.pythonware.com
  10. * Copyright (c) 2004 by Peter Astrand <astrand@lysator.liu.se>
  11. *
  12. * By obtaining, using, and/or copying this software and/or its
  13. * associated documentation, you agree that you have read, understood,
  14. * and will comply with the following terms and conditions:
  15. *
  16. * Permission to use, copy, modify, and distribute this software and
  17. * its associated documentation for any purpose and without fee is
  18. * hereby granted, provided that the above copyright notice appears in
  19. * all copies, and that both that copyright notice and this permission
  20. * notice appear in supporting documentation, and that the name of the
  21. * authors not be used in advertising or publicity pertaining to
  22. * distribution of the software without specific, written prior
  23. * permission.
  24. *
  25. * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  27. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  29. * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  30. * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  31. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  32. *
  33. */
  34. /* Licensed to PSF under a Contributor Agreement. */
  35. /* See http://www.python.org/2.4/license for licensing details. */
  36. #include "Python.h"
  37. #define WINDOWS_LEAN_AND_MEAN
  38. #include "windows.h"
  39. /* -------------------------------------------------------------------- */
  40. /* handle wrapper. note that this library uses integers when passing
  41. handles to a function, and handle wrappers when returning handles.
  42. the wrapper is used to provide Detach and Close methods */
  43. typedef struct {
  44. PyObject_HEAD
  45. HANDLE handle;
  46. } sp_handle_object;
  47. static PyTypeObject sp_handle_type;
  48. static PyObject*
  49. sp_handle_new(HANDLE handle)
  50. {
  51. sp_handle_object* self;
  52. self = PyObject_NEW(sp_handle_object, &sp_handle_type);
  53. if (self == NULL)
  54. return NULL;
  55. self->handle = handle;
  56. return (PyObject*) self;
  57. }
  58. #if defined(MS_WIN32) && !defined(MS_WIN64)
  59. #define HANDLE_TO_PYNUM(handle) PyLong_FromLong((long) handle)
  60. #define PY_HANDLE_PARAM "l"
  61. #else
  62. #define HANDLE_TO_PYNUM(handle) PyLong_FromLongLong((long long) handle)
  63. #define PY_HANDLE_PARAM "L"
  64. #endif
  65. static PyObject*
  66. sp_handle_detach(sp_handle_object* self, PyObject* args)
  67. {
  68. HANDLE handle;
  69. if (! PyArg_ParseTuple(args, ":Detach"))
  70. return NULL;
  71. handle = self->handle;
  72. self->handle = INVALID_HANDLE_VALUE;
  73. /* note: return the current handle, as an integer */
  74. return HANDLE_TO_PYNUM(handle);
  75. }
  76. static PyObject*
  77. sp_handle_close(sp_handle_object* self, PyObject* args)
  78. {
  79. if (! PyArg_ParseTuple(args, ":Close"))
  80. return NULL;
  81. if (self->handle != INVALID_HANDLE_VALUE) {
  82. CloseHandle(self->handle);
  83. self->handle = INVALID_HANDLE_VALUE;
  84. }
  85. Py_INCREF(Py_None);
  86. return Py_None;
  87. }
  88. static void
  89. sp_handle_dealloc(sp_handle_object* self)
  90. {
  91. if (self->handle != INVALID_HANDLE_VALUE)
  92. CloseHandle(self->handle);
  93. PyObject_FREE(self);
  94. }
  95. static PyMethodDef sp_handle_methods[] = {
  96. {"Detach", (PyCFunction) sp_handle_detach, METH_VARARGS},
  97. {"Close", (PyCFunction) sp_handle_close, METH_VARARGS},
  98. {NULL, NULL}
  99. };
  100. static PyObject*
  101. sp_handle_as_int(sp_handle_object* self)
  102. {
  103. return HANDLE_TO_PYNUM(self->handle);
  104. }
  105. static PyNumberMethods sp_handle_as_number;
  106. static PyTypeObject sp_handle_type = {
  107. PyVarObject_HEAD_INIT(NULL, 0)
  108. "_subprocess_handle", sizeof(sp_handle_object), 0,
  109. (destructor) sp_handle_dealloc, /*tp_dealloc*/
  110. 0, /*tp_print*/
  111. 0, /*tp_getattr*/
  112. 0, /*tp_setattr*/
  113. 0, /*tp_reserved*/
  114. 0, /*tp_repr*/
  115. &sp_handle_as_number, /*tp_as_number */
  116. 0, /*tp_as_sequence */
  117. 0, /*tp_as_mapping */
  118. 0, /*tp_hash*/
  119. 0, /*tp_call*/
  120. 0, /*tp_str*/
  121. 0, /*tp_getattro*/
  122. 0, /*tp_setattro*/
  123. 0, /*tp_as_buffer*/
  124. Py_TPFLAGS_DEFAULT, /*tp_flags*/
  125. 0, /*tp_doc*/
  126. 0, /*tp_traverse*/
  127. 0, /*tp_clear*/
  128. 0, /*tp_richcompare*/
  129. 0, /*tp_weaklistoffset*/
  130. 0, /*tp_iter*/
  131. 0, /*tp_iternext*/
  132. sp_handle_methods, /*tp_methods*/
  133. };
  134. /* -------------------------------------------------------------------- */
  135. /* windows API functions */
  136. PyDoc_STRVAR(GetStdHandle_doc,
  137. "GetStdHandle(handle) -> integer\n\
  138. \n\
  139. Return a handle to the specified standard device\n\
  140. (STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE).\n\
  141. The integer associated with the handle object is returned.");
  142. static PyObject *
  143. sp_GetStdHandle(PyObject* self, PyObject* args)
  144. {
  145. HANDLE handle;
  146. int std_handle;
  147. if (! PyArg_ParseTuple(args, "i:GetStdHandle", &std_handle))
  148. return NULL;
  149. Py_BEGIN_ALLOW_THREADS
  150. handle = GetStdHandle((DWORD) std_handle);
  151. Py_END_ALLOW_THREADS
  152. if (handle == INVALID_HANDLE_VALUE)
  153. return PyErr_SetFromWindowsErr(GetLastError());
  154. if (! handle) {
  155. Py_INCREF(Py_None);
  156. return Py_None;
  157. }
  158. /* note: returns integer, not handle object */
  159. return HANDLE_TO_PYNUM(handle);
  160. }
  161. PyDoc_STRVAR(GetCurrentProcess_doc,
  162. "GetCurrentProcess() -> handle\n\
  163. \n\
  164. Return a handle object for the current process.");
  165. static PyObject *
  166. sp_GetCurrentProcess(PyObject* self, PyObject* args)
  167. {
  168. if (! PyArg_ParseTuple(args, ":GetCurrentProcess"))
  169. return NULL;
  170. return sp_handle_new(GetCurrentProcess());
  171. }
  172. PyDoc_STRVAR(DuplicateHandle_doc,
  173. "DuplicateHandle(source_proc_handle, source_handle,\n\
  174. target_proc_handle, target_handle, access,\n\
  175. inherit[, options]) -> handle\n\
  176. \n\
  177. Return a duplicate handle object.\n\
  178. \n\
  179. The duplicate handle refers to the same object as the original\n\
  180. handle. Therefore, any changes to the object are reflected\n\
  181. through both handles.");
  182. static PyObject *
  183. sp_DuplicateHandle(PyObject* self, PyObject* args)
  184. {
  185. HANDLE target_handle;
  186. BOOL result;
  187. HANDLE source_process_handle;
  188. HANDLE source_handle;
  189. HANDLE target_process_handle;
  190. int desired_access;
  191. int inherit_handle;
  192. int options = 0;
  193. if (! PyArg_ParseTuple(args,
  194. PY_HANDLE_PARAM PY_HANDLE_PARAM PY_HANDLE_PARAM
  195. "ii|i:DuplicateHandle",
  196. &source_process_handle,
  197. &source_handle,
  198. &target_process_handle,
  199. &desired_access,
  200. &inherit_handle,
  201. &options))
  202. return NULL;
  203. Py_BEGIN_ALLOW_THREADS
  204. result = DuplicateHandle(
  205. source_process_handle,
  206. source_handle,
  207. target_process_handle,
  208. &target_handle,
  209. desired_access,
  210. inherit_handle,
  211. options
  212. );
  213. Py_END_ALLOW_THREADS
  214. if (! result)
  215. return PyErr_SetFromWindowsErr(GetLastError());
  216. return sp_handle_new(target_handle);
  217. }
  218. PyDoc_STRVAR(CreatePipe_doc,
  219. "CreatePipe(pipe_attrs, size) -> (read_handle, write_handle)\n\
  220. \n\
  221. Create an anonymous pipe, and return handles to the read and\n\
  222. write ends of the pipe.\n\
  223. \n\
  224. pipe_attrs is ignored internally and can be None.");
  225. static PyObject *
  226. sp_CreatePipe(PyObject* self, PyObject* args)
  227. {
  228. HANDLE read_pipe;
  229. HANDLE write_pipe;
  230. BOOL result;
  231. PyObject* pipe_attributes; /* ignored */
  232. int size;
  233. if (! PyArg_ParseTuple(args, "Oi:CreatePipe", &pipe_attributes, &size))
  234. return NULL;
  235. Py_BEGIN_ALLOW_THREADS
  236. result = CreatePipe(&read_pipe, &write_pipe, NULL, size);
  237. Py_END_ALLOW_THREADS
  238. if (! result)
  239. return PyErr_SetFromWindowsErr(GetLastError());
  240. return Py_BuildValue(
  241. "NN", sp_handle_new(read_pipe), sp_handle_new(write_pipe));
  242. }
  243. /* helpers for createprocess */
  244. static int
  245. getint(PyObject* obj, char* name)
  246. {
  247. PyObject* value;
  248. int ret;
  249. value = PyObject_GetAttrString(obj, name);
  250. if (! value) {
  251. PyErr_Clear(); /* FIXME: propagate error? */
  252. return 0;
  253. }
  254. ret = (int) PyLong_AsLong(value);
  255. Py_DECREF(value);
  256. return ret;
  257. }
  258. static HANDLE
  259. gethandle(PyObject* obj, char* name)
  260. {
  261. sp_handle_object* value;
  262. HANDLE ret;
  263. value = (sp_handle_object*) PyObject_GetAttrString(obj, name);
  264. if (! value) {
  265. PyErr_Clear(); /* FIXME: propagate error? */
  266. return NULL;
  267. }
  268. if (Py_TYPE(value) != &sp_handle_type)
  269. ret = NULL;
  270. else
  271. ret = value->handle;
  272. Py_DECREF(value);
  273. return ret;
  274. }
  275. static PyObject*
  276. getenvironment(PyObject* environment)
  277. {
  278. Py_ssize_t i, envsize, totalsize;
  279. Py_UCS4 *buffer = NULL, *p, *end;
  280. PyObject *keys, *values, *res;
  281. /* convert environment dictionary to windows enviroment string */
  282. if (! PyMapping_Check(environment)) {
  283. PyErr_SetString(
  284. PyExc_TypeError, "environment must be dictionary or None");
  285. return NULL;
  286. }
  287. envsize = PyMapping_Length(environment);
  288. keys = PyMapping_Keys(environment);
  289. values = PyMapping_Values(environment);
  290. if (!keys || !values)
  291. goto error;
  292. totalsize = 1; /* trailing null character */
  293. for (i = 0; i < envsize; i++) {
  294. PyObject* key = PyList_GET_ITEM(keys, i);
  295. PyObject* value = PyList_GET_ITEM(values, i);
  296. if (! PyUnicode_Check(key) || ! PyUnicode_Check(value)) {
  297. PyErr_SetString(PyExc_TypeError,
  298. "environment can only contain strings");
  299. goto error;
  300. }
  301. totalsize += PyUnicode_GET_LENGTH(key) + 1; /* +1 for '=' */
  302. totalsize += PyUnicode_GET_LENGTH(value) + 1; /* +1 for '\0' */
  303. }
  304. buffer = PyMem_Malloc(totalsize * sizeof(Py_UCS4));
  305. if (! buffer)
  306. goto error;
  307. p = buffer;
  308. end = buffer + totalsize;
  309. for (i = 0; i < envsize; i++) {
  310. PyObject* key = PyList_GET_ITEM(keys, i);
  311. PyObject* value = PyList_GET_ITEM(values, i);
  312. if (!PyUnicode_AsUCS4(key, p, end - p, 0))
  313. goto error;
  314. p += PyUnicode_GET_LENGTH(key);
  315. *p++ = '=';
  316. if (!PyUnicode_AsUCS4(value, p, end - p, 0))
  317. goto error;
  318. p += PyUnicode_GET_LENGTH(value);
  319. *p++ = '\0';
  320. }
  321. /* add trailing null byte */
  322. *p++ = '\0';
  323. assert(p == end);
  324. Py_XDECREF(keys);
  325. Py_XDECREF(values);
  326. res = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, p - buffer);
  327. PyMem_Free(buffer);
  328. return res;
  329. error:
  330. PyMem_Free(buffer);
  331. Py_XDECREF(keys);
  332. Py_XDECREF(values);
  333. return NULL;
  334. }
  335. PyDoc_STRVAR(CreateProcess_doc,
  336. "CreateProcess(app_name, cmd_line, proc_attrs, thread_attrs,\n\
  337. inherit, flags, env_mapping, curdir,\n\
  338. startup_info) -> (proc_handle, thread_handle,\n\
  339. pid, tid)\n\
  340. \n\
  341. Create a new process and its primary thread. The return\n\
  342. value is a tuple of the process handle, thread handle,\n\
  343. process ID, and thread ID.\n\
  344. \n\
  345. proc_attrs and thread_attrs are ignored internally and can be None.");
  346. static PyObject *
  347. sp_CreateProcess(PyObject* self, PyObject* args)
  348. {
  349. BOOL result;
  350. PROCESS_INFORMATION pi;
  351. STARTUPINFOW si;
  352. PyObject* environment;
  353. Py_UNICODE* application_name;
  354. Py_UNICODE* command_line;
  355. PyObject* process_attributes; /* ignored */
  356. PyObject* thread_attributes; /* ignored */
  357. int inherit_handles;
  358. int creation_flags;
  359. PyObject* env_mapping;
  360. Py_UNICODE* current_directory;
  361. PyObject* startup_info;
  362. if (! PyArg_ParseTuple(args, "ZZOOiiOZO:CreateProcess",
  363. &application_name,
  364. &command_line,
  365. &process_attributes,
  366. &thread_attributes,
  367. &inherit_handles,
  368. &creation_flags,
  369. &env_mapping,
  370. &current_directory,
  371. &startup_info))
  372. return NULL;
  373. ZeroMemory(&si, sizeof(si));
  374. si.cb = sizeof(si);
  375. /* note: we only support a small subset of all SI attributes */
  376. si.dwFlags = getint(startup_info, "dwFlags");
  377. si.wShowWindow = getint(startup_info, "wShowWindow");
  378. si.hStdInput = gethandle(startup_info, "hStdInput");
  379. si.hStdOutput = gethandle(startup_info, "hStdOutput");
  380. si.hStdError = gethandle(startup_info, "hStdError");
  381. if (PyErr_Occurred())
  382. return NULL;
  383. if (env_mapping == Py_None)
  384. environment = NULL;
  385. else {
  386. environment = getenvironment(env_mapping);
  387. if (! environment)
  388. return NULL;
  389. }
  390. Py_BEGIN_ALLOW_THREADS
  391. result = CreateProcessW(application_name,
  392. command_line,
  393. NULL,
  394. NULL,
  395. inherit_handles,
  396. creation_flags | CREATE_UNICODE_ENVIRONMENT,
  397. environment ? PyUnicode_AS_UNICODE(environment) : NULL,
  398. current_directory,
  399. &si,
  400. &pi);
  401. Py_END_ALLOW_THREADS
  402. Py_XDECREF(environment);
  403. if (! result)
  404. return PyErr_SetFromWindowsErr(GetLastError());
  405. return Py_BuildValue("NNii",
  406. sp_handle_new(pi.hProcess),
  407. sp_handle_new(pi.hThread),
  408. pi.dwProcessId,
  409. pi.dwThreadId);
  410. }
  411. PyDoc_STRVAR(TerminateProcess_doc,
  412. "TerminateProcess(handle, exit_code) -> None\n\
  413. \n\
  414. Terminate the specified process and all of its threads.");
  415. static PyObject *
  416. sp_TerminateProcess(PyObject* self, PyObject* args)
  417. {
  418. BOOL result;
  419. HANDLE process;
  420. int exit_code;
  421. if (! PyArg_ParseTuple(args, PY_HANDLE_PARAM "i:TerminateProcess",
  422. &process, &exit_code))
  423. return NULL;
  424. result = TerminateProcess(process, exit_code);
  425. if (! result)
  426. return PyErr_SetFromWindowsErr(GetLastError());
  427. Py_INCREF(Py_None);
  428. return Py_None;
  429. }
  430. PyDoc_STRVAR(GetExitCodeProcess_doc,
  431. "GetExitCodeProcess(handle) -> Exit code\n\
  432. \n\
  433. Return the termination status of the specified process.");
  434. static PyObject *
  435. sp_GetExitCodeProcess(PyObject* self, PyObject* args)
  436. {
  437. DWORD exit_code;
  438. BOOL result;
  439. HANDLE process;
  440. if (! PyArg_ParseTuple(args, PY_HANDLE_PARAM ":GetExitCodeProcess", &process))
  441. return NULL;
  442. result = GetExitCodeProcess(process, &exit_code);
  443. if (! result)
  444. return PyErr_SetFromWindowsErr(GetLastError());
  445. return PyLong_FromLong(exit_code);
  446. }
  447. PyDoc_STRVAR(WaitForSingleObject_doc,
  448. "WaitForSingleObject(handle, timeout) -> result\n\
  449. \n\
  450. Wait until the specified object is in the signaled state or\n\
  451. the time-out interval elapses. The timeout value is specified\n\
  452. in milliseconds.");
  453. static PyObject *
  454. sp_WaitForSingleObject(PyObject* self, PyObject* args)
  455. {
  456. DWORD result;
  457. HANDLE handle;
  458. int milliseconds;
  459. if (! PyArg_ParseTuple(args, PY_HANDLE_PARAM "i:WaitForSingleObject",
  460. &handle,
  461. &milliseconds))
  462. return NULL;
  463. Py_BEGIN_ALLOW_THREADS
  464. result = WaitForSingleObject(handle, (DWORD) milliseconds);
  465. Py_END_ALLOW_THREADS
  466. if (result == WAIT_FAILED)
  467. return PyErr_SetFromWindowsErr(GetLastError());
  468. return PyLong_FromLong((int) result);
  469. }
  470. PyDoc_STRVAR(GetVersion_doc,
  471. "GetVersion() -> version\n\
  472. \n\
  473. Return the version number of the current operating system.");
  474. static PyObject *
  475. sp_GetVersion(PyObject* self, PyObject* args)
  476. {
  477. if (! PyArg_ParseTuple(args, ":GetVersion"))
  478. return NULL;
  479. return PyLong_FromLong((int) GetVersion());
  480. }
  481. PyDoc_STRVAR(GetModuleFileName_doc,
  482. "GetModuleFileName(module) -> path\n\
  483. \n\
  484. Return the fully-qualified path for the file that contains\n\
  485. the specified module. The module must have been loaded by the\n\
  486. current process.\n\
  487. \n\
  488. The module parameter should be a handle to the loaded module\n\
  489. whose path is being requested. If this parameter is 0, \n\
  490. GetModuleFileName retrieves the path of the executable file\n\
  491. of the current process.");
  492. static PyObject *
  493. sp_GetModuleFileName(PyObject* self, PyObject* args)
  494. {
  495. BOOL result;
  496. HMODULE module;
  497. WCHAR filename[MAX_PATH];
  498. if (! PyArg_ParseTuple(args, PY_HANDLE_PARAM ":GetModuleFileName",
  499. &module))
  500. return NULL;
  501. result = GetModuleFileNameW(module, filename, MAX_PATH);
  502. filename[MAX_PATH-1] = '\0';
  503. if (! result)
  504. return PyErr_SetFromWindowsErr(GetLastError());
  505. return PyUnicode_FromWideChar(filename, wcslen(filename));
  506. }
  507. static PyMethodDef sp_functions[] = {
  508. {"GetStdHandle", sp_GetStdHandle, METH_VARARGS, GetStdHandle_doc},
  509. {"GetCurrentProcess", sp_GetCurrentProcess, METH_VARARGS,
  510. GetCurrentProcess_doc},
  511. {"DuplicateHandle", sp_DuplicateHandle, METH_VARARGS,
  512. DuplicateHandle_doc},
  513. {"CreatePipe", sp_CreatePipe, METH_VARARGS, CreatePipe_doc},
  514. {"CreateProcess", sp_CreateProcess, METH_VARARGS, CreateProcess_doc},
  515. {"TerminateProcess", sp_TerminateProcess, METH_VARARGS,
  516. TerminateProcess_doc},
  517. {"GetExitCodeProcess", sp_GetExitCodeProcess, METH_VARARGS,
  518. GetExitCodeProcess_doc},
  519. {"WaitForSingleObject", sp_WaitForSingleObject, METH_VARARGS,
  520. WaitForSingleObject_doc},
  521. {"GetVersion", sp_GetVersion, METH_VARARGS, GetVersion_doc},
  522. {"GetModuleFileName", sp_GetModuleFileName, METH_VARARGS,
  523. GetModuleFileName_doc},
  524. {NULL, NULL}
  525. };
  526. /* -------------------------------------------------------------------- */
  527. static void
  528. defint(PyObject* d, const char* name, int value)
  529. {
  530. PyObject* v = PyLong_FromLong((long) value);
  531. if (v) {
  532. PyDict_SetItemString(d, (char*) name, v);
  533. Py_DECREF(v);
  534. }
  535. }
  536. static struct PyModuleDef _subprocessmodule = {
  537. PyModuleDef_HEAD_INIT,
  538. "_subprocess",
  539. NULL,
  540. -1,
  541. sp_functions,
  542. NULL,
  543. NULL,
  544. NULL,
  545. NULL
  546. };
  547. PyMODINIT_FUNC
  548. PyInit__subprocess()
  549. {
  550. PyObject *d;
  551. PyObject *m;
  552. /* patch up object descriptors */
  553. sp_handle_as_number.nb_int = (unaryfunc) sp_handle_as_int;
  554. if (PyType_Ready(&sp_handle_type) < 0)
  555. return NULL;
  556. m = PyModule_Create(&_subprocessmodule);
  557. if (m == NULL)
  558. return NULL;
  559. d = PyModule_GetDict(m);
  560. /* constants */
  561. defint(d, "STD_INPUT_HANDLE", STD_INPUT_HANDLE);
  562. defint(d, "STD_OUTPUT_HANDLE", STD_OUTPUT_HANDLE);
  563. defint(d, "STD_ERROR_HANDLE", STD_ERROR_HANDLE);
  564. defint(d, "DUPLICATE_SAME_ACCESS", DUPLICATE_SAME_ACCESS);
  565. defint(d, "STARTF_USESTDHANDLES", STARTF_USESTDHANDLES);
  566. defint(d, "STARTF_USESHOWWINDOW", STARTF_USESHOWWINDOW);
  567. defint(d, "SW_HIDE", SW_HIDE);
  568. defint(d, "INFINITE", INFINITE);
  569. defint(d, "WAIT_OBJECT_0", WAIT_OBJECT_0);
  570. defint(d, "WAIT_TIMEOUT", WAIT_TIMEOUT);
  571. defint(d, "CREATE_NEW_CONSOLE", CREATE_NEW_CONSOLE);
  572. defint(d, "CREATE_NEW_PROCESS_GROUP", CREATE_NEW_PROCESS_GROUP);
  573. return m;
  574. }