realbasic-nug
[Top] [All Lists]

Re: C Conversion question

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: C Conversion question
From: "Greg O'Lone" <rbnuglist@stretchedout.com>
Date: Sun, 26 Apr 2009 23:14:22 -0400
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <D33A638D-8250-4F37-8FE0-EC64586D0890@declareSub.com>
References: <32997385-3B9F-4740-A7E7-15E5A76207E1@stretchedout.com> <D33A638D-8250-4F37-8FE0-EC64586D0890@declareSub.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com


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>


<Prev in Thread] Current Thread [Next in Thread>