mirror of
https://github.com/python/cpython.git
synced 2026-02-05 09:25:35 +00:00
#4807: Remove a wrong usage of wsprintf in the winreg module
("windows sprintf", different than swprintf)
Needed for the windows CE port.
This commit is contained in:
parent
c2f02216b6
commit
a18392a324
2 changed files with 8 additions and 10 deletions
|
|
@ -12,6 +12,8 @@ What's New in Python 2.7 alpha 1
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #4807: Port the _winreg module to Windows CE.
|
||||
|
||||
- Issue #4935: The overflow checking code in the expandtabs() method common
|
||||
to str, bytes and bytearray could be optimized away by the compiler, letting
|
||||
the interpreter segfault instead of raising an error.
|
||||
|
|
|
|||
16
PC/_winreg.c
16
PC/_winreg.c
|
|
@ -410,21 +410,17 @@ PyHKEY_intFunc(PyObject *ob)
|
|||
static int
|
||||
PyHKEY_printFunc(PyObject *ob, FILE *fp, int flags)
|
||||
{
|
||||
PyHKEYObject *pyhkey = (PyHKEYObject *)ob;
|
||||
char resBuf[160];
|
||||
wsprintf(resBuf, "<PyHKEY at %p (%p)>",
|
||||
ob, pyhkey->hkey);
|
||||
fputs(resBuf, fp);
|
||||
return 0;
|
||||
PyHKEYObject *pyhkey = (PyHKEYObject *)ob;
|
||||
fprintf(fp, "<PyHKEY at %p (%p)>",
|
||||
ob, pyhkey->hkey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyHKEY_strFunc(PyObject *ob)
|
||||
{
|
||||
PyHKEYObject *pyhkey = (PyHKEYObject *)ob;
|
||||
char resBuf[160];
|
||||
wsprintf(resBuf, "<PyHKEY:%p>", pyhkey->hkey);
|
||||
return PyString_FromString(resBuf);
|
||||
PyHKEYObject *pyhkey = (PyHKEYObject *)ob;
|
||||
return PyString_FromFormat("<PyHKEY:%p>", pyhkey->hkey);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue