Staging
v0.8.1
https://github.com/python/cpython
Revision da780432378e6298463889557ab43e0c156758cd authored by Brett Cannon on 17 October 2008, 03:38:50 UTC, committed by Brett Cannon on 17 October 2008, 03:38:50 UTC
compile(). This was due to left-over special-casing before UTF-8 became the
default source encoding.

Closes issue #3574. Thanks to Victor Stinner for help with the patch.
1 parent 9e9dcd6
Raw File
Tip revision: da780432378e6298463889557ab43e0c156758cd authored by Brett Cannon on 17 October 2008, 03:38:50 UTC
Latin-1 source code was not being properly decoded when passed through
Tip revision: da78043
generrmap.c
#include <stdio.h>
#include <errno.h>

/* Extract the mapping of Win32 error codes to errno */

int main()
{
	int i;
	printf("/* Generated file. Do not edit. */\n");
	printf("int winerror_to_errno(int winerror)\n");
	printf("{\n\tswitch(winerror) {\n");
	for(i=1; i < 65000; i++) {
		_dosmaperr(i);
		if (errno == EINVAL)
			continue;
		printf("\t\tcase %d: return %d;\n", i, errno);
	}
	printf("\t\tdefault: return EINVAL;\n");
	printf("\t}\n}\n");
}
back to top