Message167618
Continuing the discussion from #13072. I hit a snag here:
Determining in full generality whether two format strings describe
identical items is pretty complicated, see also #3132.
I'm attaching a best effort fmtcmp() function that should do the
following:
- recognize byte order specifiers at the start of the string.
- recognize if an explicitly specified byte order happens to
match the native byte order.
It won't catch:
- byte order specifiers anywhere in the string.
- C types that happen to be identical ('I', 'L' on a 32-bit
platform). I'm also not sure if that is desirable in the
first place.
- ???
So fmtcmp() will return false negatives (not equal), but should be
correct for *most* format strings that are actually in use.
Mark, Meador: You did a lot of work on the struct module and of
course on issue #3132. Does this look like a reasonable compromise?
Did I miss obvious cases (see attachment)? |
|
Date |
User |
Action |
Args |
2012-08-07 11:55:31 | skrah | set | recipients:
+ skrah, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, Arfrever, meador.inge, python-dev |
2012-08-07 11:55:31 | skrah | set | messageid: <1344340531.12.0.758557763037.issue15573@psf.upfronthosting.co.za> |
2012-08-07 11:55:30 | skrah | link | issue15573 messages |
2012-08-07 11:55:28 | skrah | create | |
|