Current Path : /usr/lib/python2.7/ctypes/ |
Current File : //usr/lib/python2.7/ctypes/_endian.pyc |
ó —|_c @ 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 1 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$ : 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