From xemacs-m  Mon Jul 21 15:18:33 1997
Received: from newman.aventail.com (root@newman.aventail.com [199.238.236.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id PAA05699
	for <xemacs-beta@xemacs.org>; Mon, 21 Jul 1997 15:18:32 -0500 (CDT)
Received: from kramer.in.aventail.com (wmperry@kramer.in.aventail.com [192.168.1.12])
	by newman.aventail.com (8.8.5/8.8.5) with ESMTP id NAA26731
	for <xemacs-beta@xemacs.org>; Mon, 21 Jul 1997 13:18:28 -0700 (PDT)
Received: (from wmperry@localhost)
	by kramer.in.aventail.com (8.8.5/8.8.5) id NAA25356;
	Mon, 21 Jul 1997 13:18:14 -0700
To: xemacs-beta@xemacs.org
Subject: Re: Logic flaw in put-database (Hegbloom crash)
References: <m2en8s5hlg.fsf@altair.xemacs.org>
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;
From: wmperry@aventail.com (William M. Perry)
Date: 21 Jul 1997 13:18:13 -0700
In-Reply-To: SL Baur's message of "21 Jul 1997 12:29:47 -0700"
Message-ID: <86en8syxa2.fsf@kramer.in.aventail.com>
Lines: 23
X-Mailer: Gnus v5.4.59/Emacs 19.34

SL Baur <steve@xemacs.org> writes:

> $ xemacs -q -no-site-file
> (progn
>   (setq db (open-database "/tmp/data.db" 'berkeley-db 'hash "rw+" 0664))
>   (put-database "One" '(a b c d) db))
>                       ^^^^^^^^^^
> 
> The function berkdb_put is expecting to be passed strings for key and
> val.  Val is passed straight through from Fput_database.  It probably
> shouldn't drop core if someone is uncouth enough to pass it something
> other than a string.  It should either convert a non-string value to
> string with prin1-to-string, or signal a wrong-type-argument.  I'm not
> sure which.  William, Martin?

  I originally had it calling prin1-to-string and then doing a 'read' on
whatever you get back from the db backend.  The problem is if you have a
generic interface like this, will people expect to be able to do a
(put-database "Abc" (make-face 'blah) db)?

  I think we should just put some STRINGP checks in there.

-Bill P.

