[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g-io-add-watch, GIOFunc?
From: |
Andreas Rottmann |
Subject: |
Re: g-io-add-watch, GIOFunc? |
Date: |
Fri, 22 Oct 2004 12:42:13 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Jan Nieuwenhuizen <address@hidden> writes:
> Jan Nieuwenhuizen writes:
>
>> Duh. I keep falling for this same kind of error. I'll add a wrapper.
>
> This is harder than I thought. I made a patch that works reasonably,
> but it crashes here
>
> + scm_c_gtype_instance_to_scm ((GTypeInstance*) source),
>
> where it turns out that source is garbage... Note that this source
> should be a channel, which is created and called using
>
IIRC, the IO channels of GLib are not GTyped/GObjectized, so you
cannot use scm_c_gtype_instance_to_scm(). GIOChannels are wrapped as
WCT/WCP, so you'll have to use gw_wcp_assimilate_ptr(), e.g.:
gw_wcp_assimilate_ptr (source,
SCM_VARIABLE_REF (scm_c_lookup ("<gio-channel*>")));
> Could this be related to not using (make <g-io-channel>) ?
>
No, there isn't even a <g-io-channel> class.
> And if so, it seems I really need channel-new-file.
>
> There is something I do not understand, why are some GIOChannel
> related C functions wrapped as GIOChannel methods, and others as
> functions?
>
Something probably causes the h2def scanner to emit "inconsistent"
declarations; dunno why exactly.
Regards, Andy
--
Andreas Rottmann | address@hidden | address@hidden | address@hidden
http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
Software Patents: Where do you want to stifle inovation today?