classification
Title: PyArg_ParseTuple corrections
Type: behavior Stage: resolved
Components: macOS Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: BreamoreBoy, ajaksu2, eric.araujo, jackjansen, loewis, ned.deily, ronaldoussoren
Priority: low Keywords: patch

Created on 2006-10-17 14:27 by loewis, last changed 2010-08-25 01:04 by eric.araujo. 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 msg84526.
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
2010-08-25 01:04:22eric.araujosetmessages: + msg114866
stage: test needed -> resolved
2010-08-25 01:03:17ned.deilysetnosy: + ned.deily

messages: + msg114863
versions: - Python 3.1, Python 3.2
2010-08-24 22:30:27eric.araujosetnosy: + eric.araujo, ronaldoussoren
messages: + msg114843
2010-08-24 22:21:52BreamoreBoysetstatus: open -> closed
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + BreamoreBoy

messages: + msg114840

resolution: out of date
2009-03-30 07:20:25ajaksu2setpriority: normal -> low

type: behavior
versions: + Python 2.6
nosy: + ajaksu2

messages: + msg84526
stage: test needed
2006-10-17 14:27:19loewiscreate