Method

IdeBufferdup_content

Declaration

GBytes*
ide_buffer_dup_content (
  IdeBuffer* self
)

Description

Gets the contents of the buffer as GBytes.

By using this function to get the bytes, you allow IdeBuffer to avoid calculating the buffer text unnecessarily, potentially saving on allocations.

Additionally, this allows the buffer to update the state in IdeUnsavedFiles if the content is out of sync.

Return value

Type: GBytes

A GBytes containing the buffer content.

The caller of the method takes ownership of the data, and is responsible for freeing it.