Issue 1578999: PyArg_ParseTuple corrections - Python tracker (original) (raw)

Created on 2006-10-17 14:27 by loewis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
macformat.diff loewis,2006-10-17 14:27
Messages (7)
msg51264 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-10-17 14:27
The attached patch corrects a number of errors in the usage of PyErr_Format, for the Mac specific modules. It should be reviewed for technical correctness wrt. the Apple API, and also wrt. whether the patch changes generated files. In particular, the error corrections are: - OSErr is a 16-bit value, can't parse with 'i' - MusicMIDIPacket::data is UINT8[249], parsing it with s# won't work, as s# outputs a char*. I *assume* QtMusicMIDIPacket_Convert wants to get the string into the data buffer - In Qt_TuneSetHeader, an int* is passed to an 's' argument. Not sure whether this is correct: shouldn't there be a requirement that the string is a multiple of sizeof(int) in length? - SndCmd_Convert parses a char* into a long. This is correct in terms of size for both 32-bit and 64-bit systems. Is it also correct logically? (i.e. is param2 really a pointer?) - TXNScrollBarState is a single-byte type - ScrapFlavorFlags is an unsigned type - Boolean is a single-byte type - CFStringEncoding is now parsed through a long temporary variable, as it's not clear what format code would be correct
msg51265 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-10-17 14:28
Logged In: YES user_id=21627 PyArg_ParseTuple, I mean, not PyErr_Format.
msg84526 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 07:20
Are these corrections still relevant?
msg114840 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-24 22:21
No reply to .
msg114843 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-24 22:30
Adding Ronald to nosy, maybe he can confirm this is outdated or reopen.
msg114863 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-08-25 01:03
Note, all of the patched files are for deprecated modules that have been removed in Python 3 so the only applicability now could be as a bug fix to 2.7. At this late date, though, I don't think it is worth worrying about trying to review and test the patches.
msg114866 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-25 01:04
This is best closed, then. Thanks for the reply.
History
Date User Action Args
2022-04-11 14:56:20 admin set github: 44137
2010-08-25 01:04:22 eric.araujo set messages: + stage: test needed -> resolved
2010-08-25 01:03:17 ned.deily set nosy: + ned.deilymessages: + versions: - Python 3.1, Python 3.2
2010-08-24 22:30:27 eric.araujo set nosy: + eric.araujo, ronaldoussorenmessages: +
2010-08-24 22:21:52 BreamoreBoy set status: open -> closedversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6nosy: + BreamoreBoymessages: + resolution: out of date
2009-03-30 07:20:25 ajaksu2 set priority: normal -> lowtype: behaviorversions: + Python 2.6nosy: + ajaksu2messages: + stage: test needed
2006-10-17 14:27:19 loewis create