Potential g-wrap bug?

Derek Atkins warlord@MIT.EDU
10 Jun 2002 15:54:36 -0400


Rob Browning <rlb@defaultvalue.org> writes:

> Yeah.  I don't think I originally expected people to use ().  I hadn't
> really thought about passing in #f, but I could see it either of the
> following ways:
> 
>   (1) Allowing #f is less appropriate (and certainly less schemey)
>       than requiring (), so we shouldn't.
> 
>   (2) People already use #f all over the place for NULL on the scheme
>       side, so it's natural to expect #f to work here for what
>       (underneath) is really a GList*.
> 
> I lean toward (1), though it should probably be fixed to not segfault.

I don't particularly care if '#f' is considered an error or not (part
of me would like to consider "#f" and "'()" equivalent here, but
obviously they are not).  In either case it should at least not
segfault when passed #f.  ;)

> Right now it traverses the input list building the output list, but
> destroys the accumulated output list if anything goes wrong.  I think
> the "goes wrong" checking just needs a little fixing.

Any chance that, while you're at it fixing the GList bug you could
also supply a g-wraped "gslist-of" as well?  I've got a lot of code
that uses GSList and I'd rather not convert it all the GList when it
really is a singly-linked list.  I also don't want to be passing
GLists into functions expecting GSLists.

Thanks!

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available