tstring.patch 937 B

123456789101112131415161718192021222324252627
  1. commit 01ca92d3b2fbcc5fc35eb2defb8f2d2966f9fb1e (tf-python)
  2. author: thegeorg
  3. date: 2021-03-16T18:13:35+03:00
  4. Renew python dramatically
  5. --- a/include/pybind11/cast.h
  6. +++ b/include/pybind11/cast.h
  7. @@ -27,6 +27,7 @@
  8. #include <type_traits>
  9. #include <utility>
  10. #include <vector>
  11. +#include <util/generic/string.h>
  12. PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
  13. PYBIND11_NAMESPACE_BEGIN(detail)
  14. @@ -513,6 +514,10 @@ template <typename CharT, class Traits, class Allocator>
  15. enable_if_t<is_std_char_type<CharT>::value>>
  16. : string_caster<std::basic_string<CharT, Traits, Allocator>> {};
  17. +template <typename CharT, class Traits>
  18. +struct type_caster<TBasicString<CharT, Traits>, enable_if_t<is_std_char_type<CharT>::value>>
  19. + : string_caster<TBasicString<CharT, Traits>> {};
  20. +
  21. #ifdef PYBIND11_HAS_STRING_VIEW
  22. template <typename CharT, class Traits>
  23. struct type_caster<std::basic_string_view<CharT, Traits>,