From 8b92a251e41e0d1cb1dec8f716511b198d8acfbf Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Sun, 18 Aug 2013 21:48:49 -0700 Subject: [PATCH] Clean up namespace a bit and add cython exporting of function signatures --- capnp/capnp.pyx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index bd233da..9c8c34d 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -4,6 +4,7 @@ # distutils: libraries = capnpc # cython: c_string_type = str # cython: c_string_encoding = default +# cython: embedsignature = True cimport cython cimport capnp_cpp as capnp @@ -598,12 +599,10 @@ cdef class MessageReader: def __init__(self): raise NotImplementedError("This is an abstract base class") - cpdef getRootNode(self): + cpdef _getRootNode(self): return _NodeReader().init(self.thisptr.getRootNode()) - cpdef getRootCodeGeneratorRequest(self): + cpdef _getRootCodeGeneratorRequest(self): return _CodeGeneratorRequestReader()._init(self.thisptr.getRootCodeGeneratorRequest()) - cpdef getRootDynamicStruct(self, StructSchema schema): - return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(schema.thisptr), self) cpdef getRoot(self, schema): cdef StructSchema s if hasattr(schema, 'Schema'):