Mac OS X: Fix crash on 64-bit Snow Leopard (bug 1034)

I incorrectly used "unsigned long" as format to pack a
4 char code to an integer, while I should have used
"unsigned int" because on 64 bits Snow Leopard,
unsigned long is 8 bytes long, and then unpack fails.
This commit is contained in:
Eric Le Lay 2010-05-30 13:29:56 +02:00 committed by Thomas Perl
parent 3301e92e93
commit df91b4d059

View file

@ -24,7 +24,7 @@ from gpodder import util
def aeKeyword(fourCharCode):
"""transform four character code into a long"""
return struct.unpack('L', fourCharCode)[0]
return struct.unpack('I', fourCharCode)[0]
# for the kCoreEventClass, kAEOpenDocuments, ... constants