slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Advice on "complex" data type integration


> >  http://cvs.sourceforge.net/viewcvs.py/gpsbabel/gpsbabel/defs.h?view=markup
> >for struct waypoint,  I'd like to be able to write Slang fragments like:
> [...]
> 
> Have you considered using slirp <http://space.mit.edu/~mnoble/slirp/>
> to wrap the functions and data structures in this file?  It should

Thanx for the tip.  I'm still digesting it to see how that would
improve things.  

I was hoping to not actually expose the bits and the bytes of the
internal data structures out to the Slang side.  I have comparitively
little _code_ I want to expose, I'm mostly interested in data.

Another approach (which doesn't thrill me) that came to me after
struggling with this for a while was to just bring out acessors with
arguments of strings.

	linkylink = gb_get_wpt(wpt, "url");
	gb_set_wpt(wpt, "url", "http://"; + linkylink);


...and have the C code look up the data thingy being accessed and Do
The Right Thing.  That's not real nice from either the linguistic or
maintenance view on either the SLang side or the C side.

I'll continue trying to get my head around slirp.  Thanx.

RJL


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]