Skip to content

Commit

Permalink
ARROW-5051: [GLib][Gandiva] Don't return temporary memory
Browse files Browse the repository at this point in the history
Author: Kouhei Sutou <[email protected]>

Closes #4071 from kou/glib-gandiva-fix-string-literal-node-value and squashes the following commits:

4a1811b <Kouhei Sutou>  Don't return temporary memory
  • Loading branch information
kou committed Mar 31, 2019
1 parent cab411a commit 57de5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c_glib/gandiva-glib/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 57de5c3

Please sign in to comment.