• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSLog a No-Op Probably Explained
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog a No-Op Probably Explained


  • Subject: Re: NSLog a No-Op Probably Explained
  • From: Jens Ayton <email@hidden>
  • Date: Sun, 20 Dec 2009 13:57:42 +0100

On Dec 20, 2009, at 11:01, Chris Suter wrote:
> On Sun, Dec 20, 2009 at 8:55 PM, Thomas Wetmore <email@hidden> wrote:
>>
>> It is my absolute expectation that dyld_stub_NSLog follows C argument evaluation semantics. However, the argument evaluation time of the format string being passed to NSLog is not the time when the description methods are called. They are called from within the NSLog function. dyld_stub_NSLog is a function in the Objective-C runtime and could easily check the run-time stack and discover another call to itself higher in the chain and simply return. However, as I stated, I only know the results, not the true cause.
>
> Well, you can probably find the source code for it. NSLog ends up
> calling CFLog, which you’ll find is available at opensource.apple.com.

Indeed. CFUtilities.c (http://opensource.apple.com/source/CF/CF-550.13/CFUtilities.c), line 766 (in _CFLogvEx):

#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
    if (pthread_getspecific(__CFTSDKeyIsInCFLog)) return;
    pthread_setspecific(__CFTSDKeyIsInCFLog, (void *)1);
#endif


--
Jens Ayton

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSLog a No-Op Probably Explained (From: Thomas Wetmore <email@hidden>)
 >Re: NSLog a No-Op Probably Explained (From: Thomas Wetmore <email@hidden>)
 >Re: NSLog a No-Op Probably Explained (From: Chris Suter <email@hidden>)

  • Prev by Date: No Syntax-coloring or symbol recognition for Cocoa Framework in my XCode 3.2.1 Project.
  • Next by Date: Missing Documentation index.html files..
  • Previous by thread: Re: NSLog a No-Op Probably Explained
  • Next by thread: to remove indirect symbols
  • Index(es):
    • Date
    • Thread