Show quoted text 6 lines
OK. It seems to have been a C macro.
But I doesn't understand it completely :
In the C headers, the macros is defined as follows:
#define CFSTR(cStr) __CFStringMakeConstantString(cStr "")
... thus calls:
/* This function is private and should not be used directly */ /*
* __CFStringMakeConstantString()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( CFStringRef )
__CFStringMakeConstantString(const char * cStr);
In the define there is 2 args, but I see only one param in the function prototype, how come ?
A tip, concerning translation macros: If you cannot do what you did above, you might write a small function which does what the macro did. The function can be made inline, to make it as fast as a macro. (Of course not all macros can be translated to functions)
Olle
BTW Rolf, I divide the discussion in manageble pieces :)
