You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2019/01/26 14:08:01 UTC

[jira] [Updated] (THRIFT-1759) for generated Obj-C constants, move static variable declarations in implementation file to 'static const' declarations in header file

     [ https://issues.apache.org/jira/browse/THRIFT-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King III updated THRIFT-1759:
--------------------------------------
    Affects Version/s:     (was: 1.0)

This issue was marked as affecting version 1.0 which is not possible.   If you know which version this issue was discovered in, please mark it as such.

> for generated Obj-C constants, move static variable declarations in implementation file to 'static const' declarations in header file
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1759
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1759
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Cocoa - Compiler
>    Affects Versions: 0.1, 0.9
>            Reporter: Paul Mans
>            Assignee: James E. King III
>            Priority: Minor
>             Fix For: 0.13.0
>
>         Attachments: t_cocoa_generator_const_static.patch
>
>
> By declaring constants as 'static const' in the header file instead in of the implementation file we can use the constants in more places, such as in case statements of switch blocks.  
> Currently in Obj-C constants can only be accessed by using the static methods, which leads to some limitations.
> The 'const' prefix only should apply to "primitive" constants (not structs or collections)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)