When assigning a pointer to an object that is allocated on the stack to the heap, send a -copy message.  This lets you cast blocks to id and then assign them to ivars without anything breaking.  Apple's 'solution' to this is to segfault, which is not particularly elegant.  This code is also quite an ugly hack (it just checks whether the object is allocated within a couple of pages of the current stack frame), so I might remove it before release.
When assigning a pointer to an object that is allocated on the stack to the heap, send a -copy message.  This lets you cast blocks to id and then assign them to ivars without anything breaking.  Apple's 'solution' to this is to segfault, which is not particularly elegant.  This code is also quite an ugly hack (it just checks whether the object is allocated within a couple of pages of the current stack frame), so I might remove it before release.



git-svn-id: a68838e7bd575144b7122a20f5a950e65beaf589@33190 72102866-910b-0410-8b05-ffd578937521

itumashyk/ndk-objc-gs-libobjc2,itumashyk/ndk-objc-gs-libobjc2