* ggandiva_binary_literal_node_new_bytes: * @value: The value of the binary literal. * * Returns: A newly created #GGandivaBinaryLiteralNode. * * Since: 0.12.0 */
| 1088 | * Since: 0.12.0 |
| 1089 | */ |
| 1090 | GGandivaBinaryLiteralNode * |
| 1091 | ggandiva_binary_literal_node_new_bytes(GBytes *value) |
| 1092 | { |
| 1093 | size_t value_size; |
| 1094 | auto raw_value = g_bytes_get_data(value, &value_size); |
| 1095 | auto gandiva_node = gandiva::TreeExprBuilder::MakeBinaryLiteral( |
| 1096 | std::string(reinterpret_cast<const char *>(raw_value), value_size)); |
| 1097 | auto literal_node = ggandiva_literal_node_new_raw(&gandiva_node, NULL); |
| 1098 | auto priv = GGANDIVA_BINARY_LITERAL_NODE_GET_PRIVATE(literal_node); |
| 1099 | priv->value = value; |
| 1100 | g_bytes_ref(priv->value); |
| 1101 | return GGANDIVA_BINARY_LITERAL_NODE(literal_node); |
| 1102 | } |
| 1103 | |
| 1104 | /** |
| 1105 | * ggandiva_binary_literal_node_get_value: |
nothing calls this directly
no test coverage detected