Merge branch 'develop' of git://github.com/amluto/capnpc-python-cpp into amluto-develop

Conflicts:
	capnp/capnp.pyx
This commit is contained in:
Jason Paryani
2013-09-03 14:34:43 -07:00
3 changed files with 70 additions and 3 deletions

View File

@@ -11,6 +11,8 @@ from libcpp cimport bool as cbool
cdef extern from "capnp/common.h" namespace " ::capnp":
enum Void:
VOID " ::capnp::VOID"
cdef cppclass word:
pass
cdef extern from "kj/string.h" namespace " ::kj":
cdef cppclass StringPtr:
@@ -31,6 +33,23 @@ cdef extern from "kj/common.h" namespace " ::kj":
size_t size()
T& operator[](size_t index)
# Cython can't handle ArrayPtr[word] as a function argument
cdef cppclass WordArrayPtr "::kj::ArrayPtr<::capnp::word>":
WordArrayPtr()
WordArrayPtr(word *, size_t size)
size_t size()
word& operator[](size_t index)
cdef extern from "kj/array.h" namespace " ::kj":
cdef cppclass Array[T]:
T* begin()
size_t size()
# Cython can't handle Array[word] as a function argument
cdef cppclass WordArray "::kj::Array<::capnp::word>":
word* begin()
size_t size()
cdef extern from "capnp/schema.h" namespace " ::capnp":
cdef cppclass Schema:
Node.Reader getProto() except +