Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-245

FIELDS constant should contain name of enumerated type for enum fields

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.1
    • Ruby - Compiler
    • None
    • Patch Available

    Description

      When a Ruby struct is generated, if the struct has fields that are of enumerated types, it is converted into an i32 field, and no trace of the enumerated type is recorded. I propose we add a new key to the FIELDS entries, :enum_class, that contains the class constant for the enumerated type. This way, you can reflectively determine both that the field is of an enumerated type and which type it is.

      Attachments

        1. thrift-245.patch
          0.5 kB
          Bryan Duxbury

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bryanduxbury Bryan Duxbury
            bryanduxbury Bryan Duxbury
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment