Qf6 ddlZddlmZddlmZddlZej edgdZGdde Z Gd d e Z d Z Gd d Z GddZy)N)BytesIOwraps) )remove)ErrorPackerUnpackerConversionErrorc eZdZ dZdZdZy)r c||_yN)msg)selfrs -/opt/alt/python312/lib64/python3.12/xdrlib.py__init__zError.__init__s c,t|jSr)reprrrs r__repr__zError.__repr__sDHH~rc,t|jSr)strrrs r__str__z Error.__str__s488}rN)__name__ __module__ __qualname__rrrrrr r srr c eZdZy)r N)rrrrrrr r #srr c0 tfd}|S)Nc ||S#tj$r}t|jddd}~wwxYwNr)structerrorr args)rvalueefunctions rresultz&raise_conversion_error..result)s> 7D%( (|| 7!!&&),$ 6 7s =8=r)r)r*s` rraise_conversion_errorr+&s#? 8_77 MrceZdZ dZdZdZeZedZedZ e Z dZ dZ e Z edZed Zd ZeZd ZeZeZd Zd ZdZy)r c$|jyrresetrs rrzPacker.__init__5s  rc"t|_yr)r _Packer__bufrs rr/z Packer.reset8s Y rc6|jjSr)r1getvaluers r get_bufferzPacker.get_buffer;szz""$$rcb|jjtjd|y)N>Lr1writer$packrxs r pack_uintzPacker.pack_uint@ T1-.rcb|jjtjd|y)N>lr7r:s rpack_intzPacker.pack_intDr=rcv|r|jjdy|jjdy)Nss)r1r8r:s r pack_boolzPacker.pack_boolJs( djj{+jj{+rcF |j|dz dz |j|dzy#ttjf$r}t |j ddd}~wwxYw#ttjf$r}t |j ddd}~wwxYw)N lr)r< TypeErrorr$r%r r&)rr;r(s r pack_uhyperzPacker.pack_uhyperNs 7 NN1b5:- . 7 NN1z> *6<<( 7!!&&),$ 6 76<<( 7!!&&),$ 6 7s,/A)A&A!!A&)B BB cb|jjtjd|y)N>fr7r:s r pack_floatzPacker.pack_floatZr=rcb|jjtjd|y)N>dr7r:s r pack_doublezPacker.pack_double^r=rc|dkr td|d|}|dzdzdz}||t|z dzz}|jj|y)Nr fstring size must be nonnegativer) ValueErrorlenr1r8)rnsdatas r pack_fstringzPacker.pack_fstringbsZ q5?@ @!ucAXqLq3t9}-- rc`t|}|j||j||yr)rRr<rV)rrTrSs r pack_stringzPacker.pack_stringls' F q !Qrcf|D]}|jd|||jdy)Nr)r<)rlist pack_itemitems r pack_listzPacker.pack_listts-D NN1  dO qrcTt||k7r td|D] }|| y)Nzwrong array size)rRrQ)rrSr[r\r]s r pack_farrayzPacker.pack_farrayzs* t9>/0 0D dOrcbt|}|j||j|||yr)rRr<r`)rr[r\rSs r pack_arrayzPacker.pack_arrays) I q D),rN)rrrrr/r4get_bufr+r<r@ pack_enumrBrF pack_hyperrIrLrV pack_fopaquerX pack_opaque pack_bytesr^r`rbrrrr r 2s:%G////I,7J//// L KJ  -rr ceZdZ dZdZdZdZdZdZdZ dZ e Z d Z d Z d Zd Zd ZdZeZdZeZeZdZdZdZy)r c&|j|yrr.rrUs rrzUnpacker.__init__s 4rc ||_d|_yr#)_Unpacker__buf_Unpacker__posrks rr/zUnpacker.resets  rc|jSrrnrs r get_positionzUnpacker.get_position zzrc||_yrrp)rpositions r set_positionzUnpacker.set_positions  rc|jSr)rmrs rr4zUnpacker.get_bufferrrrc^|jt|jkr tdy)Nzunextracted data remains)rnrRrmr rs rdonez Unpacker.dones' ::DJJ '23 3 (rc|j}|dzx|_}|j||}t|dkrtt j d|dS)NrOr6rrnrmrREOFErrorr$unpackrijrUs r unpack_uintzUnpacker.unpack_uintP JJ1 Qzz!A t9q=N}}T4(++rc|j}|dzx|_}|j||}t|dkrtt j d|dS)NrOr?rrzr}s r unpack_intzUnpacker.unpack_intrrc4t|jSr)boolrrs r unpack_boolzUnpacker.unpack_boolsDOO%&&rcd|j}|j}t|dz|zS)NrD)rint)rhilos r unpack_uhyperzUnpacker.unpack_uhypers1        2w{Rrc:|j}|dk\r|dz }|S)Nll)rr:s r unpack_hyperzUnpacker.unpack_hypers)     " "''Arc|j}|dzx|_}|j||}t|dkrtt j d|dS)NrOrHrrzr}s r unpack_floatzUnpacker.unpack_floatrrc|j}|dzx|_}|j||}t|dkrtt j d|dS)NrKrrzr}s r unpack_doublezUnpacker.unpack_doublerrc|dkr td|j}||dzdzdzz}|t|jkDrt||_|j|||zS)NrrNrrO)rQrnrRrmr{)rrSr~rs runpack_fstringzUnpacker.unpack_fstringsd q5?@ @ JJ 1q N s4:: N zz!AaC  rcD|j}|j|Sr)rr)rrSs r unpack_stringzUnpacker.unpack_strings!    ""1%%rcg}|jx}dk7rA|dk7rtd||}|j||jx}dk7rA|S)NrrZz0 or 1 expected, got )rr append)r unpack_itemr[r;r]s r unpack_listzUnpacker.unpack_listsd$$&&q1,Av%1&FGG=D KK  $$&&q1,  rcVg}t|D]}|j||Sr)ranger)rrSrr[r~s r unpack_farrayzUnpacker.unpack_farrays(qA KK & rcF|j}|j||Sr)rr)rrrSs r unpack_arrayzUnpacker.unpack_arrays#    !!![11rN)rrrrr/rqrur4rxrr unpack_enumrrrrrrunpack_fopaquer unpack_opaque unpack_bytesrrrrrrr r syE4,,K'  ,,!$N&"M L 2rr )r$ior functoolsrwarnings _deprecatedr__all__ Exceptionr r r+r r rrrrse Xg. <I$ e  Q-Q-jk2k2r