forked from M-Labs/artiq
parent
a801cde953
commit
6a1706b872
|
@ -876,7 +876,12 @@ static int send_rpc_value(const char **tag, void **value)
|
||||||
|
|
||||||
case 'O': { // host object
|
case 'O': { // host object
|
||||||
struct { uint32_t id; } **object = *value;
|
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:
|
default:
|
||||||
|
|
|
@ -43,6 +43,9 @@ class RoundtripTest(ExperimentCase):
|
||||||
obj = object()
|
obj = object()
|
||||||
self.assertRoundtrip(obj)
|
self.assertRoundtrip(obj)
|
||||||
|
|
||||||
|
def test_object_list(self):
|
||||||
|
self.assertRoundtrip([object(), object()])
|
||||||
|
|
||||||
|
|
||||||
class _DefaultArg(EnvExperiment):
|
class _DefaultArg(EnvExperiment):
|
||||||
def build(self):
|
def build(self):
|
||||||
|
|
Loading…
Reference in New Issue