Fwd: Re: Why GtkTextIter doesn't provide a function to return its byte index? How to retrieve it?
- From: Lex Trotman <elextr gmail com>
- To: gtk-list <gtk-list gnome org>
- Subject: Fwd: Re: Why GtkTextIter doesn't provide a function to return its byte index? How to retrieve it?
- Date: Thu, 11 Aug 2011 12:58:34 +1000
On 11 August 2011 12:30, Gang Chen <gang chen cn gmail com> wrote:
> g_utf8_offset_to_pointer scans the buffer. Too expensive. This is why
> I ask why the text iterator doesn't cache the byte index.
I guess since a gtk_text_buffer is a b-tree of lines the byte offset
from the beginning is not very useful. The iterator never needs the
byte offset, so it never has it to cache.
Cheers
Lex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]