• 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
C arrays as __block variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C arrays as __block variables


  • Subject: C arrays as __block variables
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 26 Jun 2010 18:38:24 -0700
  • Thread-topic: C arrays as __block variables

The docs say: "There are two further restrictions on __block variables: they
cannot be variable length arrays, and cannot be structures that contain C99
variable-length arrays."

This would seem to imply that a __block variable *can* be a *fixed* length
array. But when I try to write into such an array inside a block, I get a
compile error, "cannot access __block variable of array type inside block."

Who's mistaken, the compiler or the docs? Thx - m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: C arrays as __block variables
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: Toolbar Icon Workflow
  • Next by Date: Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?
  • Previous by thread: Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?
  • Next by thread: Re: C arrays as __block variables
  • Index(es):
    • Date
    • Thread