Changeset 13818


Ignore:
Timestamp:
Oct 23, 2019 12:54:45 PM (3 weeks ago)
Author:
randersson
Message:

#5819 Updated the decoding in set_strings(...) after review comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PyFMI/trunk/src/pyfmi/fmi.pyx

    r13811 r13818  
    16201620                'The length of valueref and values are inconsistent.')
    16211621       
    1622         if python3_flag:
    1623             values = [item.decode() if isinstance(item, bytes) else item for item in values]
    1624        
    16251622
    16261623        for i in range(val_ref.size):
    1627             val[i] = values[i]     
     1624            val[i] = decode(values[i])
    16281625       
    16291626        status = FMIL.fmi1_import_set_string(self._fmu, <FMIL.fmi1_value_reference_t*>val_ref.data, val_ref.size, val)
     
    41734170            raise FMUException(
    41744171                'The length of valueref and values are inconsistent.')
    4175        
    4176         if python3_flag:
    4177             values = [item.decode() if isinstance(item, bytes) else item for item in values]
    4178        
     4172
    41794173        for i in range(val_ref.size):
    4180             val[i] = values[i]     
     4174            val[i] = decode(values[i])
    41814175       
    41824176        status = FMIL.fmi2_import_set_string(self._fmu, <FMIL.fmi2_value_reference_t*>val_ref.data, val_ref.size, val)
Note: See TracChangeset for help on using the changeset viewer.