Re: [p: what's the deal with string chunks?]
- From: "Nils O. Selåsdal" <noselasd frisurf no>
- To: gtk-list gnome org
- Subject: Re: [p: what's the deal with string chunks?]
- Date: Thu, 13 Mar 2003 15:50:13 +0000
On Friday 28 December 2001 2:02, Peter Jay Salzman wrote:
> i'm totally confused. i need a way of temporarily storing a bunch of
> strings. i was using a g_array, but that was getting pretty hairy.
> then i found GStringChunks. but:
>
> the glib reference shows how to:
>
> declare a GStringChunk
> add a GString to a GStringChunk
> free a GStringChunk
>
> the reference guide makes no mention of how to access the GStrings in
> the GString chunk.
>
> how does one access the GStrings that you put into a GStringChunk?
You get a pointer to it when you add it. You must save that pointer
if you'd like to use the string later.
a GStringChunk is not for accessing strings, its for storing them in
an efficient matter, and for the ease of destroying a group of
strings later..
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]