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

Function garrow_resizable_buffer_resize

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

* garrow_resizable_buffer_resize: * @buffer: A #GArrowResizableBuffer. * @new_size: The new buffer size in bytes. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: %TRUE on success, %FALSE if there was an error. * * Since: 0.3.0 */

Source from the content-addressed store, hash-verified

570 * Since: 0.3.0
571 */
572gboolean
573garrow_resizable_buffer_resize(GArrowResizableBuffer *buffer,
574 gint64 new_size,
575 GError **error)
576{
577 auto arrow_buffer = garrow_buffer_get_raw(GARROW_BUFFER(buffer));
578 auto arrow_resizable_buffer =
579 std::static_pointer_cast<arrow::ResizableBuffer>(arrow_buffer);
580 auto status = arrow_resizable_buffer->Resize(new_size);
581 return garrow_error_check(error, status, "[resizable-buffer][resize]");
582}
583
584/**
585 * garrow_resizable_buffer_reserve:

Callers

nothing calls this directly

Calls 3

garrow_buffer_get_rawFunction · 0.85
garrow_error_checkFunction · 0.85
ResizeMethod · 0.45

Tested by

no test coverage detected