remove extra Xd of Eigen types in Argument and ReturnType
parent
892b9264a4
commit
435870ebf0
|
@ -105,7 +105,7 @@ void Argument::emit_cython_pxd(FileWriter& file, const std::string& className) c
|
|||
|
||||
string cythonType = typeName;
|
||||
if (type.isEigen()) {
|
||||
cythonType = "const " + typeName + "Xd&";
|
||||
cythonType = "const " + typeName + "&";
|
||||
} else {
|
||||
if (is_ptr) cythonType = "shared_ptr[" + typeName + "]&";
|
||||
if (is_ref) cythonType = cythonType + "&";
|
||||
|
@ -132,7 +132,7 @@ void Argument::emit_cython_pyx_asParam(FileWriter& file) const {
|
|||
cythonVar = name + "." + type.pyxCythonObj();
|
||||
if (!is_ptr) cythonVar = "deref(" + cythonVar + ")";
|
||||
} else if (type.isEigen()) {
|
||||
cythonVar = "<" + cythonType + "Xd>" + "(Map[" + cythonType + "Xd](" + name + "))";
|
||||
cythonVar = "<" + cythonType + ">" + "(Map[" + cythonType + "](" + name + "))";
|
||||
} else {
|
||||
cythonVar = name;
|
||||
}
|
||||
|
|
|
@ -70,8 +70,7 @@ void ReturnType::wrapTypeUnwrap(FileWriter& wrapperFile) const {
|
|||
void ReturnType::emit_cython_pxd(FileWriter& file, const std::string& className) const {
|
||||
string typeName = cythonClass();
|
||||
string cythonType;
|
||||
if (isEigen()) cythonType = typeName + "Xd";
|
||||
else if (isPtr) cythonType = "shared_ptr[" + typeName + "]";
|
||||
if (isPtr) cythonType = "shared_ptr[" + typeName + "]";
|
||||
else cythonType = typeName;
|
||||
if (typeName == "This") cythonType = className;
|
||||
file.oss << cythonType;
|
||||
|
|
Loading…
Reference in New Issue