Small patch for Pascal Strings warning under OS X

Hi all,

Just working through the code. Trying to learn some things by patching for warnings.

When compiled under OS X, this will overload the call to p2cstr (which is deprecated) with the equivalent CFString functions.

-p.

— original/of_preRelease_v0.02_xcode/libs/openFrameworks/utils/ofConstants.h 2007-04-16 13:16:55.000000000 -0400
+++ of_preRelease_v0.02_xcode/libs/openFrameworks/utils/ofConstants.h 2007-05-30 12:25:53.000000000 -0400
@@ -63,6 +63,10 @@
#if defined(__LITTLE_ENDIAN__)
#define TARGET_LITTLE_ENDIAN // intel cpu
#endif
+

  • //P Take care of the p2cstr warnings
  • #define p2cstr(aStr) CFStringGetCStringPtr(CFStringCreateWithPascalString(NULL, aStr, kCFStringEncodingMacRoman),kCFStringEncodingMacRoman)

#endif

Awesome!
Thanks for finding that - it will definately be in for the next version. I think a lot of the Xcode warnings are from depreciated quicktime calls at the moment.

Cheers
Theo