[issue4807] wrong wsprintf usage

2009-01-13 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

fprintf() is much better than wsprintf() + fputs() with a fixed size 
buffer (with no size/error check!). Same remark for 
PyString_FromFormat() instead of wsprintf()+PyString_FromString().

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4807
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4807] wrong wsprintf usage

2009-01-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Fixed in r68592.

--
resolution: accepted - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4807
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4807] wrong wsprintf usage

2009-01-02 Thread Ulrich Eckhardt

New submission from Ulrich Eckhardt eckha...@satorlaser.com:

Note up front: there is a win32 function wsprintf() and an ISO C
function swprintf(), these are different things in case you wonder.

In _winreg.c, there are two functions that use wsprintf on a char
buffer, while the function takes a TCHAR buffer instead. This leads to
compile warning and runtime errors when _UNICODE is defined, like e.g.
under MS Windows CE. The attached patch replaces the two calls to that
function with calls to fprintf() and PyString_FromFormat().

--
components: Windows
files: python-2.7-no-wsprint.0.patch
keywords: patch
messages: 78790
nosy: eckhardt
severity: normal
status: open
title: wrong wsprintf usage
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file12538/python-2.7-no-wsprint.0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4807
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com