Update of /cvsroot/ctypes/ctypes/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv590
Modified Files:
Tag: branch_1_0
stgdict.c
Log Message:
Implement BigEndianStructure and LittleEndianStructure.
Index: stgdict.c
===================================================================
RCS file: /cvsroot/ctypes/ctypes/source/stgdict.c,v
retrieving revision 1.32.2.3
retrieving revision 1.32.2.4
diff -C2 -d -r1.32.2.3 -r1.32.2.4
*** stgdict.c 11 Nov 2005 08:10:26 -0000 1.32.2.3
--- stgdict.c 30 Nov 2005 09:34:21 -0000 1.32.2.4
***************
*** 195,201 ****
#ifdef IS_BIG_ENDIAN
! big_endian = 1;
#else
! big_endian = 0;
#endif
--- 195,201 ----
#ifdef IS_BIG_ENDIAN
! big_endian = PyObject_HasAttrString(type, "_swappedbytes_") ? 0 : 1;
#else
! big_endian = PyObject_HasAttrString(type, "_swappedbytes_") ? 1 : 0;
#endif
|