Hi Cocoa users,

You might be waiting for support of ARC (Automatic Reference Counting) which is 
default in iOS 5.

There is a patch for 0.8.0-dev in the following page.  Please merge it.

        https://issues.apache.org/jira/browse/THRIFT-1340

If you want to use it now, check out the latest source code from the trunk of 
SVN repository then apply the patch. 
I recommend to do "Add files" to import runtime library from "lib/cocoa/src" 
into your project instead of making a static library from the library. Don't 
forget to set "Always Search User Paths" to YES in Build Settings.


* What is the patch?

- Works for iOS and MacOS.
- The runtime and generated code are compatible with both ARC compilation mode 
and non-ARC compilation mode.
  If you want to know how I realize the compatibility, look into 
lib/cocoa/src/TObjective-C.h 
- Initialization of struct/exception/map/list/set with defalut values is 
implemented.
- Now it generates much better code for initializing constants. The current 
thrift compiler generates buggy code.

I needed to fix the problems of initialization so as to support ARC. I 
confirmed that the all generated code from test/*.thrift pass code analyzer and 
can be compiled without warning. However, I didn't run the test suite because 
Cocoa lacks test cases.

@@@@@@@@@@@@@@  Life is beautiful and full of surprises.

HIRANO Satoshi, Ph.D.         <[email protected]>
AIST: National Institute of Advanced Industrial Science and Technology

Reply via email to