From 2fe61781f512d4f7ae0bdc5c0ece8672b24274f5 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Wed, 28 Aug 2013 14:46:53 -0700 Subject: [PATCH] Expose _StructSchema's raw node --- capnp/capnp.pyx | 5 +++++ capnp/capnp_cpp.pxd | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index fd1e9dd..9c041b7 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -380,6 +380,11 @@ cdef class _StructSchema: for i in xrange(nfields)) return self.__fieldnames + property node: + """The raw schema node""" + def __get__(self): + return _DynamicStructReader()._init(self.thisptr.getProto(), None) + cdef class _ParsedSchema: cdef C_ParsedSchema thisptr cdef _init(self, C_ParsedSchema other): diff --git a/capnp/capnp_cpp.pxd b/capnp/capnp_cpp.pxd index 794a0ec..658e50e 100644 --- a/capnp/capnp_cpp.pxd +++ b/capnp/capnp_cpp.pxd @@ -43,7 +43,6 @@ cdef extern from "capnp/schema.h" namespace " ::capnp": uint size() Field operator[](uint index) - Node.Reader getProto() FieldList getFields() Field getFieldByName(char * name)