pxd returntype

release/4.3a0
Duy-Nguyen Ta 2016-09-09 07:10:32 -04:00
parent 86405dbb48
commit f72448b624
2 changed files with 14 additions and 0 deletions

View File

@ -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 << " ";
}
/* ************************************************************************* */

View File

@ -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;