On Apr 26, 2009, at 9:46 pm, Charles Yeomans wrote:
On Apr 26, 2009, at 9:24 PM, Greg O'Lone wrote:
So I'm still trying to figure out how to connect to a library in
Linux and the .h file specifies the return value of some of these
methods as GSList. I've done some research, and it appears to be a
linked list, but does anyone have any hints on the best way to
implement it in RB?
A linked list of what? This is a solved problem, but only if you
let us in on the secret...
Sorry... I am trying to link to a library which controls the data
store of a BlueOnyx website hosting system (http://blueonyx.it).
Anyway, one of the declarations looks like this:
struct cce_props_struct {
/* Actually hold the key/vals here */
GHashTable *stable;
/* Linked list of all keys for iterating */
GSList *keys;
/* Pointer to the next value for iterating */
GSList *curr;
cce_props_state_t state;
GHashTable *changed;
};
Which looks like a dictionary to me, with a state and a flag that
indicates if it was changed recently. I was planning to implement
these as Structures, but I'm not sure how to deal with the GSList and
GHashTable types. Many of the functions defined in cce.h return a
GSList.
I'm assuming that GSList is just a convenient way of linking objects
in memory.
Anyway, the idea here is that Linux applications that I compile from
RB run very well on this platform (CentOS 5.3 Minimal install) and I'm
trying to add some features. I would be REALLY helpful to hook
directly into this data store, but I can do it using Perl if I must.
Greg
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|