comparison Python/sysmodule.c @ 13977:eb9a36163a9e legacy-trunk

Guido pointed out that all names in the sys module have no underscore,
author Fred Drake <fdrake@acm.org>
date Tue, 15 Aug 2000 04:24:43 +0000
parents aa4202702252
children 128f641191c3
comparison
equal deleted inserted replaced
13976:5ada9fa54801 13977:eb9a36163a9e
459 Py_XDECREF(v); 459 Py_XDECREF(v);
460 { 460 {
461 /* Assumes that longs are at least 2 bytes long. 461 /* Assumes that longs are at least 2 bytes long.
462 Should be safe! */ 462 Should be safe! */
463 unsigned long number = 1; 463 unsigned long number = 1;
464 char *value;
464 465
465 s = (char *) &number; 466 s = (char *) &number;
466 if (s[0] == 0) 467 if (s[0] == 0)
467 PyDict_SetItemString(sysdict, "byte_order", 468 value = "big";
468 PyString_FromString("big"));
469 else 469 else
470 PyDict_SetItemString(sysdict, "byte_order", 470 value = "little";
471 PyString_FromString("little")); 471 PyDict_SetItemString(sysdict, "byteorder",
472 PyString_FromString(value));
472 } 473 }
473 #ifdef MS_COREDLL 474 #ifdef MS_COREDLL
474 PyDict_SetItemString(sysdict, "dllhandle", 475 PyDict_SetItemString(sysdict, "dllhandle",
475 v = PyLong_FromVoidPtr(PyWin_DLLhModule)); 476 v = PyLong_FromVoidPtr(PyWin_DLLhModule));
476 Py_XDECREF(v); 477 Py_XDECREF(v);