From 099325e01b9c244bdaf96e072829195243caced9 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 14 Aug 2000 15:47:03 +0000 Subject: Add a byte_order value to the sys module. The value is "big" for big-endian machines and "little" for little-endian machines. --- Python/sysmodule.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 8883ba1..2ae6d20 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -456,6 +456,19 @@ _PySys_Init(void) PyDict_SetItemString(sysdict, "builtin_module_names", v = list_builtin_module_names()); Py_XDECREF(v); + { + /* Assumes that longs are at least 2 bytes long. + Should be safe! */ + unsigned long number = 1; + + s = (char *) &number; + if (s[0] == 0) + PyDict_SetItemString(sysdict, "byte_order", + PyString_FromString("big")); + else + PyDict_SetItemString(sysdict, "byte_order", + PyString_FromString("little")); + } #ifdef MS_COREDLL PyDict_SetItemString(sysdict, "dllhandle", v = PyLong_FromVoidPtr(PyWin_DLLhModule)); -- cgit v0.12 t' action=''> Qt s a cross-platform application framework that is used for developing application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while still being a native application with native capabilities and speed.
summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-07-29 07:26:08 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-07-29 07:26:08 (GMT)
commita7cc30b30df53d6a70208c25f6c12a9f229b3ea6 (patch)
tree7764192081a6f36113bc7c2f32419fa36ed7013b /src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h
parentfb7d86cf23227302d48db279ec589221d11a1f6a (diff)
parent3b00ee50810206a20a5bb1b06e1dfaf593aae7ed (diff)
downloadQt-a7cc30b30df53d6a70208c25f6c12a9f229b3ea6.zip
Qt-a7cc30b30df53d6a70208c25f6c12a9f229b3ea6.tar.gz
Qt-a7cc30b30df53d6a70208c25f6c12a9f229b3ea6.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt