Description

Adopt a read-write slice as buffer's backing store.

The slice memory will not be copied and must remain alive during the buffer's lifetime. Usually this is guaranteed by some global static memory or some parent object and this buffer being a view of that -- be aware of parent memory remaining alive, such as "slice,changed" events.

The memory will be disposed using free() and reallocated using realloc().

Since 1.19

Signature

adopt_readwrite {
    params {
        @in slice: Eina.Rw_Slice;
    }
}

C signature

void efl_io_buffer_adopt_readwrite(Eo *obj, Eina_Rw_Slice slice);

Parameters

  • slice (in) - Slice to adopt as read-write

Implemented by

  • Efl.Io.Buffer.adopt_readwrite