* mapping.scm and hashx-remove!
@ 2003-09-20 23:23 Kevin Ryde
2003-10-07 17:38 ` Marius Vollmer
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2003-09-20 23:23 UTC (permalink / raw)
In ice-9/mapping.scm line 97, hash-table-mapping-hooks has a call
(hashx-get-handle hash-proc assoc-proc delete-proc table key)
which is the wrong number of arguments for that function.
Just from looking at it, I wonder if it's meant to be hashx-remove!
instead of hashx-get-handle.
Except there's no hashx-remove! defined. scm_hashx_remove_x exists,
but it's not given a scheme level binding.
Looks like scm_hashx_remove_x might be missing "&closure" for
scm_hash_fn_remove_x too, though again that's only from looking at it.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mapping.scm and hashx-remove!
2003-09-20 23:23 mapping.scm and hashx-remove! Kevin Ryde
@ 2003-10-07 17:38 ` Marius Vollmer
2003-10-08 21:16 ` Kevin Ryde
0 siblings, 1 reply; 3+ messages in thread
From: Marius Vollmer @ 2003-10-07 17:38 UTC (permalink / raw)
Kevin Ryde <user42@zip.com.au> writes:
> In ice-9/mapping.scm line 97, hash-table-mapping-hooks has a call
>
> (hashx-get-handle hash-proc assoc-proc delete-proc table key)
>
> which is the wrong number of arguments for that function.
>
> Just from looking at it, I wonder if it's meant to be hashx-remove!
> instead of hashx-get-handle.
>
> Except there's no hashx-remove! defined. scm_hashx_remove_x exists,
> but it's not given a scheme level binding.
>
> Looks like scm_hashx_remove_x might be missing "&closure" for
> scm_hash_fn_remove_x too, though again that's only from looking at it.
Right. Can you write a test case for this and fix it? That would be
great!
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mapping.scm and hashx-remove!
2003-10-07 17:38 ` Marius Vollmer
@ 2003-10-08 21:16 ` Kevin Ryde
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2003-10-08 21:16 UTC (permalink / raw)
Cc: guile-devel
Marius Vollmer <mvo@zagadka.de> writes:
>
> Right. Can you write a test case for this and fix it? That would be
> great!
I added some words to the todo file instead. The functions taken by
hashx_remove seem sub-optimal.
- hashx-remove!, corresponding to other hash*-remove! functions.
scm_hashx_remove_x exists, but has never been documented, and
might be non-functional (looks like it's missing "&closure" in the
scm_hash_fn_remove_x call).
Might want to think about the procedures taken. Separate assoc
and delete! suit existing such functions, but it's wasteful to
traverse a bucket list once to see if an element exists, then
again to delete it. Think about maybe a function returning both a
modified list and a flag indicating whether a delete was done. Or
maybe just returning the list tail of the target element.
- mapping.scm hash-table-mapping-hooks uses hashx-create-handle,
which doesn't exist. Probably a typo for hashx-create-handle!,
just wants to get a little test program to exercise it.
- mapping.scm hash-table-mapping-hooks uses hashx-get-handle in its
constructed delete-proc, which is probably meant to be
hashx-remove!, if/when such a function exists.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-10-08 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-20 23:23 mapping.scm and hashx-remove! Kevin Ryde
2003-10-07 17:38 ` Marius Vollmer
2003-10-08 21:16 ` Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).