pxd return value

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

View File

@ -68,4 +68,17 @@ void ReturnValue::emit_matlab(FileWriter& proxyFile) const {
} }
/* ************************************************************************* */ /* ************************************************************************* */
void ReturnValue::emit_cython_pxd(FileWriter& file) const {
string output;
if (isPair) {
file.oss << "pair[";
type1.emit_cython_pxd(file);
file.oss << ",";
type1.emit_cython_pxd(file);
"] ";
}
else type1.emit_cython_pxd(file);
}
/* ************************************************************************* */

View File

@ -67,6 +67,8 @@ struct ReturnValue {
void emit_matlab(FileWriter& proxyFile) const; void emit_matlab(FileWriter& proxyFile) const;
void emit_cython_pxd(FileWriter& file) const;
friend std::ostream& operator<<(std::ostream& os, const ReturnValue& r) { friend std::ostream& operator<<(std::ostream& os, const ReturnValue& r) {
if (!r.isPair && r.type1.category == ReturnType::VOID) if (!r.isPair && r.type1.category == ReturnType::VOID)
os << "void"; os << "void";