Staging
v0.8.1
https://github.com/python/cpython
Revision 3af831bacac9626b62039f7bcf777a5f1202493b authored by Neal Norwitz on 01 March 2008, 04:06:19 UTC, committed by Neal Norwitz on 01 March 2008, 04:06:19 UTC
__repr__ which caused bsddb.test.test_misc.py to fail in test03_repr_closed_db
Restore the repr so the test passes.  I think this is correct, but it would
be good to have some more review.
1 parent de802dc
Raw File
Tip revision: 3af831bacac9626b62039f7bcf777a5f1202493b authored by Neal Norwitz on 01 March 2008, 04:06:19 UTC
When the _iter_mixin stopped inheritting from UsserDictMixin, it lost the
Tip revision: 3af831b
strerror.c

/* PD implementation of strerror() for systems that don't have it.
   Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <guido@cwi.nl>. */

#include <stdio.h>
#include "Python.h"

extern int sys_nerr;
extern char *sys_errlist[];

char *
strerror(int err)
{
	static char buf[20];
	if (err >= 0 && err < sys_nerr)
		return sys_errlist[err];
	PyOS_snprintf(buf, sizeof(buf), "Unknown errno %d", err);
	return buf;
}
back to top