avoid std::string when creating signatures, and make nicer type names. binary size reduced by ~10%
diff --git a/include/pybind/functional.h b/include/pybind/functional.h
index 1979dea..1eedab6 100644
--- a/include/pybind/functional.h
+++ b/include/pybind/functional.h
@@ -38,7 +38,11 @@
return f.ptr();
}
- PYBIND_TYPE_CASTER(type, "function<" + type_caster<std::tuple<Args...>>::name() + " -> " + type_caster<typename decay<Return>::type>::name() + ">");
+
+ PYBIND_TYPE_CASTER(type, detail::descr("function<") +
+ type_caster<std::tuple<Args...>>::descr() + detail::descr(" -> ") +
+ type_caster<typename decay<Return>::type>::descr() +
+ detail::descr(">"));
};
NAMESPACE_END(detail)