This is an automated email from the ASF dual-hosted git repository.
shiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 114985c ARROW-5051: [GLib][Gandiva] Don't return temporary memory
114985c is described below
commit 114985c3ca8570a683dbc61062ed781daa3ddc8e
Author: Kouhei Sutou <[email protected]>
AuthorDate: Sat Mar 30 04:47:44 2019 +0900
ARROW-5051: [GLib][Gandiva] Don't return temporary memory
Author: Kouhei Sutou <[email protected]>
Closes #4071 from kou/glib-gandiva-fix-string-literal-node-value and
squashes the following commits:
4a1811b8 <Kouhei Sutou> Don't return temporary memory
---
c_glib/gandiva-glib/node.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/c_glib/gandiva-glib/node.cpp b/c_glib/gandiva-glib/node.cpp
index 347473b..0c47a7c 100644
--- a/c_glib/gandiva-glib/node.cpp
+++ b/c_glib/gandiva-glib/node.cpp
@@ -28,7 +28,7 @@
#include <gandiva-glib/node.hpp>
template <typename Type>
-Type
+const Type &
ggandiva_literal_node_get(GGandivaLiteralNode *node)
{
auto gandiva_literal_node =
@@ -1178,7 +1178,7 @@ ggandiva_string_literal_node_new(const gchar *value)
const gchar *
ggandiva_string_literal_node_get_value(GGandivaStringLiteralNode *node)
{
- auto value =
ggandiva_literal_node_get<std::string>(GGANDIVA_LITERAL_NODE(node));
+ auto &value =
ggandiva_literal_node_get<std::string>(GGANDIVA_LITERAL_NODE(node));
return value.c_str();
}