Description

Adopt a read-only 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-const 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.

Since 1.19

Signature

adopt_readonly {
    params {
        @in slice: const(Eina.Slice);
    }
}

C signature

void efl_io_buffer_adopt_readonly(Eo *obj, const Eina_Slice slice);

Parameters

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

Implemented by

  • Efl.Io.Buffer.adopt_readonly