cpython/Misc
Thomas Heller fbb9c0bf3c Issue #1798: Add ctypes calling convention that allows safe access of errno.
ctypes maintains thread-local storage that has space for two error
numbers: private copies of the system 'errno' value and, on Windows,
the system error code accessed by the GetLastError() and
SetLastError() api functions.

Foreign functions created with CDLL(..., use_errno=True), when called,
swap the system 'errno' value with the private copy just before the
actual function call, and swapped again immediately afterwards.  The
'use_errno' parameter defaults to False, in this case 'ctypes_errno'
is not touched.

On Windows, foreign functions created with CDLL(...,
use_last_error=True) or WinDLL(..., use_last_error=True) swap the
system LastError value with the ctypes private copy.

The values are also swapped immeditately before and after ctypes
callback functions are called, if the callbacks are constructed using
the new optional use_errno parameter set to True: CFUNCTYPE(...,
use_errno=TRUE) or WINFUNCTYPE(..., use_errno=True).

New ctypes functions are provided to access the ctypes private copies
from Python:

- ctypes.set_errno(value) and ctypes.set_last_error(value) store
  'value' in the private copy and returns the previous value.

- ctypes.get_errno() and ctypes.get_last_error() returns the current
  ctypes private copies value.
2008-06-06 08:33:46 +00:00
..
RPM Tkinter rename reversal: remove tkinter package, adapt imports and docs. 2008-05-20 07:13:37 +00:00
TextMate/Python-Dev.tmbundle Add a snippet for the deprecation directive for docs. 2008-05-15 04:36:53 +00:00
Vim Update Vim syntax highlighting to specify what revision was used to generate 2008-01-29 04:18:04 +00:00
ACKS Patch #1513695: New turtle module, with demos. 2008-06-04 06:29:55 +00:00
AIX-NOTES The fix to use . was incorporated 2003-06-08 02:25:17 +00:00
BeOS-NOTES Remove Mikael as the maintainer of BeOS at his request. With no maintainer 2007-08-18 18:30:36 +00:00
BeOS-setup.py Patch #2167 from calvin: Remove unused imports 2008-02-23 17:40:11 +00:00
HISTORY Fix a few typos and layout glitches (more work is needed). 2008-02-21 19:46:35 +00:00
NEWS Issue #1798: Add ctypes calling convention that allows safe access of errno. 2008-06-06 08:33:46 +00:00
NEWS.help Bug #1014775: update NEWS.help for changes in docutils. 2004-08-30 14:33:25 +00:00
PURIFY.README Update purify doc some. 2006-08-14 01:49:54 +00:00
Porting Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
README Add some doc about using valgrind 2004-06-06 19:58:40 +00:00
README.OpenBSD Add some notes about a recurring problem with OpenBSD 2006-01-09 07:29:03 +00:00
README.coverity Add some explanation about Klocwork and Coverity static analysis 2006-08-02 07:09:32 +00:00
README.klocwork Klocwork made another run and found a bunch more problems. 2006-08-12 01:43:40 +00:00
README.valgrind Add some notes about a couple of poorly behaved tests 2006-04-17 01:49:14 +00:00
RFD Initial revision 1994-01-26 10:20:16 +00:00
SpecialBuilds.txt Fix typo. 2006-11-15 16:23:46 +00:00
build.sh test_httpservers has unpredictable refcount behavior. 2008-05-19 16:47:25 +00:00
cheatsheet ConfigParser renaming reversal part 3: move module into place and adapt imports. 2008-05-25 07:25:25 +00:00
developers.txt Add Robert Schuppenies. 2008-05-21 07:31:31 +00:00
find_recursionlimit.py Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
gdbinit break sets a breakpoint rather than stopping the loop. 2005-09-05 16:16:49 +00:00
indent.pro Some new files... 1994-09-14 14:06:46 +00:00
pymemcompat.h Fix grammatically inept comment. 2002-08-22 13:36:11 +00:00
python-config.in Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS 2007-03-31 18:56:11 +00:00
python-mode.el sync with most recent version from python-mode sf project 2008-02-05 02:32:16 +00:00
python.man fix two typos in python(1) 2005-03-20 14:16:03 +00:00
setuid-prog.c correct bogus instructions 'ccoment out' -> 'uncomment' 1998-09-10 20:18:09 +00:00
valgrind-python.supp Ignore valgrind problems on Ubuntu from ld 2007-06-11 01:22:03 +00:00
vgrindefs Add 'yield' as a keyword 2001-08-06 17:42:53 +00:00

README

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS		Acknowledgements
AIX-NOTES	Notes for building Python on AIX
BeOS-NOTES	Notes for building on BeOS
BeOS-setup.py	setup.py replacement for BeOS, see BeOS-NOTES
cheatsheet	Quick summary of Python by Ken Manheimer
find_recursionlimit.py  Script to find a value for sys.maxrecursionlimit
gdbinit		Handy stuff to put in your .gdbinit file, if you use gdb
HISTORY		News from previous releases -- oldest last
HPUX-NOTES	Notes about dynamic loading under HP-UX
indent.pro	GNU indent profile approximating my C style
NEWS		News for this release (for some meaning of "this")
Porting		Mini-FAQ on porting to new platforms
PURIFY.README	Information for Purify users
pymemcompat.h	Memory interface compatibility file.
python.man	UNIX man page for the python interpreter
python-mode.el	Emacs mode for editing Python programs
README		The file you're reading now
README.valgrind	Information for Valgrind users, see valgrind-python.supp
RFD		Request For Discussion about a Python newsgroup
RPM		(Old) tools to build RPMs
SpecialBuilds.txt     Describes extra symbols you can set for debug builds
setuid-prog.c	C helper program for set-uid Python scripts
vgrindefs	Python configuration for vgrind (a generic pretty printer)
valgrind-python.supp	Valgrind suppression file, see README.valgrind