Kaydet (Commit) a2b6ad6e authored tarafından Fred Drake's avatar Fred Drake

Guido pointed out that all names in the sys module have no underscore,

üst 39dce293
...@@ -20,7 +20,7 @@ It is always available. ...@@ -20,7 +20,7 @@ It is always available.
\code{argv} has zero length. \code{argv} has zero length.
\end{datadesc} \end{datadesc}
\begin{datadesc}{byte_order} \begin{datadesc}{byteorder}
An indicator of the native byte order. This will have the value An indicator of the native byte order. This will have the value
\code{'big'} on big-endian (most-signigicant byte first) platforms, \code{'big'} on big-endian (most-signigicant byte first) platforms,
and \code{'little'} on little-endian (least-significant byte first) and \code{'little'} on little-endian (least-significant byte first)
......
...@@ -461,14 +461,15 @@ _PySys_Init(void) ...@@ -461,14 +461,15 @@ _PySys_Init(void)
/* Assumes that longs are at least 2 bytes long. /* Assumes that longs are at least 2 bytes long.
Should be safe! */ Should be safe! */
unsigned long number = 1; unsigned long number = 1;
char *value;
s = (char *) &number; s = (char *) &number;
if (s[0] == 0) if (s[0] == 0)
PyDict_SetItemString(sysdict, "byte_order", value = "big";
PyString_FromString("big"));
else else
PyDict_SetItemString(sysdict, "byte_order", value = "little";
PyString_FromString("little")); PyDict_SetItemString(sysdict, "byteorder",
PyString_FromString(value));
} }
#ifdef MS_COREDLL #ifdef MS_COREDLL
PyDict_SetItemString(sysdict, "dllhandle", PyDict_SetItemString(sysdict, "dllhandle",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment