Commits

Fredrik Johansson committed ffed72c

Further fixes with nums in list

  • Participants
  • Parent commits 2469b14

Comments (0)

Files changed (2)

maven/protocol-generator-plugin/src/main/scripts/java_generator.rb

       @indent_level += 1
       wi("ps.saveInt(#{name}.size());")
       wi("for(int i = 0; i != #{name}.size(); ++i) {")
-      wi("ps.saveInt(#{name}.get(i).ordinal());",1)
+      wi("ps.saveUnsignedByte(#{name}.get(i).ordinal());",1)
       wi("}")
       @indent_level -= 1
       wi("}")
       if(builtin?(list.obj_type))
         wi("#{name}.add(ps.load#{ltype}());",1)
       elsif(enum?(list.obj_type))
-        wi("int ordinal = ps.loadInt();",1)
+        wi("int ordinal = ps.loadUnsignedByte();",1)
         wi("#{ltype} _tmp = Enums.make#{ltype}(ordinal);",1)
         wi("#{name}.add(_tmp);",1)
       else

maven/protocol-generator-plugin/src/main/scripts/javascript_generator.rb

       #@indent_level += 1
       if(fbuiltin?(list.obj_type))
         wi("byteArray.write#{ltype}(this.#{name}[i]);",1)
+        
+      elsif(enum?(list.obj_type))
+       wi("byteArray.writeUnsignedByte(this.#{name}[i]); // ENUM Fixme",1)
+        
       else
         wi("byteArray.writeArray(this.#{name}[i].save());",1) 
       end