From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: Forwarded patch for modular exponentiation support (GMP powm) Date: Mon, 16 Feb 2004 08:08:16 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87bro00ze7.fsf@zip.com.au> References: <87k73cng30.fsf@raven.i.defaultvalue.org> <874qtzsv3c.fsf@zip.com.au> <87llnah2hf.fsf@offby1.atm01.sea.blarg.net> <87hdxyctsa.fsf@zip.com.au> <87ad3qm76l.fsf@offby1.atm01.sea.blarg.net> <87vfmdfaga.fsf@zip.com.au> <87lln8lwue.fsf@offby1.atm01.sea.blarg.net> <87isiao6ee.fsf@zip.com.au> <87r7wxjjhg.fsf@offby1.atm01.sea.blarg.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076883037 13013 80.91.224.253 (15 Feb 2004 22:10:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2004 22:10:37 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Feb 15 23:10:22 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsUT0-0002iB-00 for ; Sun, 15 Feb 2004 23:10:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsURz-0004qR-19 for guile-devel@m.gmane.org; Sun, 15 Feb 2004 17:09:19 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AsURi-0004nl-Gs for guile-devel@gnu.org; Sun, 15 Feb 2004 17:09:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsURC-0003ry-Kr for guile-devel@gnu.org; Sun, 15 Feb 2004 17:09:01 -0500 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsURB-0003ja-1q for guile-devel@gnu.org; Sun, 15 Feb 2004 17:08:29 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i1FM8M5O011773; Mon, 16 Feb 2004 09:08:22 +1100 Original-Received: from localhost (ppp183.dyn10.pacific.net.au [61.8.10.183]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i1FM8K0H031447; Mon, 16 Feb 2004 09:08:21 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1AsUQy-0000Pf-00; Mon, 16 Feb 2004 08:08:16 +1000 Original-To: Eric Hanchrow Mail-Copies-To: never User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3380 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3380 Eric Hanchrow writes: > > + if (!coerce_to_big (k, k_tmp)) > + { > + position_of_wrong_type = 2; > + goto cleanup; I'd be inclined to put the necessary clears inline there, if (! coerce_and_init (k, k_tmp)) { mpz_clear (n_tmp); SCM_WRONG_TYPE_ARG (SCM_ARG2, k); } if (! coerce_and_init (m, m_tmp)) { mpz_clear (n_tmp); mpz_clear (k_tmp); SCM_WRONG_TYPE_ARG (SCM_ARG3, m); } Which seems a bit cleaner to me than setting flags. Or maybe it's just my prejudices against the sort of idiocies with flags that I remember advocated in Pascal texts. :-) _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel