[Pyobjc-dev] FourCharCodes vs. PyObjC
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-11-14 16:38:13
|
In Python, four char codes are strings of length four. PyObjC sees the signature of FourCharCode as an unsigned integer. This is bad, AFAIK there is no "signature character" that we can use to specify a length of four.. so basically I have some 30 or so, maybe more, mappings to write just to provide FourCharCode to string of length four compatibility. This is mostly a question for Ronald I guess, but how would this best be done? Basically what needs to be done is a lot of PyMac_GetOSType and PyMac_BuildOSType all over the place.. or else people will have to struct.unpack('L', fourCharCode)[0] everywhere, which is not fun. A potential solution to this would be to add a signature character, or to allow length of 4 strings for any uint32.. but I'd also like to see things come out of PyObjC as length of four character strings. Also, how can I transparently bridge AEDesc with NSAppleEventDescriptor? They're basically the same thing. -bob |