ó ^ bc@sÒddlZddlZddlZddlmZmZddlmZmZdddddd gZ i ej d 6ej d 6ej d 6ej d 6ejd6ejd6ejd6ejd6ejd6ejd6ejd6Zyejed Returns a ctypes object allocated from shared memory i(ttypecode_to_typetgetRRtmemsett addressofRt__init__(ttypecode_or_typetargsRtobj((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyRGs  % cCs—tj||ƒ}t|ttfƒrf||}t|ƒ}tjtj|ƒdtj |ƒƒ|S|t |ƒ}t|ƒ}|j |Œ|SdS(s= Returns a ctypes array allocated from shared memory iN( RR t isinstancetinttlongRRR!R"RtlenR#(R$tsize_or_initializerRR&tresult((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyRQs  %  cOs|jddƒ}|r1td|jƒƒ‚nt||Œ}|tkrP|S|tdfkrntƒ}nt|dƒst d|ƒ‚nt ||ƒS(s6 Return a synchronization wrapper for a Value tlocks$unrecognized keyword argument(s): %stacquires'%r' has no method 'acquire'N( tpopRt ValueErrortkeysRtFalsetTrueRthasattrtAttributeErrorR (R$R%tkwdsR-R&((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyRas  cKs|jddƒ}|r1td|jƒƒ‚nt||ƒ}|tkrP|S|tdfkrntƒ}nt|dƒst d|ƒ‚nt ||ƒS(s9 Return a synchronization wrapper for a RawArray R-s$unrecognized keyword argument(s): %sR.s'%r' has no method 'acquire'N( R/RR0R1RR2R3RR4R5R (R$R+R6R-R&((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyRqs  cCs)tt|ƒƒ}|tj|ƒd<|S(Ni(RttypeRtpointer(R&tnew_obj((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyRscCst|tƒ stdƒ‚t|tjƒr;t||ƒSt|tjƒry|jtjkrlt ||ƒSt ||ƒSt |ƒ}yt |}Wnqt k rg|jD]}|d^q­}td„|Dƒƒ}d|j}t |tf|ƒ}t |•st Synchronized(R'tSynchronizedBasetAssertionErrorRt _SimpleCDataR=Rt_type_tc_chartSynchronizedStringtSynchronizedArrayR7t class_cachetKeyErrort_fields_tdictt__name__(R&R-tclstsclstfieldtnamesRt classname((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR †s        !cCsXt|ƒt|tjƒr8t|j|j|jffStt|ƒ|jdffSdS(N( RR'RRRRAt_wrappert_length_R7R(R&((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt reduce_ctypežs cCsK|dk r||}ntj|tƒ|j|jƒƒ}||_|S(N(RRtregisterRQt from_addresst get_addressRO(RRtlengthR&((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR¥s    cBsPy e|SWn=ek rKi}e|fd|U||e|<||SXdS(Ni(t prop_cacheRFttemplate(R<R((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR:±s  sÿ def get%s(self): self.acquire() try: return self._obj.%s finally: self.release() def set%s(self, value): self.acquire() try: self._obj.%s = value finally: self.release() %s = property(get%s, set%s) R>cBs8eZdd„Zd„Zd„Zd„Zd„ZRS(cCs=||_|ptƒ|_|jj|_|jj|_dS(N(t_objRt_lockR.trelease(tselfR&R-((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR#Ós cCs t|ƒt|j|jffS(N(RR RXRY(R[((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt __reduce__Ùs cCs|jS(N(RX(R[((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pytget_objÝscCs|jS(N(RY(R[((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pytget_lockàscCsdt|ƒj|jfS(Ns<%s wrapper for %s>(R7RIRX(R[((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt__repr__ãsN(RIt __module__RR#R\R]R^R_(((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR>Ñs     R=cBseZedƒZRS(tvalue(RIR`R:Ra(((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyR=çsRDcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs t|jƒS(N(R*RX(R[((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt__len__íscCs+|jƒz|j|SWd|jƒXdS(N(R.RXRZ(R[R((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt __getitem__ðs cCs-|jƒz||j|R=RDRC(((sA/opt/alt/python27/lib64/python2.7/multiprocessing/sharedctypes.pyt#sB              "