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

Function garrow_resizable_buffer_new

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

* garrow_resizable_buffer_new: * @initial_size: The initial buffer size in bytes. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): A newly created #GArrowResizableBuffer. * * Since: 0.10.0 */

Source from the content-addressed store, hash-verified

548 * Since: 0.10.0
549 */
550GArrowResizableBuffer *
551garrow_resizable_buffer_new(gint64 initial_size, GError **error)
552{
553 auto maybe_buffer = arrow::AllocateResizableBuffer(initial_size);
554 if (garrow::check(error, maybe_buffer, "[resizable-buffer][new]")) {
555 auto arrow_buffer = std::shared_ptr<arrow::ResizableBuffer>(*std::move(maybe_buffer));
556 return garrow_resizable_buffer_new_raw(&arrow_buffer);
557 } else {
558 return NULL;
559 }
560}
561
562/**
563 * garrow_resizable_buffer_resize:

Callers 1

mainFunction · 0.85

Calls 3

AllocateResizableBufferFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected