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: Uniform vector lengths -- how long? Date: Thu, 22 Jul 2004 11:20:32 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87iscgu9b3.fsf@zip.com.au> References: <878yeieyhp.fsf@trouble.defaultvalue.org> <87vfhlstec.fsf@zip.com.au> <87wu21cvyz.fsf@trouble.defaultvalue.org> <87zn68ithm.fsf@zip.com.au> <87isctl122.fsf@trouble.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090459281 30745 80.91.224.253 (22 Jul 2004 01:21:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Jul 2004 01:21:21 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jul 22 03:21:08 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BnSGi-0006vd-00 for ; Thu, 22 Jul 2004 03:21:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BnSJW-0002UN-4T for guile-devel@m.gmane.org; Wed, 21 Jul 2004 21:24:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BnSJP-0002Tw-PN for guile-devel@gnu.org; Wed, 21 Jul 2004 21:23:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BnSJN-0002TZ-Vg for guile-devel@gnu.org; Wed, 21 Jul 2004 21:23:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BnSJN-0002TP-RY for guile-devel@gnu.org; Wed, 21 Jul 2004 21:23:53 -0400 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BnSGL-0003YL-7f for guile-devel@gnu.org; Wed, 21 Jul 2004 21:20:45 -0400 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 i6M1Kdje011727; Thu, 22 Jul 2004 11:20:39 +1000 Original-Received: from localhost (ppp21AC.dyn.pacific.net.au [61.8.33.172]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i6M1Kban025546; Thu, 22 Jul 2004 11:20:38 +1000 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1BnSG8-0001Ey-00; Thu, 22 Jul 2004 11:20:32 +1000 Original-To: Rob Browning Mail-Copies-To: never User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 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:3876 Rob Browning writes: > > SIZE_MAX being defined I think, but don't quote me, that limits.h and SIZE_MAX are ANSI C, and guile already demands that. > if (len > ((size_t) SIZE_MAX / uvec_sizes[type])) ... Since uvec_sizes are all powers of 2, perhaps change to a uvec_shift[type] array and use a shift instead of a division. Ditto shift instead of multiply for the len -> bytes. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel