Hi all, I've designed a sparse array libary re-using glib's array for one a project I'm working on. This is working quite well so I thought I'd publish this for others to re-use this toolkit. The patch attached is to be applied to glib: "zcat 20030930_glib_gsparray.patch.gz | patch -p1". This patch was generated from glib-2.2.3's sources. The modifications have been done on glib/garray.c and glib/garray.h, and are adding a new GSPArray struct as well as GArray-like functions to handle creation/modifications/deletion of a GSPArray as well as conversion from and to a GArray. The interface to GSPArrays is very similar to GArray to allow porting from one to the other. I've also modified tests/testglib.c to include tests concerning the behaviour of the GSPArray-related functions. If someone thinks this can be added to glib's release, I'll write the documentation for the GSPArray interface as well. If anyone finds a bug, please let me know! Lionel
Attachment:
20030930_glib_gsparray.patch.gz
Description: GNU Zip compressed data