From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.bugs Subject: Re: (apply make-vector '(1 2 3)) Date: Tue, 03 Oct 2006 06:08:51 +1000 Message-ID: <87k63ilbu4.fsf@zip.com.au> References: <87fyez8g9u.fsf@zagadka.de> <87odtn18z9.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1159821979 19773 80.91.229.2 (2 Oct 2006 20:46:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Oct 2006 20:46:19 +0000 (UTC) Cc: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Oct 02 22:46:16 2006 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GUUg0-0003dZ-Is for guile-bugs@m.gmane.org; Mon, 02 Oct 2006 22:46:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GUUg0-00086f-5h for guile-bugs@m.gmane.org; Mon, 02 Oct 2006 16:46:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GUUfw-00083b-TR for bug-guile@gnu.org; Mon, 02 Oct 2006 16:46:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GUUfw-00081f-5m for bug-guile@gnu.org; Mon, 02 Oct 2006 16:46:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GUUfw-00081G-0D for bug-guile@gnu.org; Mon, 02 Oct 2006 16:46:08 -0400 Original-Received: from [61.8.2.212] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GUUCH-0000Uw-ER for bug-guile@gnu.org; Mon, 02 Oct 2006 16:15:29 -0400 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id BE07F5AFE7A; Tue, 3 Oct 2006 06:09:10 +1000 (EST) Original-Received: from localhost (ppp2C08.dyn.pacific.net.au [61.8.44.8]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id k92K98kk008687; Tue, 3 Oct 2006 06:09:09 +1000 Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1GUU5r-0001fa-QK; Tue, 03 Oct 2006 06:08:51 +1000 Original-To: Marius Vollmer User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3360 Archived-At: --=-=-= The case of no args was also not caught (passed through to the 2o func). I made this change, * eval.c (SCM_APPLY): For scm_tc7_subr_2o, throw wrong-num-args on 0 arguments or 3 or more arguments. Previously 0 called proc with SCM_UNDEFINED, and 3 or more silently used just the first 2. --=-=-= Content-Disposition: attachment; filename=eval.c.apply_2o.diff --- eval.c.~1.405.2.5.~ 2006-07-21 10:22:22.000000000 +1000 +++ eval.c 2006-10-02 12:18:26.000000000 +1000 @@ -4849,7 +4849,16 @@ switch (SCM_TYP7 (proc)) { case scm_tc7_subr_2o: - args = scm_is_null (args) ? SCM_UNDEFINED : SCM_CAR (args); + if (SCM_UNBNDP (arg1)) + scm_wrong_num_args (proc); + if (scm_is_null (args)) + args = SCM_UNDEFINED; + else + { + if (! scm_is_null (SCM_CDR (args))) + scm_wrong_num_args (proc); + args = SCM_CAR (args); + } RETURN (SCM_SUBRF (proc) (arg1, args)); case scm_tc7_subr_2: if (scm_is_null (args) || !scm_is_null (SCM_CDR (args))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile --=-=-=--