Andreas Linke wrote:
> Bob Ebert <[EMAIL PROTECTED]> wrote:
>> Your sources, however, are toast. VoidHand and Handle no
>> longer exist. In
>> general, you'll need to search/replace them with MemHandle.
>
> My sources are toast???? That was exactly the answer I feared.
Your sources aren't toast! The parts of the compatibility header that
Bob mentioned are now written and will make your sources less toasty.
> Even the
> simple thing of adding additional "compatibility" headers can be a pain if
> you do shared development.
I guess I don't quite understand what you mean by "shared development".
You can arrange things so that you add the compatibility header once
(per development machine), at the same time as you install the new
headers. You don't immediately have to do anything for each source
file, or even for each project.
Of course, we think you'll be happiest if you move over to the new
naming scheme eventually, and compile without the header. Fixing the
VoidHand/Handle confusion is a big win, and (perhaps this is a sign
of a fading memory :-() I for one find it impossible to remember whether
DWord and friends are supposed to be unsigned or not, and hence find
UInt32 and so on much more comprehensible.
But this type naming change doesn't itself force you to rewrite immediately.
Anyway, here's the relevant typedefs. For those of you with the new
3.5 headers, you can add this to Incs/Core/CoreCompatibility.h, which
is where they'll be in the final headers. For those without: here's
the new naming scheme, and if you want to change now most of the IntXX
types are already defined in the v3 headers, but you can't define
MemHandle to both the old ones :-), so you'll have to wait on that.
(I was expecting this to be not quite right for the simulator, but it
seems to be fine. I'll be interested to hear if anybody has problems
with simulator builds due to this stuff.)
=====
// The data types Byte, Word, DWord and so on are now deprecated. We
// recommend that you use the corresponding new data types: for example,
// use Int16 instead of SWord and UInt32 instead of DWord. In particular,
// the unfortunate distinction between Handle/VoidHand has been fixed:
// use MemHandle instead.
typedef Int8 SByte;
#if __DEFINE_TYPES_
typedef UInt8 Byte;
#endif
typedef Int16 SWord;
typedef UInt16 Word;
typedef Int32 SDWord;
typedef UInt32 DWord;
// Logical data types
typedef Int8 SChar;
typedef UInt8 UChar;
typedef Int16 Short;
typedef UInt16 UShort;
typedef Int16 Int;
typedef UInt16 UInt;
typedef Int32 Long;
typedef UInt32 ULong;
// Pointer Types
typedef MemPtr VoidPtr;
typedef MemHandle VoidHand;
#if __DEFINE_TYPES_
typedef MemPtr Ptr;
typedef MemHandle Handle;
#endif
// Because "const BytePtr" means "const pointer to Byte" rather than "pointer
// to const Byte", all these XXXXPtr types are deprecated: you're better off
// just using "Byte *" and so on. (Even better, use "UInt8 *"!)
typedef SByte* SBytePtr;
#if __DEFINE_TYPES_
typedef Byte* BytePtr;
#endif
typedef SWord* SWordPtr;
typedef Word* WordPtr;
typedef UInt16* UInt16Ptr;
typedef SDWord* SDWordPtr;
typedef DWord* DWordPtr;
// Logical data types
typedef Boolean* BooleanPtr;
typedef Char* CharPtr;
typedef SChar* SCharPtr;
typedef UChar* UCharPtr;
typedef WChar* WCharPtr;
typedef Short* ShortPtr;
typedef UShort* UShortPtr;
typedef Int* IntPtr;
typedef UInt* UIntPtr;
typedef Long* LongPtr;
typedef ULong* ULongPtr;
=====
John