• 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: Xcode-users Digest, Vol 13, Issue 52
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode-users Digest, Vol 13, Issue 52


  • Subject: Re: Xcode-users Digest, Vol 13, Issue 52
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Fri, 26 Feb 2016 16:26:53 -0300

On 2/25/16 17:00, email@hidden wrote:
>> On Feb 24, 2016, at 6:15 PM, Wim Lewis <email@hidden> wrote:
>> >
>> > You can place a C string into a specific section using syntax like this:
>> >
>> >    static __attribute__((section("__TEXT,foo"))) const char foo_var[] = "Foo, forsooth.”;
> I did try using that instead. The problem is that these strings are used at the call-site as format strings (for the logged message), and I run into trouble with the `format` attribute on the logging function — I can’t use the `__NSString__` style because the parameter isn’t an NSString anymore, but I can’t use the `__printf__` style because that doesn’t allow `%@`. :(
>

A little late, sorry.

Try using Wim's trick and then reference the string like

NSLog(@(foo_var), ...)

--
Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
http://brockerhoff.net/blog/

 _______________________________________________
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


  • Prev by Date: Re: How to fix "misuse of 'nonnull'" warnings in Xcode 7.3?
  • Next by Date: Aggregate targets in Xcode - is there any documentation on this anywhere?
  • Previous by thread: Re: Swift binding of NSEnumerator subclasses
  • Next by thread: Aggregate targets in Xcode - is there any documentation on this anywhere?
  • Index(es):
    • Date
    • Thread