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

Function garrow_buffer_slice

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

* garrow_buffer_slice: * @buffer: A #GArrowBuffer. * @offset: An offset in the buffer data in byte. * @size: The number of bytes of the sliced data. * * Returns: (transfer full): A newly created #GArrowBuffer that shares * data of the base #GArrowBuffer. The created #GArrowBuffer has data * start with offset from the base buffer data and are the specified * bytes size. * * Since: 0

Source from the content-addressed store, hash-verified

407 * Since: 0.3.0
408 */
409GArrowBuffer *
410garrow_buffer_slice(GArrowBuffer *buffer, gint64 offset, gint64 size)
411{
412 auto arrow_parent_buffer = garrow_buffer_get_raw(buffer);
413 auto arrow_buffer = std::make_shared<arrow::Buffer>(arrow_parent_buffer, offset, size);
414 return garrow_buffer_new_raw_parent(&arrow_buffer, buffer);
415}
416
417G_DEFINE_TYPE(GArrowMutableBuffer, garrow_mutable_buffer, GARROW_TYPE_BUFFER)
418

Callers

nothing calls this directly

Calls 2

garrow_buffer_get_rawFunction · 0.85

Tested by

no test coverage detected