File: //usr/lib/python2.7/ctypes/_endian.pyc
ķ
, bc @ sŋ d d l Z d d l Te e Z d Z d e e f d YZ e j d k r{ d Z e Z
d e f d YZ n@ e j d
k r¯ d Z e Z d e f d
YZ
n e d d S( i˙˙˙˙N( t *c C sf t | t r t | t St | t r? t | j | j St | t rR | St
d | d S( sī Return the type with the 'other' byte order. Simple types like
c_int and so on already have __ctype_be__ and __ctype_le__
attributes which contain the types, for more complicated types
arrays and structures are supported.
s+ This type does not support other endian: %sN( t hasattrt
_OTHER_ENDIANt getattrt
isinstancet _array_typet
_other_endiant _type_t _length_t
issubclasst Structuret TypeError( t typ( ( s$ /usr/lib/python2.7/ctypes/_endian.pyR s
t
_swapped_metac B s e Z d Z RS( c C s | d k rg g } xI | D]A } | d } | d } | d } | j | t | f | q W| } n t t | j | | d S( Nt _fields_i i i ( t appendR t superR
t __setattr__( t selft attrnamet valuet fieldst desct nameR t rest( ( s$ /usr/lib/python2.7/ctypes/_endian.pyR s
! ( t __name__t
__module__R ( ( ( s$ /usr/lib/python2.7/ctypes/_endian.pyR
s t littlet __ctype_be__t BigEndianStructurec B s e Z d Z e Z d Z RS( s$ Structure with big endian byte orderN( R R t __doc__R
t
__metaclass__t Nonet _swappedbytes_( ( ( s$ /usr/lib/python2.7/ctypes/_endian.pyR . s t bigt __ctype_le__t LittleEndianStructurec B s e Z d Z e Z d Z RS( s' Structure with little endian byte orderN( R R R R
R R R! ( ( ( s$ /usr/lib/python2.7/ctypes/_endian.pyR$ 7 s s Invalid byteorder(
t syst ctypest typet ArrayR R R
R
t byteorderR R$ R t RuntimeError( ( ( s$ /usr/lib/python2.7/ctypes/_endian.pyt <module> s