Index: PC/_winreg.c =================================================================== --- PC/_winreg.c (revision 68152) +++ PC/_winreg.c (working copy) @@ -410,21 +410,17 @@ static int PyHKEY_printFunc(PyObject *ob, FILE *fp, int flags) { - PyHKEYObject *pyhkey = (PyHKEYObject *)ob; - char resBuf[160]; - wsprintf(resBuf, "", - ob, pyhkey->hkey); - fputs(resBuf, fp); - return 0; + PyHKEYObject *pyhkey = (PyHKEYObject *)ob; + fprintf(fp, "", + ob, pyhkey->hkey); + return 0; } static PyObject * PyHKEY_strFunc(PyObject *ob) { - PyHKEYObject *pyhkey = (PyHKEYObject *)ob; - char resBuf[160]; - wsprintf(resBuf, "", pyhkey->hkey); - return PyString_FromString(resBuf); + PyHKEYObject *pyhkey = (PyHKEYObject *)ob; + return PyString_FromFormat("", pyhkey->hkey); } static int