MCPcopy Create free account
hub / github.com/apache/arrow / garrow_buffer_new_bytes

Function garrow_buffer_new_bytes

c_glib/arrow-glib/buffer.cpp:200–208  ·  view source on GitHub ↗

* garrow_buffer_new_bytes: * @data: Data for the buffer. * * Returns: A newly created #GArrowBuffer. * * Since: 0.9.0 */

Source from the content-addressed store, hash-verified

198 * Since: 0.9.0
199 */
200GArrowBuffer *
201garrow_buffer_new_bytes(GBytes *data)
202{
203 size_t data_size;
204 auto raw_data = g_bytes_get_data(data, &data_size);
205 auto arrow_buffer =
206 std::make_shared<arrow::Buffer>(static_cast<const uint8_t *>(raw_data), data_size);
207 return garrow_buffer_new_raw_bytes(&arrow_buffer, data);
208}
209
210/**
211 * garrow_buffer_equal:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected