runtime: fix serialization of object lists.

Fixes #500.
release-1
whitequark 2016-07-07 12:40:50 +00:00 committed by Sebastien Bourdeauducq
parent a801cde953
commit 6a1706b872
2 changed files with 9 additions and 1 deletions

View File

@ -876,7 +876,12 @@ static int send_rpc_value(const char **tag, void **value)
case 'O': { // host object
struct { uint32_t id; } **object = *value;
return out_packet_int32((*object)->id);
if(!out_packet_int32((*object)->id))
return 0;
*value = (void*)((intptr_t)(*value) + sizeof(*object));
break;
}
default:

View File

@ -43,6 +43,9 @@ class RoundtripTest(ExperimentCase):
obj = object()
self.assertRoundtrip(obj)
def test_object_list(self):
self.assertRoundtrip([object(), object()])
class _DefaultArg(EnvExperiment):
def build(self):