Why is NSLogv procedure commented out in iOSapi.Foundation?

in iOSapi.Foundation.pas we have this line:

//procedure NSLogv(format: PNSString; args: va_list); cdecl; external libFoundation name _PU + 'NSLogv';

      

Why is it commented / deactivated? This procedure is defined as follows in the title:

FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0) NS_NO_TAIL_CALL;

      

When I try to uncomment it, I have an error: va_list is not defined. If I'm not mistaken, is va_list just a pointer?

After calling this function? NB: I need to call this exact function and not any other log function ....

+1
delphi


source to share


1 answer


NSLogv

exists when you need to wrap the call with NSLog

your own variation function. But since you cannot write a variable function in Delphi, this scenario cannot be applied.

Call NSLog

. It is an externally defined variation function. While Delphi cannot be used to write such things, it is capable of absorbing them.

See this thread for more details: Difference between NSLog and NSLogv .



Further reading:

  • https://en.m.wikipedia.org/wiki/Variadic_function
  • http://docwiki.embarcadero.com/RADStudio/en/Procedures_and_Functions_(Delphi)#External_Declarations
+3


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics