[ctypes-commit] ctypes/ctypes/test test_byteswap.py,1.1.2.2.2.5,1.1.2.2.2.6
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2005-11-18 14:48:03
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21325 Modified Files: Tag: endian_branch test_byteswap.py Log Message: *** empty log message *** Index: test_byteswap.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_byteswap.py,v retrieving revision 1.1.2.2.2.5 retrieving revision 1.1.2.2.2.6 diff -C2 -d -r1.1.2.2.2.5 -r1.1.2.2.2.6 *** test_byteswap.py 18 Nov 2005 14:27:05 -0000 1.1.2.2.2.5 --- test_byteswap.py 18 Nov 2005 14:47:56 -0000 1.1.2.2.2.6 *************** *** 31,41 **** --- 31,50 ---- ("n8", c_int, 4)] + class X(Union): + _fields_ = [("nibbles", Nibbles), + ("int", c_uint)] + n = Nibbles(1, 2, 3, 4, 5, 6, 7, 8) + x = X() + x.nibbles = n + for name, typ, bits in Nibbles._fields_: print name, getattr(Nibbles, name) print "sys.byteorder:", sys.byteorder + print "int", hex(x.int) dump(n) + dump(x) sys.exit() |