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

Lua Generator: using string.len funtion to get struct(map,list,set) size

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.3
    • Component/s: Lua - Compiler
    • Labels:
      None

      Description

      #t_lua_generator::generate_serialize_container
      string.len can't get struct's size.

      Tables are the only "container" type in Lua.
      We can get the "length" of an array using the # operator.
      But the # operator doesn't count all the items in the table.
      So when ttype equals to list, # should be OK.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                roger Roger Meier
                Reporter:
                winsweet winsweet
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: