Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 107b967 commit 099325eCopy full SHA for 099325e
1 file changed
Python/sysmodule.c
@@ -456,6 +456,19 @@ _PySys_Init(void)
456
PyDict_SetItemString(sysdict, "builtin_module_names",
457
v = list_builtin_module_names());
458
Py_XDECREF(v);
459
+ {
460
+ /* Assumes that longs are at least 2 bytes long.
461
+ Should be safe! */
462
+ unsigned long number = 1;
463
+
464
+ s = (char *) &number;
465
+ if (s[0] == 0)
466
+ PyDict_SetItemString(sysdict, "byte_order",
467
+ PyString_FromString("big"));
468
+ else
469
470
+ PyString_FromString("little"));
471
+ }
472
#ifdef MS_COREDLL
473
PyDict_SetItemString(sysdict, "dllhandle",
474
v = PyLong_FromVoidPtr(PyWin_DLLhModule));
0 commit comments