"Sigbjorn Finne (Intl Vendor)" wrote:
> That's almost right, try changing it to
> 
> typedef [string]char* str;
> void gtk_init ( [out]int* argc
>               , [out, size_is(*argc)]str** argv);
> 
> I've put up a new snapshot on the ftp site, but not added an URL
> to the home page since the changes have not been thoroughly tested
> yet. Have a go and see if it fixes your argv'ish troubles.

Hey, waddayaknow, this looks like it just might work. I haven't tried to
fully compile this into a real program yet to see if it truly works, but
from looking at the output of ihc, it looks like it should do the trick.

A couple of notes:
- I'm not sure if this is just because the code is in a development
state, but I was curious why "szof" is passed to readlist when the
readAddr function in "go" makes the implicit assumption that it is an
array of addresses.
- I was initially nervous about seeing freeString passed to both
freelist and unmarshalllist, but I then realized that the "free ptr"
statement in unmarshalllist is commented out. Still makes me a little
edgy seeing it there as a parameter, but not nervous.
 
> Gtk, eh? Cool.

Hopefully, it will be. This fix should solve all of the foreseeable
problems I have with using HDirect for GTK. (Except for callbacks, which
is an entirely separate issue.) If all goes well, you shouldn't hear
much more from me for a while.

Thanks,
        Michael Hobbs


FYI: This latest snapshot caused 4.01-compiled ihc to dump core when
compiling the above example. I reverted to 3.01 to compile ihc and then
it worked fine.

Reply via email to