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

Incorrectly generates code for 'set' return type.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.7
    • None
    • Perl - Compiler
    • None
    • Ubuntu/Centos, perl 5.10.1

    Description

      If return value is the 'set<type>', where type is sctruct, for example:

      struct Result
      {
      1: string response;
      2: i32 count;
      }
      service URLScheduler

      { set <Result> getResult(); }

      produced the following deserialize code:

      /^0$/ && do{ if ($ftype == TType::SET) {
      {
      $self->

      {success} = {};
      # ...
      $elem5 = new XXX::Thrift::Result();
      $xfer += $elem5->read($input);
      $self->{success}->{$elem5} = 1;

      which gives { "XXX::Thrift::MyType=HASH(0x935b818)" => 1, ... }

      Clearly, this is not true for the classes. It seems that this will not prevent something like that:

      $self->{success}

      ->{$elem5} = ref $elem5 ? $elem5 : 1;

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              asan_13 Asyakin Andrey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: