]> granicus.if.org Git - python/commitdiff
Guido pointed out that all names in the sys module have no underscore,
authorFred Drake <fdrake@acm.org>
Tue, 15 Aug 2000 04:24:43 +0000 (04:24 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 15 Aug 2000 04:24:43 +0000 (04:24 +0000)
Doc/lib/libsys.tex
Python/sysmodule.c

index 5cc833d12af59ff88badb5d9fc55010bf2cd3dec..bbea623a57ba175353b895dfe406d6c6abf4b839 100644 (file)
@@ -20,7 +20,7 @@ It is always available.
   \code{argv} has zero length.
 \end{datadesc}
 
-\begin{datadesc}{byte_order}
+\begin{datadesc}{byteorder}
   An indicator of the native byte order.  This will have the value
   \code{'big'} on big-endian (most-signigicant byte first) platforms,
   and \code{'little'} on little-endian (least-significant byte first)
index 99a6ff76e41207a43b5901be33185b701ad9e8a6..3026b66d1fb75ebcef459176672b3034608ad595 100644 (file)
@@ -461,14 +461,15 @@ _PySys_Init(void)
                /* Assumes that longs are at least 2 bytes long.
                   Should be safe! */
                unsigned long number = 1;
+               char *value;
 
                s = (char *) &number;
                if (s[0] == 0)
-                       PyDict_SetItemString(sysdict, "byte_order",
-                                            PyString_FromString("big"));
+                       value = "big";
                else
-                       PyDict_SetItemString(sysdict, "byte_order",
-                                            PyString_FromString("little"));
+                       value = "little";
+               PyDict_SetItemString(sysdict, "byteorder",
+                                    PyString_FromString(value));
        }
 #ifdef MS_COREDLL
        PyDict_SetItemString(sysdict, "dllhandle",