From 435870ebf047ccc1db5e7f7ab4fdbc1a4a32d170 Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Wed, 14 Sep 2016 07:44:38 -0400 Subject: [PATCH] remove extra Xd of Eigen types in Argument and ReturnType --- wrap/Argument.cpp | 4 ++-- wrap/ReturnType.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wrap/Argument.cpp b/wrap/Argument.cpp index 3f240f917..a33f357fa 100644 --- a/wrap/Argument.cpp +++ b/wrap/Argument.cpp @@ -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; } diff --git a/wrap/ReturnType.cpp b/wrap/ReturnType.cpp index 62202dc44..68d0cf170 100644 --- a/wrap/ReturnType.cpp +++ b/wrap/ReturnType.cpp @@ -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;