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

c_glib: Handle string lists correctly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Question
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.2
    • 0.9.3
    • C glib - Compiler
    • None
    • Patch Available

    Description

      The C (GLib) compiler in its present form will generate incorrect code for string lists (i.e. variables of type list<string>) that are

      • Passed as a parameter to a method,
      • Returned from a method, or
      • Assigned a default value.

      In each case, the issue relates to the compiler not recognizing a string list is represented as an instance of GLib's GPtrArray, instead of GArray used to represent most other types of lists.

      Fixing this will silence a number of compiler warnings when building the generated code.


      I noticed that in latest thrift v0.9.2, the C (GLib) compiler and library to add support for implementing servers.
      But in my case, I got some compiling warnings in when compiling the generated server side code after upgrade to 0.9.2. Actually, I just use thrift c glib in client side, Is it possible to generate the client side code only?

      Attachments

        Activity

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

          People

            simonsouth Simon South
            wuhzj wuhzj
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment