diff --git a/wrap/ReturnType.cpp b/wrap/ReturnType.cpp index 1a1f1bc26..9ec30f7df 100644 --- a/wrap/ReturnType.cpp +++ b/wrap/ReturnType.cpp @@ -66,4 +66,16 @@ void ReturnType::wrapTypeUnwrap(FileWriter& wrapperFile) const { } /* ************************************************************************* */ +void ReturnType::emit_cython_pxd(FileWriter& file) const { + string typeName = qualifiedName("_"); + string cythonType = typeName; + if (typeName=="Vector" || typeName == "Matrix") { + cythonType = typeName + "Xd"; + } else { + if (isPtr) cythonType = "shared_ptr[" + typeName + "]"; + } + file.oss << cythonType << " "; +} + +/* ************************************************************************* */ diff --git a/wrap/ReturnType.h b/wrap/ReturnType.h index 1c67a1d9a..78ef97536 100644 --- a/wrap/ReturnType.h +++ b/wrap/ReturnType.h @@ -47,6 +47,8 @@ struct ReturnType: public Qualified { throw DependencyMissing(key, "checking return type of " + s); } + void emit_cython_pxd(FileWriter& file) const; + private: friend struct ReturnValue;