Description: Fix cast from Gyoto;;Unit to Python string
Author: Thibaut Paumard <thibaut.paumard@obspm.fr>
Origin: upstream
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1017050
Applied-Upstream: https://github.com/gyoto/Gyoto/commit/028802f4d524546b6b440e56ca850efc89c5312d
Last-Update: 2022-11-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/python/gyoto.i b/python/gyoto.i
index 389f0e3..05e5752 100644
--- a/python/gyoto.i
+++ b/python/gyoto.i
@@ -1,5 +1,5 @@
 /*
-    Copyright 2014-2020 Thibaut Paumard
+    Copyright 2014-2022 Thibaut Paumard
 
     This file is part of Gyoto.
 
@@ -995,8 +995,8 @@ public:
 
 // Units and Converters are SmartPointee
 %extend Gyoto::Units::Unit {
-  const char *__str__() {
-    return (std::string(*($self))).c_str();
+  std::string __str__() {
+    return (std::string(*($self)));
   }
 };
 %feature("ref") Gyoto::Units::Unit "$this->incRefCount();//ref Unit";
