diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index 19af3fa..d1e2ba8 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -1469,6 +1469,9 @@ cdef class _StructSchema: def __get__(self): return _DynamicStructReader()._init(self.thisptr.getProto(), None) + cpdef get_dependency(self, id): + return _Schema()._init(self.thisptr.getDependency(id)) + def __richcmp__(_StructSchema self, _StructSchema other, mode): if mode == 2: return self.thisptr == other.thisptr @@ -1504,6 +1507,9 @@ cdef class _InterfaceSchema: def __get__(self): return _DynamicStructReader()._init(self.thisptr.getProto(), None) + cpdef get_dependency(self, id): + return _Schema()._init(self.thisptr.getDependency(id)) + def __repr__(self): return '' % self.node.displayName