unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* num2int mpz_import word order
@ 2004-02-14 22:30 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2004-02-14 22:30 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

        * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
        order parameter to mpz_import, in fact with just one word there's no
        order to worry about at all.


[-- Attachment #2: num2integral.i.c.word-order.diff --]
[-- Type: text/plain, Size: 744 bytes --]

--- num2integral.i.c.~1.20.~	2003-05-24 09:22:52.000000000 +1000
+++ num2integral.i.c	2004-02-14 13:23:30.000000000 +1000
@@ -204,15 +204,11 @@
 #endif
 
       mpz_import (SCM_I_BIG_MPZ (result),
-                  1,
-#ifdef WORDS_BIGENDIAN
-                  1,
-#else
-                  -1,
-#endif
-                  SIZEOF_ITYPE,
-                  0,
-                  0,
+                  1,            /* one word */
+                  1,            /* word order irrelevant when just one word */
+                  SIZEOF_ITYPE, /* word size */
+                  0,            /* native endianness within word */
+                  0,            /* no nails */
                   &n);
 
       /* mpz_import doesn't handle sign */

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-14 22:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-14 22:30 num2int mpz_import word order 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).