�`^c@s�dZddlZddlZejZdd�Zdejfd��YZdejfd��YZd ej fd
��YZ dej
fd��YZ
d
�ZdS(s
Python 'utf-32' Codec
i�NtstrictcCstj||t�S(N(tcodecst
utf_32_decodetTrue(tinputterrors((s&/sys/lib/python2.7/encodings/utf_32.pytdecode
stIncrementalEncodercBs;eZdd�Zed�Zd�Zd�Zd�ZRS(RcCs tjj||�d|_dS(N(RRt__init__tNonetencoder(tselfR((s&/sys/lib/python2.7/encodings/utf_32.pyRscCsm|jdkrVtj||j�d}tjdkrFtj|_ntj|_|S|j||j�dS(Nitlittle( R
R Rt
utf_32_encodeRtsyst byteordertutf_32_le_encodetutf_32_be_encode(RRtfinaltresult((s&/sys/lib/python2.7/encodings/utf_32.pytencodescCstjj|�d|_dS(N(RRtresetR R
(R((s&/sys/lib/python2.7/encodings/utf_32.pyRscCs|jdkrdSdS(Nii(R
R (R((s&/sys/lib/python2.7/encodings/utf_32.pytgetstate scCs@|rd|_n*tjdkr0tj|_ntj|_dS(NR(R R
RRRRR(Rtstate((s&/sys/lib/python2.7/encodings/utf_32.pytsetstate's
(t__name__t
__module__RtFalseRRRR(((s&/sys/lib/python2.7/encodings/utf_32.pyR
s
tIncrementalDecodercBs8eZdd�Zd�Zd�Zd�Zd�ZRS(RcCs tjj||�d|_dS(N(RtBufferedIncrementalDecoderRR tdecoder(RR((s&/sys/lib/python2.7/encodings/utf_32.pyR1scCs�|jdkr�tj||d|�\}}}|dkrKtj|_n6|dkrftj|_n|dkr�td��n||fS|j||j|�S(Nii�iis%UTF-32 stream does not start with BOM(RR Rtutf_32_ex_decodetutf_32_le_decodetutf_32_be_decodetUnicodeErrorR(RRRRtoutputtconsumedR((s&/sys/lib/python2.7/encodings/utf_32.pyt_buffer_decode5s!
cCstjj|�d|_dS(N(RRRR R(R((s&/sys/lib/python2.7/encodings/utf_32.pyRBscCs`tjj|�d}|jdkr/|dfSttjdk|jtjkk�}||fS(Niitbig( RRRRR tintRRR!(RRtaddstate((s&/sys/lib/python2.7/encodings/utf_32.pyRFs
cCs�tjj||�|d}|dkrPtjdkrAtjntj|_n<|dkr�tjdkrttjntj|_n d|_dS(NiiR&( RRRRRR!R RR (RR((s&/sys/lib/python2.7/encodings/utf_32.pyRTs
(RRRR%RRR(((s&/sys/lib/python2.7/encodings/utf_32.pyR0s
tStreamWritercBs)eZdd�Zd�Zdd�ZRS(RcCs#d|_tjj|||�dS(N(R R
RR)R(RtstreamR((s&/sys/lib/python2.7/encodings/utf_32.pyRds cCstjj|�d|_dS(N(RR)RR R
(R((s&/sys/lib/python2.7/encodings/utf_32.pyRhscCsc|jdkrOtj||�}tjdkr?tj|_ntj|_|S|j||�SdS(NR(R
R RR
RRRR(RRRR((s&/sys/lib/python2.7/encodings/utf_32.pyRls(RRRRR(((s&/sys/lib/python2.7/encodings/utf_32.pyR)cs tStreamReadercBseZd�Zdd�ZRS(cCs2tjj|�y
|`Wntk
r-nXdS(N(RR+RRtAttributeError(R((s&/sys/lib/python2.7/encodings/utf_32.pyRys
RcCsytj||dt�\}}}|dkr<tj|_n3|dkrWtj|_n|dkrotd�n||fS(Nii�iis%UTF-32 stream does not start with BOM(RRRR RR!R"(RRRtobjectR$R((s&/sys/lib/python2.7/encodings/utf_32.pyR�s!(RRRR(((s&/sys/lib/python2.7/encodings/utf_32.pyR+ws cCs4tjdddtdtdtdtdtdt�S( Ntnamesutf-32RRtincrementalencodertincrementaldecodertstreamreadertstreamwriter(Rt CodecInfoRRRRR+R)(((s&/sys/lib/python2.7/encodings/utf_32.pytgetregentry�s (t__doc__RRR
RRRRRR)R+R4(((s&/sys/lib/python2.7/encodings/utf_32.pyt<module>s #3
|