gevent.corecext.c 1.7 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618
  1. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2. /* Generated by cythonpp.py on 2017-06-05 11:35:20 */
  3. /* Generated by Cython 0.25.2 */
  4. #define PY_SSIZE_T_CLEAN
  5. #include "Python.h"
  6. #ifndef Py_PYTHON_H
  7. #error Python headers needed to compile C extensions, please install development version of Python.
  8. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
  9. #error Cython requires Python 2.6+ or Python 3.2+.
  10. #else
  11. #define CYTHON_ABI "0_25_2"
  12. #include <stddef.h>
  13. #ifndef offsetof
  14. #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  15. #endif
  16. #if !defined(WIN32) && !defined(MS_WINDOWS)
  17. #ifndef __stdcall
  18. #define __stdcall
  19. #endif
  20. #ifndef __cdecl
  21. #define __cdecl
  22. #endif
  23. #ifndef __fastcall
  24. #define __fastcall
  25. #endif
  26. #endif
  27. #ifndef DL_IMPORT
  28. #define DL_IMPORT(t) t
  29. #endif
  30. #ifndef DL_EXPORT
  31. #define DL_EXPORT(t) t
  32. #endif
  33. #ifndef HAVE_LONG_LONG
  34. #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
  35. #define HAVE_LONG_LONG
  36. #endif
  37. #endif
  38. #ifndef PY_LONG_LONG
  39. #define PY_LONG_LONG LONG_LONG
  40. #endif
  41. #ifndef Py_HUGE_VAL
  42. #define Py_HUGE_VAL HUGE_VAL
  43. #endif
  44. #ifdef PYPY_VERSION
  45. #define CYTHON_COMPILING_IN_PYPY 1
  46. #define CYTHON_COMPILING_IN_PYSTON 0
  47. #define CYTHON_COMPILING_IN_CPYTHON 0
  48. #undef CYTHON_USE_TYPE_SLOTS
  49. #define CYTHON_USE_TYPE_SLOTS 0
  50. #undef CYTHON_USE_ASYNC_SLOTS
  51. #define CYTHON_USE_ASYNC_SLOTS 0
  52. #undef CYTHON_USE_PYLIST_INTERNALS
  53. #define CYTHON_USE_PYLIST_INTERNALS 0
  54. #undef CYTHON_USE_UNICODE_INTERNALS
  55. #define CYTHON_USE_UNICODE_INTERNALS 0
  56. #undef CYTHON_USE_UNICODE_WRITER
  57. #define CYTHON_USE_UNICODE_WRITER 0
  58. #undef CYTHON_USE_PYLONG_INTERNALS
  59. #define CYTHON_USE_PYLONG_INTERNALS 0
  60. #undef CYTHON_AVOID_BORROWED_REFS
  61. #define CYTHON_AVOID_BORROWED_REFS 1
  62. #undef CYTHON_ASSUME_SAFE_MACROS
  63. #define CYTHON_ASSUME_SAFE_MACROS 0
  64. #undef CYTHON_UNPACK_METHODS
  65. #define CYTHON_UNPACK_METHODS 0
  66. #undef CYTHON_FAST_THREAD_STATE
  67. #define CYTHON_FAST_THREAD_STATE 0
  68. #undef CYTHON_FAST_PYCALL
  69. #define CYTHON_FAST_PYCALL 0
  70. #elif defined(PYSTON_VERSION)
  71. #define CYTHON_COMPILING_IN_PYPY 0
  72. #define CYTHON_COMPILING_IN_PYSTON 1
  73. #define CYTHON_COMPILING_IN_CPYTHON 0
  74. #ifndef CYTHON_USE_TYPE_SLOTS
  75. #define CYTHON_USE_TYPE_SLOTS 1
  76. #endif
  77. #undef CYTHON_USE_ASYNC_SLOTS
  78. #define CYTHON_USE_ASYNC_SLOTS 0
  79. #undef CYTHON_USE_PYLIST_INTERNALS
  80. #define CYTHON_USE_PYLIST_INTERNALS 0
  81. #ifndef CYTHON_USE_UNICODE_INTERNALS
  82. #define CYTHON_USE_UNICODE_INTERNALS 1
  83. #endif
  84. #undef CYTHON_USE_UNICODE_WRITER
  85. #define CYTHON_USE_UNICODE_WRITER 0
  86. #undef CYTHON_USE_PYLONG_INTERNALS
  87. #define CYTHON_USE_PYLONG_INTERNALS 0
  88. #ifndef CYTHON_AVOID_BORROWED_REFS
  89. #define CYTHON_AVOID_BORROWED_REFS 0
  90. #endif
  91. #ifndef CYTHON_ASSUME_SAFE_MACROS
  92. #define CYTHON_ASSUME_SAFE_MACROS 1
  93. #endif
  94. #ifndef CYTHON_UNPACK_METHODS
  95. #define CYTHON_UNPACK_METHODS 1
  96. #endif
  97. #undef CYTHON_FAST_THREAD_STATE
  98. #define CYTHON_FAST_THREAD_STATE 0
  99. #undef CYTHON_FAST_PYCALL
  100. #define CYTHON_FAST_PYCALL 0
  101. #else
  102. #define CYTHON_COMPILING_IN_PYPY 0
  103. #define CYTHON_COMPILING_IN_PYSTON 0
  104. #define CYTHON_COMPILING_IN_CPYTHON 1
  105. #ifndef CYTHON_USE_TYPE_SLOTS
  106. #define CYTHON_USE_TYPE_SLOTS 1
  107. #endif
  108. #if PY_MAJOR_VERSION < 3
  109. #undef CYTHON_USE_ASYNC_SLOTS
  110. #define CYTHON_USE_ASYNC_SLOTS 0
  111. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  112. #define CYTHON_USE_ASYNC_SLOTS 1
  113. #endif
  114. #if PY_VERSION_HEX < 0x02070000
  115. #undef CYTHON_USE_PYLONG_INTERNALS
  116. #define CYTHON_USE_PYLONG_INTERNALS 0
  117. #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  118. #define CYTHON_USE_PYLONG_INTERNALS 1
  119. #endif
  120. #ifndef CYTHON_USE_PYLIST_INTERNALS
  121. #define CYTHON_USE_PYLIST_INTERNALS 1
  122. #endif
  123. #ifndef CYTHON_USE_UNICODE_INTERNALS
  124. #define CYTHON_USE_UNICODE_INTERNALS 1
  125. #endif
  126. #if PY_VERSION_HEX < 0x030300F0
  127. #undef CYTHON_USE_UNICODE_WRITER
  128. #define CYTHON_USE_UNICODE_WRITER 0
  129. #elif !defined(CYTHON_USE_UNICODE_WRITER)
  130. #define CYTHON_USE_UNICODE_WRITER 1
  131. #endif
  132. #ifndef CYTHON_AVOID_BORROWED_REFS
  133. #define CYTHON_AVOID_BORROWED_REFS 0
  134. #endif
  135. #ifndef CYTHON_ASSUME_SAFE_MACROS
  136. #define CYTHON_ASSUME_SAFE_MACROS 1
  137. #endif
  138. #ifndef CYTHON_UNPACK_METHODS
  139. #define CYTHON_UNPACK_METHODS 1
  140. #endif
  141. #ifndef CYTHON_FAST_THREAD_STATE
  142. #define CYTHON_FAST_THREAD_STATE 1
  143. #endif
  144. #ifndef CYTHON_FAST_PYCALL
  145. #define CYTHON_FAST_PYCALL 1
  146. #endif
  147. #endif
  148. #if !defined(CYTHON_FAST_PYCCALL)
  149. #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  150. #endif
  151. #if CYTHON_USE_PYLONG_INTERNALS
  152. #include "longintrepr.h"
  153. #undef SHIFT
  154. #undef BASE
  155. #undef MASK
  156. #endif
  157. #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  158. #define Py_OptimizeFlag 0
  159. #endif
  160. #define __PYX_BUILD_PY_SSIZE_T "n"
  161. #define CYTHON_FORMAT_SSIZE_T "z"
  162. #if PY_MAJOR_VERSION < 3
  163. #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  164. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  165. PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  166. #define __Pyx_DefaultClassType PyClass_Type
  167. #else
  168. #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  169. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  170. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  171. #define __Pyx_DefaultClassType PyType_Type
  172. #endif
  173. #ifndef Py_TPFLAGS_CHECKTYPES
  174. #define Py_TPFLAGS_CHECKTYPES 0
  175. #endif
  176. #ifndef Py_TPFLAGS_HAVE_INDEX
  177. #define Py_TPFLAGS_HAVE_INDEX 0
  178. #endif
  179. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  180. #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  181. #endif
  182. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  183. #define Py_TPFLAGS_HAVE_FINALIZE 0
  184. #endif
  185. #ifndef METH_FASTCALL
  186. #define METH_FASTCALL 0x80
  187. typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
  188. Py_ssize_t nargs, PyObject *kwnames);
  189. #else
  190. #define __Pyx_PyCFunctionFast _PyCFunctionFast
  191. #endif
  192. #if CYTHON_FAST_PYCCALL
  193. #define __Pyx_PyFastCFunction_Check(func)\
  194. ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
  195. #else
  196. #define __Pyx_PyFastCFunction_Check(func) 0
  197. #endif
  198. #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  199. #define CYTHON_PEP393_ENABLED 1
  200. #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
  201. 0 : _PyUnicode_Ready((PyObject *)(op)))
  202. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  203. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  204. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
  205. #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
  206. #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
  207. #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
  208. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
  209. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  210. #else
  211. #define CYTHON_PEP393_ENABLED 0
  212. #define PyUnicode_1BYTE_KIND 1
  213. #define PyUnicode_2BYTE_KIND 2
  214. #define PyUnicode_4BYTE_KIND 4
  215. #define __Pyx_PyUnicode_READY(op) (0)
  216. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  217. #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  218. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  219. #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
  220. #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
  221. #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  222. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  223. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
  224. #endif
  225. #if CYTHON_COMPILING_IN_PYPY
  226. #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
  227. #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
  228. #else
  229. #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
  230. #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  231. PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  232. #endif
  233. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  234. #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
  235. #endif
  236. #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  237. #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
  238. #endif
  239. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  240. #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
  241. #endif
  242. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  243. #define PyObject_Malloc(s) PyMem_Malloc(s)
  244. #define PyObject_Free(p) PyMem_Free(p)
  245. #define PyObject_Realloc(p) PyMem_Realloc(p)
  246. #endif
  247. #if CYTHON_COMPILING_IN_PYSTON
  248. #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
  249. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  250. #else
  251. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  252. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
  253. #endif
  254. #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
  255. #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  256. #if PY_MAJOR_VERSION >= 3
  257. #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
  258. #else
  259. #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
  260. #endif
  261. #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  262. #define PyObject_ASCII(o) PyObject_Repr(o)
  263. #endif
  264. #if PY_MAJOR_VERSION >= 3
  265. #define PyBaseString_Type PyUnicode_Type
  266. #define PyStringObject PyUnicodeObject
  267. #define PyString_Type PyUnicode_Type
  268. #define PyString_Check PyUnicode_Check
  269. #define PyString_CheckExact PyUnicode_CheckExact
  270. #endif
  271. #if PY_MAJOR_VERSION >= 3
  272. #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  273. #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  274. #else
  275. #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  276. #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  277. #endif
  278. #ifndef PySet_CheckExact
  279. #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
  280. #endif
  281. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  282. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  283. #if PY_MAJOR_VERSION >= 3
  284. #define PyIntObject PyLongObject
  285. #define PyInt_Type PyLong_Type
  286. #define PyInt_Check(op) PyLong_Check(op)
  287. #define PyInt_CheckExact(op) PyLong_CheckExact(op)
  288. #define PyInt_FromString PyLong_FromString
  289. #define PyInt_FromUnicode PyLong_FromUnicode
  290. #define PyInt_FromLong PyLong_FromLong
  291. #define PyInt_FromSize_t PyLong_FromSize_t
  292. #define PyInt_FromSsize_t PyLong_FromSsize_t
  293. #define PyInt_AsLong PyLong_AsLong
  294. #define PyInt_AS_LONG PyLong_AS_LONG
  295. #define PyInt_AsSsize_t PyLong_AsSsize_t
  296. #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
  297. #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  298. #define PyNumber_Int PyNumber_Long
  299. #endif
  300. #if PY_MAJOR_VERSION >= 3
  301. #define PyBoolObject PyLongObject
  302. #endif
  303. #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  304. #ifndef PyUnicode_InternFromString
  305. #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  306. #endif
  307. #endif
  308. #if PY_VERSION_HEX < 0x030200A4
  309. typedef long Py_hash_t;
  310. #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  311. #define __Pyx_PyInt_AsHash_t PyInt_AsLong
  312. #else
  313. #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  314. #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
  315. #endif
  316. #if PY_MAJOR_VERSION >= 3
  317. #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
  318. #else
  319. #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  320. #endif
  321. #if CYTHON_USE_ASYNC_SLOTS
  322. #if PY_VERSION_HEX >= 0x030500B1
  323. #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  324. #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  325. #else
  326. typedef struct {
  327. unaryfunc am_await;
  328. unaryfunc am_aiter;
  329. unaryfunc am_anext;
  330. } __Pyx_PyAsyncMethodsStruct;
  331. #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  332. #endif
  333. #else
  334. #define __Pyx_PyType_AsAsync(obj) NULL
  335. #endif
  336. #ifndef CYTHON_RESTRICT
  337. #if defined(__GNUC__)
  338. #define CYTHON_RESTRICT __restrict__
  339. #elif defined(_MSC_VER) && _MSC_VER >= 1400
  340. #define CYTHON_RESTRICT __restrict
  341. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  342. #define CYTHON_RESTRICT restrict
  343. #else
  344. #define CYTHON_RESTRICT
  345. #endif
  346. #endif
  347. #ifndef CYTHON_UNUSED
  348. # if defined(__GNUC__)
  349. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  350. # define CYTHON_UNUSED __attribute__ ((__unused__))
  351. # else
  352. # define CYTHON_UNUSED
  353. # endif
  354. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  355. # define CYTHON_UNUSED __attribute__ ((__unused__))
  356. # else
  357. # define CYTHON_UNUSED
  358. # endif
  359. #endif
  360. #ifndef CYTHON_MAYBE_UNUSED_VAR
  361. # if defined(__cplusplus)
  362. template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  363. # else
  364. # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  365. # endif
  366. #endif
  367. #ifndef CYTHON_NCP_UNUSED
  368. # if CYTHON_COMPILING_IN_CPYTHON
  369. # define CYTHON_NCP_UNUSED
  370. # else
  371. # define CYTHON_NCP_UNUSED CYTHON_UNUSED
  372. # endif
  373. #endif
  374. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  375. #ifndef CYTHON_INLINE
  376. #if defined(__clang__)
  377. #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  378. #elif defined(__GNUC__)
  379. #define CYTHON_INLINE __inline__
  380. #elif defined(_MSC_VER)
  381. #define CYTHON_INLINE __inline
  382. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  383. #define CYTHON_INLINE inline
  384. #else
  385. #define CYTHON_INLINE
  386. #endif
  387. #endif
  388. #if defined(WIN32) || defined(MS_WINDOWS)
  389. #define _USE_MATH_DEFINES
  390. #endif
  391. #include <math.h>
  392. #ifdef NAN
  393. #define __PYX_NAN() ((float) NAN)
  394. #else
  395. static CYTHON_INLINE float __PYX_NAN() {
  396. float value;
  397. memset(&value, 0xFF, sizeof(value));
  398. return value;
  399. }
  400. #endif
  401. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  402. #define __Pyx_truncl trunc
  403. #else
  404. #define __Pyx_truncl truncl
  405. #endif
  406. #define __PYX_ERR(f_index, lineno, Ln_error) \
  407. { \
  408. __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  409. }
  410. #if PY_MAJOR_VERSION >= 3
  411. #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
  412. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
  413. #else
  414. #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
  415. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
  416. #endif
  417. #ifndef __PYX_EXTERN_C
  418. #ifdef __cplusplus
  419. #define __PYX_EXTERN_C extern "C"
  420. #else
  421. #define __PYX_EXTERN_C extern
  422. #endif
  423. #endif
  424. #define __PYX_HAVE__gevent__libev__corecext
  425. #define __PYX_HAVE_API__gevent__libev__corecext
  426. #include "libev_vfd.h"
  427. #include "libev.h"
  428. #include "frameobject.h"
  429. #include "callbacks.h"
  430. #include "stathelper.c"
  431. #ifdef _OPENMP
  432. #include <omp.h>
  433. #endif /* _OPENMP */
  434. #ifdef PYREX_WITHOUT_ASSERTIONS
  435. #define CYTHON_WITHOUT_ASSERTIONS
  436. #endif
  437. typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  438. const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  439. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  440. #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
  441. #define __PYX_DEFAULT_STRING_ENCODING ""
  442. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  443. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  444. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  445. #define __Pyx_long_cast(x) ((long)x)
  446. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  447. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  448. (sizeof(type) > sizeof(Py_ssize_t) &&\
  449. likely(v < (type)PY_SSIZE_T_MAX ||\
  450. v == (type)PY_SSIZE_T_MAX) &&\
  451. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  452. v == (type)PY_SSIZE_T_MIN))) ||\
  453. (sizeof(type) == sizeof(Py_ssize_t) &&\
  454. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  455. v == (type)PY_SSIZE_T_MAX))) )
  456. #if defined (__cplusplus) && __cplusplus >= 201103L
  457. #include <cstdlib>
  458. #define __Pyx_sst_abs(value) std::abs(value)
  459. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  460. #define __Pyx_sst_abs(value) abs(value)
  461. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  462. #define __Pyx_sst_abs(value) labs(value)
  463. #elif defined (_MSC_VER) && defined (_M_X64)
  464. #define __Pyx_sst_abs(value) _abs64(value)
  465. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  466. #define __Pyx_sst_abs(value) llabs(value)
  467. #elif defined (__GNUC__)
  468. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  469. #else
  470. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  471. #endif
  472. static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
  473. static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  474. #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  475. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  476. #define __Pyx_PyBytes_FromString PyBytes_FromString
  477. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  478. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  479. #if PY_MAJOR_VERSION < 3
  480. #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
  481. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  482. #else
  483. #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
  484. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  485. #endif
  486. #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
  487. #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
  488. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  489. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  490. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  491. #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
  492. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  493. #if PY_MAJOR_VERSION < 3
  494. static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
  495. {
  496. const Py_UNICODE *u_end = u;
  497. while (*u_end++) ;
  498. return (size_t)(u_end - u - 1);
  499. }
  500. #else
  501. #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
  502. #endif
  503. #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  504. #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  505. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  506. #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  507. #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  508. #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
  509. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  510. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  511. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  512. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  513. #if CYTHON_ASSUME_SAFE_MACROS
  514. #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  515. #else
  516. #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  517. #endif
  518. #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  519. #if PY_MAJOR_VERSION >= 3
  520. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  521. #else
  522. #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  523. #endif
  524. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  525. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  526. static int __Pyx_sys_getdefaultencoding_not_ascii;
  527. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  528. PyObject* sys;
  529. PyObject* default_encoding = NULL;
  530. PyObject* ascii_chars_u = NULL;
  531. PyObject* ascii_chars_b = NULL;
  532. const char* default_encoding_c;
  533. sys = PyImport_ImportModule("sys");
  534. if (!sys) goto bad;
  535. default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  536. Py_DECREF(sys);
  537. if (!default_encoding) goto bad;
  538. default_encoding_c = PyBytes_AsString(default_encoding);
  539. if (!default_encoding_c) goto bad;
  540. if (strcmp(default_encoding_c, "ascii") == 0) {
  541. __Pyx_sys_getdefaultencoding_not_ascii = 0;
  542. } else {
  543. char ascii_chars[128];
  544. int c;
  545. for (c = 0; c < 128; c++) {
  546. ascii_chars[c] = c;
  547. }
  548. __Pyx_sys_getdefaultencoding_not_ascii = 1;
  549. ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  550. if (!ascii_chars_u) goto bad;
  551. ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  552. if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  553. PyErr_Format(
  554. PyExc_ValueError,
  555. "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  556. default_encoding_c);
  557. goto bad;
  558. }
  559. Py_DECREF(ascii_chars_u);
  560. Py_DECREF(ascii_chars_b);
  561. }
  562. Py_DECREF(default_encoding);
  563. return 0;
  564. bad:
  565. Py_XDECREF(default_encoding);
  566. Py_XDECREF(ascii_chars_u);
  567. Py_XDECREF(ascii_chars_b);
  568. return -1;
  569. }
  570. #endif
  571. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  572. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  573. #else
  574. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  575. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  576. static char* __PYX_DEFAULT_STRING_ENCODING;
  577. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  578. PyObject* sys;
  579. PyObject* default_encoding = NULL;
  580. char* default_encoding_c;
  581. sys = PyImport_ImportModule("sys");
  582. if (!sys) goto bad;
  583. default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  584. Py_DECREF(sys);
  585. if (!default_encoding) goto bad;
  586. default_encoding_c = PyBytes_AsString(default_encoding);
  587. if (!default_encoding_c) goto bad;
  588. __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
  589. if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  590. strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  591. Py_DECREF(default_encoding);
  592. return 0;
  593. bad:
  594. Py_XDECREF(default_encoding);
  595. return -1;
  596. }
  597. #endif
  598. #endif
  599. /* Test for GCC > 2.95 */
  600. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  601. #define likely(x) __builtin_expect(!!(x), 1)
  602. #define unlikely(x) __builtin_expect(!!(x), 0)
  603. #else /* !__GNUC__ or GCC < 2.95 */
  604. #define likely(x) (x)
  605. #define unlikely(x) (x)
  606. #endif /* __GNUC__ */
  607. static PyObject *__pyx_m;
  608. static PyObject *__pyx_d;
  609. static PyObject *__pyx_b;
  610. static PyObject *__pyx_empty_tuple;
  611. static PyObject *__pyx_empty_bytes;
  612. static PyObject *__pyx_empty_unicode;
  613. static int __pyx_lineno;
  614. static int __pyx_clineno = 0;
  615. static const char * __pyx_cfilenm= __FILE__;
  616. static const char *__pyx_filename;
  617. static const char *__pyx_f[] = {
  618. "gevent.libev.corecext.pyx",
  619. };
  620. /*--- Type declarations ---*/
  621. struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType;
  622. struct PyGeventLoopObject;
  623. struct PyGeventCallbackObject;
  624. struct PyGeventWatcherObject;
  625. struct PyGeventIOObject;
  626. struct PyGeventTimerObject;
  627. struct PyGeventSignalObject;
  628. struct PyGeventIdleObject;
  629. struct PyGeventPrepareObject;
  630. struct PyGeventCheckObject;
  631. struct PyGeventForkObject;
  632. struct PyGeventAsyncObject;
  633. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  634. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  635. struct PyGeventChildObject;
  636. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  637. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  638. struct PyGeventStatObject;
  639. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr;
  640. struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType {
  641. PyObject_HEAD
  642. };
  643. struct PyGeventLoopObject {
  644. PyObject_HEAD
  645. struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtab;
  646. struct ev_loop *_ptr;
  647. PyObject *error_handler;
  648. struct ev_prepare _prepare;
  649. PyObject *_callbacks;
  650. struct ev_timer _timer0;
  651. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  652. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  653. struct ev_timer _periodic_signal_checker;
  654. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  655. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  656. };
  657. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;
  658. struct PyGeventCallbackObject {
  659. PyObject_HEAD
  660. PyObject *callback;
  661. PyObject *args;
  662. };
  663. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCallback_Type;
  664. struct PyGeventWatcherObject {
  665. PyObject_HEAD
  666. };
  667. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventWatcher_Type;
  668. struct PyGeventIOObject {
  669. struct PyGeventWatcherObject __pyx_base;
  670. struct PyGeventLoopObject *loop;
  671. PyObject *_callback;
  672. PyObject *args;
  673. int _flags;
  674. struct ev_io _watcher;
  675. };
  676. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIO_Type;
  677. struct PyGeventTimerObject {
  678. struct PyGeventWatcherObject __pyx_base;
  679. struct PyGeventLoopObject *loop;
  680. PyObject *_callback;
  681. PyObject *args;
  682. int _flags;
  683. struct ev_timer _watcher;
  684. };
  685. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventTimer_Type;
  686. struct PyGeventSignalObject {
  687. struct PyGeventWatcherObject __pyx_base;
  688. struct PyGeventLoopObject *loop;
  689. PyObject *_callback;
  690. PyObject *args;
  691. int _flags;
  692. struct ev_signal _watcher;
  693. };
  694. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventSignal_Type;
  695. struct PyGeventIdleObject {
  696. struct PyGeventWatcherObject __pyx_base;
  697. struct PyGeventLoopObject *loop;
  698. PyObject *_callback;
  699. PyObject *args;
  700. int _flags;
  701. struct ev_idle _watcher;
  702. };
  703. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventIdle_Type;
  704. struct PyGeventPrepareObject {
  705. struct PyGeventWatcherObject __pyx_base;
  706. struct PyGeventLoopObject *loop;
  707. PyObject *_callback;
  708. PyObject *args;
  709. int _flags;
  710. struct ev_prepare _watcher;
  711. };
  712. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventPrepare_Type;
  713. struct PyGeventCheckObject {
  714. struct PyGeventWatcherObject __pyx_base;
  715. struct PyGeventLoopObject *loop;
  716. PyObject *_callback;
  717. PyObject *args;
  718. int _flags;
  719. struct ev_check _watcher;
  720. };
  721. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventCheck_Type;
  722. struct PyGeventForkObject {
  723. struct PyGeventWatcherObject __pyx_base;
  724. struct PyGeventLoopObject *loop;
  725. PyObject *_callback;
  726. PyObject *args;
  727. int _flags;
  728. struct ev_fork _watcher;
  729. };
  730. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventFork_Type;
  731. struct PyGeventAsyncObject {
  732. struct PyGeventWatcherObject __pyx_base;
  733. struct PyGeventLoopObject *loop;
  734. PyObject *_callback;
  735. PyObject *args;
  736. int _flags;
  737. struct ev_async _watcher;
  738. };
  739. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventAsync_Type;
  740. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  741. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  742. struct PyGeventChildObject {
  743. struct PyGeventWatcherObject __pyx_base;
  744. struct PyGeventLoopObject *loop;
  745. PyObject *_callback;
  746. PyObject *args;
  747. int _flags;
  748. struct ev_child _watcher;
  749. };
  750. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventChild_Type;
  751. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  752. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  753. struct PyGeventStatObject {
  754. struct PyGeventWatcherObject __pyx_base;
  755. struct PyGeventLoopObject *loop;
  756. PyObject *_callback;
  757. PyObject *args;
  758. int _flags;
  759. struct ev_stat _watcher;
  760. PyObject *path;
  761. PyObject *_paths;
  762. };
  763. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventStat_Type;
  764. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr {
  765. PyObject_HEAD
  766. PyObject *__pyx_v_flag;
  767. PyObject *__pyx_v_string;
  768. };
  769. __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyGeventLoop_Type;
  770. struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop {
  771. PyObject *(*_run_callbacks)(struct PyGeventLoopObject *);
  772. PyObject *(*handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  773. PyObject *(*_default_handle_error)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  774. };
  775. static struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *__pyx_vtabptr_6gevent_5libev_8corecext_loop;
  776. /* --- Runtime support code (head) --- */
  777. /* Refnanny.proto */
  778. #ifndef CYTHON_REFNANNY
  779. #define CYTHON_REFNANNY 0
  780. #endif
  781. #if CYTHON_REFNANNY
  782. typedef struct {
  783. void (*INCREF)(void*, PyObject*, int);
  784. void (*DECREF)(void*, PyObject*, int);
  785. void (*GOTREF)(void*, PyObject*, int);
  786. void (*GIVEREF)(void*, PyObject*, int);
  787. void* (*SetupContext)(const char*, int, const char*);
  788. void (*FinishContext)(void**);
  789. } __Pyx_RefNannyAPIStruct;
  790. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  791. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  792. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  793. #ifdef WITH_THREAD
  794. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  795. if (acquire_gil) {\
  796. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  797. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  798. PyGILState_Release(__pyx_gilstate_save);\
  799. } else {\
  800. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  801. }
  802. #else
  803. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  804. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  805. #endif
  806. #define __Pyx_RefNannyFinishContext()\
  807. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  808. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  809. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  810. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  811. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  812. #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  813. #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  814. #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  815. #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  816. #else
  817. #define __Pyx_RefNannyDeclarations
  818. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  819. #define __Pyx_RefNannyFinishContext()
  820. #define __Pyx_INCREF(r) Py_INCREF(r)
  821. #define __Pyx_DECREF(r) Py_DECREF(r)
  822. #define __Pyx_GOTREF(r)
  823. #define __Pyx_GIVEREF(r)
  824. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  825. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  826. #define __Pyx_XGOTREF(r)
  827. #define __Pyx_XGIVEREF(r)
  828. #endif
  829. #define __Pyx_XDECREF_SET(r, v) do {\
  830. PyObject *tmp = (PyObject *) r;\
  831. r = v; __Pyx_XDECREF(tmp);\
  832. } while (0)
  833. #define __Pyx_DECREF_SET(r, v) do {\
  834. PyObject *tmp = (PyObject *) r;\
  835. r = v; __Pyx_DECREF(tmp);\
  836. } while (0)
  837. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  838. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  839. /* PyObjectGetAttrStr.proto */
  840. #if CYTHON_USE_TYPE_SLOTS
  841. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  842. PyTypeObject* tp = Py_TYPE(obj);
  843. if (likely(tp->tp_getattro))
  844. return tp->tp_getattro(obj, attr_name);
  845. #if PY_MAJOR_VERSION < 3
  846. if (likely(tp->tp_getattr))
  847. return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
  848. #endif
  849. return PyObject_GetAttr(obj, attr_name);
  850. }
  851. #else
  852. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  853. #endif
  854. /* GetBuiltinName.proto */
  855. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  856. /* GetModuleGlobalName.proto */
  857. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
  858. /* RaiseTooManyValuesToUnpack.proto */
  859. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
  860. /* RaiseNeedMoreValuesToUnpack.proto */
  861. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
  862. /* IterFinish.proto */
  863. static CYTHON_INLINE int __Pyx_IterFinish(void);
  864. /* UnpackItemEndCheck.proto */
  865. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
  866. /* ListAppend.proto */
  867. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  868. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  869. PyListObject* L = (PyListObject*) list;
  870. Py_ssize_t len = Py_SIZE(list);
  871. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  872. Py_INCREF(x);
  873. PyList_SET_ITEM(list, len, x);
  874. Py_SIZE(list) = len+1;
  875. return 0;
  876. }
  877. return PyList_Append(list, x);
  878. }
  879. #else
  880. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  881. #endif
  882. /* PyObjectCall.proto */
  883. #if CYTHON_COMPILING_IN_CPYTHON
  884. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  885. #else
  886. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  887. #endif
  888. /* PyCFunctionFastCall.proto */
  889. #if CYTHON_FAST_PYCCALL
  890. static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
  891. #else
  892. #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
  893. #endif
  894. /* PyFunctionFastCall.proto */
  895. #if CYTHON_FAST_PYCALL
  896. #define __Pyx_PyFunction_FastCall(func, args, nargs)\
  897. __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
  898. #if 1 || PY_VERSION_HEX < 0x030600B1
  899. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
  900. #else
  901. #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
  902. #endif
  903. #endif
  904. /* PyObjectCallMethO.proto */
  905. #if CYTHON_COMPILING_IN_CPYTHON
  906. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  907. #endif
  908. /* PyObjectCallOneArg.proto */
  909. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  910. /* PyObjectCallNoArg.proto */
  911. #if CYTHON_COMPILING_IN_CPYTHON
  912. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  913. #else
  914. #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
  915. #endif
  916. /* PyThreadStateGet.proto */
  917. #if CYTHON_FAST_THREAD_STATE
  918. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  919. #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
  920. #else
  921. #define __Pyx_PyThreadState_declare
  922. #define __Pyx_PyThreadState_assign
  923. #endif
  924. /* SaveResetException.proto */
  925. #if CYTHON_FAST_THREAD_STATE
  926. #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
  927. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  928. #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
  929. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  930. #else
  931. #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
  932. #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
  933. #endif
  934. /* PyErrExceptionMatches.proto */
  935. #if CYTHON_FAST_THREAD_STATE
  936. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  937. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  938. #else
  939. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  940. #endif
  941. /* GetException.proto */
  942. #if CYTHON_FAST_THREAD_STATE
  943. #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
  944. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  945. #else
  946. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
  947. #endif
  948. /* StringJoin.proto */
  949. #if PY_MAJOR_VERSION < 3
  950. #define __Pyx_PyString_Join __Pyx_PyBytes_Join
  951. #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
  952. #else
  953. #define __Pyx_PyString_Join PyUnicode_Join
  954. #define __Pyx_PyBaseString_Join PyUnicode_Join
  955. #endif
  956. #if CYTHON_COMPILING_IN_CPYTHON
  957. #if PY_MAJOR_VERSION < 3
  958. #define __Pyx_PyBytes_Join _PyString_Join
  959. #else
  960. #define __Pyx_PyBytes_Join _PyBytes_Join
  961. #endif
  962. #else
  963. static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
  964. #endif
  965. /* PyErrFetchRestore.proto */
  966. #if CYTHON_FAST_THREAD_STATE
  967. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  968. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  969. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  970. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  971. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  972. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  973. #else
  974. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  975. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  976. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  977. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  978. #endif
  979. /* RaiseException.proto */
  980. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  981. /* ListCompAppend.proto */
  982. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  983. static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
  984. PyListObject* L = (PyListObject*) list;
  985. Py_ssize_t len = Py_SIZE(list);
  986. if (likely(L->allocated > len)) {
  987. Py_INCREF(x);
  988. PyList_SET_ITEM(list, len, x);
  989. Py_SIZE(list) = len+1;
  990. return 0;
  991. }
  992. return PyList_Append(list, x);
  993. }
  994. #else
  995. #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
  996. #endif
  997. /* RaiseDoubleKeywords.proto */
  998. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  999. /* ParseKeywords.proto */
  1000. static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
  1001. PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
  1002. const char* function_name);
  1003. /* RaiseArgTupleInvalid.proto */
  1004. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  1005. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  1006. /* ExtTypeTest.proto */
  1007. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
  1008. /* WriteUnraisableException.proto */
  1009. static void __Pyx_WriteUnraisable(const char *name, int clineno,
  1010. int lineno, const char *filename,
  1011. int full_traceback, int nogil);
  1012. /* GetItemInt.proto */
  1013. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1014. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1015. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
  1016. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  1017. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  1018. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1019. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1020. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  1021. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  1022. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  1023. int wraparound, int boundscheck);
  1024. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1025. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1026. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  1027. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  1028. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  1029. int wraparound, int boundscheck);
  1030. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  1031. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  1032. int is_list, int wraparound, int boundscheck);
  1033. /* GetAttr.proto */
  1034. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
  1035. /* GetAttr3.proto */
  1036. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  1037. /* ArgTypeTest.proto */
  1038. static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
  1039. const char *name, int exact);
  1040. /* SwapException.proto */
  1041. #if CYTHON_FAST_THREAD_STATE
  1042. #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
  1043. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1044. #else
  1045. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
  1046. #endif
  1047. /* PyObjectSetAttrStr.proto */
  1048. #if CYTHON_USE_TYPE_SLOTS
  1049. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
  1050. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
  1051. PyTypeObject* tp = Py_TYPE(obj);
  1052. if (likely(tp->tp_setattro))
  1053. return tp->tp_setattro(obj, attr_name, value);
  1054. #if PY_MAJOR_VERSION < 3
  1055. if (likely(tp->tp_setattr))
  1056. return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
  1057. #endif
  1058. return PyObject_SetAttr(obj, attr_name, value);
  1059. }
  1060. #else
  1061. #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
  1062. #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
  1063. #endif
  1064. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1065. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1066. /* KeywordStringCheck.proto */
  1067. static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
  1068. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1069. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1070. /* ForceInitThreads.proto */
  1071. #ifndef __PYX_FORCE_INIT_THREADS
  1072. #define __PYX_FORCE_INIT_THREADS 0
  1073. #endif
  1074. /* CallableCheck.proto */
  1075. #if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
  1076. #define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL)
  1077. #else
  1078. #define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj)
  1079. #endif
  1080. /* CallNextTpTraverse.proto */
  1081. static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
  1082. /* CallNextTpClear.proto */
  1083. static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
  1084. /* IncludeStringH.proto */
  1085. #include <string.h>
  1086. /* SetVTable.proto */
  1087. static int __Pyx_SetVtable(PyObject *dict, void *vtable);
  1088. /* CodeObjectCache.proto */
  1089. typedef struct {
  1090. PyCodeObject* code_object;
  1091. int code_line;
  1092. } __Pyx_CodeObjectCacheEntry;
  1093. struct __Pyx_CodeObjectCache {
  1094. int count;
  1095. int max_count;
  1096. __Pyx_CodeObjectCacheEntry* entries;
  1097. };
  1098. static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
  1099. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  1100. static PyCodeObject *__pyx_find_code_object(int code_line);
  1101. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
  1102. /* AddTraceback.proto */
  1103. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  1104. int py_line, const char *filename);
  1105. /* CIntToPy.proto */
  1106. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
  1107. /* CIntToPy.proto */
  1108. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
  1109. /* CIntToPy.proto */
  1110. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
  1111. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1112. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1113. /* CIntToPy.proto */
  1114. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vfd_socket_t(vfd_socket_t value);
  1115. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1116. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1117. /* CIntFromPy.proto */
  1118. static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
  1119. /* CIntFromPy.proto */
  1120. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
  1121. /* CIntFromPy.proto */
  1122. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
  1123. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1124. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1125. /* CIntFromPy.proto */
  1126. static CYTHON_INLINE vfd_socket_t __Pyx_PyInt_As_vfd_socket_t(PyObject *);
  1127. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1128. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1129. /* CIntFromPy.proto */
  1130. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
  1131. /* FetchCommonType.proto */
  1132. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
  1133. /* PyObjectCallMethod1.proto */
  1134. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  1135. /* CoroutineBase.proto */
  1136. typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
  1137. typedef struct {
  1138. PyObject_HEAD
  1139. __pyx_coroutine_body_t body;
  1140. PyObject *closure;
  1141. PyObject *exc_type;
  1142. PyObject *exc_value;
  1143. PyObject *exc_traceback;
  1144. PyObject *gi_weakreflist;
  1145. PyObject *classobj;
  1146. PyObject *yieldfrom;
  1147. PyObject *gi_name;
  1148. PyObject *gi_qualname;
  1149. PyObject *gi_modulename;
  1150. int resume_label;
  1151. char is_running;
  1152. } __pyx_CoroutineObject;
  1153. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  1154. PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
  1155. PyObject *name, PyObject *qualname, PyObject *module_name);
  1156. static int __Pyx_Coroutine_clear(PyObject *self);
  1157. #if 1 || PY_VERSION_HEX < 0x030300B0
  1158. static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
  1159. #else
  1160. #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
  1161. #endif
  1162. /* PatchModuleWithCoroutine.proto */
  1163. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
  1164. /* PatchGeneratorABC.proto */
  1165. static int __Pyx_patch_abc(void);
  1166. /* Generator.proto */
  1167. #define __Pyx_Generator_USED
  1168. static PyTypeObject *__pyx_GeneratorType = 0;
  1169. #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
  1170. #define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
  1171. __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
  1172. static PyObject *__Pyx_Generator_Next(PyObject *self);
  1173. static int __pyx_Generator_init(void);
  1174. /* CheckBinaryVersion.proto */
  1175. static int __Pyx_check_binary_version(void);
  1176. /* InitStrings.proto */
  1177. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
  1178. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks(struct PyGeventLoopObject *__pyx_v_self); /* proto*/
  1179. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch); /* proto*/
  1180. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch); /* proto*/
  1181. /* Module declarations from 'cython' */
  1182. /* Module declarations from 'libev' */
  1183. /* Module declarations from 'python' */
  1184. /* Module declarations from 'gevent.libev.corecext' */
  1185. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext__EVENTSType = 0;
  1186. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_loop = 0;
  1187. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_callback = 0;
  1188. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_watcher = 0;
  1189. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_io = 0;
  1190. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_timer = 0;
  1191. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_signal = 0;
  1192. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_idle = 0;
  1193. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_prepare = 0;
  1194. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_check = 0;
  1195. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_fork = 0;
  1196. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_async = 0;
  1197. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1198. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1199. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_child = 0;
  1200. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1201. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1202. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext_stat = 0;
  1203. static PyTypeObject *__pyx_ptype_6gevent_5libev_8corecext___pyx_scope_struct__genexpr = 0;
  1204. static PyObject *__pyx_v_6gevent_5libev_8corecext_integer_types = 0;
  1205. __PYX_EXTERN_C DL_EXPORT(PyObject) *GEVENT_CORE_EVENTS;
  1206. static int __pyx_v_6gevent_5libev_8corecext__default_loop_destroyed;
  1207. static PyObject *__pyx_f_6gevent_5libev_8corecext__flags_to_list(unsigned int, int __pyx_skip_dispatch); /*proto*/
  1208. static unsigned int __pyx_f_6gevent_5libev_8corecext__flags_to_int(PyObject *, int __pyx_skip_dispatch); /*proto*/
  1209. static PyObject *__pyx_f_6gevent_5libev_8corecext__str_hex(PyObject *); /*proto*/
  1210. static PyObject *__pyx_f_6gevent_5libev_8corecext__check_flags(unsigned int, int __pyx_skip_dispatch); /*proto*/
  1211. static PyObject *__pyx_f_6gevent_5libev_8corecext__events_to_str(int, int __pyx_skip_dispatch); /*proto*/
  1212. static void __pyx_f_6gevent_5libev_8corecext__syserr_cb(char *); /*proto*/
  1213. static PyObject *__pyx_f_6gevent_5libev_8corecext_set_syserr_cb(PyObject *, int __pyx_skip_dispatch); /*proto*/
  1214. #define __Pyx_MODULE_NAME "gevent.libev.corecext"
  1215. int __pyx_module_is_main_gevent__libev__corecext = 0;
  1216. /* Implementation of 'gevent.libev.corecext' */
  1217. static PyObject *__pyx_builtin___import__;
  1218. static PyObject *__pyx_builtin_KeyError;
  1219. static PyObject *__pyx_builtin_ValueError;
  1220. static PyObject *__pyx_builtin_hex;
  1221. static PyObject *__pyx_builtin_SystemError;
  1222. static PyObject *__pyx_builtin_id;
  1223. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1224. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1225. static PyObject *__pyx_builtin_TypeError;
  1226. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1227. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1228. static PyObject *__pyx_builtin_AttributeError;
  1229. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1230. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1231. static PyObject *__pyx_builtin_TypeError;
  1232. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1233. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  1234. static PyObject *__pyx_builtin_AttributeError;
  1235. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  1236. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1237. static const char __pyx_k_[] = ",";
  1238. static const char __pyx_k__3[] = ", ";
  1239. static const char __pyx_k__4[] = "|";
  1240. static const char __pyx_k__5[] = ": ";
  1241. static const char __pyx_k_fd[] = "fd";
  1242. static const char __pyx_k_id[] = "id";
  1243. static const char __pyx_k_os[] = "os";
  1244. static const char __pyx_k_tb[] = "tb";
  1245. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1246. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1247. static const char __pyx_k__21[] = "";
  1248. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1249. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1250. static const char __pyx_k__26[] = "<...>";
  1251. static const char __pyx_k__27[] = ">";
  1252. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1253. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1254. static const char __pyx_k__27[] = "<...>";
  1255. static const char __pyx_k__28[] = ">";
  1256. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1257. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1258. static const char __pyx_k__21[] = "<...>";
  1259. static const char __pyx_k__22[] = ">";
  1260. static const char __pyx_k__23[] = "";
  1261. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1262. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1263. static const char __pyx_k__21[] = "";
  1264. static const char __pyx_k__27[] = "<...>";
  1265. static const char __pyx_k__28[] = ">";
  1266. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1267. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1268. static const char __pyx_k_all[] = "__all__";
  1269. static const char __pyx_k_hex[] = "hex";
  1270. static const char __pyx_k_how[] = "how";
  1271. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1272. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1273. static const char __pyx_k_pid[] = "pid";
  1274. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1275. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1276. static const char __pyx_k_ptr[] = "ptr";
  1277. static const char __pyx_k_ref[] = "ref";
  1278. static const char __pyx_k_sys[] = "sys";
  1279. static const char __pyx_k_FORK[] = "FORK";
  1280. static const char __pyx_k_IDLE[] = "IDLE";
  1281. static const char __pyx_k_NONE[] = "NONE";
  1282. static const char __pyx_k_NSIG[] = "NSIG";
  1283. static const char __pyx_k_READ[] = "READ";
  1284. static const char __pyx_k_STAT[] = "STAT";
  1285. static const char __pyx_k_args[] = "args";
  1286. static const char __pyx_k_func[] = "func";
  1287. static const char __pyx_k_join[] = "join";
  1288. static const char __pyx_k_keys[] = "keys";
  1289. static const char __pyx_k_loop[] = "loop";
  1290. static const char __pyx_k_main[] = "__main__";
  1291. static const char __pyx_k_name[] = "__name__";
  1292. static const char __pyx_k_once[] = "once";
  1293. static const char __pyx_k_path[] = "path";
  1294. static const char __pyx_k_poll[] = "poll";
  1295. static const char __pyx_k_port[] = "port";
  1296. static const char __pyx_k_send[] = "send";
  1297. static const char __pyx_k_test[] = "__test__";
  1298. static const char __pyx_k_time[] = "time";
  1299. static const char __pyx_k_type[] = "type";
  1300. static const char __pyx_k_ASYNC[] = "ASYNC";
  1301. static const char __pyx_k_CHECK[] = "CHECK";
  1302. static const char __pyx_k_CHILD[] = "CHILD";
  1303. static const char __pyx_k_EMBED[] = "EMBED";
  1304. static const char __pyx_k_ERROR[] = "ERROR";
  1305. static const char __pyx_k_TIMER[] = "TIMER";
  1306. static const char __pyx_k_UNDEF[] = "UNDEF";
  1307. static const char __pyx_k_WRITE[] = "WRITE";
  1308. static const char __pyx_k_after[] = "after";
  1309. static const char __pyx_k_class[] = "__class__";
  1310. static const char __pyx_k_close[] = "close";
  1311. static const char __pyx_k_epoll[] = "epoll";
  1312. static const char __pyx_k_errno[] = "errno";
  1313. static const char __pyx_k_flags[] = "_flags";
  1314. static const char __pyx_k_level[] = "level";
  1315. static const char __pyx_k_lower[] = "lower";
  1316. static const char __pyx_k_noenv[] = "noenv";
  1317. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1318. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1319. static const char __pyx_k_ref_2[] = " ref=";
  1320. static const char __pyx_k_sigfd[] = "sigfd";
  1321. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1322. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1323. static const char __pyx_k_split[] = "split";
  1324. static const char __pyx_k_strip[] = "strip";
  1325. static const char __pyx_k_throw[] = "throw";
  1326. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1327. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1328. static const char __pyx_k_trace[] = "trace";
  1329. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1330. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1331. static const char __pyx_k_value[] = "value";
  1332. static const char __pyx_k_CUSTOM[] = "CUSTOM";
  1333. static const char __pyx_k_EVENTS[] = "EVENTS";
  1334. static const char __pyx_k_MAXPRI[] = "MAXPRI";
  1335. static const char __pyx_k_MINPRI[] = "MINPRI";
  1336. static const char __pyx_k_SIGNAL[] = "SIGNAL";
  1337. static const char __pyx_k_active[] = "active";
  1338. static const char __pyx_k_args_r[] = " args=%r";
  1339. static const char __pyx_k_decode[] = "decode";
  1340. static const char __pyx_k_encode[] = "encode";
  1341. static const char __pyx_k_events[] = "_events";
  1342. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1343. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1344. static const char __pyx_k_fileno[] = "fileno";
  1345. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1346. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1347. static const char __pyx_k_format[] = "_format";
  1348. static const char __pyx_k_import[] = "__import__";
  1349. static const char __pyx_k_kqueue[] = "kqueue";
  1350. static const char __pyx_k_nowait[] = "nowait";
  1351. static const char __pyx_k_repeat[] = "repeat";
  1352. static const char __pyx_k_select[] = "select";
  1353. static const char __pyx_k_signal[] = "signal";
  1354. static const char __pyx_k_signum[] = "signum";
  1355. static const char __pyx_k_update[] = "update";
  1356. static const char __pyx_k_CLEANUP[] = "CLEANUP";
  1357. static const char __pyx_k_IOFDSET[] = "_IOFDSET";
  1358. static const char __pyx_k_PREPARE[] = "PREPARE";
  1359. static const char __pyx_k_backend[] = "backend";
  1360. static const char __pyx_k_context[] = "context";
  1361. static const char __pyx_k_default[] = "default";
  1362. static const char __pyx_k_flags_2[] = "flags";
  1363. static const char __pyx_k_genexpr[] = "genexpr";
  1364. static const char __pyx_k_message[] = "message";
  1365. static const char __pyx_k_pending[] = "pending";
  1366. static const char __pyx_k_revents[] = "revents";
  1367. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1368. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1369. static const char __pyx_k_sigfd_2[] = " sigfd=";
  1370. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1371. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1372. static const char __pyx_k_rstatus[] = "rstatus";
  1373. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1374. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1375. static const char __pyx_k_sigfd_2[] = " sigfd=";
  1376. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1377. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1378. static const char __pyx_k_stopped[] = " stopped";
  1379. static const char __pyx_k_KeyError[] = "KeyError";
  1380. static const char __pyx_k_PERIODIC[] = "PERIODIC";
  1381. static const char __pyx_k_SIGNALFD[] = "SIGNALFD";
  1382. static const char __pyx_k_active_2[] = " active";
  1383. static const char __pyx_k_builtins[] = "__builtins__";
  1384. static const char __pyx_k_callback[] = "callback";
  1385. static const char __pyx_k_events_2[] = "events";
  1386. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1387. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1388. static const char __pyx_k_fileno_2[] = " fileno=";
  1389. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1390. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1391. static const char __pyx_k_interval[] = "interval";
  1392. static const char __pyx_k_priority[] = "priority";
  1393. static const char __pyx_k_signalfd[] = "signalfd";
  1394. static const char __pyx_k_strerror[] = "strerror";
  1395. static const char __pyx_k_FORKCHECK[] = "FORKCHECK";
  1396. static const char __pyx_k_NOINOTIFY[] = "NOINOTIFY";
  1397. static const char __pyx_k_NOSIGMASK[] = "NOSIGMASK";
  1398. static const char __pyx_k_READWRITE[] = "READWRITE";
  1399. static const char __pyx_k_TypeError[] = "TypeError";
  1400. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1401. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1402. static const char __pyx_k_activecnt[] = "activecnt";
  1403. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1404. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1405. static const char __pyx_k_default_2[] = " default";
  1406. static const char __pyx_k_destroyed[] = "destroyed";
  1407. static const char __pyx_k_forkcheck[] = "forkcheck";
  1408. static const char __pyx_k_noinotify[] = "noinotify";
  1409. static const char __pyx_k_nosigmask[] = "nosigmask";
  1410. static const char __pyx_k_pending_2[] = " pending";
  1411. static const char __pyx_k_pending_s[] = " pending=%s";
  1412. static const char __pyx_k_print_exc[] = "print_exc";
  1413. static const char __pyx_k_signalnum[] = "signalnum";
  1414. static const char __pyx_k_traceback[] = "traceback";
  1415. static const char __pyx_k_ValueError[] = "ValueError";
  1416. static const char __pyx_k_basestring[] = "basestring";
  1417. static const char __pyx_k_callback_r[] = " callback=%r";
  1418. static const char __pyx_k_events_str[] = "events_str";
  1419. static const char __pyx_k_pendingcnt[] = "pendingcnt";
  1420. static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
  1421. static const char __pyx_k_LIBEV_EMBED[] = "LIBEV_EMBED";
  1422. static const char __pyx_k_SystemError[] = "SystemError";
  1423. static const char __pyx_k_get_version[] = "get_version";
  1424. static const char __pyx_k_libev_d_02d[] = "libev-%d.%02d";
  1425. static const char __pyx_k_pass_events[] = "pass_events";
  1426. static const char __pyx_k_s_at_0x_x_s[] = "<%s at 0x%x %s>";
  1427. static const char __pyx_k_BACKEND_POLL[] = "BACKEND_POLL";
  1428. static const char __pyx_k_BACKEND_PORT[] = "BACKEND_PORT";
  1429. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1430. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1431. static const char __pyx_k_EV_USE_4HEAP[] = "EV_USE_4HEAP";
  1432. static const char __pyx_k_EV_USE_FLOOR[] = "EV_USE_FLOOR";
  1433. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1434. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1435. static const char __pyx_k_handle_error[] = "handle_error";
  1436. static const char __pyx_k_signalmodule[] = "signalmodule";
  1437. static const char __pyx_k_version_info[] = "version_info";
  1438. static const char __pyx_k_BACKEND_EPOLL[] = "BACKEND_EPOLL";
  1439. static const char __pyx_k_fd_s_events_s[] = " fd=%s events=%s";
  1440. static const char __pyx_k_flags_str2int[] = "_flags_str2int";
  1441. static const char __pyx_k_handle_syserr[] = "_handle_syserr";
  1442. static const char __pyx_k_s_at_0x_x_s_2[] = "<%s at 0x%x%s";
  1443. static const char __pyx_k_stop_watchers[] = "_stop_watchers";
  1444. static const char __pyx_k_AttributeError[] = "AttributeError";
  1445. static const char __pyx_k_BACKEND_KQUEUE[] = "BACKEND_KQUEUE";
  1446. static const char __pyx_k_BACKEND_SELECT[] = "BACKEND_SELECT";
  1447. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1448. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1449. static const char __pyx_k_EV_USE_EVENTFD[] = "EV_USE_EVENTFD";
  1450. static const char __pyx_k_EV_USE_INOTIFY[] = "EV_USE_INOTIFY";
  1451. static const char __pyx_k_format_details[] = "_format_details";
  1452. static const char __pyx_k_EV_USE_REALTIME[] = "EV_USE_REALTIME";
  1453. static const char __pyx_k_EV_USE_SIGNALFD[] = "EV_USE_SIGNALFD";
  1454. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1455. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1456. static const char __pyx_k_SYSERR_CALLBACK[] = "__SYSERR_CALLBACK";
  1457. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1458. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1459. static const char __pyx_k_pid_r_rstatus_r[] = " pid=%r rstatus=%r";
  1460. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1461. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1462. static const char __pyx_k_print_exception[] = "print_exception";
  1463. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1464. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1465. static const char __pyx_k_EV_USE_MONOTONIC[] = "EV_USE_MONOTONIC";
  1466. static const char __pyx_k_EV_USE_NANOSLEEP[] = "EV_USE_NANOSLEEP";
  1467. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1468. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1469. static const char __pyx_k_get_header_version[] = "get_header_version";
  1470. static const char __pyx_k_gevent_core_EVENTS[] = "gevent.core.EVENTS";
  1471. static const char __pyx_k_supported_backends[] = "supported_backends";
  1472. static const char __pyx_k_embeddable_backends[] = "embeddable_backends";
  1473. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1474. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1475. static const char __pyx_k_EV_USE_CLOCK_SYSCALL[] = "EV_USE_CLOCK_SYSCALL";
  1476. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1477. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1478. static const char __pyx_k_default_handle_error[] = "_default_handle_error";
  1479. static const char __pyx_k_ev_loop_new_s_failed[] = "ev_loop_new(%s) failed";
  1480. static const char __pyx_k_illegal_event_mask_r[] = "illegal event mask: %r";
  1481. static const char __pyx_k_recommended_backends[] = "recommended_backends";
  1482. static const char __pyx_k_Unsupported_backend_s[] = "Unsupported backend: %s";
  1483. static const char __pyx_k_getfilesystemencoding[] = "getfilesystemencoding";
  1484. static const char __pyx_k_gevent_libev_corecext[] = "gevent.libev.corecext";
  1485. static const char __pyx_k_Expected_callable_not_r[] = "Expected callable, not %r";
  1486. static const char __pyx_k_illegal_signal_number_r[] = "illegal signal number: %r";
  1487. static const char __pyx_k_ev_default_loop_s_failed[] = "ev_default_loop(%s) failed";
  1488. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1489. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1490. static const char __pyx_k_fd_must_be_non_negative_r[] = "fd must be non-negative: %r";
  1491. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1492. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1493. static const char __pyx_k_operation_on_destroyed_loop[] = "operation on destroyed loop";
  1494. static const char __pyx_k_Invalid_value_for_backend_0x_x[] = "Invalid value for backend: 0x%x";
  1495. static const char __pyx_k_io_watcher_attribute_events_is[] = "'io' watcher attribute 'events' is read-only while watcher is active";
  1496. static const char __pyx_k_Expected_callable_or_None_got_r[] = "Expected callable or None, got %r";
  1497. static const char __pyx_k_io_watcher_attribute_fd_is_read[] = "'io' watcher attribute 'fd' is read-only while watcher is active";
  1498. static const char __pyx_k_repeat_must_be_positive_or_zero[] = "repeat must be positive or zero: %r";
  1499. static const char __pyx_k_Cannot_set_priority_of_an_active[] = "Cannot set priority of an active watcher";
  1500. static const char __pyx_k_Invalid_backend_or_flag_s_Possib[] = "Invalid backend or flag: %s\nPossible values: %s";
  1501. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1502. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1503. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmpjtsz25\\gevent.libev.corecext.pyx";
  1504. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1505. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1506. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmpdovkkn\\gevent.libev.corecext.pyx";
  1507. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1508. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  1509. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmp8huita\\gevent.libev.corecext.pyx";
  1510. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  1511. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1512. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmpmwad5d\\gevent.libev.corecext.pyx";
  1513. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1514. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1515. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmpgeoxr_\\gevent.libev.corecext.pyx";
  1516. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1517. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1518. static const char __pyx_k_c_users_appveyor_appdata_local_t[] = "c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmpfvpqt_\\gevent.libev.corecext.pyx";
  1519. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1520. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1521. static const char __pyx_k_callback_must_be_callable_not_No[] = "callback must be callable, not None";
  1522. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1523. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1524. static const char __pyx_k_child_watchers_are_only_availabl[] = "child watchers are only available on the default loop";
  1525. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1526. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1527. static PyObject *__pyx_kp_s_;
  1528. static PyObject *__pyx_n_s_ASYNC;
  1529. static PyObject *__pyx_n_s_AttributeError;
  1530. static PyObject *__pyx_n_s_BACKEND_EPOLL;
  1531. static PyObject *__pyx_n_s_BACKEND_KQUEUE;
  1532. static PyObject *__pyx_n_s_BACKEND_POLL;
  1533. static PyObject *__pyx_n_s_BACKEND_PORT;
  1534. static PyObject *__pyx_n_s_BACKEND_SELECT;
  1535. static PyObject *__pyx_n_s_CHECK;
  1536. static PyObject *__pyx_n_s_CHILD;
  1537. static PyObject *__pyx_n_s_CLEANUP;
  1538. static PyObject *__pyx_n_s_CUSTOM;
  1539. static PyObject *__pyx_kp_s_Cannot_set_priority_of_an_active;
  1540. static PyObject *__pyx_n_s_EMBED;
  1541. static PyObject *__pyx_n_s_ERROR;
  1542. static PyObject *__pyx_n_s_EVENTS;
  1543. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1544. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1545. static PyObject *__pyx_n_s_EV_USE_4HEAP;
  1546. static PyObject *__pyx_n_s_EV_USE_CLOCK_SYSCALL;
  1547. static PyObject *__pyx_n_s_EV_USE_EVENTFD;
  1548. static PyObject *__pyx_n_s_EV_USE_FLOOR;
  1549. static PyObject *__pyx_n_s_EV_USE_INOTIFY;
  1550. static PyObject *__pyx_n_s_EV_USE_MONOTONIC;
  1551. static PyObject *__pyx_n_s_EV_USE_NANOSLEEP;
  1552. static PyObject *__pyx_n_s_EV_USE_REALTIME;
  1553. static PyObject *__pyx_n_s_EV_USE_SIGNALFD;
  1554. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1555. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1556. static PyObject *__pyx_kp_s_Expected_callable_not_r;
  1557. static PyObject *__pyx_kp_s_Expected_callable_or_None_got_r;
  1558. static PyObject *__pyx_n_s_FORK;
  1559. static PyObject *__pyx_n_s_FORKCHECK;
  1560. static PyObject *__pyx_n_s_IDLE;
  1561. static PyObject *__pyx_n_s_IOFDSET;
  1562. static PyObject *__pyx_kp_s_Invalid_backend_or_flag_s_Possib;
  1563. static PyObject *__pyx_kp_s_Invalid_value_for_backend_0x_x;
  1564. static PyObject *__pyx_n_s_KeyError;
  1565. static PyObject *__pyx_n_s_LIBEV_EMBED;
  1566. static PyObject *__pyx_n_s_MAXPRI;
  1567. static PyObject *__pyx_n_s_MINPRI;
  1568. static PyObject *__pyx_n_s_NOINOTIFY;
  1569. static PyObject *__pyx_n_s_NONE;
  1570. static PyObject *__pyx_n_s_NOSIGMASK;
  1571. static PyObject *__pyx_n_s_NSIG;
  1572. static PyObject *__pyx_n_s_PERIODIC;
  1573. static PyObject *__pyx_n_s_PREPARE;
  1574. static PyObject *__pyx_n_s_READ;
  1575. static PyObject *__pyx_n_s_READWRITE;
  1576. static PyObject *__pyx_n_s_SIGNAL;
  1577. static PyObject *__pyx_n_s_SIGNALFD;
  1578. static PyObject *__pyx_n_s_STAT;
  1579. static PyObject *__pyx_n_s_SYSERR_CALLBACK;
  1580. static PyObject *__pyx_n_s_SystemError;
  1581. static PyObject *__pyx_n_s_TIMER;
  1582. static PyObject *__pyx_n_s_TypeError;
  1583. static PyObject *__pyx_n_s_UNDEF;
  1584. static PyObject *__pyx_kp_s_Unsupported_backend_s;
  1585. static PyObject *__pyx_n_s_ValueError;
  1586. static PyObject *__pyx_n_s_WRITE;
  1587. static PyObject *__pyx_kp_s__21;
  1588. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1589. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1590. static PyObject *__pyx_kp_s__26;
  1591. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1592. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1593. static PyObject *__pyx_kp_s__27;
  1594. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1595. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1596. static PyObject *__pyx_kp_s__28;
  1597. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1598. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1599. static PyObject *__pyx_kp_s__22;
  1600. static PyObject *__pyx_kp_s__23;
  1601. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1602. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1603. static PyObject *__pyx_kp_s__27;
  1604. static PyObject *__pyx_kp_s__28;
  1605. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1606. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1607. static PyObject *__pyx_kp_s__3;
  1608. static PyObject *__pyx_kp_s__4;
  1609. static PyObject *__pyx_kp_s__5;
  1610. static PyObject *__pyx_n_s_active;
  1611. static PyObject *__pyx_kp_s_active_2;
  1612. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1613. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1614. static PyObject *__pyx_n_s_activecnt;
  1615. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1616. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1617. static PyObject *__pyx_n_s_after;
  1618. static PyObject *__pyx_n_s_all;
  1619. static PyObject *__pyx_n_s_args;
  1620. static PyObject *__pyx_kp_s_args_r;
  1621. static PyObject *__pyx_n_s_backend;
  1622. static PyObject *__pyx_n_s_basestring;
  1623. static PyObject *__pyx_n_s_builtins;
  1624. static PyObject *__pyx_kp_s_c_users_appveyor_appdata_local_t;
  1625. static PyObject *__pyx_n_s_callback;
  1626. static PyObject *__pyx_kp_s_callback_must_be_callable_not_No;
  1627. static PyObject *__pyx_kp_s_callback_r;
  1628. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1629. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1630. static PyObject *__pyx_kp_s_child_watchers_are_only_availabl;
  1631. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1632. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1633. static PyObject *__pyx_n_s_class;
  1634. static PyObject *__pyx_n_s_close;
  1635. static PyObject *__pyx_n_s_context;
  1636. static PyObject *__pyx_n_s_decode;
  1637. static PyObject *__pyx_n_s_default;
  1638. static PyObject *__pyx_kp_s_default_2;
  1639. static PyObject *__pyx_n_s_default_handle_error;
  1640. static PyObject *__pyx_n_s_destroyed;
  1641. static PyObject *__pyx_n_s_embeddable_backends;
  1642. static PyObject *__pyx_n_s_encode;
  1643. static PyObject *__pyx_n_s_epoll;
  1644. static PyObject *__pyx_n_s_errno;
  1645. static PyObject *__pyx_kp_s_ev_default_loop_s_failed;
  1646. static PyObject *__pyx_kp_s_ev_loop_new_s_failed;
  1647. static PyObject *__pyx_n_s_events;
  1648. static PyObject *__pyx_n_s_events_2;
  1649. static PyObject *__pyx_n_s_events_str;
  1650. static PyObject *__pyx_n_s_fd;
  1651. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1652. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1653. static PyObject *__pyx_kp_s_fd_must_be_non_negative_r;
  1654. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1655. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1656. static PyObject *__pyx_kp_s_fd_s_events_s;
  1657. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1658. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1659. static PyObject *__pyx_n_s_fileno;
  1660. static PyObject *__pyx_kp_s_fileno_2;
  1661. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1662. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1663. static PyObject *__pyx_n_s_flags;
  1664. static PyObject *__pyx_n_s_flags_2;
  1665. static PyObject *__pyx_n_s_flags_str2int;
  1666. static PyObject *__pyx_n_s_forkcheck;
  1667. static PyObject *__pyx_n_s_format;
  1668. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1669. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1670. static PyObject *__pyx_n_s_format_details;
  1671. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1672. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1673. static PyObject *__pyx_n_s_func;
  1674. static PyObject *__pyx_n_s_genexpr;
  1675. static PyObject *__pyx_n_s_get_header_version;
  1676. static PyObject *__pyx_n_s_get_version;
  1677. static PyObject *__pyx_n_s_getfilesystemencoding;
  1678. static PyObject *__pyx_kp_s_gevent_core_EVENTS;
  1679. static PyObject *__pyx_n_s_gevent_libev_corecext;
  1680. static PyObject *__pyx_n_s_handle_error;
  1681. static PyObject *__pyx_n_s_handle_syserr;
  1682. static PyObject *__pyx_n_s_hex;
  1683. static PyObject *__pyx_n_s_how;
  1684. static PyObject *__pyx_n_s_id;
  1685. static PyObject *__pyx_kp_s_illegal_event_mask_r;
  1686. static PyObject *__pyx_kp_s_illegal_signal_number_r;
  1687. static PyObject *__pyx_n_s_import;
  1688. static PyObject *__pyx_n_s_interval;
  1689. static PyObject *__pyx_kp_s_io_watcher_attribute_events_is;
  1690. static PyObject *__pyx_kp_s_io_watcher_attribute_fd_is_read;
  1691. static PyObject *__pyx_n_s_join;
  1692. static PyObject *__pyx_n_s_keys;
  1693. static PyObject *__pyx_n_s_kqueue;
  1694. static PyObject *__pyx_n_s_level;
  1695. static PyObject *__pyx_kp_s_libev_d_02d;
  1696. static PyObject *__pyx_n_s_loop;
  1697. static PyObject *__pyx_n_s_lower;
  1698. static PyObject *__pyx_n_s_main;
  1699. static PyObject *__pyx_n_s_message;
  1700. static PyObject *__pyx_n_s_name;
  1701. static PyObject *__pyx_n_s_noenv;
  1702. static PyObject *__pyx_n_s_noinotify;
  1703. static PyObject *__pyx_n_s_nosigmask;
  1704. static PyObject *__pyx_n_s_nowait;
  1705. static PyObject *__pyx_n_s_once;
  1706. static PyObject *__pyx_kp_s_operation_on_destroyed_loop;
  1707. static PyObject *__pyx_n_s_os;
  1708. static PyObject *__pyx_n_s_pass_events;
  1709. static PyObject *__pyx_n_s_path;
  1710. static PyObject *__pyx_n_s_pending;
  1711. static PyObject *__pyx_kp_s_pending_2;
  1712. static PyObject *__pyx_kp_s_pending_s;
  1713. static PyObject *__pyx_n_s_pendingcnt;
  1714. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1715. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1716. static PyObject *__pyx_n_s_pid;
  1717. static PyObject *__pyx_kp_s_pid_r_rstatus_r;
  1718. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1719. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1720. static PyObject *__pyx_n_s_poll;
  1721. static PyObject *__pyx_n_s_port;
  1722. static PyObject *__pyx_n_s_print_exc;
  1723. static PyObject *__pyx_n_s_print_exception;
  1724. static PyObject *__pyx_n_s_priority;
  1725. static PyObject *__pyx_n_s_ptr;
  1726. static PyObject *__pyx_n_s_pyx_vtable;
  1727. static PyObject *__pyx_n_s_recommended_backends;
  1728. static PyObject *__pyx_n_s_ref;
  1729. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1730. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1731. static PyObject *__pyx_kp_s_ref_2;
  1732. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1733. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1734. static PyObject *__pyx_n_s_repeat;
  1735. static PyObject *__pyx_kp_s_repeat_must_be_positive_or_zero;
  1736. static PyObject *__pyx_n_s_revents;
  1737. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1738. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1739. static PyObject *__pyx_n_s_rstatus;
  1740. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1741. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1742. static PyObject *__pyx_kp_s_s_at_0x_x_s;
  1743. static PyObject *__pyx_kp_s_s_at_0x_x_s_2;
  1744. static PyObject *__pyx_n_s_select;
  1745. static PyObject *__pyx_n_s_send;
  1746. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1747. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1748. static PyObject *__pyx_n_s_sigfd;
  1749. static PyObject *__pyx_kp_s_sigfd_2;
  1750. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1751. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1752. static PyObject *__pyx_n_s_signal;
  1753. static PyObject *__pyx_n_s_signalfd;
  1754. static PyObject *__pyx_n_s_signalmodule;
  1755. static PyObject *__pyx_n_s_signalnum;
  1756. static PyObject *__pyx_n_s_signum;
  1757. static PyObject *__pyx_n_s_split;
  1758. static PyObject *__pyx_n_s_stop_watchers;
  1759. static PyObject *__pyx_kp_s_stopped;
  1760. static PyObject *__pyx_n_s_strerror;
  1761. static PyObject *__pyx_n_s_strip;
  1762. static PyObject *__pyx_n_s_supported_backends;
  1763. static PyObject *__pyx_n_s_sys;
  1764. static PyObject *__pyx_n_s_tb;
  1765. static PyObject *__pyx_n_s_test;
  1766. static PyObject *__pyx_n_s_throw;
  1767. static PyObject *__pyx_n_s_time;
  1768. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1769. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1770. static PyObject *__pyx_n_s_trace;
  1771. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1772. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1773. static PyObject *__pyx_n_s_traceback;
  1774. static PyObject *__pyx_n_s_type;
  1775. static PyObject *__pyx_n_s_update;
  1776. static PyObject *__pyx_n_s_value;
  1777. static PyObject *__pyx_n_s_version_info;
  1778. static PyObject *__pyx_pf_6gevent_5libev_8corecext_22genexpr(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1779. static PyObject *__pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(CYTHON_UNUSED struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *__pyx_v_self); /* proto */
  1780. static PyObject *__pyx_pf_6gevent_5libev_8corecext_get_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1781. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2get_header_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1782. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
  1783. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags); /* proto */
  1784. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8_check_flags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags); /* proto */
  1785. static PyObject *__pyx_pf_6gevent_5libev_8corecext_10_events_to_str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_events); /* proto */
  1786. static PyObject *__pyx_pf_6gevent_5libev_8corecext_12supported_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1787. static PyObject *__pyx_pf_6gevent_5libev_8corecext_14recommended_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1788. static PyObject *__pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1789. static PyObject *__pyx_pf_6gevent_5libev_8corecext_18time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
  1790. static int __pyx_pf_6gevent_5libev_8corecext_4loop___init__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_default, size_t __pyx_v_ptr); /* proto */
  1791. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_2_stop_watchers(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1792. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1793. static void __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1794. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1795. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1796. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1797. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1798. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
  1799. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb); /* proto */
  1800. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb); /* proto */
  1801. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_14run(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_nowait, PyObject *__pyx_v_once); /* proto */
  1802. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1803. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_18ref(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1804. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_20unref(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1805. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_22break_(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_how); /* proto */
  1806. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_24verify(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1807. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_26now(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1808. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_28update(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1809. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1810. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1811. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1812. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1813. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1814. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1815. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1816. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1817. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1818. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1819. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1820. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1821. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1822. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1823. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1824. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_34timer(struct PyGeventLoopObject *__pyx_v_self, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1825. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_36signal(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_signum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1826. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_38idle(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1827. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_40prepare(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1828. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_42check(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1829. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_44fork(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1830. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_46async(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1831. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1832. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1833. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1834. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */
  1835. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52_format(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1836. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1837. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1838. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54_format_details(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1839. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56fileno(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1840. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1841. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1842. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1843. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1844. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1845. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1846. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1847. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1848. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1849. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48child(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref); /* proto */
  1850. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50install_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1851. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52reset_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1852. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1853. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args); /* proto */
  1854. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_58_format(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1855. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1856. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1857. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60_format_details(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1858. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62fileno(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1859. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1860. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1861. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1862. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1863. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1864. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1865. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1866. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1867. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  1868. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1869. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1870. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1871. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1872. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1873. static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1874. static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1875. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1876. static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1877. static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(struct PyGeventLoopObject *__pyx_v_self); /* proto */
  1878. static int __pyx_pf_6gevent_5libev_8corecext_8callback___init__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1879. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_2stop(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1880. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4__nonzero__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1881. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1882. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1883. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8_format(CYTHON_UNUSED struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1884. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1885. static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1886. static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1887. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1888. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1889. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(struct PyGeventCallbackObject *__pyx_v_self); /* proto */
  1890. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher___repr__(struct PyGeventWatcherObject *__pyx_v_self); /* proto */
  1891. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_2_format(CYTHON_UNUSED struct PyGeventWatcherObject *__pyx_v_self); /* proto */
  1892. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_3ref___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1893. static int __pyx_pf_6gevent_5libev_8corecext_2io_3ref_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1894. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8callback___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1895. static int __pyx_pf_6gevent_5libev_8corecext_2io_8callback_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  1896. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_stop(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1897. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8priority___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1898. static int __pyx_pf_6gevent_5libev_8corecext_2io_8priority_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  1899. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2feed(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1900. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4start(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_pass_events, PyObject *__pyx_v_args); /* proto */
  1901. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6active___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1902. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_7pending___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1903. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1904. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1905. static int __pyx_pf_6gevent_5libev_8corecext_2io_6__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1906. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1907. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1908. static int __pyx_pf_6gevent_5libev_8corecext_2io_6__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1909. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1910. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1911. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1912. static int __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(struct PyGeventIOObject *__pyx_v_self, long __pyx_v_fd); /* proto */
  1913. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1914. static int __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_events); /* proto */
  1915. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1916. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8_format(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1917. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  1918. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  1919. static int __pyx_pf_6gevent_5libev_8corecext_2io_10__cinit__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1920. static void __pyx_pf_6gevent_5libev_8corecext_2io_12__dealloc__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1921. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  1922. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  1923. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4loop___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1924. static int __pyx_pf_6gevent_5libev_8corecext_2io_4loop_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1925. static int __pyx_pf_6gevent_5libev_8corecext_2io_4loop_4__del__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1926. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4args___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1927. static int __pyx_pf_6gevent_5libev_8corecext_2io_4args_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1928. static int __pyx_pf_6gevent_5libev_8corecext_2io_4args_4__del__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1929. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6_flags___get__(struct PyGeventIOObject *__pyx_v_self); /* proto */
  1930. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_3ref___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1931. static int __pyx_pf_6gevent_5libev_8corecext_5timer_3ref_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1932. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8callback___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1933. static int __pyx_pf_6gevent_5libev_8corecext_5timer_8callback_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  1934. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_stop(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1935. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8priority___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1936. static int __pyx_pf_6gevent_5libev_8corecext_5timer_8priority_2__set__(struct PyGeventTimerObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  1937. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2feed(struct PyGeventTimerObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1938. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4start(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args); /* proto */
  1939. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6active___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1940. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_7pending___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1941. static int __pyx_pf_6gevent_5libev_8corecext_5timer_6__init__(struct PyGeventTimerObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1942. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1943. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8again(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args); /* proto */
  1944. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4loop___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1945. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1946. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_4__del__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1947. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4args___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1948. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4args_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1949. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4args_4__del__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1950. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6_flags___get__(struct PyGeventTimerObject *__pyx_v_self); /* proto */
  1951. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_3ref___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1952. static int __pyx_pf_6gevent_5libev_8corecext_6signal_3ref_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1953. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_8callback___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1954. static int __pyx_pf_6gevent_5libev_8corecext_6signal_8callback_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  1955. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_stop(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1956. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_8priority___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1957. static int __pyx_pf_6gevent_5libev_8corecext_6signal_8priority_2__set__(struct PyGeventSignalObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  1958. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_2feed(struct PyGeventSignalObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1959. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4start(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1960. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_6active___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1961. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_7pending___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1962. static int __pyx_pf_6gevent_5libev_8corecext_6signal_6__init__(struct PyGeventSignalObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_signalnum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1963. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4loop___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1964. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1965. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_4__del__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1966. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4args___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1967. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4args_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1968. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4args_4__del__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1969. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_6_flags___get__(struct PyGeventSignalObject *__pyx_v_self); /* proto */
  1970. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_3ref___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1971. static int __pyx_pf_6gevent_5libev_8corecext_4idle_3ref_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1972. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_8callback___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1973. static int __pyx_pf_6gevent_5libev_8corecext_4idle_8callback_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  1974. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_stop(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1975. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_8priority___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1976. static int __pyx_pf_6gevent_5libev_8corecext_4idle_8priority_2__set__(struct PyGeventIdleObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  1977. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_2feed(struct PyGeventIdleObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1978. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4start(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1979. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_6active___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1980. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_7pending___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1981. static int __pyx_pf_6gevent_5libev_8corecext_4idle_6__init__(struct PyGeventIdleObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  1982. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4loop___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1983. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1984. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_4__del__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1985. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4args___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1986. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4args_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1987. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4args_4__del__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1988. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_6_flags___get__(struct PyGeventIdleObject *__pyx_v_self); /* proto */
  1989. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_3ref___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  1990. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_3ref_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  1991. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_8callback___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  1992. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_8callback_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  1993. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_stop(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  1994. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_8priority___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  1995. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_8priority_2__set__(struct PyGeventPrepareObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  1996. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_2feed(struct PyGeventPrepareObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1997. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4start(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  1998. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_6active___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  1999. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_7pending___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2000. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_6__init__(struct PyGeventPrepareObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  2001. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4loop___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2002. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2003. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_4__del__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2004. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4args___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2005. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2006. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_4__del__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2007. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_6_flags___get__(struct PyGeventPrepareObject *__pyx_v_self); /* proto */
  2008. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_3ref___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2009. static int __pyx_pf_6gevent_5libev_8corecext_5check_3ref_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2010. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_8callback___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2011. static int __pyx_pf_6gevent_5libev_8corecext_5check_8callback_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  2012. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_stop(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2013. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_8priority___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2014. static int __pyx_pf_6gevent_5libev_8corecext_5check_8priority_2__set__(struct PyGeventCheckObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  2015. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_2feed(struct PyGeventCheckObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2016. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4start(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2017. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_6active___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2018. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_7pending___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2019. static int __pyx_pf_6gevent_5libev_8corecext_5check_6__init__(struct PyGeventCheckObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  2020. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4loop___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2021. static int __pyx_pf_6gevent_5libev_8corecext_5check_4loop_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2022. static int __pyx_pf_6gevent_5libev_8corecext_5check_4loop_4__del__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2023. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4args___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2024. static int __pyx_pf_6gevent_5libev_8corecext_5check_4args_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2025. static int __pyx_pf_6gevent_5libev_8corecext_5check_4args_4__del__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2026. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_6_flags___get__(struct PyGeventCheckObject *__pyx_v_self); /* proto */
  2027. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_3ref___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2028. static int __pyx_pf_6gevent_5libev_8corecext_4fork_3ref_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2029. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_8callback___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2030. static int __pyx_pf_6gevent_5libev_8corecext_4fork_8callback_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  2031. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_stop(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2032. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_8priority___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2033. static int __pyx_pf_6gevent_5libev_8corecext_4fork_8priority_2__set__(struct PyGeventForkObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  2034. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_2feed(struct PyGeventForkObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2035. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4start(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2036. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_6active___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2037. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_7pending___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2038. static int __pyx_pf_6gevent_5libev_8corecext_4fork_6__init__(struct PyGeventForkObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  2039. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4loop___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2040. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2041. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_4__del__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2042. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4args___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2043. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4args_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2044. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4args_4__del__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2045. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_6_flags___get__(struct PyGeventForkObject *__pyx_v_self); /* proto */
  2046. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_3ref___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2047. static int __pyx_pf_6gevent_5libev_8corecext_5async_3ref_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2048. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8callback___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2049. static int __pyx_pf_6gevent_5libev_8corecext_5async_8callback_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  2050. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_stop(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2051. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8priority___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2052. static int __pyx_pf_6gevent_5libev_8corecext_5async_8priority_2__set__(struct PyGeventAsyncObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  2053. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_2feed(struct PyGeventAsyncObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2054. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4start(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2055. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_6active___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2056. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_7pending___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2057. static int __pyx_pf_6gevent_5libev_8corecext_5async_6__init__(struct PyGeventAsyncObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  2058. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8send(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2059. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4loop___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2060. static int __pyx_pf_6gevent_5libev_8corecext_5async_4loop_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2061. static int __pyx_pf_6gevent_5libev_8corecext_5async_4loop_4__del__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2062. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4args___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2063. static int __pyx_pf_6gevent_5libev_8corecext_5async_4args_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2064. static int __pyx_pf_6gevent_5libev_8corecext_5async_4args_4__del__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2065. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_6_flags___get__(struct PyGeventAsyncObject *__pyx_v_self); /* proto */
  2066. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2067. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2068. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3ref___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2069. static int __pyx_pf_6gevent_5libev_8corecext_5child_3ref_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2070. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8callback___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2071. static int __pyx_pf_6gevent_5libev_8corecext_5child_8callback_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  2072. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_stop(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2073. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8priority___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2074. static int __pyx_pf_6gevent_5libev_8corecext_5child_8priority_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  2075. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_2feed(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2076. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4start(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2077. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_6active___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2078. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7pending___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2079. static int __pyx_pf_6gevent_5libev_8corecext_5child_6__init__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref); /* proto */
  2080. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8_format(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2081. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2082. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2083. static int __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value); /* proto */
  2084. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2085. static int __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value); /* proto */
  2086. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4loop___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2087. static int __pyx_pf_6gevent_5libev_8corecext_5child_4loop_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2088. static int __pyx_pf_6gevent_5libev_8corecext_5child_4loop_4__del__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2089. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4args___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2090. static int __pyx_pf_6gevent_5libev_8corecext_5child_4args_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2091. static int __pyx_pf_6gevent_5libev_8corecext_5child_4args_4__del__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2092. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_6_flags___get__(struct PyGeventChildObject *__pyx_v_self); /* proto */
  2093. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2094. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2095. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_3ref___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2096. static int __pyx_pf_6gevent_5libev_8corecext_4stat_3ref_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2097. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8callback___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2098. static int __pyx_pf_6gevent_5libev_8corecext_4stat_8callback_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
  2099. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_stop(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2100. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8priority___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2101. static int __pyx_pf_6gevent_5libev_8corecext_4stat_8priority_2__set__(struct PyGeventStatObject *__pyx_v_self, int __pyx_v_priority); /* proto */
  2102. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_2feed(struct PyGeventStatObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2103. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4start(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args); /* proto */
  2104. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6active___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2105. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_7pending___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2106. static int __pyx_pf_6gevent_5libev_8corecext_4stat_6__init__(struct PyGeventStatObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority); /* proto */
  2107. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2108. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2109. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2110. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4loop___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2111. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2112. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_4__del__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2113. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4args___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2114. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4args_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
  2115. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4args_4__del__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2116. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_flags___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2117. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2118. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(struct PyGeventStatObject *__pyx_v_self); /* proto */
  2119. static PyObject *__pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_callback); /* proto */
  2120. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext__EVENTSType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2121. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_loop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2122. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_callback(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2123. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_watcher(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2124. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_io(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2125. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_timer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2126. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_signal(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2127. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_idle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2128. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_prepare(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2129. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_check(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2130. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_fork(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2131. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_async(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2132. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2133. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2134. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_child(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2135. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2136. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2137. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_stat(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2138. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2139. static PyObject *__pyx_int_0;
  2140. static PyObject *__pyx_int_3;
  2141. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2142. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  2143. static PyObject *__pyx_int_neg_1;
  2144. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  2145. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2146. static int __pyx_k__9;
  2147. static PyObject *__pyx_tuple__2;
  2148. static PyObject *__pyx_tuple__6;
  2149. static PyObject *__pyx_tuple__7;
  2150. static PyObject *__pyx_tuple__8;
  2151. static PyObject *__pyx_tuple__10;
  2152. static PyObject *__pyx_tuple__11;
  2153. static PyObject *__pyx_tuple__12;
  2154. static PyObject *__pyx_tuple__13;
  2155. static PyObject *__pyx_tuple__14;
  2156. static PyObject *__pyx_tuple__15;
  2157. static PyObject *__pyx_tuple__16;
  2158. static PyObject *__pyx_tuple__17;
  2159. static PyObject *__pyx_tuple__18;
  2160. static PyObject *__pyx_tuple__19;
  2161. static PyObject *__pyx_tuple__20;
  2162. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2163. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  2164. static PyObject *__pyx_tuple__22;
  2165. static PyObject *__pyx_tuple__23;
  2166. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  2167. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2168. static PyObject *__pyx_tuple__24;
  2169. static PyObject *__pyx_tuple__25;
  2170. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2171. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2172. static PyObject *__pyx_tuple__26;
  2173. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2174. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2175. static PyObject *__pyx_tuple__27;
  2176. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2177. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2178. static PyObject *__pyx_tuple__28;
  2179. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2180. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2181. static PyObject *__pyx_tuple__29;
  2182. static PyObject *__pyx_tuple__30;
  2183. static PyObject *__pyx_tuple__31;
  2184. static PyObject *__pyx_tuple__32;
  2185. static PyObject *__pyx_tuple__33;
  2186. static PyObject *__pyx_tuple__34;
  2187. static PyObject *__pyx_tuple__35;
  2188. static PyObject *__pyx_tuple__36;
  2189. static PyObject *__pyx_tuple__37;
  2190. static PyObject *__pyx_tuple__38;
  2191. static PyObject *__pyx_tuple__39;
  2192. static PyObject *__pyx_tuple__40;
  2193. static PyObject *__pyx_tuple__41;
  2194. static PyObject *__pyx_tuple__42;
  2195. static PyObject *__pyx_tuple__43;
  2196. static PyObject *__pyx_tuple__44;
  2197. static PyObject *__pyx_tuple__45;
  2198. static PyObject *__pyx_tuple__46;
  2199. static PyObject *__pyx_tuple__47;
  2200. static PyObject *__pyx_tuple__48;
  2201. static PyObject *__pyx_tuple__49;
  2202. static PyObject *__pyx_tuple__50;
  2203. static PyObject *__pyx_tuple__51;
  2204. static PyObject *__pyx_tuple__52;
  2205. static PyObject *__pyx_tuple__53;
  2206. static PyObject *__pyx_tuple__54;
  2207. static PyObject *__pyx_tuple__55;
  2208. static PyObject *__pyx_tuple__56;
  2209. static PyObject *__pyx_tuple__57;
  2210. static PyObject *__pyx_tuple__58;
  2211. static PyObject *__pyx_tuple__59;
  2212. static PyObject *__pyx_tuple__60;
  2213. static PyObject *__pyx_tuple__61;
  2214. static PyObject *__pyx_tuple__62;
  2215. static PyObject *__pyx_tuple__63;
  2216. static PyObject *__pyx_tuple__64;
  2217. static PyObject *__pyx_tuple__65;
  2218. static PyObject *__pyx_tuple__66;
  2219. static PyObject *__pyx_tuple__67;
  2220. static PyObject *__pyx_tuple__68;
  2221. static PyObject *__pyx_tuple__69;
  2222. static PyObject *__pyx_tuple__70;
  2223. static PyObject *__pyx_tuple__71;
  2224. static PyObject *__pyx_tuple__72;
  2225. static PyObject *__pyx_tuple__73;
  2226. static PyObject *__pyx_tuple__74;
  2227. static PyObject *__pyx_tuple__75;
  2228. static PyObject *__pyx_tuple__76;
  2229. static PyObject *__pyx_tuple__77;
  2230. static PyObject *__pyx_tuple__78;
  2231. static PyObject *__pyx_tuple__79;
  2232. static PyObject *__pyx_tuple__80;
  2233. static PyObject *__pyx_tuple__81;
  2234. static PyObject *__pyx_tuple__82;
  2235. static PyObject *__pyx_tuple__83;
  2236. static PyObject *__pyx_tuple__84;
  2237. static PyObject *__pyx_tuple__85;
  2238. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2239. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  2240. static PyObject *__pyx_codeobj__86;
  2241. static PyObject *__pyx_codeobj__87;
  2242. static PyObject *__pyx_codeobj__88;
  2243. static PyObject *__pyx_codeobj__89;
  2244. static PyObject *__pyx_codeobj__90;
  2245. static PyObject *__pyx_codeobj__91;
  2246. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  2247. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2248. static PyObject *__pyx_tuple__86;
  2249. static PyObject *__pyx_tuple__87;
  2250. static PyObject *__pyx_tuple__88;
  2251. static PyObject *__pyx_tuple__89;
  2252. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2253. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  2254. static PyObject *__pyx_codeobj__90;
  2255. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  2256. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2257. static PyObject *__pyx_tuple__90;
  2258. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2259. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  2260. static PyObject *__pyx_codeobj__91;
  2261. static PyObject *__pyx_codeobj__92;
  2262. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  2263. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  2264. static PyObject *__pyx_codeobj__93;
  2265. static PyObject *__pyx_codeobj__94;
  2266. static PyObject *__pyx_codeobj__95;
  2267. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  2268. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  2269. static PyObject *__pyx_tuple__90;
  2270. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2271. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2272. static PyObject *__pyx_tuple__91;
  2273. static PyObject *__pyx_tuple__92;
  2274. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2275. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  2276. static PyObject *__pyx_tuple__93;
  2277. static PyObject *__pyx_tuple__94;
  2278. static PyObject *__pyx_tuple__95;
  2279. static PyObject *__pyx_tuple__96;
  2280. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2281. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  2282. static PyObject *__pyx_tuple__97;
  2283. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2284. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2285. static PyObject *__pyx_codeobj__93;
  2286. static PyObject *__pyx_codeobj__94;
  2287. static PyObject *__pyx_codeobj__95;
  2288. static PyObject *__pyx_codeobj__96;
  2289. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2290. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2291. static PyObject *__pyx_codeobj__97;
  2292. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2293. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2294. static PyObject *__pyx_codeobj__98;
  2295. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2296. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  2297. static PyObject *__pyx_codeobj__99;
  2298. static PyObject *__pyx_codeobj__100;
  2299. static PyObject *__pyx_codeobj__101;
  2300. static PyObject *__pyx_codeobj__102;
  2301. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2302. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  2303. static PyObject *__pyx_codeobj__103;
  2304. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  2305. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  2306. static PyObject *__pyx_gb_6gevent_5libev_8corecext_24generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
  2307. static PyObject *__pyx_pf_6gevent_5libev_8corecext_22genexpr(CYTHON_UNUSED PyObject *__pyx_self) {
  2308. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *__pyx_cur_scope;
  2309. PyObject *__pyx_r = NULL;
  2310. __Pyx_RefNannyDeclarations
  2311. __Pyx_RefNannySetupContext("genexpr", 0);
  2312. __pyx_cur_scope = (struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)__pyx_tp_new_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(__pyx_ptype_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
  2313. if (unlikely(!__pyx_cur_scope)) {
  2314. __pyx_cur_scope = ((struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)Py_None);
  2315. __Pyx_INCREF(Py_None);
  2316. __PYX_ERR(0, 128, __pyx_L1_error)
  2317. } else {
  2318. __Pyx_GOTREF(__pyx_cur_scope);
  2319. }
  2320. {
  2321. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6gevent_5libev_8corecext_24generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_gevent_libev_corecext); if (unlikely(!gen)) __PYX_ERR(0, 128, __pyx_L1_error)
  2322. __Pyx_DECREF(__pyx_cur_scope);
  2323. __Pyx_RefNannyFinishContext();
  2324. return (PyObject *) gen;
  2325. }
  2326. /* function exit code */
  2327. __pyx_L1_error:;
  2328. __Pyx_AddTraceback("gevent.libev.corecext.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2329. __pyx_r = NULL;
  2330. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  2331. __Pyx_XGIVEREF(__pyx_r);
  2332. __Pyx_RefNannyFinishContext();
  2333. return __pyx_r;
  2334. }
  2335. static PyObject *__pyx_gb_6gevent_5libev_8corecext_24generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
  2336. {
  2337. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)__pyx_generator->closure);
  2338. PyObject *__pyx_r = NULL;
  2339. PyObject *__pyx_t_1 = NULL;
  2340. PyObject *__pyx_t_2 = NULL;
  2341. Py_ssize_t __pyx_t_3;
  2342. PyObject *(*__pyx_t_4)(PyObject *);
  2343. PyObject *__pyx_t_5 = NULL;
  2344. PyObject *__pyx_t_6 = NULL;
  2345. PyObject *__pyx_t_7 = NULL;
  2346. PyObject *(*__pyx_t_8)(PyObject *);
  2347. __Pyx_RefNannyDeclarations
  2348. __Pyx_RefNannySetupContext("None", 0);
  2349. switch (__pyx_generator->resume_label) {
  2350. case 0: goto __pyx_L3_first_run;
  2351. default: /* CPython raises the right error here */
  2352. __Pyx_RefNannyFinishContext();
  2353. return NULL;
  2354. }
  2355. __pyx_L3_first_run:;
  2356. if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 128, __pyx_L1_error)
  2357. __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 128, __pyx_L1_error)
  2358. __Pyx_GOTREF(__pyx_r);
  2359. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  2360. __Pyx_GOTREF(__pyx_t_1);
  2361. if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
  2362. __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  2363. __pyx_t_4 = NULL;
  2364. } else {
  2365. __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
  2366. __Pyx_GOTREF(__pyx_t_2);
  2367. __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
  2368. }
  2369. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2370. for (;;) {
  2371. if (likely(!__pyx_t_4)) {
  2372. if (likely(PyList_CheckExact(__pyx_t_2))) {
  2373. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
  2374. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2375. __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L1_error)
  2376. #else
  2377. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  2378. __Pyx_GOTREF(__pyx_t_1);
  2379. #endif
  2380. } else {
  2381. if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
  2382. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2383. __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L1_error)
  2384. #else
  2385. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  2386. __Pyx_GOTREF(__pyx_t_1);
  2387. #endif
  2388. }
  2389. } else {
  2390. __pyx_t_1 = __pyx_t_4(__pyx_t_2);
  2391. if (unlikely(!__pyx_t_1)) {
  2392. PyObject* exc_type = PyErr_Occurred();
  2393. if (exc_type) {
  2394. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  2395. else __PYX_ERR(0, 128, __pyx_L1_error)
  2396. }
  2397. break;
  2398. }
  2399. __Pyx_GOTREF(__pyx_t_1);
  2400. }
  2401. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  2402. PyObject* sequence = __pyx_t_1;
  2403. #if !CYTHON_COMPILING_IN_PYPY
  2404. Py_ssize_t size = Py_SIZE(sequence);
  2405. #else
  2406. Py_ssize_t size = PySequence_Size(sequence);
  2407. #endif
  2408. if (unlikely(size != 2)) {
  2409. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  2410. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  2411. __PYX_ERR(0, 128, __pyx_L1_error)
  2412. }
  2413. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2414. if (likely(PyTuple_CheckExact(sequence))) {
  2415. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
  2416. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  2417. } else {
  2418. __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
  2419. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  2420. }
  2421. __Pyx_INCREF(__pyx_t_5);
  2422. __Pyx_INCREF(__pyx_t_6);
  2423. #else
  2424. __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
  2425. __Pyx_GOTREF(__pyx_t_5);
  2426. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
  2427. __Pyx_GOTREF(__pyx_t_6);
  2428. #endif
  2429. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2430. } else {
  2431. Py_ssize_t index = -1;
  2432. __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error)
  2433. __Pyx_GOTREF(__pyx_t_7);
  2434. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2435. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  2436. index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
  2437. __Pyx_GOTREF(__pyx_t_5);
  2438. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
  2439. __Pyx_GOTREF(__pyx_t_6);
  2440. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  2441. __pyx_t_8 = NULL;
  2442. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  2443. goto __pyx_L7_unpacking_done;
  2444. __pyx_L6_unpacking_failed:;
  2445. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  2446. __pyx_t_8 = NULL;
  2447. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  2448. __PYX_ERR(0, 128, __pyx_L1_error)
  2449. __pyx_L7_unpacking_done:;
  2450. }
  2451. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_flag);
  2452. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_flag, __pyx_t_5);
  2453. __Pyx_GIVEREF(__pyx_t_5);
  2454. __pyx_t_5 = 0;
  2455. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_string);
  2456. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_string, __pyx_t_6);
  2457. __Pyx_GIVEREF(__pyx_t_6);
  2458. __pyx_t_6 = 0;
  2459. if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_string, (PyObject*)__pyx_cur_scope->__pyx_v_flag))) __PYX_ERR(0, 128, __pyx_L1_error)
  2460. }
  2461. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2462. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  2463. /* function exit code */
  2464. goto __pyx_L0;
  2465. __pyx_L1_error:;
  2466. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  2467. __Pyx_XDECREF(__pyx_t_1);
  2468. __Pyx_XDECREF(__pyx_t_2);
  2469. __Pyx_XDECREF(__pyx_t_5);
  2470. __Pyx_XDECREF(__pyx_t_6);
  2471. __Pyx_XDECREF(__pyx_t_7);
  2472. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2473. __pyx_L0:;
  2474. __Pyx_XGIVEREF(__pyx_r);
  2475. __pyx_generator->resume_label = -1;
  2476. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  2477. __Pyx_RefNannyFinishContext();
  2478. return __pyx_r;
  2479. }
  2480. PyObject *GEVENT_CORE_EVENTS = 0;
  2481. /* Python wrapper */
  2482. static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self); /*proto*/
  2483. static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__(PyObject *__pyx_v_self) {
  2484. PyObject *__pyx_r = 0;
  2485. __Pyx_RefNannyDeclarations
  2486. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  2487. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(((struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *)__pyx_v_self));
  2488. /* function exit code */
  2489. __Pyx_RefNannyFinishContext();
  2490. return __pyx_r;
  2491. }
  2492. static PyObject *__pyx_pf_6gevent_5libev_8corecext_11_EVENTSType___repr__(CYTHON_UNUSED struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType *__pyx_v_self) {
  2493. PyObject *__pyx_r = NULL;
  2494. __Pyx_RefNannyDeclarations
  2495. __Pyx_RefNannySetupContext("__repr__", 0);
  2496. __Pyx_XDECREF(__pyx_r);
  2497. __Pyx_INCREF(__pyx_kp_s_gevent_core_EVENTS);
  2498. __pyx_r = __pyx_kp_s_gevent_core_EVENTS;
  2499. goto __pyx_L0;
  2500. /* function exit code */
  2501. __pyx_L0:;
  2502. __Pyx_XGIVEREF(__pyx_r);
  2503. __Pyx_RefNannyFinishContext();
  2504. return __pyx_r;
  2505. }
  2506. /* Python wrapper */
  2507. static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  2508. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_1get_version = {"get_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_1get_version, METH_NOARGS, 0};
  2509. static PyObject *__pyx_pw_6gevent_5libev_8corecext_1get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  2510. PyObject *__pyx_r = 0;
  2511. __Pyx_RefNannyDeclarations
  2512. __Pyx_RefNannySetupContext("get_version (wrapper)", 0);
  2513. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_get_version(__pyx_self);
  2514. /* function exit code */
  2515. __Pyx_RefNannyFinishContext();
  2516. return __pyx_r;
  2517. }
  2518. static PyObject *__pyx_pf_6gevent_5libev_8corecext_get_version(CYTHON_UNUSED PyObject *__pyx_self) {
  2519. PyObject *__pyx_r = NULL;
  2520. __Pyx_RefNannyDeclarations
  2521. PyObject *__pyx_t_1 = NULL;
  2522. PyObject *__pyx_t_2 = NULL;
  2523. PyObject *__pyx_t_3 = NULL;
  2524. __Pyx_RefNannySetupContext("get_version", 0);
  2525. __Pyx_XDECREF(__pyx_r);
  2526. __pyx_t_1 = __Pyx_PyInt_From_int(ev_version_major()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  2527. __Pyx_GOTREF(__pyx_t_1);
  2528. __pyx_t_2 = __Pyx_PyInt_From_int(ev_version_minor()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
  2529. __Pyx_GOTREF(__pyx_t_2);
  2530. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
  2531. __Pyx_GOTREF(__pyx_t_3);
  2532. __Pyx_GIVEREF(__pyx_t_1);
  2533. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  2534. __Pyx_GIVEREF(__pyx_t_2);
  2535. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  2536. __pyx_t_1 = 0;
  2537. __pyx_t_2 = 0;
  2538. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_libev_d_02d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
  2539. __Pyx_GOTREF(__pyx_t_2);
  2540. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2541. __pyx_r = __pyx_t_2;
  2542. __pyx_t_2 = 0;
  2543. goto __pyx_L0;
  2544. /* function exit code */
  2545. __pyx_L1_error:;
  2546. __Pyx_XDECREF(__pyx_t_1);
  2547. __Pyx_XDECREF(__pyx_t_2);
  2548. __Pyx_XDECREF(__pyx_t_3);
  2549. __Pyx_AddTraceback("gevent.libev.corecext.get_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2550. __pyx_r = NULL;
  2551. __pyx_L0:;
  2552. __Pyx_XGIVEREF(__pyx_r);
  2553. __Pyx_RefNannyFinishContext();
  2554. return __pyx_r;
  2555. }
  2556. /* Python wrapper */
  2557. static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  2558. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_3get_header_version = {"get_header_version", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_3get_header_version, METH_NOARGS, 0};
  2559. static PyObject *__pyx_pw_6gevent_5libev_8corecext_3get_header_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  2560. PyObject *__pyx_r = 0;
  2561. __Pyx_RefNannyDeclarations
  2562. __Pyx_RefNannySetupContext("get_header_version (wrapper)", 0);
  2563. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2get_header_version(__pyx_self);
  2564. /* function exit code */
  2565. __Pyx_RefNannyFinishContext();
  2566. return __pyx_r;
  2567. }
  2568. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2get_header_version(CYTHON_UNUSED PyObject *__pyx_self) {
  2569. PyObject *__pyx_r = NULL;
  2570. __Pyx_RefNannyDeclarations
  2571. PyObject *__pyx_t_1 = NULL;
  2572. PyObject *__pyx_t_2 = NULL;
  2573. PyObject *__pyx_t_3 = NULL;
  2574. __Pyx_RefNannySetupContext("get_header_version", 0);
  2575. __Pyx_XDECREF(__pyx_r);
  2576. __pyx_t_1 = __Pyx_PyInt_From_int(EV_VERSION_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  2577. __Pyx_GOTREF(__pyx_t_1);
  2578. __pyx_t_2 = __Pyx_PyInt_From_int(EV_VERSION_MINOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  2579. __Pyx_GOTREF(__pyx_t_2);
  2580. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
  2581. __Pyx_GOTREF(__pyx_t_3);
  2582. __Pyx_GIVEREF(__pyx_t_1);
  2583. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  2584. __Pyx_GIVEREF(__pyx_t_2);
  2585. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  2586. __pyx_t_1 = 0;
  2587. __pyx_t_2 = 0;
  2588. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_libev_d_02d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
  2589. __Pyx_GOTREF(__pyx_t_2);
  2590. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2591. __pyx_r = __pyx_t_2;
  2592. __pyx_t_2 = 0;
  2593. goto __pyx_L0;
  2594. /* function exit code */
  2595. __pyx_L1_error:;
  2596. __Pyx_XDECREF(__pyx_t_1);
  2597. __Pyx_XDECREF(__pyx_t_2);
  2598. __Pyx_XDECREF(__pyx_t_3);
  2599. __Pyx_AddTraceback("gevent.libev.corecext.get_header_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2600. __pyx_r = NULL;
  2601. __pyx_L0:;
  2602. __Pyx_XGIVEREF(__pyx_r);
  2603. __Pyx_RefNannyFinishContext();
  2604. return __pyx_r;
  2605. }
  2606. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
  2607. static PyObject *__pyx_f_6gevent_5libev_8corecext__flags_to_list(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  2608. PyObject *__pyx_v_result = 0;
  2609. PyObject *__pyx_v_code = NULL;
  2610. PyObject *__pyx_v_value = NULL;
  2611. PyObject *__pyx_r = NULL;
  2612. __Pyx_RefNannyDeclarations
  2613. PyObject *__pyx_t_1 = NULL;
  2614. PyObject *__pyx_t_2 = NULL;
  2615. Py_ssize_t __pyx_t_3;
  2616. PyObject *(*__pyx_t_4)(PyObject *);
  2617. PyObject *__pyx_t_5 = NULL;
  2618. PyObject *__pyx_t_6 = NULL;
  2619. PyObject *__pyx_t_7 = NULL;
  2620. PyObject *(*__pyx_t_8)(PyObject *);
  2621. int __pyx_t_9;
  2622. int __pyx_t_10;
  2623. unsigned int __pyx_t_11;
  2624. __Pyx_RefNannySetupContext("_flags_to_list", 0);
  2625. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
  2626. __Pyx_GOTREF(__pyx_t_1);
  2627. __pyx_v_result = ((PyObject*)__pyx_t_1);
  2628. __pyx_t_1 = 0;
  2629. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
  2630. __Pyx_GOTREF(__pyx_t_1);
  2631. if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
  2632. __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  2633. __pyx_t_4 = NULL;
  2634. } else {
  2635. __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
  2636. __Pyx_GOTREF(__pyx_t_2);
  2637. __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  2638. }
  2639. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2640. for (;;) {
  2641. if (likely(!__pyx_t_4)) {
  2642. if (likely(PyList_CheckExact(__pyx_t_2))) {
  2643. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
  2644. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2645. __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
  2646. #else
  2647. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
  2648. __Pyx_GOTREF(__pyx_t_1);
  2649. #endif
  2650. } else {
  2651. if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
  2652. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2653. __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
  2654. #else
  2655. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
  2656. __Pyx_GOTREF(__pyx_t_1);
  2657. #endif
  2658. }
  2659. } else {
  2660. __pyx_t_1 = __pyx_t_4(__pyx_t_2);
  2661. if (unlikely(!__pyx_t_1)) {
  2662. PyObject* exc_type = PyErr_Occurred();
  2663. if (exc_type) {
  2664. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  2665. else __PYX_ERR(0, 151, __pyx_L1_error)
  2666. }
  2667. break;
  2668. }
  2669. __Pyx_GOTREF(__pyx_t_1);
  2670. }
  2671. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  2672. PyObject* sequence = __pyx_t_1;
  2673. #if !CYTHON_COMPILING_IN_PYPY
  2674. Py_ssize_t size = Py_SIZE(sequence);
  2675. #else
  2676. Py_ssize_t size = PySequence_Size(sequence);
  2677. #endif
  2678. if (unlikely(size != 2)) {
  2679. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  2680. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  2681. __PYX_ERR(0, 151, __pyx_L1_error)
  2682. }
  2683. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2684. if (likely(PyTuple_CheckExact(sequence))) {
  2685. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
  2686. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  2687. } else {
  2688. __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
  2689. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  2690. }
  2691. __Pyx_INCREF(__pyx_t_5);
  2692. __Pyx_INCREF(__pyx_t_6);
  2693. #else
  2694. __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
  2695. __Pyx_GOTREF(__pyx_t_5);
  2696. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
  2697. __Pyx_GOTREF(__pyx_t_6);
  2698. #endif
  2699. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2700. } else {
  2701. Py_ssize_t index = -1;
  2702. __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error)
  2703. __Pyx_GOTREF(__pyx_t_7);
  2704. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2705. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  2706. index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
  2707. __Pyx_GOTREF(__pyx_t_5);
  2708. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
  2709. __Pyx_GOTREF(__pyx_t_6);
  2710. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  2711. __pyx_t_8 = NULL;
  2712. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  2713. goto __pyx_L6_unpacking_done;
  2714. __pyx_L5_unpacking_failed:;
  2715. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  2716. __pyx_t_8 = NULL;
  2717. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  2718. __PYX_ERR(0, 151, __pyx_L1_error)
  2719. __pyx_L6_unpacking_done:;
  2720. }
  2721. __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_5);
  2722. __pyx_t_5 = 0;
  2723. __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
  2724. __pyx_t_6 = 0;
  2725. __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
  2726. __Pyx_GOTREF(__pyx_t_1);
  2727. __pyx_t_6 = PyNumber_And(__pyx_t_1, __pyx_v_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
  2728. __Pyx_GOTREF(__pyx_t_6);
  2729. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2730. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 152, __pyx_L1_error)
  2731. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  2732. if (__pyx_t_9) {
  2733. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_value); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 153, __pyx_L1_error)
  2734. }
  2735. __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error)
  2736. __Pyx_GOTREF(__pyx_t_6);
  2737. __pyx_t_1 = PyNumber_Invert(__pyx_v_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  2738. __Pyx_GOTREF(__pyx_t_1);
  2739. __pyx_t_5 = PyNumber_InPlaceAnd(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error)
  2740. __Pyx_GOTREF(__pyx_t_5);
  2741. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  2742. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2743. __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L1_error)
  2744. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  2745. __pyx_v_flags = __pyx_t_11;
  2746. __pyx_t_9 = ((!(__pyx_v_flags != 0)) != 0);
  2747. if (__pyx_t_9) {
  2748. goto __pyx_L4_break;
  2749. }
  2750. }
  2751. __pyx_L4_break:;
  2752. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2753. __pyx_t_9 = (__pyx_v_flags != 0);
  2754. if (__pyx_t_9) {
  2755. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
  2756. __Pyx_GOTREF(__pyx_t_2);
  2757. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 158, __pyx_L1_error)
  2758. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2759. }
  2760. __Pyx_XDECREF(__pyx_r);
  2761. __Pyx_INCREF(__pyx_v_result);
  2762. __pyx_r = __pyx_v_result;
  2763. goto __pyx_L0;
  2764. /* function exit code */
  2765. __pyx_L1_error:;
  2766. __Pyx_XDECREF(__pyx_t_1);
  2767. __Pyx_XDECREF(__pyx_t_2);
  2768. __Pyx_XDECREF(__pyx_t_5);
  2769. __Pyx_XDECREF(__pyx_t_6);
  2770. __Pyx_XDECREF(__pyx_t_7);
  2771. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2772. __pyx_r = 0;
  2773. __pyx_L0:;
  2774. __Pyx_XDECREF(__pyx_v_result);
  2775. __Pyx_XDECREF(__pyx_v_code);
  2776. __Pyx_XDECREF(__pyx_v_value);
  2777. __Pyx_XGIVEREF(__pyx_r);
  2778. __Pyx_RefNannyFinishContext();
  2779. return __pyx_r;
  2780. }
  2781. /* Python wrapper */
  2782. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
  2783. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  2784. unsigned int __pyx_v_flags;
  2785. PyObject *__pyx_r = 0;
  2786. __Pyx_RefNannyDeclarations
  2787. __Pyx_RefNannySetupContext("_flags_to_list (wrapper)", 0);
  2788. assert(__pyx_arg_flags); {
  2789. __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L3_error)
  2790. }
  2791. goto __pyx_L4_argument_unpacking_done;
  2792. __pyx_L3_error:;
  2793. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2794. __Pyx_RefNannyFinishContext();
  2795. return NULL;
  2796. __pyx_L4_argument_unpacking_done:;
  2797. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(__pyx_self, ((unsigned int)__pyx_v_flags));
  2798. /* function exit code */
  2799. __Pyx_RefNannyFinishContext();
  2800. return __pyx_r;
  2801. }
  2802. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4_flags_to_list(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  2803. PyObject *__pyx_r = NULL;
  2804. __Pyx_RefNannyDeclarations
  2805. PyObject *__pyx_t_1 = NULL;
  2806. __Pyx_RefNannySetupContext("_flags_to_list", 0);
  2807. __Pyx_XDECREF(__pyx_r);
  2808. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
  2809. __Pyx_GOTREF(__pyx_t_1);
  2810. __pyx_r = __pyx_t_1;
  2811. __pyx_t_1 = 0;
  2812. goto __pyx_L0;
  2813. /* function exit code */
  2814. __pyx_L1_error:;
  2815. __Pyx_XDECREF(__pyx_t_1);
  2816. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2817. __pyx_r = NULL;
  2818. __pyx_L0:;
  2819. __Pyx_XGIVEREF(__pyx_r);
  2820. __Pyx_RefNannyFinishContext();
  2821. return __pyx_r;
  2822. }
  2823. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
  2824. static unsigned int __pyx_f_6gevent_5libev_8corecext__flags_to_int(PyObject *__pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  2825. unsigned int __pyx_v_result;
  2826. PyObject *__pyx_v_value = NULL;
  2827. PyObject *__pyx_v_ex = NULL;
  2828. unsigned int __pyx_r;
  2829. __Pyx_RefNannyDeclarations
  2830. int __pyx_t_1;
  2831. int __pyx_t_2;
  2832. PyObject *__pyx_t_3 = NULL;
  2833. unsigned int __pyx_t_4;
  2834. PyObject *__pyx_t_5 = NULL;
  2835. PyObject *__pyx_t_6 = NULL;
  2836. PyObject *__pyx_t_7 = NULL;
  2837. PyObject *__pyx_t_8 = NULL;
  2838. Py_ssize_t __pyx_t_9;
  2839. PyObject *(*__pyx_t_10)(PyObject *);
  2840. PyObject *__pyx_t_11 = NULL;
  2841. PyObject *__pyx_t_12 = NULL;
  2842. PyObject *__pyx_t_13 = NULL;
  2843. int __pyx_t_14;
  2844. PyObject *__pyx_t_15 = NULL;
  2845. PyObject *__pyx_t_16 = NULL;
  2846. int __pyx_t_17;
  2847. __Pyx_RefNannySetupContext("_flags_to_int", 0);
  2848. __Pyx_INCREF(__pyx_v_flags);
  2849. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flags); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 170, __pyx_L1_error)
  2850. __pyx_t_2 = ((!__pyx_t_1) != 0);
  2851. if (__pyx_t_2) {
  2852. __pyx_r = 0;
  2853. goto __pyx_L0;
  2854. }
  2855. __pyx_t_3 = __pyx_v_6gevent_5libev_8corecext_integer_types;
  2856. __Pyx_INCREF(__pyx_t_3);
  2857. __pyx_t_2 = PyObject_IsInstance(__pyx_v_flags, __pyx_t_3); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 172, __pyx_L1_error)
  2858. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2859. __pyx_t_1 = (__pyx_t_2 != 0);
  2860. if (__pyx_t_1) {
  2861. __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_flags); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L1_error)
  2862. __pyx_r = __pyx_t_4;
  2863. goto __pyx_L0;
  2864. }
  2865. __pyx_v_result = 0;
  2866. {
  2867. __Pyx_PyThreadState_declare
  2868. __Pyx_PyThreadState_assign
  2869. __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  2870. __Pyx_XGOTREF(__pyx_t_5);
  2871. __Pyx_XGOTREF(__pyx_t_6);
  2872. __Pyx_XGOTREF(__pyx_t_7);
  2873. /*try:*/ {
  2874. __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L5_error)
  2875. __Pyx_GOTREF(__pyx_t_3);
  2876. __pyx_t_1 = PyObject_IsInstance(__pyx_v_flags, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 176, __pyx_L5_error)
  2877. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2878. __pyx_t_2 = (__pyx_t_1 != 0);
  2879. if (__pyx_t_2) {
  2880. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_flags, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L5_error)
  2881. __Pyx_GOTREF(__pyx_t_3);
  2882. __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 177, __pyx_L5_error)
  2883. __Pyx_GOTREF(__pyx_t_8);
  2884. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2885. __Pyx_DECREF_SET(__pyx_v_flags, __pyx_t_8);
  2886. __pyx_t_8 = 0;
  2887. }
  2888. if (likely(PyList_CheckExact(__pyx_v_flags)) || PyTuple_CheckExact(__pyx_v_flags)) {
  2889. __pyx_t_8 = __pyx_v_flags; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
  2890. __pyx_t_10 = NULL;
  2891. } else {
  2892. __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_flags); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L5_error)
  2893. __Pyx_GOTREF(__pyx_t_8);
  2894. __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 178, __pyx_L5_error)
  2895. }
  2896. for (;;) {
  2897. if (likely(!__pyx_t_10)) {
  2898. if (likely(PyList_CheckExact(__pyx_t_8))) {
  2899. if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
  2900. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2901. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 178, __pyx_L5_error)
  2902. #else
  2903. __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L5_error)
  2904. __Pyx_GOTREF(__pyx_t_3);
  2905. #endif
  2906. } else {
  2907. if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
  2908. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2909. __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 178, __pyx_L5_error)
  2910. #else
  2911. __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L5_error)
  2912. __Pyx_GOTREF(__pyx_t_3);
  2913. #endif
  2914. }
  2915. } else {
  2916. __pyx_t_3 = __pyx_t_10(__pyx_t_8);
  2917. if (unlikely(!__pyx_t_3)) {
  2918. PyObject* exc_type = PyErr_Occurred();
  2919. if (exc_type) {
  2920. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  2921. else __PYX_ERR(0, 178, __pyx_L5_error)
  2922. }
  2923. break;
  2924. }
  2925. __Pyx_GOTREF(__pyx_t_3);
  2926. }
  2927. __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
  2928. __pyx_t_3 = 0;
  2929. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L5_error)
  2930. __Pyx_GOTREF(__pyx_t_12);
  2931. __pyx_t_13 = NULL;
  2932. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  2933. __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
  2934. if (likely(__pyx_t_13)) {
  2935. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  2936. __Pyx_INCREF(__pyx_t_13);
  2937. __Pyx_INCREF(function);
  2938. __Pyx_DECREF_SET(__pyx_t_12, function);
  2939. }
  2940. }
  2941. if (__pyx_t_13) {
  2942. __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 179, __pyx_L5_error)
  2943. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  2944. } else {
  2945. __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 179, __pyx_L5_error)
  2946. }
  2947. __Pyx_GOTREF(__pyx_t_11);
  2948. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  2949. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_lower); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 179, __pyx_L5_error)
  2950. __Pyx_GOTREF(__pyx_t_12);
  2951. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  2952. __pyx_t_11 = NULL;
  2953. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
  2954. __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
  2955. if (likely(__pyx_t_11)) {
  2956. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
  2957. __Pyx_INCREF(__pyx_t_11);
  2958. __Pyx_INCREF(function);
  2959. __Pyx_DECREF_SET(__pyx_t_12, function);
  2960. }
  2961. }
  2962. if (__pyx_t_11) {
  2963. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L5_error)
  2964. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  2965. } else {
  2966. __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L5_error)
  2967. }
  2968. __Pyx_GOTREF(__pyx_t_3);
  2969. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  2970. __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
  2971. __pyx_t_3 = 0;
  2972. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 180, __pyx_L5_error)
  2973. if (__pyx_t_2) {
  2974. __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L5_error)
  2975. __Pyx_GOTREF(__pyx_t_3);
  2976. __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_flags_str2int); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 181, __pyx_L5_error)
  2977. __Pyx_GOTREF(__pyx_t_12);
  2978. __pyx_t_11 = PyObject_GetItem(__pyx_t_12, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 181, __pyx_L5_error)
  2979. __Pyx_GOTREF(__pyx_t_11);
  2980. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  2981. __pyx_t_12 = PyNumber_InPlaceOr(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 181, __pyx_L5_error)
  2982. __Pyx_GOTREF(__pyx_t_12);
  2983. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2984. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  2985. __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_12); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L5_error)
  2986. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  2987. __pyx_v_result = __pyx_t_4;
  2988. }
  2989. }
  2990. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  2991. }
  2992. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  2993. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  2994. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  2995. goto __pyx_L12_try_end;
  2996. __pyx_L5_error:;
  2997. __Pyx_PyThreadState_assign
  2998. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  2999. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  3000. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  3001. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  3002. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  3003. __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
  3004. if (__pyx_t_14) {
  3005. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3006. if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_12, &__pyx_t_11) < 0) __PYX_ERR(0, 182, __pyx_L7_except_error)
  3007. __Pyx_GOTREF(__pyx_t_8);
  3008. __Pyx_GOTREF(__pyx_t_12);
  3009. __Pyx_GOTREF(__pyx_t_11);
  3010. __Pyx_INCREF(__pyx_t_12);
  3011. __pyx_v_ex = __pyx_t_12;
  3012. __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_flags_str2int); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3013. __Pyx_GOTREF(__pyx_t_15);
  3014. __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3015. __Pyx_GOTREF(__pyx_t_16);
  3016. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  3017. __pyx_t_15 = NULL;
  3018. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
  3019. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
  3020. if (likely(__pyx_t_15)) {
  3021. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
  3022. __Pyx_INCREF(__pyx_t_15);
  3023. __Pyx_INCREF(function);
  3024. __Pyx_DECREF_SET(__pyx_t_16, function);
  3025. }
  3026. }
  3027. if (__pyx_t_15) {
  3028. __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3029. __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  3030. } else {
  3031. __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3032. }
  3033. __Pyx_GOTREF(__pyx_t_13);
  3034. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  3035. __pyx_t_16 = PySequence_List(__pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3036. __Pyx_GOTREF(__pyx_t_16);
  3037. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  3038. __pyx_t_3 = ((PyObject*)__pyx_t_16);
  3039. __pyx_t_16 = 0;
  3040. __pyx_t_17 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3041. __pyx_t_16 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3042. __Pyx_GOTREF(__pyx_t_16);
  3043. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3044. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3045. __Pyx_GOTREF(__pyx_t_3);
  3046. __Pyx_INCREF(__pyx_v_ex);
  3047. __Pyx_GIVEREF(__pyx_v_ex);
  3048. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_ex);
  3049. __Pyx_GIVEREF(__pyx_t_16);
  3050. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_16);
  3051. __pyx_t_16 = 0;
  3052. __pyx_t_16 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_backend_or_flag_s_Possib, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3053. __Pyx_GOTREF(__pyx_t_16);
  3054. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3055. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3056. __Pyx_GOTREF(__pyx_t_3);
  3057. __Pyx_GIVEREF(__pyx_t_16);
  3058. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_16);
  3059. __pyx_t_16 = 0;
  3060. __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 183, __pyx_L7_except_error)
  3061. __Pyx_GOTREF(__pyx_t_16);
  3062. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3063. __Pyx_Raise(__pyx_t_16, 0, 0, 0);
  3064. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  3065. __PYX_ERR(0, 183, __pyx_L7_except_error)
  3066. }
  3067. goto __pyx_L7_except_error;
  3068. __pyx_L7_except_error:;
  3069. __Pyx_PyThreadState_assign
  3070. __Pyx_XGIVEREF(__pyx_t_5);
  3071. __Pyx_XGIVEREF(__pyx_t_6);
  3072. __Pyx_XGIVEREF(__pyx_t_7);
  3073. __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  3074. goto __pyx_L1_error;
  3075. __pyx_L12_try_end:;
  3076. }
  3077. __pyx_r = __pyx_v_result;
  3078. goto __pyx_L0;
  3079. /* function exit code */
  3080. __pyx_L1_error:;
  3081. __Pyx_XDECREF(__pyx_t_3);
  3082. __Pyx_XDECREF(__pyx_t_8);
  3083. __Pyx_XDECREF(__pyx_t_11);
  3084. __Pyx_XDECREF(__pyx_t_12);
  3085. __Pyx_XDECREF(__pyx_t_13);
  3086. __Pyx_XDECREF(__pyx_t_15);
  3087. __Pyx_XDECREF(__pyx_t_16);
  3088. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3089. __pyx_r = -1;
  3090. __pyx_L0:;
  3091. __Pyx_XDECREF(__pyx_v_value);
  3092. __Pyx_XDECREF(__pyx_v_ex);
  3093. __Pyx_XDECREF(__pyx_v_flags);
  3094. __Pyx_RefNannyFinishContext();
  3095. return __pyx_r;
  3096. }
  3097. /* Python wrapper */
  3098. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags); /*proto*/
  3099. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int(PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  3100. PyObject *__pyx_r = 0;
  3101. __Pyx_RefNannyDeclarations
  3102. __Pyx_RefNannySetupContext("_flags_to_int (wrapper)", 0);
  3103. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(__pyx_self, ((PyObject *)__pyx_v_flags));
  3104. /* function exit code */
  3105. __Pyx_RefNannyFinishContext();
  3106. return __pyx_r;
  3107. }
  3108. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6_flags_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_flags) {
  3109. PyObject *__pyx_r = NULL;
  3110. __Pyx_RefNannyDeclarations
  3111. unsigned int __pyx_t_1;
  3112. PyObject *__pyx_t_2 = NULL;
  3113. __Pyx_RefNannySetupContext("_flags_to_int", 0);
  3114. __Pyx_XDECREF(__pyx_r);
  3115. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_1 == -1 && PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
  3116. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  3117. __Pyx_GOTREF(__pyx_t_2);
  3118. __pyx_r = __pyx_t_2;
  3119. __pyx_t_2 = 0;
  3120. goto __pyx_L0;
  3121. /* function exit code */
  3122. __pyx_L1_error:;
  3123. __Pyx_XDECREF(__pyx_t_2);
  3124. __Pyx_AddTraceback("gevent.libev.corecext._flags_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3125. __pyx_r = NULL;
  3126. __pyx_L0:;
  3127. __Pyx_XGIVEREF(__pyx_r);
  3128. __Pyx_RefNannyFinishContext();
  3129. return __pyx_r;
  3130. }
  3131. static PyObject *__pyx_f_6gevent_5libev_8corecext__str_hex(PyObject *__pyx_v_flag) {
  3132. PyObject *__pyx_r = NULL;
  3133. __Pyx_RefNannyDeclarations
  3134. PyObject *__pyx_t_1 = NULL;
  3135. int __pyx_t_2;
  3136. int __pyx_t_3;
  3137. PyObject *__pyx_t_4 = NULL;
  3138. __Pyx_RefNannySetupContext("_str_hex", 0);
  3139. __pyx_t_1 = __pyx_v_6gevent_5libev_8corecext_integer_types;
  3140. __Pyx_INCREF(__pyx_t_1);
  3141. __pyx_t_2 = PyObject_IsInstance(__pyx_v_flag, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 188, __pyx_L1_error)
  3142. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3143. __pyx_t_3 = (__pyx_t_2 != 0);
  3144. if (__pyx_t_3) {
  3145. __Pyx_XDECREF(__pyx_r);
  3146. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
  3147. __Pyx_GOTREF(__pyx_t_1);
  3148. __Pyx_INCREF(__pyx_v_flag);
  3149. __Pyx_GIVEREF(__pyx_v_flag);
  3150. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_flag);
  3151. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
  3152. __Pyx_GOTREF(__pyx_t_4);
  3153. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3154. if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 189, __pyx_L1_error)
  3155. __pyx_r = ((PyObject*)__pyx_t_4);
  3156. __pyx_t_4 = 0;
  3157. goto __pyx_L0;
  3158. }
  3159. __Pyx_XDECREF(__pyx_r);
  3160. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error)
  3161. __Pyx_GOTREF(__pyx_t_4);
  3162. __Pyx_INCREF(__pyx_v_flag);
  3163. __Pyx_GIVEREF(__pyx_v_flag);
  3164. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_flag);
  3165. __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
  3166. __Pyx_GOTREF(__pyx_t_1);
  3167. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3168. if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 190, __pyx_L1_error)
  3169. __pyx_r = ((PyObject*)__pyx_t_1);
  3170. __pyx_t_1 = 0;
  3171. goto __pyx_L0;
  3172. /* function exit code */
  3173. __pyx_L1_error:;
  3174. __Pyx_XDECREF(__pyx_t_1);
  3175. __Pyx_XDECREF(__pyx_t_4);
  3176. __Pyx_AddTraceback("gevent.libev.corecext._str_hex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3177. __pyx_r = 0;
  3178. __pyx_L0:;
  3179. __Pyx_XGIVEREF(__pyx_r);
  3180. __Pyx_RefNannyFinishContext();
  3181. return __pyx_r;
  3182. }
  3183. static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
  3184. static PyObject *__pyx_f_6gevent_5libev_8corecext__check_flags(unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  3185. PyObject *__pyx_v_as_list = 0;
  3186. PyObject *__pyx_v_x = NULL;
  3187. PyObject *__pyx_r = NULL;
  3188. __Pyx_RefNannyDeclarations
  3189. int __pyx_t_1;
  3190. PyObject *__pyx_t_2 = NULL;
  3191. PyObject *__pyx_t_3 = NULL;
  3192. PyObject *__pyx_t_4 = NULL;
  3193. Py_ssize_t __pyx_t_5;
  3194. PyObject *(*__pyx_t_6)(PyObject *);
  3195. __Pyx_RefNannySetupContext("_check_flags", 0);
  3196. __pyx_v_flags = (__pyx_v_flags & EVBACKEND_MASK);
  3197. __pyx_t_1 = ((!(__pyx_v_flags != 0)) != 0);
  3198. if (__pyx_t_1) {
  3199. __Pyx_XDECREF(__pyx_r);
  3200. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3201. goto __pyx_L0;
  3202. }
  3203. __pyx_t_1 = ((!((__pyx_v_flags & EVBACKEND_ALL) != 0)) != 0);
  3204. if (__pyx_t_1) {
  3205. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  3206. __Pyx_GOTREF(__pyx_t_2);
  3207. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_value_for_backend_0x_x, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
  3208. __Pyx_GOTREF(__pyx_t_3);
  3209. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3210. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  3211. __Pyx_GOTREF(__pyx_t_2);
  3212. __Pyx_GIVEREF(__pyx_t_3);
  3213. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  3214. __pyx_t_3 = 0;
  3215. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
  3216. __Pyx_GOTREF(__pyx_t_3);
  3217. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3218. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  3219. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3220. __PYX_ERR(0, 199, __pyx_L1_error)
  3221. }
  3222. __pyx_t_1 = ((!((__pyx_v_flags & ev_supported_backends()) != 0)) != 0);
  3223. if (__pyx_t_1) {
  3224. __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
  3225. __Pyx_GOTREF(__pyx_t_3);
  3226. __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_flags, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
  3227. __Pyx_GOTREF(__pyx_t_2);
  3228. if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
  3229. __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
  3230. __pyx_t_6 = NULL;
  3231. } else {
  3232. __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
  3233. __Pyx_GOTREF(__pyx_t_4);
  3234. __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error)
  3235. }
  3236. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3237. for (;;) {
  3238. if (likely(!__pyx_t_6)) {
  3239. if (likely(PyList_CheckExact(__pyx_t_4))) {
  3240. if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
  3241. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3242. __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
  3243. #else
  3244. __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
  3245. __Pyx_GOTREF(__pyx_t_2);
  3246. #endif
  3247. } else {
  3248. if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
  3249. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3250. __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
  3251. #else
  3252. __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
  3253. __Pyx_GOTREF(__pyx_t_2);
  3254. #endif
  3255. }
  3256. } else {
  3257. __pyx_t_2 = __pyx_t_6(__pyx_t_4);
  3258. if (unlikely(!__pyx_t_2)) {
  3259. PyObject* exc_type = PyErr_Occurred();
  3260. if (exc_type) {
  3261. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  3262. else __PYX_ERR(0, 201, __pyx_L1_error)
  3263. }
  3264. break;
  3265. }
  3266. __Pyx_GOTREF(__pyx_t_2);
  3267. }
  3268. __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
  3269. __pyx_t_2 = 0;
  3270. __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__str_hex(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
  3271. __Pyx_GOTREF(__pyx_t_2);
  3272. if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 201, __pyx_L1_error)
  3273. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3274. }
  3275. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3276. __pyx_v_as_list = ((PyObject*)__pyx_t_3);
  3277. __pyx_t_3 = 0;
  3278. __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_v_as_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  3279. __Pyx_GOTREF(__pyx_t_3);
  3280. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unsupported_backend_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error)
  3281. __Pyx_GOTREF(__pyx_t_4);
  3282. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3283. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  3284. __Pyx_GOTREF(__pyx_t_3);
  3285. __Pyx_GIVEREF(__pyx_t_4);
  3286. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  3287. __pyx_t_4 = 0;
  3288. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error)
  3289. __Pyx_GOTREF(__pyx_t_4);
  3290. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3291. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  3292. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3293. __PYX_ERR(0, 202, __pyx_L1_error)
  3294. }
  3295. /* function exit code */
  3296. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3297. goto __pyx_L0;
  3298. __pyx_L1_error:;
  3299. __Pyx_XDECREF(__pyx_t_2);
  3300. __Pyx_XDECREF(__pyx_t_3);
  3301. __Pyx_XDECREF(__pyx_t_4);
  3302. __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3303. __pyx_r = 0;
  3304. __pyx_L0:;
  3305. __Pyx_XDECREF(__pyx_v_as_list);
  3306. __Pyx_XDECREF(__pyx_v_x);
  3307. __Pyx_XGIVEREF(__pyx_r);
  3308. __Pyx_RefNannyFinishContext();
  3309. return __pyx_r;
  3310. }
  3311. /* Python wrapper */
  3312. static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags); /*proto*/
  3313. static PyObject *__pyx_pw_6gevent_5libev_8corecext_9_check_flags(PyObject *__pyx_self, PyObject *__pyx_arg_flags) {
  3314. unsigned int __pyx_v_flags;
  3315. PyObject *__pyx_r = 0;
  3316. __Pyx_RefNannyDeclarations
  3317. __Pyx_RefNannySetupContext("_check_flags (wrapper)", 0);
  3318. assert(__pyx_arg_flags); {
  3319. __pyx_v_flags = __Pyx_PyInt_As_unsigned_int(__pyx_arg_flags); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __pyx_L3_error)
  3320. }
  3321. goto __pyx_L4_argument_unpacking_done;
  3322. __pyx_L3_error:;
  3323. __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3324. __Pyx_RefNannyFinishContext();
  3325. return NULL;
  3326. __pyx_L4_argument_unpacking_done:;
  3327. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8_check_flags(__pyx_self, ((unsigned int)__pyx_v_flags));
  3328. /* function exit code */
  3329. __Pyx_RefNannyFinishContext();
  3330. return __pyx_r;
  3331. }
  3332. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8_check_flags(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_flags) {
  3333. PyObject *__pyx_r = NULL;
  3334. __Pyx_RefNannyDeclarations
  3335. PyObject *__pyx_t_1 = NULL;
  3336. __Pyx_RefNannySetupContext("_check_flags", 0);
  3337. __Pyx_XDECREF(__pyx_r);
  3338. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_flags, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  3339. __Pyx_GOTREF(__pyx_t_1);
  3340. __pyx_r = __pyx_t_1;
  3341. __pyx_t_1 = 0;
  3342. goto __pyx_L0;
  3343. /* function exit code */
  3344. __pyx_L1_error:;
  3345. __Pyx_XDECREF(__pyx_t_1);
  3346. __Pyx_AddTraceback("gevent.libev.corecext._check_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3347. __pyx_r = NULL;
  3348. __pyx_L0:;
  3349. __Pyx_XGIVEREF(__pyx_r);
  3350. __Pyx_RefNannyFinishContext();
  3351. return __pyx_r;
  3352. }
  3353. static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
  3354. static PyObject *__pyx_f_6gevent_5libev_8corecext__events_to_str(int __pyx_v_events, CYTHON_UNUSED int __pyx_skip_dispatch) {
  3355. PyObject *__pyx_v_result = 0;
  3356. int __pyx_v_c_flag;
  3357. PyObject *__pyx_v_flag = NULL;
  3358. PyObject *__pyx_v_string = NULL;
  3359. PyObject *__pyx_r = NULL;
  3360. __Pyx_RefNannyDeclarations
  3361. PyObject *__pyx_t_1 = NULL;
  3362. PyObject *__pyx_t_2 = NULL;
  3363. Py_ssize_t __pyx_t_3;
  3364. PyObject *(*__pyx_t_4)(PyObject *);
  3365. PyObject *__pyx_t_5 = NULL;
  3366. PyObject *__pyx_t_6 = NULL;
  3367. PyObject *__pyx_t_7 = NULL;
  3368. PyObject *(*__pyx_t_8)(PyObject *);
  3369. int __pyx_t_9;
  3370. int __pyx_t_10;
  3371. int __pyx_t_11;
  3372. __Pyx_RefNannySetupContext("_events_to_str", 0);
  3373. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
  3374. __Pyx_GOTREF(__pyx_t_1);
  3375. __pyx_v_result = ((PyObject*)__pyx_t_1);
  3376. __pyx_t_1 = 0;
  3377. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  3378. __Pyx_GOTREF(__pyx_t_1);
  3379. if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
  3380. __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  3381. __pyx_t_4 = NULL;
  3382. } else {
  3383. __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
  3384. __Pyx_GOTREF(__pyx_t_2);
  3385. __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
  3386. }
  3387. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3388. for (;;) {
  3389. if (likely(!__pyx_t_4)) {
  3390. if (likely(PyList_CheckExact(__pyx_t_2))) {
  3391. if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
  3392. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3393. __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
  3394. #else
  3395. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  3396. __Pyx_GOTREF(__pyx_t_1);
  3397. #endif
  3398. } else {
  3399. if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
  3400. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3401. __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
  3402. #else
  3403. __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  3404. __Pyx_GOTREF(__pyx_t_1);
  3405. #endif
  3406. }
  3407. } else {
  3408. __pyx_t_1 = __pyx_t_4(__pyx_t_2);
  3409. if (unlikely(!__pyx_t_1)) {
  3410. PyObject* exc_type = PyErr_Occurred();
  3411. if (exc_type) {
  3412. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  3413. else __PYX_ERR(0, 208, __pyx_L1_error)
  3414. }
  3415. break;
  3416. }
  3417. __Pyx_GOTREF(__pyx_t_1);
  3418. }
  3419. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  3420. PyObject* sequence = __pyx_t_1;
  3421. #if !CYTHON_COMPILING_IN_PYPY
  3422. Py_ssize_t size = Py_SIZE(sequence);
  3423. #else
  3424. Py_ssize_t size = PySequence_Size(sequence);
  3425. #endif
  3426. if (unlikely(size != 2)) {
  3427. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  3428. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  3429. __PYX_ERR(0, 208, __pyx_L1_error)
  3430. }
  3431. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3432. if (likely(PyTuple_CheckExact(sequence))) {
  3433. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
  3434. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
  3435. } else {
  3436. __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
  3437. __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
  3438. }
  3439. __Pyx_INCREF(__pyx_t_5);
  3440. __Pyx_INCREF(__pyx_t_6);
  3441. #else
  3442. __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error)
  3443. __Pyx_GOTREF(__pyx_t_5);
  3444. __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error)
  3445. __Pyx_GOTREF(__pyx_t_6);
  3446. #endif
  3447. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3448. } else {
  3449. Py_ssize_t index = -1;
  3450. __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L1_error)
  3451. __Pyx_GOTREF(__pyx_t_7);
  3452. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3453. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  3454. index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
  3455. __Pyx_GOTREF(__pyx_t_5);
  3456. index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
  3457. __Pyx_GOTREF(__pyx_t_6);
  3458. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 208, __pyx_L1_error)
  3459. __pyx_t_8 = NULL;
  3460. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  3461. goto __pyx_L6_unpacking_done;
  3462. __pyx_L5_unpacking_failed:;
  3463. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  3464. __pyx_t_8 = NULL;
  3465. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  3466. __PYX_ERR(0, 208, __pyx_L1_error)
  3467. __pyx_L6_unpacking_done:;
  3468. }
  3469. __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_5);
  3470. __pyx_t_5 = 0;
  3471. __Pyx_XDECREF_SET(__pyx_v_string, __pyx_t_6);
  3472. __pyx_t_6 = 0;
  3473. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_flag); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 209, __pyx_L1_error)
  3474. __pyx_v_c_flag = __pyx_t_9;
  3475. __pyx_t_10 = ((__pyx_v_events & __pyx_v_c_flag) != 0);
  3476. if (__pyx_t_10) {
  3477. __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_string); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 211, __pyx_L1_error)
  3478. __pyx_v_events = (__pyx_v_events & (~__pyx_v_c_flag));
  3479. }
  3480. __pyx_t_10 = ((!(__pyx_v_events != 0)) != 0);
  3481. if (__pyx_t_10) {
  3482. goto __pyx_L4_break;
  3483. }
  3484. }
  3485. __pyx_L4_break:;
  3486. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3487. __pyx_t_10 = (__pyx_v_events != 0);
  3488. if (__pyx_t_10) {
  3489. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
  3490. __Pyx_GOTREF(__pyx_t_2);
  3491. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
  3492. __Pyx_GOTREF(__pyx_t_1);
  3493. __Pyx_GIVEREF(__pyx_t_2);
  3494. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  3495. __pyx_t_2 = 0;
  3496. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
  3497. __Pyx_GOTREF(__pyx_t_2);
  3498. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3499. __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 216, __pyx_L1_error)
  3500. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3501. }
  3502. __Pyx_XDECREF(__pyx_r);
  3503. __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  3504. __Pyx_GOTREF(__pyx_t_2);
  3505. __pyx_r = __pyx_t_2;
  3506. __pyx_t_2 = 0;
  3507. goto __pyx_L0;
  3508. /* function exit code */
  3509. __pyx_L1_error:;
  3510. __Pyx_XDECREF(__pyx_t_1);
  3511. __Pyx_XDECREF(__pyx_t_2);
  3512. __Pyx_XDECREF(__pyx_t_5);
  3513. __Pyx_XDECREF(__pyx_t_6);
  3514. __Pyx_XDECREF(__pyx_t_7);
  3515. __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3516. __pyx_r = 0;
  3517. __pyx_L0:;
  3518. __Pyx_XDECREF(__pyx_v_result);
  3519. __Pyx_XDECREF(__pyx_v_flag);
  3520. __Pyx_XDECREF(__pyx_v_string);
  3521. __Pyx_XGIVEREF(__pyx_r);
  3522. __Pyx_RefNannyFinishContext();
  3523. return __pyx_r;
  3524. }
  3525. /* Python wrapper */
  3526. static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events); /*proto*/
  3527. static PyObject *__pyx_pw_6gevent_5libev_8corecext_11_events_to_str(PyObject *__pyx_self, PyObject *__pyx_arg_events) {
  3528. int __pyx_v_events;
  3529. PyObject *__pyx_r = 0;
  3530. __Pyx_RefNannyDeclarations
  3531. __Pyx_RefNannySetupContext("_events_to_str (wrapper)", 0);
  3532. assert(__pyx_arg_events); {
  3533. __pyx_v_events = __Pyx_PyInt_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L3_error)
  3534. }
  3535. goto __pyx_L4_argument_unpacking_done;
  3536. __pyx_L3_error:;
  3537. __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3538. __Pyx_RefNannyFinishContext();
  3539. return NULL;
  3540. __pyx_L4_argument_unpacking_done:;
  3541. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_10_events_to_str(__pyx_self, ((int)__pyx_v_events));
  3542. /* function exit code */
  3543. __Pyx_RefNannyFinishContext();
  3544. return __pyx_r;
  3545. }
  3546. static PyObject *__pyx_pf_6gevent_5libev_8corecext_10_events_to_str(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_events) {
  3547. PyObject *__pyx_r = NULL;
  3548. __Pyx_RefNannyDeclarations
  3549. PyObject *__pyx_t_1 = NULL;
  3550. __Pyx_RefNannySetupContext("_events_to_str", 0);
  3551. __Pyx_XDECREF(__pyx_r);
  3552. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_events, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
  3553. __Pyx_GOTREF(__pyx_t_1);
  3554. __pyx_r = __pyx_t_1;
  3555. __pyx_t_1 = 0;
  3556. goto __pyx_L0;
  3557. /* function exit code */
  3558. __pyx_L1_error:;
  3559. __Pyx_XDECREF(__pyx_t_1);
  3560. __Pyx_AddTraceback("gevent.libev.corecext._events_to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3561. __pyx_r = NULL;
  3562. __pyx_L0:;
  3563. __Pyx_XGIVEREF(__pyx_r);
  3564. __Pyx_RefNannyFinishContext();
  3565. return __pyx_r;
  3566. }
  3567. /* Python wrapper */
  3568. static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3569. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_13supported_backends = {"supported_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_13supported_backends, METH_NOARGS, 0};
  3570. static PyObject *__pyx_pw_6gevent_5libev_8corecext_13supported_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  3571. PyObject *__pyx_r = 0;
  3572. __Pyx_RefNannyDeclarations
  3573. __Pyx_RefNannySetupContext("supported_backends (wrapper)", 0);
  3574. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_12supported_backends(__pyx_self);
  3575. /* function exit code */
  3576. __Pyx_RefNannyFinishContext();
  3577. return __pyx_r;
  3578. }
  3579. static PyObject *__pyx_pf_6gevent_5libev_8corecext_12supported_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  3580. PyObject *__pyx_r = NULL;
  3581. __Pyx_RefNannyDeclarations
  3582. PyObject *__pyx_t_1 = NULL;
  3583. __Pyx_RefNannySetupContext("supported_backends", 0);
  3584. __Pyx_XDECREF(__pyx_r);
  3585. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_supported_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  3586. __Pyx_GOTREF(__pyx_t_1);
  3587. __pyx_r = __pyx_t_1;
  3588. __pyx_t_1 = 0;
  3589. goto __pyx_L0;
  3590. /* function exit code */
  3591. __pyx_L1_error:;
  3592. __Pyx_XDECREF(__pyx_t_1);
  3593. __Pyx_AddTraceback("gevent.libev.corecext.supported_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3594. __pyx_r = NULL;
  3595. __pyx_L0:;
  3596. __Pyx_XGIVEREF(__pyx_r);
  3597. __Pyx_RefNannyFinishContext();
  3598. return __pyx_r;
  3599. }
  3600. /* Python wrapper */
  3601. static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3602. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_15recommended_backends = {"recommended_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_15recommended_backends, METH_NOARGS, 0};
  3603. static PyObject *__pyx_pw_6gevent_5libev_8corecext_15recommended_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  3604. PyObject *__pyx_r = 0;
  3605. __Pyx_RefNannyDeclarations
  3606. __Pyx_RefNannySetupContext("recommended_backends (wrapper)", 0);
  3607. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_14recommended_backends(__pyx_self);
  3608. /* function exit code */
  3609. __Pyx_RefNannyFinishContext();
  3610. return __pyx_r;
  3611. }
  3612. static PyObject *__pyx_pf_6gevent_5libev_8corecext_14recommended_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  3613. PyObject *__pyx_r = NULL;
  3614. __Pyx_RefNannyDeclarations
  3615. PyObject *__pyx_t_1 = NULL;
  3616. __Pyx_RefNannySetupContext("recommended_backends", 0);
  3617. __Pyx_XDECREF(__pyx_r);
  3618. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_recommended_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  3619. __Pyx_GOTREF(__pyx_t_1);
  3620. __pyx_r = __pyx_t_1;
  3621. __pyx_t_1 = 0;
  3622. goto __pyx_L0;
  3623. /* function exit code */
  3624. __pyx_L1_error:;
  3625. __Pyx_XDECREF(__pyx_t_1);
  3626. __Pyx_AddTraceback("gevent.libev.corecext.recommended_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3627. __pyx_r = NULL;
  3628. __pyx_L0:;
  3629. __Pyx_XGIVEREF(__pyx_r);
  3630. __Pyx_RefNannyFinishContext();
  3631. return __pyx_r;
  3632. }
  3633. /* Python wrapper */
  3634. static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3635. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends = {"embeddable_backends", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends, METH_NOARGS, 0};
  3636. static PyObject *__pyx_pw_6gevent_5libev_8corecext_17embeddable_backends(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  3637. PyObject *__pyx_r = 0;
  3638. __Pyx_RefNannyDeclarations
  3639. __Pyx_RefNannySetupContext("embeddable_backends (wrapper)", 0);
  3640. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(__pyx_self);
  3641. /* function exit code */
  3642. __Pyx_RefNannyFinishContext();
  3643. return __pyx_r;
  3644. }
  3645. static PyObject *__pyx_pf_6gevent_5libev_8corecext_16embeddable_backends(CYTHON_UNUSED PyObject *__pyx_self) {
  3646. PyObject *__pyx_r = NULL;
  3647. __Pyx_RefNannyDeclarations
  3648. PyObject *__pyx_t_1 = NULL;
  3649. __Pyx_RefNannySetupContext("embeddable_backends", 0);
  3650. __Pyx_XDECREF(__pyx_r);
  3651. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(ev_embeddable_backends(), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
  3652. __Pyx_GOTREF(__pyx_t_1);
  3653. __pyx_r = __pyx_t_1;
  3654. __pyx_t_1 = 0;
  3655. goto __pyx_L0;
  3656. /* function exit code */
  3657. __pyx_L1_error:;
  3658. __Pyx_XDECREF(__pyx_t_1);
  3659. __Pyx_AddTraceback("gevent.libev.corecext.embeddable_backends", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3660. __pyx_r = NULL;
  3661. __pyx_L0:;
  3662. __Pyx_XGIVEREF(__pyx_r);
  3663. __Pyx_RefNannyFinishContext();
  3664. return __pyx_r;
  3665. }
  3666. /* Python wrapper */
  3667. static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3668. static PyMethodDef __pyx_mdef_6gevent_5libev_8corecext_19time = {"time", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_19time, METH_NOARGS, 0};
  3669. static PyObject *__pyx_pw_6gevent_5libev_8corecext_19time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  3670. PyObject *__pyx_r = 0;
  3671. __Pyx_RefNannyDeclarations
  3672. __Pyx_RefNannySetupContext("time (wrapper)", 0);
  3673. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_18time(__pyx_self);
  3674. /* function exit code */
  3675. __Pyx_RefNannyFinishContext();
  3676. return __pyx_r;
  3677. }
  3678. static PyObject *__pyx_pf_6gevent_5libev_8corecext_18time(CYTHON_UNUSED PyObject *__pyx_self) {
  3679. PyObject *__pyx_r = NULL;
  3680. __Pyx_RefNannyDeclarations
  3681. PyObject *__pyx_t_1 = NULL;
  3682. __Pyx_RefNannySetupContext("time", 0);
  3683. __Pyx_XDECREF(__pyx_r);
  3684. __pyx_t_1 = PyFloat_FromDouble(ev_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  3685. __Pyx_GOTREF(__pyx_t_1);
  3686. __pyx_r = __pyx_t_1;
  3687. __pyx_t_1 = 0;
  3688. goto __pyx_L0;
  3689. /* function exit code */
  3690. __pyx_L1_error:;
  3691. __Pyx_XDECREF(__pyx_t_1);
  3692. __Pyx_AddTraceback("gevent.libev.corecext.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3693. __pyx_r = NULL;
  3694. __pyx_L0:;
  3695. __Pyx_XGIVEREF(__pyx_r);
  3696. __Pyx_RefNannyFinishContext();
  3697. return __pyx_r;
  3698. }
  3699. /* Python wrapper */
  3700. static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  3701. static int __pyx_pw_6gevent_5libev_8corecext_4loop_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  3702. PyObject *__pyx_v_flags = 0;
  3703. PyObject *__pyx_v_default = 0;
  3704. size_t __pyx_v_ptr;
  3705. int __pyx_r;
  3706. __Pyx_RefNannyDeclarations
  3707. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  3708. {
  3709. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flags_2,&__pyx_n_s_default,&__pyx_n_s_ptr,0};
  3710. PyObject* values[3] = {0,0,0};
  3711. values[0] = ((PyObject *)Py_None);
  3712. values[1] = ((PyObject *)Py_None);
  3713. if (unlikely(__pyx_kwds)) {
  3714. Py_ssize_t kw_args;
  3715. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  3716. switch (pos_args) {
  3717. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  3718. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  3719. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  3720. case 0: break;
  3721. default: goto __pyx_L5_argtuple_error;
  3722. }
  3723. kw_args = PyDict_Size(__pyx_kwds);
  3724. switch (pos_args) {
  3725. case 0:
  3726. if (kw_args > 0) {
  3727. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags_2);
  3728. if (value) { values[0] = value; kw_args--; }
  3729. }
  3730. case 1:
  3731. if (kw_args > 0) {
  3732. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default);
  3733. if (value) { values[1] = value; kw_args--; }
  3734. }
  3735. case 2:
  3736. if (kw_args > 0) {
  3737. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ptr);
  3738. if (value) { values[2] = value; kw_args--; }
  3739. }
  3740. }
  3741. if (unlikely(kw_args > 0)) {
  3742. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 256, __pyx_L3_error)
  3743. }
  3744. } else {
  3745. switch (PyTuple_GET_SIZE(__pyx_args)) {
  3746. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  3747. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  3748. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  3749. case 0: break;
  3750. default: goto __pyx_L5_argtuple_error;
  3751. }
  3752. }
  3753. __pyx_v_flags = values[0];
  3754. __pyx_v_default = values[1];
  3755. if (values[2]) {
  3756. __pyx_v_ptr = __Pyx_PyInt_As_size_t(values[2]); if (unlikely((__pyx_v_ptr == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L3_error)
  3757. } else {
  3758. __pyx_v_ptr = ((size_t)0);
  3759. }
  3760. }
  3761. goto __pyx_L4_argument_unpacking_done;
  3762. __pyx_L5_argtuple_error:;
  3763. __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 256, __pyx_L3_error)
  3764. __pyx_L3_error:;
  3765. __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3766. __Pyx_RefNannyFinishContext();
  3767. return -1;
  3768. __pyx_L4_argument_unpacking_done:;
  3769. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop___init__(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_flags, __pyx_v_default, __pyx_v_ptr);
  3770. /* function exit code */
  3771. __Pyx_RefNannyFinishContext();
  3772. return __pyx_r;
  3773. }
  3774. static int __pyx_pf_6gevent_5libev_8corecext_4loop___init__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_flags, PyObject *__pyx_v_default, size_t __pyx_v_ptr) {
  3775. unsigned int __pyx_v_c_flags;
  3776. CYTHON_UNUSED PyObject *__pyx_v_old_handler = 0;
  3777. int __pyx_r;
  3778. __Pyx_RefNannyDeclarations
  3779. int __pyx_t_1;
  3780. unsigned int __pyx_t_2;
  3781. PyObject *__pyx_t_3 = NULL;
  3782. int __pyx_t_4;
  3783. PyObject *__pyx_t_5 = NULL;
  3784. int __pyx_t_6;
  3785. __Pyx_RefNannySetupContext("__init__", 0);
  3786. __Pyx_INCREF(__pyx_v_default);
  3787. __Pyx_INCREF(Py_None);
  3788. __pyx_v_old_handler = Py_None;
  3789. ev_prepare_init((&__pyx_v_self->_prepare), ((void *)gevent_run_callbacks));
  3790. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  3791. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  3792. ev_timer_init((&__pyx_v_self->_periodic_signal_checker), ((void *)gevent_periodic_signal_check), 0.3, 0.3);
  3793. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  3794. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  3795. ev_timer_init((&__pyx_v_self->_timer0), ((void *)gevent_noop), 0.0, 0.0);
  3796. __pyx_t_1 = (__pyx_v_ptr != 0);
  3797. if (__pyx_t_1) {
  3798. __pyx_v_self->_ptr = ((struct ev_loop *)__pyx_v_ptr);
  3799. goto __pyx_L3;
  3800. }
  3801. /*else*/ {
  3802. __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error)
  3803. __pyx_v_c_flags = __pyx_t_2;
  3804. __pyx_t_3 = __pyx_f_6gevent_5libev_8corecext__check_flags(__pyx_v_c_flags, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
  3805. __Pyx_GOTREF(__pyx_t_3);
  3806. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3807. __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_NOENV);
  3808. __pyx_v_c_flags = (__pyx_v_c_flags | EVFLAG_FORKCHECK);
  3809. __pyx_t_1 = (__pyx_v_default == Py_None);
  3810. __pyx_t_4 = (__pyx_t_1 != 0);
  3811. if (__pyx_t_4) {
  3812. __Pyx_INCREF(Py_True);
  3813. __Pyx_DECREF_SET(__pyx_v_default, Py_True);
  3814. __pyx_t_4 = (__pyx_v_6gevent_5libev_8corecext__default_loop_destroyed != 0);
  3815. if (__pyx_t_4) {
  3816. __Pyx_INCREF(Py_False);
  3817. __Pyx_DECREF_SET(__pyx_v_default, Py_False);
  3818. }
  3819. }
  3820. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 275, __pyx_L1_error)
  3821. if (__pyx_t_4) {
  3822. __pyx_v_self->_ptr = gevent_ev_default_loop(__pyx_v_c_flags);
  3823. __pyx_t_4 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  3824. if (__pyx_t_4) {
  3825. __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_c_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  3826. __Pyx_GOTREF(__pyx_t_3);
  3827. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
  3828. __Pyx_GOTREF(__pyx_t_5);
  3829. __Pyx_GIVEREF(__pyx_t_3);
  3830. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  3831. __pyx_t_3 = 0;
  3832. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ev_default_loop_s_failed, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  3833. __Pyx_GOTREF(__pyx_t_3);
  3834. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3835. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
  3836. __Pyx_GOTREF(__pyx_t_5);
  3837. __Pyx_GIVEREF(__pyx_t_3);
  3838. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  3839. __pyx_t_3 = 0;
  3840. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  3841. __Pyx_GOTREF(__pyx_t_3);
  3842. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3843. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  3844. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3845. __PYX_ERR(0, 278, __pyx_L1_error)
  3846. }
  3847. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  3848. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  3849. ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_periodic_signal_checker));
  3850. ev_unref(__pyx_v_self->_ptr);
  3851. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  3852. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  3853. goto __pyx_L6;
  3854. }
  3855. /*else*/ {
  3856. __pyx_v_self->_ptr = ev_loop_new(__pyx_v_c_flags);
  3857. __pyx_t_4 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  3858. if (__pyx_t_4) {
  3859. __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_c_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  3860. __Pyx_GOTREF(__pyx_t_3);
  3861. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
  3862. __Pyx_GOTREF(__pyx_t_5);
  3863. __Pyx_GIVEREF(__pyx_t_3);
  3864. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  3865. __pyx_t_3 = 0;
  3866. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_ev_loop_new_s_failed, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  3867. __Pyx_GOTREF(__pyx_t_3);
  3868. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3869. __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
  3870. __Pyx_GOTREF(__pyx_t_5);
  3871. __Pyx_GIVEREF(__pyx_t_3);
  3872. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  3873. __pyx_t_3 = 0;
  3874. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  3875. __Pyx_GOTREF(__pyx_t_3);
  3876. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3877. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  3878. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3879. __PYX_ERR(0, 286, __pyx_L1_error)
  3880. }
  3881. }
  3882. __pyx_L6:;
  3883. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_default); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 287, __pyx_L1_error)
  3884. if (!__pyx_t_1) {
  3885. } else {
  3886. __pyx_t_4 = __pyx_t_1;
  3887. goto __pyx_L10_bool_binop_done;
  3888. }
  3889. __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_SYSERR_CALLBACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
  3890. __Pyx_GOTREF(__pyx_t_3);
  3891. __pyx_t_1 = (__pyx_t_3 == Py_None);
  3892. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3893. __pyx_t_6 = (__pyx_t_1 != 0);
  3894. __pyx_t_4 = __pyx_t_6;
  3895. __pyx_L10_bool_binop_done:;
  3896. if (__pyx_t_4) {
  3897. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_syserr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
  3898. __Pyx_GOTREF(__pyx_t_3);
  3899. __pyx_t_5 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_t_3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
  3900. __Pyx_GOTREF(__pyx_t_5);
  3901. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3902. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3903. }
  3904. ev_prepare_start(__pyx_v_self->_ptr, (&__pyx_v_self->_prepare));
  3905. ev_unref(__pyx_v_self->_ptr);
  3906. }
  3907. __pyx_L3:;
  3908. __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
  3909. __Pyx_GOTREF(__pyx_t_5);
  3910. __Pyx_GIVEREF(__pyx_t_5);
  3911. __Pyx_GOTREF(__pyx_v_self->_callbacks);
  3912. __Pyx_DECREF(__pyx_v_self->_callbacks);
  3913. __pyx_v_self->_callbacks = ((PyObject*)__pyx_t_5);
  3914. __pyx_t_5 = 0;
  3915. /* function exit code */
  3916. __pyx_r = 0;
  3917. goto __pyx_L0;
  3918. __pyx_L1_error:;
  3919. __Pyx_XDECREF(__pyx_t_3);
  3920. __Pyx_XDECREF(__pyx_t_5);
  3921. __Pyx_AddTraceback("gevent.libev.corecext.loop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3922. __pyx_r = -1;
  3923. __pyx_L0:;
  3924. __Pyx_XDECREF(__pyx_v_old_handler);
  3925. __Pyx_XDECREF(__pyx_v_default);
  3926. __Pyx_RefNannyFinishContext();
  3927. return __pyx_r;
  3928. }
  3929. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks(struct PyGeventLoopObject *__pyx_v_self) {
  3930. struct PyGeventCallbackObject *__pyx_v_cb = 0;
  3931. PyObject *__pyx_v_callbacks = 0;
  3932. int __pyx_v_count;
  3933. PyObject *__pyx_r = NULL;
  3934. __Pyx_RefNannyDeclarations
  3935. int __pyx_t_1;
  3936. int __pyx_t_2;
  3937. PyObject *__pyx_t_3 = NULL;
  3938. Py_ssize_t __pyx_t_4;
  3939. PyObject *(*__pyx_t_5)(PyObject *);
  3940. PyObject *__pyx_t_6 = NULL;
  3941. __Pyx_RefNannySetupContext("_run_callbacks", 0);
  3942. __pyx_v_count = 0x3E8;
  3943. ev_timer_stop(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));
  3944. while (1) {
  3945. __pyx_t_2 = (__pyx_v_self->_callbacks != Py_None) && (PyList_GET_SIZE(__pyx_v_self->_callbacks) != 0);
  3946. if (__pyx_t_2) {
  3947. } else {
  3948. __pyx_t_1 = __pyx_t_2;
  3949. goto __pyx_L5_bool_binop_done;
  3950. }
  3951. __pyx_t_2 = ((__pyx_v_count > 0) != 0);
  3952. __pyx_t_1 = __pyx_t_2;
  3953. __pyx_L5_bool_binop_done:;
  3954. if (!__pyx_t_1) break;
  3955. __pyx_t_3 = __pyx_v_self->_callbacks;
  3956. __Pyx_INCREF(__pyx_t_3);
  3957. __Pyx_XDECREF_SET(__pyx_v_callbacks, __pyx_t_3);
  3958. __pyx_t_3 = 0;
  3959. __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
  3960. __Pyx_GOTREF(__pyx_t_3);
  3961. __Pyx_GIVEREF(__pyx_t_3);
  3962. __Pyx_GOTREF(__pyx_v_self->_callbacks);
  3963. __Pyx_DECREF(__pyx_v_self->_callbacks);
  3964. __pyx_v_self->_callbacks = ((PyObject*)__pyx_t_3);
  3965. __pyx_t_3 = 0;
  3966. if (likely(PyList_CheckExact(__pyx_v_callbacks)) || PyTuple_CheckExact(__pyx_v_callbacks)) {
  3967. __pyx_t_3 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  3968. __pyx_t_5 = NULL;
  3969. } else {
  3970. __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
  3971. __Pyx_GOTREF(__pyx_t_3);
  3972. __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
  3973. }
  3974. for (;;) {
  3975. if (likely(!__pyx_t_5)) {
  3976. if (likely(PyList_CheckExact(__pyx_t_3))) {
  3977. if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
  3978. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3979. __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 301, __pyx_L1_error)
  3980. #else
  3981. __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error)
  3982. __Pyx_GOTREF(__pyx_t_6);
  3983. #endif
  3984. } else {
  3985. if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
  3986. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3987. __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 301, __pyx_L1_error)
  3988. #else
  3989. __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error)
  3990. __Pyx_GOTREF(__pyx_t_6);
  3991. #endif
  3992. }
  3993. } else {
  3994. __pyx_t_6 = __pyx_t_5(__pyx_t_3);
  3995. if (unlikely(!__pyx_t_6)) {
  3996. PyObject* exc_type = PyErr_Occurred();
  3997. if (exc_type) {
  3998. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  3999. else __PYX_ERR(0, 301, __pyx_L1_error)
  4000. }
  4001. break;
  4002. }
  4003. __Pyx_GOTREF(__pyx_t_6);
  4004. }
  4005. if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6gevent_5libev_8corecext_callback))))) __PYX_ERR(0, 301, __pyx_L1_error)
  4006. __Pyx_XDECREF_SET(__pyx_v_cb, ((struct PyGeventCallbackObject *)__pyx_t_6));
  4007. __pyx_t_6 = 0;
  4008. ev_unref(__pyx_v_self->_ptr);
  4009. gevent_call(__pyx_v_self, __pyx_v_cb);
  4010. __pyx_v_count = (__pyx_v_count - 1);
  4011. }
  4012. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4013. }
  4014. __pyx_t_1 = (__pyx_v_self->_callbacks != Py_None) && (PyList_GET_SIZE(__pyx_v_self->_callbacks) != 0);
  4015. if (__pyx_t_1) {
  4016. ev_timer_start(__pyx_v_self->_ptr, (&__pyx_v_self->_timer0));
  4017. }
  4018. /* function exit code */
  4019. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4020. goto __pyx_L0;
  4021. __pyx_L1_error:;
  4022. __Pyx_XDECREF(__pyx_t_3);
  4023. __Pyx_XDECREF(__pyx_t_6);
  4024. __Pyx_AddTraceback("gevent.libev.corecext.loop._run_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4025. __pyx_r = 0;
  4026. __pyx_L0:;
  4027. __Pyx_XDECREF((PyObject *)__pyx_v_cb);
  4028. __Pyx_XDECREF(__pyx_v_callbacks);
  4029. __Pyx_XGIVEREF(__pyx_r);
  4030. __Pyx_RefNannyFinishContext();
  4031. return __pyx_r;
  4032. }
  4033. /* Python wrapper */
  4034. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3_stop_watchers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  4035. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3_stop_watchers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  4036. PyObject *__pyx_r = 0;
  4037. __Pyx_RefNannyDeclarations
  4038. __Pyx_RefNannySetupContext("_stop_watchers (wrapper)", 0);
  4039. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_2_stop_watchers(((struct PyGeventLoopObject *)__pyx_v_self));
  4040. /* function exit code */
  4041. __Pyx_RefNannyFinishContext();
  4042. return __pyx_r;
  4043. }
  4044. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_2_stop_watchers(struct PyGeventLoopObject *__pyx_v_self) {
  4045. PyObject *__pyx_r = NULL;
  4046. __Pyx_RefNannyDeclarations
  4047. int __pyx_t_1;
  4048. __Pyx_RefNannySetupContext("_stop_watchers", 0);
  4049. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_prepare)) != 0);
  4050. if (__pyx_t_1) {
  4051. ev_ref(__pyx_v_self->_ptr);
  4052. ev_prepare_stop(__pyx_v_self->_ptr, (&__pyx_v_self->_prepare));
  4053. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  4054. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  4055. }
  4056. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_periodic_signal_checker)) != 0);
  4057. if (__pyx_t_1) {
  4058. ev_ref(__pyx_v_self->_ptr);
  4059. ev_timer_stop(__pyx_v_self->_ptr, (&__pyx_v_self->_periodic_signal_checker));
  4060. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  4061. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  4062. }
  4063. /* function exit code */
  4064. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4065. __Pyx_XGIVEREF(__pyx_r);
  4066. __Pyx_RefNannyFinishContext();
  4067. return __pyx_r;
  4068. }
  4069. /* Python wrapper */
  4070. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  4071. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  4072. PyObject *__pyx_r = 0;
  4073. __Pyx_RefNannyDeclarations
  4074. __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  4075. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(((struct PyGeventLoopObject *)__pyx_v_self));
  4076. /* function exit code */
  4077. __Pyx_RefNannyFinishContext();
  4078. return __pyx_r;
  4079. }
  4080. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_4destroy(struct PyGeventLoopObject *__pyx_v_self) {
  4081. PyObject *__pyx_r = NULL;
  4082. __Pyx_RefNannyDeclarations
  4083. int __pyx_t_1;
  4084. PyObject *__pyx_t_2 = NULL;
  4085. PyObject *__pyx_t_3 = NULL;
  4086. PyObject *__pyx_t_4 = NULL;
  4087. __Pyx_RefNannySetupContext("destroy", 0);
  4088. __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  4089. if (__pyx_t_1) {
  4090. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop_watchers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error)
  4091. __Pyx_GOTREF(__pyx_t_3);
  4092. __pyx_t_4 = NULL;
  4093. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  4094. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  4095. if (likely(__pyx_t_4)) {
  4096. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4097. __Pyx_INCREF(__pyx_t_4);
  4098. __Pyx_INCREF(function);
  4099. __Pyx_DECREF_SET(__pyx_t_3, function);
  4100. }
  4101. }
  4102. if (__pyx_t_4) {
  4103. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  4104. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4105. } else {
  4106. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  4107. }
  4108. __Pyx_GOTREF(__pyx_t_2);
  4109. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4110. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4111. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SYSERR_CALLBACK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
  4112. __Pyx_GOTREF(__pyx_t_2);
  4113. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_syserr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
  4114. __Pyx_GOTREF(__pyx_t_3);
  4115. __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
  4116. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4117. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4118. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 322, __pyx_L1_error)
  4119. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4120. if (__pyx_t_1) {
  4121. __pyx_t_4 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error)
  4122. __Pyx_GOTREF(__pyx_t_4);
  4123. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4124. }
  4125. __pyx_t_1 = (ev_is_default_loop(__pyx_v_self->_ptr) != 0);
  4126. if (__pyx_t_1) {
  4127. __pyx_v_6gevent_5libev_8corecext__default_loop_destroyed = 1;
  4128. }
  4129. ev_loop_destroy(__pyx_v_self->_ptr);
  4130. __pyx_v_self->_ptr = NULL;
  4131. }
  4132. /* function exit code */
  4133. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4134. goto __pyx_L0;
  4135. __pyx_L1_error:;
  4136. __Pyx_XDECREF(__pyx_t_2);
  4137. __Pyx_XDECREF(__pyx_t_3);
  4138. __Pyx_XDECREF(__pyx_t_4);
  4139. __Pyx_AddTraceback("gevent.libev.corecext.loop.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4140. __pyx_r = NULL;
  4141. __pyx_L0:;
  4142. __Pyx_XGIVEREF(__pyx_r);
  4143. __Pyx_RefNannyFinishContext();
  4144. return __pyx_r;
  4145. }
  4146. /* Python wrapper */
  4147. static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
  4148. static void __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(PyObject *__pyx_v_self) {
  4149. __Pyx_RefNannyDeclarations
  4150. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  4151. __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(((struct PyGeventLoopObject *)__pyx_v_self));
  4152. /* function exit code */
  4153. __Pyx_RefNannyFinishContext();
  4154. }
  4155. static void __pyx_pf_6gevent_5libev_8corecext_4loop_6__dealloc__(struct PyGeventLoopObject *__pyx_v_self) {
  4156. __Pyx_RefNannyDeclarations
  4157. int __pyx_t_1;
  4158. PyObject *__pyx_t_2 = NULL;
  4159. PyObject *__pyx_t_3 = NULL;
  4160. PyObject *__pyx_t_4 = NULL;
  4161. __Pyx_RefNannySetupContext("__dealloc__", 0);
  4162. __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  4163. if (__pyx_t_1) {
  4164. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop_watchers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
  4165. __Pyx_GOTREF(__pyx_t_3);
  4166. __pyx_t_4 = NULL;
  4167. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  4168. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  4169. if (likely(__pyx_t_4)) {
  4170. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4171. __Pyx_INCREF(__pyx_t_4);
  4172. __Pyx_INCREF(function);
  4173. __Pyx_DECREF_SET(__pyx_t_3, function);
  4174. }
  4175. }
  4176. if (__pyx_t_4) {
  4177. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  4178. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4179. } else {
  4180. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  4181. }
  4182. __Pyx_GOTREF(__pyx_t_2);
  4183. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4184. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4185. __pyx_t_1 = ((!(ev_is_default_loop(__pyx_v_self->_ptr) != 0)) != 0);
  4186. if (__pyx_t_1) {
  4187. ev_loop_destroy(__pyx_v_self->_ptr);
  4188. }
  4189. __pyx_v_self->_ptr = NULL;
  4190. }
  4191. /* function exit code */
  4192. goto __pyx_L0;
  4193. __pyx_L1_error:;
  4194. __Pyx_XDECREF(__pyx_t_2);
  4195. __Pyx_XDECREF(__pyx_t_3);
  4196. __Pyx_XDECREF(__pyx_t_4);
  4197. __Pyx_WriteUnraisable("gevent.libev.corecext.loop.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  4198. __pyx_L0:;
  4199. __Pyx_RefNannyFinishContext();
  4200. }
  4201. /* Python wrapper */
  4202. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/
  4203. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(PyObject *__pyx_v_self) {
  4204. PyObject *__pyx_r = 0;
  4205. __Pyx_RefNannyDeclarations
  4206. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  4207. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  4208. /* function exit code */
  4209. __Pyx_RefNannyFinishContext();
  4210. return __pyx_r;
  4211. }
  4212. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_3ptr___get__(struct PyGeventLoopObject *__pyx_v_self) {
  4213. PyObject *__pyx_r = NULL;
  4214. __Pyx_RefNannyDeclarations
  4215. PyObject *__pyx_t_1 = NULL;
  4216. __Pyx_RefNannySetupContext("__get__", 0);
  4217. __Pyx_XDECREF(__pyx_r);
  4218. __pyx_t_1 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
  4219. __Pyx_GOTREF(__pyx_t_1);
  4220. __pyx_r = __pyx_t_1;
  4221. __pyx_t_1 = 0;
  4222. goto __pyx_L0;
  4223. /* function exit code */
  4224. __pyx_L1_error:;
  4225. __Pyx_XDECREF(__pyx_t_1);
  4226. __Pyx_AddTraceback("gevent.libev.corecext.loop.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4227. __pyx_r = NULL;
  4228. __pyx_L0:;
  4229. __Pyx_XGIVEREF(__pyx_r);
  4230. __Pyx_RefNannyFinishContext();
  4231. return __pyx_r;
  4232. }
  4233. /* Python wrapper */
  4234. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self); /*proto*/
  4235. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(PyObject *__pyx_v_self) {
  4236. PyObject *__pyx_r = 0;
  4237. __Pyx_RefNannyDeclarations
  4238. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  4239. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  4240. /* function exit code */
  4241. __Pyx_RefNannyFinishContext();
  4242. return __pyx_r;
  4243. }
  4244. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11WatcherType___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  4245. PyObject *__pyx_r = NULL;
  4246. __Pyx_RefNannyDeclarations
  4247. __Pyx_RefNannySetupContext("__get__", 0);
  4248. __Pyx_XDECREF(__pyx_r);
  4249. __Pyx_INCREF(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher));
  4250. __pyx_r = ((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_watcher);
  4251. goto __pyx_L0;
  4252. /* function exit code */
  4253. __pyx_L0:;
  4254. __Pyx_XGIVEREF(__pyx_r);
  4255. __Pyx_RefNannyFinishContext();
  4256. return __pyx_r;
  4257. }
  4258. /* Python wrapper */
  4259. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
  4260. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(PyObject *__pyx_v_self) {
  4261. PyObject *__pyx_r = 0;
  4262. __Pyx_RefNannyDeclarations
  4263. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  4264. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  4265. /* function exit code */
  4266. __Pyx_RefNannyFinishContext();
  4267. return __pyx_r;
  4268. }
  4269. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MAXPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  4270. PyObject *__pyx_r = NULL;
  4271. __Pyx_RefNannyDeclarations
  4272. PyObject *__pyx_t_1 = NULL;
  4273. __Pyx_RefNannySetupContext("__get__", 0);
  4274. __Pyx_XDECREF(__pyx_r);
  4275. __pyx_t_1 = __Pyx_PyInt_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
  4276. __Pyx_GOTREF(__pyx_t_1);
  4277. __pyx_r = __pyx_t_1;
  4278. __pyx_t_1 = 0;
  4279. goto __pyx_L0;
  4280. /* function exit code */
  4281. __pyx_L1_error:;
  4282. __Pyx_XDECREF(__pyx_t_1);
  4283. __Pyx_AddTraceback("gevent.libev.corecext.loop.MAXPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4284. __pyx_r = NULL;
  4285. __pyx_L0:;
  4286. __Pyx_XGIVEREF(__pyx_r);
  4287. __Pyx_RefNannyFinishContext();
  4288. return __pyx_r;
  4289. }
  4290. /* Python wrapper */
  4291. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self); /*proto*/
  4292. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(PyObject *__pyx_v_self) {
  4293. PyObject *__pyx_r = 0;
  4294. __Pyx_RefNannyDeclarations
  4295. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  4296. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  4297. /* function exit code */
  4298. __Pyx_RefNannyFinishContext();
  4299. return __pyx_r;
  4300. }
  4301. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_6MINPRI___get__(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  4302. PyObject *__pyx_r = NULL;
  4303. __Pyx_RefNannyDeclarations
  4304. PyObject *__pyx_t_1 = NULL;
  4305. __Pyx_RefNannySetupContext("__get__", 0);
  4306. __Pyx_XDECREF(__pyx_r);
  4307. __pyx_t_1 = __Pyx_PyInt_From_int(EV_MINPRI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
  4308. __Pyx_GOTREF(__pyx_t_1);
  4309. __pyx_r = __pyx_t_1;
  4310. __pyx_t_1 = 0;
  4311. goto __pyx_L0;
  4312. /* function exit code */
  4313. __pyx_L1_error:;
  4314. __Pyx_XDECREF(__pyx_t_1);
  4315. __Pyx_AddTraceback("gevent.libev.corecext.loop.MINPRI.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4316. __pyx_r = NULL;
  4317. __pyx_L0:;
  4318. __Pyx_XGIVEREF(__pyx_r);
  4319. __Pyx_RefNannyFinishContext();
  4320. return __pyx_r;
  4321. }
  4322. /* Python wrapper */
  4323. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4324. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  4325. PyObject *__pyx_v_message = 0;
  4326. PyObject *__pyx_v_errno = 0;
  4327. PyObject *__pyx_r = 0;
  4328. __Pyx_RefNannyDeclarations
  4329. __Pyx_RefNannySetupContext("_handle_syserr (wrapper)", 0);
  4330. {
  4331. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,&__pyx_n_s_errno,0};
  4332. PyObject* values[2] = {0,0};
  4333. if (unlikely(__pyx_kwds)) {
  4334. Py_ssize_t kw_args;
  4335. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  4336. switch (pos_args) {
  4337. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4338. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4339. case 0: break;
  4340. default: goto __pyx_L5_argtuple_error;
  4341. }
  4342. kw_args = PyDict_Size(__pyx_kwds);
  4343. switch (pos_args) {
  4344. case 0:
  4345. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
  4346. else goto __pyx_L5_argtuple_error;
  4347. case 1:
  4348. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno)) != 0)) kw_args--;
  4349. else {
  4350. __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, 1); __PYX_ERR(0, 356, __pyx_L3_error)
  4351. }
  4352. }
  4353. if (unlikely(kw_args > 0)) {
  4354. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_handle_syserr") < 0)) __PYX_ERR(0, 356, __pyx_L3_error)
  4355. }
  4356. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  4357. goto __pyx_L5_argtuple_error;
  4358. } else {
  4359. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4360. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4361. }
  4362. __pyx_v_message = values[0];
  4363. __pyx_v_errno = values[1];
  4364. }
  4365. goto __pyx_L4_argument_unpacking_done;
  4366. __pyx_L5_argtuple_error:;
  4367. __Pyx_RaiseArgtupleInvalid("_handle_syserr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 356, __pyx_L3_error)
  4368. __pyx_L3_error:;
  4369. __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4370. __Pyx_RefNannyFinishContext();
  4371. return NULL;
  4372. __pyx_L4_argument_unpacking_done:;
  4373. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_message, __pyx_v_errno);
  4374. /* function exit code */
  4375. __Pyx_RefNannyFinishContext();
  4376. return __pyx_r;
  4377. }
  4378. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_8_handle_syserr(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
  4379. PyObject *__pyx_r = NULL;
  4380. __Pyx_RefNannyDeclarations
  4381. PyObject *__pyx_t_1 = NULL;
  4382. PyObject *__pyx_t_2 = NULL;
  4383. int __pyx_t_3;
  4384. PyObject *__pyx_t_4 = NULL;
  4385. PyObject *__pyx_t_5 = NULL;
  4386. PyObject *__pyx_t_6 = NULL;
  4387. __Pyx_RefNannySetupContext("_handle_syserr", 0);
  4388. __Pyx_INCREF(__pyx_v_message);
  4389. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  4390. __Pyx_GOTREF(__pyx_t_1);
  4391. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
  4392. __Pyx_GOTREF(__pyx_t_2);
  4393. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4394. __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  4395. __Pyx_GOTREF(__pyx_t_1);
  4396. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4397. __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
  4398. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4399. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 357, __pyx_L1_error)
  4400. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4401. if (__pyx_t_3) {
  4402. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
  4403. __Pyx_GOTREF(__pyx_t_1);
  4404. __pyx_t_4 = NULL;
  4405. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
  4406. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
  4407. if (likely(__pyx_t_4)) {
  4408. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
  4409. __Pyx_INCREF(__pyx_t_4);
  4410. __Pyx_INCREF(function);
  4411. __Pyx_DECREF_SET(__pyx_t_1, function);
  4412. }
  4413. }
  4414. if (__pyx_t_4) {
  4415. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
  4416. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4417. } else {
  4418. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
  4419. }
  4420. __Pyx_GOTREF(__pyx_t_2);
  4421. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4422. __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_2);
  4423. __pyx_t_2 = 0;
  4424. }
  4425. __pyx_t_2 = PyNumber_Add(__pyx_v_message, __pyx_kp_s__5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  4426. __Pyx_GOTREF(__pyx_t_2);
  4427. __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error)
  4428. __Pyx_GOTREF(__pyx_t_4);
  4429. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error)
  4430. __Pyx_GOTREF(__pyx_t_5);
  4431. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4432. __pyx_t_4 = NULL;
  4433. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  4434. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
  4435. if (likely(__pyx_t_4)) {
  4436. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  4437. __Pyx_INCREF(__pyx_t_4);
  4438. __Pyx_INCREF(function);
  4439. __Pyx_DECREF_SET(__pyx_t_5, function);
  4440. }
  4441. }
  4442. if (!__pyx_t_4) {
  4443. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4444. __Pyx_GOTREF(__pyx_t_1);
  4445. } else {
  4446. #if CYTHON_FAST_PYCALL
  4447. if (PyFunction_Check(__pyx_t_5)) {
  4448. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_errno};
  4449. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4450. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4451. __Pyx_GOTREF(__pyx_t_1);
  4452. } else
  4453. #endif
  4454. #if CYTHON_FAST_PYCCALL
  4455. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  4456. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_errno};
  4457. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4458. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4459. __Pyx_GOTREF(__pyx_t_1);
  4460. } else
  4461. #endif
  4462. {
  4463. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error)
  4464. __Pyx_GOTREF(__pyx_t_6);
  4465. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  4466. __Pyx_INCREF(__pyx_v_errno);
  4467. __Pyx_GIVEREF(__pyx_v_errno);
  4468. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_errno);
  4469. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4470. __Pyx_GOTREF(__pyx_t_1);
  4471. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4472. }
  4473. }
  4474. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  4475. __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error)
  4476. __Pyx_GOTREF(__pyx_t_5);
  4477. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4478. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4479. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4480. __Pyx_GOTREF(__pyx_t_1);
  4481. __Pyx_GIVEREF(__pyx_t_5);
  4482. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  4483. __pyx_t_5 = 0;
  4484. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error)
  4485. __Pyx_GOTREF(__pyx_t_5);
  4486. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4487. __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->handle_error(__pyx_v_self, Py_None, __pyx_builtin_SystemError, __pyx_t_5, Py_None, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  4488. __Pyx_GOTREF(__pyx_t_1);
  4489. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  4490. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4491. /* function exit code */
  4492. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4493. goto __pyx_L0;
  4494. __pyx_L1_error:;
  4495. __Pyx_XDECREF(__pyx_t_1);
  4496. __Pyx_XDECREF(__pyx_t_2);
  4497. __Pyx_XDECREF(__pyx_t_4);
  4498. __Pyx_XDECREF(__pyx_t_5);
  4499. __Pyx_XDECREF(__pyx_t_6);
  4500. __Pyx_AddTraceback("gevent.libev.corecext.loop._handle_syserr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4501. __pyx_r = NULL;
  4502. __pyx_L0:;
  4503. __Pyx_XDECREF(__pyx_v_message);
  4504. __Pyx_XGIVEREF(__pyx_r);
  4505. __Pyx_RefNannyFinishContext();
  4506. return __pyx_r;
  4507. }
  4508. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4509. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
  4510. PyObject *__pyx_v_handle_error = 0;
  4511. PyObject *__pyx_v_error_handler = 0;
  4512. PyObject *__pyx_r = NULL;
  4513. __Pyx_RefNannyDeclarations
  4514. PyObject *__pyx_t_1 = NULL;
  4515. PyObject *__pyx_t_2 = NULL;
  4516. PyObject *__pyx_t_3 = NULL;
  4517. PyObject *__pyx_t_4 = NULL;
  4518. int __pyx_t_5;
  4519. PyObject *__pyx_t_6 = NULL;
  4520. int __pyx_t_7;
  4521. int __pyx_t_8;
  4522. __Pyx_RefNannySetupContext("handle_error", 0);
  4523. /* Check if called by wrapper */
  4524. if (unlikely(__pyx_skip_dispatch)) ;
  4525. /* Check if overridden in Python */
  4526. else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
  4527. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
  4528. __Pyx_GOTREF(__pyx_t_1);
  4529. if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error)) {
  4530. __Pyx_XDECREF(__pyx_r);
  4531. __Pyx_INCREF(__pyx_t_1);
  4532. __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
  4533. __pyx_t_5 = 0;
  4534. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  4535. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  4536. if (likely(__pyx_t_4)) {
  4537. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4538. __Pyx_INCREF(__pyx_t_4);
  4539. __Pyx_INCREF(function);
  4540. __Pyx_DECREF_SET(__pyx_t_3, function);
  4541. __pyx_t_5 = 1;
  4542. }
  4543. }
  4544. #if CYTHON_FAST_PYCALL
  4545. if (PyFunction_Check(__pyx_t_3)) {
  4546. PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4547. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  4548. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4549. __Pyx_GOTREF(__pyx_t_2);
  4550. } else
  4551. #endif
  4552. #if CYTHON_FAST_PYCCALL
  4553. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  4554. PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4555. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  4556. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4557. __Pyx_GOTREF(__pyx_t_2);
  4558. } else
  4559. #endif
  4560. {
  4561. __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
  4562. __Pyx_GOTREF(__pyx_t_6);
  4563. if (__pyx_t_4) {
  4564. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  4565. }
  4566. __Pyx_INCREF(__pyx_v_context);
  4567. __Pyx_GIVEREF(__pyx_v_context);
  4568. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_context);
  4569. __Pyx_INCREF(__pyx_v_type);
  4570. __Pyx_GIVEREF(__pyx_v_type);
  4571. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_type);
  4572. __Pyx_INCREF(__pyx_v_value);
  4573. __Pyx_GIVEREF(__pyx_v_value);
  4574. PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_value);
  4575. __Pyx_INCREF(__pyx_v_tb);
  4576. __Pyx_GIVEREF(__pyx_v_tb);
  4577. PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_tb);
  4578. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
  4579. __Pyx_GOTREF(__pyx_t_2);
  4580. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4581. }
  4582. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4583. __pyx_r = __pyx_t_2;
  4584. __pyx_t_2 = 0;
  4585. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4586. goto __pyx_L0;
  4587. }
  4588. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4589. }
  4590. __pyx_t_1 = __pyx_v_self->error_handler;
  4591. __Pyx_INCREF(__pyx_t_1);
  4592. __pyx_v_error_handler = __pyx_t_1;
  4593. __pyx_t_1 = 0;
  4594. __pyx_t_7 = (__pyx_v_error_handler != Py_None);
  4595. __pyx_t_8 = (__pyx_t_7 != 0);
  4596. if (__pyx_t_8) {
  4597. __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_error_handler, __pyx_n_s_handle_error, __pyx_v_error_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
  4598. __Pyx_GOTREF(__pyx_t_1);
  4599. __pyx_v_handle_error = __pyx_t_1;
  4600. __pyx_t_1 = 0;
  4601. __Pyx_INCREF(__pyx_v_handle_error);
  4602. __pyx_t_2 = __pyx_v_handle_error; __pyx_t_3 = NULL;
  4603. __pyx_t_5 = 0;
  4604. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  4605. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  4606. if (likely(__pyx_t_3)) {
  4607. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  4608. __Pyx_INCREF(__pyx_t_3);
  4609. __Pyx_INCREF(function);
  4610. __Pyx_DECREF_SET(__pyx_t_2, function);
  4611. __pyx_t_5 = 1;
  4612. }
  4613. }
  4614. #if CYTHON_FAST_PYCALL
  4615. if (PyFunction_Check(__pyx_t_2)) {
  4616. PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4617. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
  4618. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4619. __Pyx_GOTREF(__pyx_t_1);
  4620. } else
  4621. #endif
  4622. #if CYTHON_FAST_PYCCALL
  4623. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  4624. PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4625. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
  4626. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4627. __Pyx_GOTREF(__pyx_t_1);
  4628. } else
  4629. #endif
  4630. {
  4631. __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 367, __pyx_L1_error)
  4632. __Pyx_GOTREF(__pyx_t_6);
  4633. if (__pyx_t_3) {
  4634. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
  4635. }
  4636. __Pyx_INCREF(__pyx_v_context);
  4637. __Pyx_GIVEREF(__pyx_v_context);
  4638. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_context);
  4639. __Pyx_INCREF(__pyx_v_type);
  4640. __Pyx_GIVEREF(__pyx_v_type);
  4641. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_type);
  4642. __Pyx_INCREF(__pyx_v_value);
  4643. __Pyx_GIVEREF(__pyx_v_value);
  4644. PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_value);
  4645. __Pyx_INCREF(__pyx_v_tb);
  4646. __Pyx_GIVEREF(__pyx_v_tb);
  4647. PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_tb);
  4648. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
  4649. __Pyx_GOTREF(__pyx_t_1);
  4650. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4651. }
  4652. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4653. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4654. goto __pyx_L3;
  4655. }
  4656. /*else*/ {
  4657. __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop *)__pyx_v_self->__pyx_vtab)->_default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
  4658. __Pyx_GOTREF(__pyx_t_1);
  4659. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4660. }
  4661. __pyx_L3:;
  4662. /* function exit code */
  4663. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4664. goto __pyx_L0;
  4665. __pyx_L1_error:;
  4666. __Pyx_XDECREF(__pyx_t_1);
  4667. __Pyx_XDECREF(__pyx_t_2);
  4668. __Pyx_XDECREF(__pyx_t_3);
  4669. __Pyx_XDECREF(__pyx_t_4);
  4670. __Pyx_XDECREF(__pyx_t_6);
  4671. __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4672. __pyx_r = 0;
  4673. __pyx_L0:;
  4674. __Pyx_XDECREF(__pyx_v_handle_error);
  4675. __Pyx_XDECREF(__pyx_v_error_handler);
  4676. __Pyx_XGIVEREF(__pyx_r);
  4677. __Pyx_RefNannyFinishContext();
  4678. return __pyx_r;
  4679. }
  4680. /* Python wrapper */
  4681. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4682. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  4683. PyObject *__pyx_v_context = 0;
  4684. PyObject *__pyx_v_type = 0;
  4685. PyObject *__pyx_v_value = 0;
  4686. PyObject *__pyx_v_tb = 0;
  4687. PyObject *__pyx_r = 0;
  4688. __Pyx_RefNannyDeclarations
  4689. __Pyx_RefNannySetupContext("handle_error (wrapper)", 0);
  4690. {
  4691. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_tb,0};
  4692. PyObject* values[4] = {0,0,0,0};
  4693. if (unlikely(__pyx_kwds)) {
  4694. Py_ssize_t kw_args;
  4695. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  4696. switch (pos_args) {
  4697. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4698. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4699. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4700. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4701. case 0: break;
  4702. default: goto __pyx_L5_argtuple_error;
  4703. }
  4704. kw_args = PyDict_Size(__pyx_kwds);
  4705. switch (pos_args) {
  4706. case 0:
  4707. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
  4708. else goto __pyx_L5_argtuple_error;
  4709. case 1:
  4710. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
  4711. else {
  4712. __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 1); __PYX_ERR(0, 361, __pyx_L3_error)
  4713. }
  4714. case 2:
  4715. if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
  4716. else {
  4717. __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 2); __PYX_ERR(0, 361, __pyx_L3_error)
  4718. }
  4719. case 3:
  4720. if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tb)) != 0)) kw_args--;
  4721. else {
  4722. __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, 3); __PYX_ERR(0, 361, __pyx_L3_error)
  4723. }
  4724. }
  4725. if (unlikely(kw_args > 0)) {
  4726. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "handle_error") < 0)) __PYX_ERR(0, 361, __pyx_L3_error)
  4727. }
  4728. } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
  4729. goto __pyx_L5_argtuple_error;
  4730. } else {
  4731. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4732. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4733. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4734. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4735. }
  4736. __pyx_v_context = values[0];
  4737. __pyx_v_type = values[1];
  4738. __pyx_v_value = values[2];
  4739. __pyx_v_tb = values[3];
  4740. }
  4741. goto __pyx_L4_argument_unpacking_done;
  4742. __pyx_L5_argtuple_error:;
  4743. __Pyx_RaiseArgtupleInvalid("handle_error", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 361, __pyx_L3_error)
  4744. __pyx_L3_error:;
  4745. __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4746. __Pyx_RefNannyFinishContext();
  4747. return NULL;
  4748. __pyx_L4_argument_unpacking_done:;
  4749. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);
  4750. /* function exit code */
  4751. __Pyx_RefNannyFinishContext();
  4752. return __pyx_r;
  4753. }
  4754. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
  4755. PyObject *__pyx_r = NULL;
  4756. __Pyx_RefNannyDeclarations
  4757. PyObject *__pyx_t_1 = NULL;
  4758. __Pyx_RefNannySetupContext("handle_error", 0);
  4759. __Pyx_XDECREF(__pyx_r);
  4760. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
  4761. __Pyx_GOTREF(__pyx_t_1);
  4762. __pyx_r = __pyx_t_1;
  4763. __pyx_t_1 = 0;
  4764. goto __pyx_L0;
  4765. /* function exit code */
  4766. __pyx_L1_error:;
  4767. __Pyx_XDECREF(__pyx_t_1);
  4768. __Pyx_AddTraceback("gevent.libev.corecext.loop.handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4769. __pyx_r = NULL;
  4770. __pyx_L0:;
  4771. __Pyx_XGIVEREF(__pyx_r);
  4772. __Pyx_RefNannyFinishContext();
  4773. return __pyx_r;
  4774. }
  4775. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4776. static PyObject *__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(struct PyGeventLoopObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb, int __pyx_skip_dispatch) {
  4777. PyObject *__pyx_r = NULL;
  4778. __Pyx_RefNannyDeclarations
  4779. PyObject *__pyx_t_1 = NULL;
  4780. PyObject *__pyx_t_2 = NULL;
  4781. PyObject *__pyx_t_3 = NULL;
  4782. PyObject *__pyx_t_4 = NULL;
  4783. int __pyx_t_5;
  4784. PyObject *__pyx_t_6 = NULL;
  4785. int __pyx_t_7;
  4786. __Pyx_RefNannySetupContext("_default_handle_error", 0);
  4787. /* Check if called by wrapper */
  4788. if (unlikely(__pyx_skip_dispatch)) ;
  4789. /* Check if overridden in Python */
  4790. else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
  4791. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
  4792. __Pyx_GOTREF(__pyx_t_1);
  4793. if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error)) {
  4794. __Pyx_XDECREF(__pyx_r);
  4795. __Pyx_INCREF(__pyx_t_1);
  4796. __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
  4797. __pyx_t_5 = 0;
  4798. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  4799. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  4800. if (likely(__pyx_t_4)) {
  4801. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4802. __Pyx_INCREF(__pyx_t_4);
  4803. __Pyx_INCREF(function);
  4804. __Pyx_DECREF_SET(__pyx_t_3, function);
  4805. __pyx_t_5 = 1;
  4806. }
  4807. }
  4808. #if CYTHON_FAST_PYCALL
  4809. if (PyFunction_Check(__pyx_t_3)) {
  4810. PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4811. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
  4812. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4813. __Pyx_GOTREF(__pyx_t_2);
  4814. } else
  4815. #endif
  4816. #if CYTHON_FAST_PYCCALL
  4817. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  4818. PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4819. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
  4820. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  4821. __Pyx_GOTREF(__pyx_t_2);
  4822. } else
  4823. #endif
  4824. {
  4825. __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
  4826. __Pyx_GOTREF(__pyx_t_6);
  4827. if (__pyx_t_4) {
  4828. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  4829. }
  4830. __Pyx_INCREF(__pyx_v_context);
  4831. __Pyx_GIVEREF(__pyx_v_context);
  4832. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_context);
  4833. __Pyx_INCREF(__pyx_v_type);
  4834. __Pyx_GIVEREF(__pyx_v_type);
  4835. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_type);
  4836. __Pyx_INCREF(__pyx_v_value);
  4837. __Pyx_GIVEREF(__pyx_v_value);
  4838. PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_value);
  4839. __Pyx_INCREF(__pyx_v_tb);
  4840. __Pyx_GIVEREF(__pyx_v_tb);
  4841. PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_tb);
  4842. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
  4843. __Pyx_GOTREF(__pyx_t_2);
  4844. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4845. }
  4846. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4847. __pyx_r = __pyx_t_2;
  4848. __pyx_t_2 = 0;
  4849. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4850. goto __pyx_L0;
  4851. }
  4852. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4853. }
  4854. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
  4855. __Pyx_GOTREF(__pyx_t_2);
  4856. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_print_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
  4857. __Pyx_GOTREF(__pyx_t_3);
  4858. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4859. __pyx_t_2 = NULL;
  4860. __pyx_t_5 = 0;
  4861. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  4862. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  4863. if (likely(__pyx_t_2)) {
  4864. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4865. __Pyx_INCREF(__pyx_t_2);
  4866. __Pyx_INCREF(function);
  4867. __Pyx_DECREF_SET(__pyx_t_3, function);
  4868. __pyx_t_5 = 1;
  4869. }
  4870. }
  4871. #if CYTHON_FAST_PYCALL
  4872. if (PyFunction_Check(__pyx_t_3)) {
  4873. PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4874. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  4875. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4876. __Pyx_GOTREF(__pyx_t_1);
  4877. } else
  4878. #endif
  4879. #if CYTHON_FAST_PYCCALL
  4880. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  4881. PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_type, __pyx_v_value, __pyx_v_tb};
  4882. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  4883. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4884. __Pyx_GOTREF(__pyx_t_1);
  4885. } else
  4886. #endif
  4887. {
  4888. __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
  4889. __Pyx_GOTREF(__pyx_t_6);
  4890. if (__pyx_t_2) {
  4891. __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
  4892. }
  4893. __Pyx_INCREF(__pyx_v_type);
  4894. __Pyx_GIVEREF(__pyx_v_type);
  4895. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_type);
  4896. __Pyx_INCREF(__pyx_v_value);
  4897. __Pyx_GIVEREF(__pyx_v_value);
  4898. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
  4899. __Pyx_INCREF(__pyx_v_tb);
  4900. __Pyx_GIVEREF(__pyx_v_tb);
  4901. PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_tb);
  4902. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  4903. __Pyx_GOTREF(__pyx_t_1);
  4904. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4905. }
  4906. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4907. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4908. __pyx_t_7 = (__pyx_v_self->_ptr != 0);
  4909. if (__pyx_t_7) {
  4910. ev_break(__pyx_v_self->_ptr, EVBREAK_ONE);
  4911. }
  4912. /* function exit code */
  4913. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4914. goto __pyx_L0;
  4915. __pyx_L1_error:;
  4916. __Pyx_XDECREF(__pyx_t_1);
  4917. __Pyx_XDECREF(__pyx_t_2);
  4918. __Pyx_XDECREF(__pyx_t_3);
  4919. __Pyx_XDECREF(__pyx_t_4);
  4920. __Pyx_XDECREF(__pyx_t_6);
  4921. __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4922. __pyx_r = 0;
  4923. __pyx_L0:;
  4924. __Pyx_XGIVEREF(__pyx_r);
  4925. __Pyx_RefNannyFinishContext();
  4926. return __pyx_r;
  4927. }
  4928. /* Python wrapper */
  4929. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4930. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  4931. PyObject *__pyx_v_context = 0;
  4932. PyObject *__pyx_v_type = 0;
  4933. PyObject *__pyx_v_value = 0;
  4934. PyObject *__pyx_v_tb = 0;
  4935. PyObject *__pyx_r = 0;
  4936. __Pyx_RefNannyDeclarations
  4937. __Pyx_RefNannySetupContext("_default_handle_error (wrapper)", 0);
  4938. {
  4939. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_context,&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_tb,0};
  4940. PyObject* values[4] = {0,0,0,0};
  4941. if (unlikely(__pyx_kwds)) {
  4942. Py_ssize_t kw_args;
  4943. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  4944. switch (pos_args) {
  4945. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4946. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4947. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4948. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4949. case 0: break;
  4950. default: goto __pyx_L5_argtuple_error;
  4951. }
  4952. kw_args = PyDict_Size(__pyx_kwds);
  4953. switch (pos_args) {
  4954. case 0:
  4955. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
  4956. else goto __pyx_L5_argtuple_error;
  4957. case 1:
  4958. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
  4959. else {
  4960. __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 1); __PYX_ERR(0, 371, __pyx_L3_error)
  4961. }
  4962. case 2:
  4963. if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
  4964. else {
  4965. __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 2); __PYX_ERR(0, 371, __pyx_L3_error)
  4966. }
  4967. case 3:
  4968. if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tb)) != 0)) kw_args--;
  4969. else {
  4970. __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, 3); __PYX_ERR(0, 371, __pyx_L3_error)
  4971. }
  4972. }
  4973. if (unlikely(kw_args > 0)) {
  4974. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_default_handle_error") < 0)) __PYX_ERR(0, 371, __pyx_L3_error)
  4975. }
  4976. } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
  4977. goto __pyx_L5_argtuple_error;
  4978. } else {
  4979. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4980. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4981. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4982. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4983. }
  4984. __pyx_v_context = values[0];
  4985. __pyx_v_type = values[1];
  4986. __pyx_v_value = values[2];
  4987. __pyx_v_tb = values[3];
  4988. }
  4989. goto __pyx_L4_argument_unpacking_done;
  4990. __pyx_L5_argtuple_error:;
  4991. __Pyx_RaiseArgtupleInvalid("_default_handle_error", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error)
  4992. __pyx_L3_error:;
  4993. __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4994. __Pyx_RefNannyFinishContext();
  4995. return NULL;
  4996. __pyx_L4_argument_unpacking_done:;
  4997. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb);
  4998. /* function exit code */
  4999. __Pyx_RefNannyFinishContext();
  5000. return __pyx_r;
  5001. }
  5002. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_12_default_handle_error(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_context, PyObject *__pyx_v_type, PyObject *__pyx_v_value, PyObject *__pyx_v_tb) {
  5003. PyObject *__pyx_r = NULL;
  5004. __Pyx_RefNannyDeclarations
  5005. PyObject *__pyx_t_1 = NULL;
  5006. __Pyx_RefNannySetupContext("_default_handle_error", 0);
  5007. __Pyx_XDECREF(__pyx_r);
  5008. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error(__pyx_v_self, __pyx_v_context, __pyx_v_type, __pyx_v_value, __pyx_v_tb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
  5009. __Pyx_GOTREF(__pyx_t_1);
  5010. __pyx_r = __pyx_t_1;
  5011. __pyx_t_1 = 0;
  5012. goto __pyx_L0;
  5013. /* function exit code */
  5014. __pyx_L1_error:;
  5015. __Pyx_XDECREF(__pyx_t_1);
  5016. __Pyx_AddTraceback("gevent.libev.corecext.loop._default_handle_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5017. __pyx_r = NULL;
  5018. __pyx_L0:;
  5019. __Pyx_XGIVEREF(__pyx_r);
  5020. __Pyx_RefNannyFinishContext();
  5021. return __pyx_r;
  5022. }
  5023. /* Python wrapper */
  5024. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  5025. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_15run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  5026. PyObject *__pyx_v_nowait = 0;
  5027. PyObject *__pyx_v_once = 0;
  5028. PyObject *__pyx_r = 0;
  5029. __Pyx_RefNannyDeclarations
  5030. __Pyx_RefNannySetupContext("run (wrapper)", 0);
  5031. {
  5032. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nowait,&__pyx_n_s_once,0};
  5033. PyObject* values[2] = {0,0};
  5034. values[0] = ((PyObject *)Py_False);
  5035. values[1] = ((PyObject *)Py_False);
  5036. if (unlikely(__pyx_kwds)) {
  5037. Py_ssize_t kw_args;
  5038. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  5039. switch (pos_args) {
  5040. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  5041. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5042. case 0: break;
  5043. default: goto __pyx_L5_argtuple_error;
  5044. }
  5045. kw_args = PyDict_Size(__pyx_kwds);
  5046. switch (pos_args) {
  5047. case 0:
  5048. if (kw_args > 0) {
  5049. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nowait);
  5050. if (value) { values[0] = value; kw_args--; }
  5051. }
  5052. case 1:
  5053. if (kw_args > 0) {
  5054. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_once);
  5055. if (value) { values[1] = value; kw_args--; }
  5056. }
  5057. }
  5058. if (unlikely(kw_args > 0)) {
  5059. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run") < 0)) __PYX_ERR(0, 378, __pyx_L3_error)
  5060. }
  5061. } else {
  5062. switch (PyTuple_GET_SIZE(__pyx_args)) {
  5063. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  5064. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5065. case 0: break;
  5066. default: goto __pyx_L5_argtuple_error;
  5067. }
  5068. }
  5069. __pyx_v_nowait = values[0];
  5070. __pyx_v_once = values[1];
  5071. }
  5072. goto __pyx_L4_argument_unpacking_done;
  5073. __pyx_L5_argtuple_error:;
  5074. __Pyx_RaiseArgtupleInvalid("run", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 378, __pyx_L3_error)
  5075. __pyx_L3_error:;
  5076. __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5077. __Pyx_RefNannyFinishContext();
  5078. return NULL;
  5079. __pyx_L4_argument_unpacking_done:;
  5080. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_14run(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_nowait, __pyx_v_once);
  5081. /* function exit code */
  5082. __Pyx_RefNannyFinishContext();
  5083. return __pyx_r;
  5084. }
  5085. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_14run(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_nowait, PyObject *__pyx_v_once) {
  5086. unsigned int __pyx_v_flags;
  5087. PyObject *__pyx_r = NULL;
  5088. __Pyx_RefNannyDeclarations
  5089. int __pyx_t_1;
  5090. PyObject *__pyx_t_2 = NULL;
  5091. __Pyx_RefNannySetupContext("run", 0);
  5092. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5093. if (__pyx_t_1) {
  5094. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  5095. __Pyx_GOTREF(__pyx_t_2);
  5096. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5097. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5098. __PYX_ERR(0, 381, __pyx_L1_error)
  5099. }
  5100. __pyx_v_flags = 0;
  5101. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_nowait); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 383, __pyx_L1_error)
  5102. if (__pyx_t_1) {
  5103. __pyx_v_flags = (__pyx_v_flags | EVRUN_NOWAIT);
  5104. }
  5105. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_once); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 385, __pyx_L1_error)
  5106. if (__pyx_t_1) {
  5107. __pyx_v_flags = (__pyx_v_flags | EVRUN_ONCE);
  5108. }
  5109. {
  5110. #ifdef WITH_THREAD
  5111. PyThreadState *_save;
  5112. Py_UNBLOCK_THREADS
  5113. #endif
  5114. /*try:*/ {
  5115. ev_run(__pyx_v_self->_ptr, __pyx_v_flags);
  5116. }
  5117. /*finally:*/ {
  5118. /*normal exit:*/{
  5119. #ifdef WITH_THREAD
  5120. Py_BLOCK_THREADS
  5121. #endif
  5122. goto __pyx_L8;
  5123. }
  5124. __pyx_L8:;
  5125. }
  5126. }
  5127. /* function exit code */
  5128. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5129. goto __pyx_L0;
  5130. __pyx_L1_error:;
  5131. __Pyx_XDECREF(__pyx_t_2);
  5132. __Pyx_AddTraceback("gevent.libev.corecext.loop.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5133. __pyx_r = NULL;
  5134. __pyx_L0:;
  5135. __Pyx_XGIVEREF(__pyx_r);
  5136. __Pyx_RefNannyFinishContext();
  5137. return __pyx_r;
  5138. }
  5139. /* Python wrapper */
  5140. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5141. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5142. PyObject *__pyx_r = 0;
  5143. __Pyx_RefNannyDeclarations
  5144. __Pyx_RefNannySetupContext("reinit (wrapper)", 0);
  5145. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(((struct PyGeventLoopObject *)__pyx_v_self));
  5146. /* function exit code */
  5147. __Pyx_RefNannyFinishContext();
  5148. return __pyx_r;
  5149. }
  5150. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_16reinit(struct PyGeventLoopObject *__pyx_v_self) {
  5151. PyObject *__pyx_r = NULL;
  5152. __Pyx_RefNannyDeclarations
  5153. int __pyx_t_1;
  5154. __Pyx_RefNannySetupContext("reinit", 0);
  5155. __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  5156. if (__pyx_t_1) {
  5157. ev_loop_fork(__pyx_v_self->_ptr);
  5158. }
  5159. /* function exit code */
  5160. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5161. __Pyx_XGIVEREF(__pyx_r);
  5162. __Pyx_RefNannyFinishContext();
  5163. return __pyx_r;
  5164. }
  5165. /* Python wrapper */
  5166. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5167. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_19ref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5168. PyObject *__pyx_r = 0;
  5169. __Pyx_RefNannyDeclarations
  5170. __Pyx_RefNannySetupContext("ref (wrapper)", 0);
  5171. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_18ref(((struct PyGeventLoopObject *)__pyx_v_self));
  5172. /* function exit code */
  5173. __Pyx_RefNannyFinishContext();
  5174. return __pyx_r;
  5175. }
  5176. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_18ref(struct PyGeventLoopObject *__pyx_v_self) {
  5177. PyObject *__pyx_r = NULL;
  5178. __Pyx_RefNannyDeclarations
  5179. int __pyx_t_1;
  5180. PyObject *__pyx_t_2 = NULL;
  5181. __Pyx_RefNannySetupContext("ref", 0);
  5182. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5183. if (__pyx_t_1) {
  5184. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  5185. __Pyx_GOTREF(__pyx_t_2);
  5186. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5187. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5188. __PYX_ERR(0, 397, __pyx_L1_error)
  5189. }
  5190. ev_ref(__pyx_v_self->_ptr);
  5191. /* function exit code */
  5192. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5193. goto __pyx_L0;
  5194. __pyx_L1_error:;
  5195. __Pyx_XDECREF(__pyx_t_2);
  5196. __Pyx_AddTraceback("gevent.libev.corecext.loop.ref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5197. __pyx_r = NULL;
  5198. __pyx_L0:;
  5199. __Pyx_XGIVEREF(__pyx_r);
  5200. __Pyx_RefNannyFinishContext();
  5201. return __pyx_r;
  5202. }
  5203. /* Python wrapper */
  5204. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5205. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_21unref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5206. PyObject *__pyx_r = 0;
  5207. __Pyx_RefNannyDeclarations
  5208. __Pyx_RefNannySetupContext("unref (wrapper)", 0);
  5209. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_20unref(((struct PyGeventLoopObject *)__pyx_v_self));
  5210. /* function exit code */
  5211. __Pyx_RefNannyFinishContext();
  5212. return __pyx_r;
  5213. }
  5214. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_20unref(struct PyGeventLoopObject *__pyx_v_self) {
  5215. PyObject *__pyx_r = NULL;
  5216. __Pyx_RefNannyDeclarations
  5217. int __pyx_t_1;
  5218. PyObject *__pyx_t_2 = NULL;
  5219. __Pyx_RefNannySetupContext("unref", 0);
  5220. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5221. if (__pyx_t_1) {
  5222. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
  5223. __Pyx_GOTREF(__pyx_t_2);
  5224. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5225. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5226. __PYX_ERR(0, 403, __pyx_L1_error)
  5227. }
  5228. ev_unref(__pyx_v_self->_ptr);
  5229. /* function exit code */
  5230. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5231. goto __pyx_L0;
  5232. __pyx_L1_error:;
  5233. __Pyx_XDECREF(__pyx_t_2);
  5234. __Pyx_AddTraceback("gevent.libev.corecext.loop.unref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5235. __pyx_r = NULL;
  5236. __pyx_L0:;
  5237. __Pyx_XGIVEREF(__pyx_r);
  5238. __Pyx_RefNannyFinishContext();
  5239. return __pyx_r;
  5240. }
  5241. /* Python wrapper */
  5242. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  5243. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_23break_(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  5244. int __pyx_v_how;
  5245. PyObject *__pyx_r = 0;
  5246. __Pyx_RefNannyDeclarations
  5247. __Pyx_RefNannySetupContext("break_ (wrapper)", 0);
  5248. {
  5249. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_how,0};
  5250. PyObject* values[1] = {0};
  5251. if (unlikely(__pyx_kwds)) {
  5252. Py_ssize_t kw_args;
  5253. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  5254. switch (pos_args) {
  5255. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5256. case 0: break;
  5257. default: goto __pyx_L5_argtuple_error;
  5258. }
  5259. kw_args = PyDict_Size(__pyx_kwds);
  5260. switch (pos_args) {
  5261. case 0:
  5262. if (kw_args > 0) {
  5263. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_how);
  5264. if (value) { values[0] = value; kw_args--; }
  5265. }
  5266. }
  5267. if (unlikely(kw_args > 0)) {
  5268. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "break_") < 0)) __PYX_ERR(0, 406, __pyx_L3_error)
  5269. }
  5270. } else {
  5271. switch (PyTuple_GET_SIZE(__pyx_args)) {
  5272. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5273. case 0: break;
  5274. default: goto __pyx_L5_argtuple_error;
  5275. }
  5276. }
  5277. if (values[0]) {
  5278. __pyx_v_how = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_how == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L3_error)
  5279. } else {
  5280. __pyx_v_how = __pyx_k__9;
  5281. }
  5282. }
  5283. goto __pyx_L4_argument_unpacking_done;
  5284. __pyx_L5_argtuple_error:;
  5285. __Pyx_RaiseArgtupleInvalid("break_", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 406, __pyx_L3_error)
  5286. __pyx_L3_error:;
  5287. __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5288. __Pyx_RefNannyFinishContext();
  5289. return NULL;
  5290. __pyx_L4_argument_unpacking_done:;
  5291. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_22break_(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_how);
  5292. /* function exit code */
  5293. __Pyx_RefNannyFinishContext();
  5294. return __pyx_r;
  5295. }
  5296. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_22break_(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_how) {
  5297. PyObject *__pyx_r = NULL;
  5298. __Pyx_RefNannyDeclarations
  5299. int __pyx_t_1;
  5300. PyObject *__pyx_t_2 = NULL;
  5301. __Pyx_RefNannySetupContext("break_", 0);
  5302. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5303. if (__pyx_t_1) {
  5304. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error)
  5305. __Pyx_GOTREF(__pyx_t_2);
  5306. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5307. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5308. __PYX_ERR(0, 409, __pyx_L1_error)
  5309. }
  5310. ev_break(__pyx_v_self->_ptr, __pyx_v_how);
  5311. /* function exit code */
  5312. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5313. goto __pyx_L0;
  5314. __pyx_L1_error:;
  5315. __Pyx_XDECREF(__pyx_t_2);
  5316. __Pyx_AddTraceback("gevent.libev.corecext.loop.break_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5317. __pyx_r = NULL;
  5318. __pyx_L0:;
  5319. __Pyx_XGIVEREF(__pyx_r);
  5320. __Pyx_RefNannyFinishContext();
  5321. return __pyx_r;
  5322. }
  5323. /* Python wrapper */
  5324. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5325. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_25verify(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5326. PyObject *__pyx_r = 0;
  5327. __Pyx_RefNannyDeclarations
  5328. __Pyx_RefNannySetupContext("verify (wrapper)", 0);
  5329. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_24verify(((struct PyGeventLoopObject *)__pyx_v_self));
  5330. /* function exit code */
  5331. __Pyx_RefNannyFinishContext();
  5332. return __pyx_r;
  5333. }
  5334. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_24verify(struct PyGeventLoopObject *__pyx_v_self) {
  5335. PyObject *__pyx_r = NULL;
  5336. __Pyx_RefNannyDeclarations
  5337. int __pyx_t_1;
  5338. PyObject *__pyx_t_2 = NULL;
  5339. __Pyx_RefNannySetupContext("verify", 0);
  5340. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5341. if (__pyx_t_1) {
  5342. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  5343. __Pyx_GOTREF(__pyx_t_2);
  5344. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5345. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5346. __PYX_ERR(0, 415, __pyx_L1_error)
  5347. }
  5348. ev_verify(__pyx_v_self->_ptr);
  5349. /* function exit code */
  5350. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5351. goto __pyx_L0;
  5352. __pyx_L1_error:;
  5353. __Pyx_XDECREF(__pyx_t_2);
  5354. __Pyx_AddTraceback("gevent.libev.corecext.loop.verify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5355. __pyx_r = NULL;
  5356. __pyx_L0:;
  5357. __Pyx_XGIVEREF(__pyx_r);
  5358. __Pyx_RefNannyFinishContext();
  5359. return __pyx_r;
  5360. }
  5361. /* Python wrapper */
  5362. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5363. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_27now(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5364. PyObject *__pyx_r = 0;
  5365. __Pyx_RefNannyDeclarations
  5366. __Pyx_RefNannySetupContext("now (wrapper)", 0);
  5367. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_26now(((struct PyGeventLoopObject *)__pyx_v_self));
  5368. /* function exit code */
  5369. __Pyx_RefNannyFinishContext();
  5370. return __pyx_r;
  5371. }
  5372. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_26now(struct PyGeventLoopObject *__pyx_v_self) {
  5373. PyObject *__pyx_r = NULL;
  5374. __Pyx_RefNannyDeclarations
  5375. int __pyx_t_1;
  5376. PyObject *__pyx_t_2 = NULL;
  5377. __Pyx_RefNannySetupContext("now", 0);
  5378. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5379. if (__pyx_t_1) {
  5380. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  5381. __Pyx_GOTREF(__pyx_t_2);
  5382. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5383. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5384. __PYX_ERR(0, 421, __pyx_L1_error)
  5385. }
  5386. __Pyx_XDECREF(__pyx_r);
  5387. __pyx_t_2 = PyFloat_FromDouble(ev_now(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
  5388. __Pyx_GOTREF(__pyx_t_2);
  5389. __pyx_r = __pyx_t_2;
  5390. __pyx_t_2 = 0;
  5391. goto __pyx_L0;
  5392. /* function exit code */
  5393. __pyx_L1_error:;
  5394. __Pyx_XDECREF(__pyx_t_2);
  5395. __Pyx_AddTraceback("gevent.libev.corecext.loop.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5396. __pyx_r = NULL;
  5397. __pyx_L0:;
  5398. __Pyx_XGIVEREF(__pyx_r);
  5399. __Pyx_RefNannyFinishContext();
  5400. return __pyx_r;
  5401. }
  5402. /* Python wrapper */
  5403. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5404. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_29update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5405. PyObject *__pyx_r = 0;
  5406. __Pyx_RefNannyDeclarations
  5407. __Pyx_RefNannySetupContext("update (wrapper)", 0);
  5408. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_28update(((struct PyGeventLoopObject *)__pyx_v_self));
  5409. /* function exit code */
  5410. __Pyx_RefNannyFinishContext();
  5411. return __pyx_r;
  5412. }
  5413. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_28update(struct PyGeventLoopObject *__pyx_v_self) {
  5414. PyObject *__pyx_r = NULL;
  5415. __Pyx_RefNannyDeclarations
  5416. int __pyx_t_1;
  5417. PyObject *__pyx_t_2 = NULL;
  5418. __Pyx_RefNannySetupContext("update", 0);
  5419. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5420. if (__pyx_t_1) {
  5421. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
  5422. __Pyx_GOTREF(__pyx_t_2);
  5423. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5424. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5425. __PYX_ERR(0, 427, __pyx_L1_error)
  5426. }
  5427. ev_now_update(__pyx_v_self->_ptr);
  5428. /* function exit code */
  5429. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5430. goto __pyx_L0;
  5431. __pyx_L1_error:;
  5432. __Pyx_XDECREF(__pyx_t_2);
  5433. __Pyx_AddTraceback("gevent.libev.corecext.loop.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5434. __pyx_r = NULL;
  5435. __pyx_L0:;
  5436. __Pyx_XGIVEREF(__pyx_r);
  5437. __Pyx_RefNannyFinishContext();
  5438. return __pyx_r;
  5439. }
  5440. /* Python wrapper */
  5441. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self); /*proto*/
  5442. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__(PyObject *__pyx_v_self) {
  5443. PyObject *__pyx_r = 0;
  5444. __Pyx_RefNannyDeclarations
  5445. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  5446. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(((struct PyGeventLoopObject *)__pyx_v_self));
  5447. /* function exit code */
  5448. __Pyx_RefNannyFinishContext();
  5449. return __pyx_r;
  5450. }
  5451. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_30__repr__(struct PyGeventLoopObject *__pyx_v_self) {
  5452. PyObject *__pyx_r = NULL;
  5453. __Pyx_RefNannyDeclarations
  5454. PyObject *__pyx_t_1 = NULL;
  5455. PyObject *__pyx_t_2 = NULL;
  5456. PyObject *__pyx_t_3 = NULL;
  5457. PyObject *__pyx_t_4 = NULL;
  5458. PyObject *__pyx_t_5 = NULL;
  5459. __Pyx_RefNannySetupContext("__repr__", 0);
  5460. __Pyx_XDECREF(__pyx_r);
  5461. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  5462. __Pyx_GOTREF(__pyx_t_1);
  5463. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  5464. __Pyx_GOTREF(__pyx_t_2);
  5465. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5466. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  5467. __Pyx_GOTREF(__pyx_t_1);
  5468. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  5469. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  5470. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  5471. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error)
  5472. __Pyx_GOTREF(__pyx_t_3);
  5473. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5474. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  5475. __Pyx_GOTREF(__pyx_t_4);
  5476. __pyx_t_5 = NULL;
  5477. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  5478. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  5479. if (likely(__pyx_t_5)) {
  5480. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  5481. __Pyx_INCREF(__pyx_t_5);
  5482. __Pyx_INCREF(function);
  5483. __Pyx_DECREF_SET(__pyx_t_4, function);
  5484. }
  5485. }
  5486. if (__pyx_t_5) {
  5487. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  5488. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  5489. } else {
  5490. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  5491. }
  5492. __Pyx_GOTREF(__pyx_t_1);
  5493. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  5494. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
  5495. __Pyx_GOTREF(__pyx_t_4);
  5496. __Pyx_GIVEREF(__pyx_t_2);
  5497. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  5498. __Pyx_GIVEREF(__pyx_t_3);
  5499. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  5500. __Pyx_GIVEREF(__pyx_t_1);
  5501. PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  5502. __pyx_t_2 = 0;
  5503. __pyx_t_3 = 0;
  5504. __pyx_t_1 = 0;
  5505. __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  5506. __Pyx_GOTREF(__pyx_t_1);
  5507. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  5508. __pyx_r = __pyx_t_1;
  5509. __pyx_t_1 = 0;
  5510. goto __pyx_L0;
  5511. /* function exit code */
  5512. __pyx_L1_error:;
  5513. __Pyx_XDECREF(__pyx_t_1);
  5514. __Pyx_XDECREF(__pyx_t_2);
  5515. __Pyx_XDECREF(__pyx_t_3);
  5516. __Pyx_XDECREF(__pyx_t_4);
  5517. __Pyx_XDECREF(__pyx_t_5);
  5518. __Pyx_AddTraceback("gevent.libev.corecext.loop.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5519. __pyx_r = NULL;
  5520. __pyx_L0:;
  5521. __Pyx_XGIVEREF(__pyx_r);
  5522. __Pyx_RefNannyFinishContext();
  5523. return __pyx_r;
  5524. }
  5525. /* Python wrapper */
  5526. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self); /*proto*/
  5527. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(PyObject *__pyx_v_self) {
  5528. PyObject *__pyx_r = 0;
  5529. __Pyx_RefNannyDeclarations
  5530. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5531. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5532. /* function exit code */
  5533. __Pyx_RefNannyFinishContext();
  5534. return __pyx_r;
  5535. }
  5536. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7default___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5537. PyObject *__pyx_r = NULL;
  5538. __Pyx_RefNannyDeclarations
  5539. int __pyx_t_1;
  5540. PyObject *__pyx_t_2 = NULL;
  5541. __Pyx_RefNannySetupContext("__get__", 0);
  5542. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5543. if (__pyx_t_1) {
  5544. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
  5545. __Pyx_GOTREF(__pyx_t_2);
  5546. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5547. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5548. __PYX_ERR(0, 438, __pyx_L1_error)
  5549. }
  5550. __Pyx_XDECREF(__pyx_r);
  5551. if ((ev_is_default_loop(__pyx_v_self->_ptr) != 0)) {
  5552. __Pyx_INCREF(Py_True);
  5553. __pyx_t_2 = Py_True;
  5554. } else {
  5555. __Pyx_INCREF(Py_False);
  5556. __pyx_t_2 = Py_False;
  5557. }
  5558. __pyx_r = __pyx_t_2;
  5559. __pyx_t_2 = 0;
  5560. goto __pyx_L0;
  5561. /* function exit code */
  5562. __pyx_L1_error:;
  5563. __Pyx_XDECREF(__pyx_t_2);
  5564. __Pyx_AddTraceback("gevent.libev.corecext.loop.default.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5565. __pyx_r = NULL;
  5566. __pyx_L0:;
  5567. __Pyx_XGIVEREF(__pyx_r);
  5568. __Pyx_RefNannyFinishContext();
  5569. return __pyx_r;
  5570. }
  5571. /* Python wrapper */
  5572. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self); /*proto*/
  5573. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(PyObject *__pyx_v_self) {
  5574. PyObject *__pyx_r = 0;
  5575. __Pyx_RefNannyDeclarations
  5576. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5577. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5578. /* function exit code */
  5579. __Pyx_RefNannyFinishContext();
  5580. return __pyx_r;
  5581. }
  5582. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9iteration___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5583. PyObject *__pyx_r = NULL;
  5584. __Pyx_RefNannyDeclarations
  5585. int __pyx_t_1;
  5586. PyObject *__pyx_t_2 = NULL;
  5587. __Pyx_RefNannySetupContext("__get__", 0);
  5588. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5589. if (__pyx_t_1) {
  5590. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
  5591. __Pyx_GOTREF(__pyx_t_2);
  5592. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5593. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5594. __PYX_ERR(0, 446, __pyx_L1_error)
  5595. }
  5596. __Pyx_XDECREF(__pyx_r);
  5597. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_iteration(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
  5598. __Pyx_GOTREF(__pyx_t_2);
  5599. __pyx_r = __pyx_t_2;
  5600. __pyx_t_2 = 0;
  5601. goto __pyx_L0;
  5602. /* function exit code */
  5603. __pyx_L1_error:;
  5604. __Pyx_XDECREF(__pyx_t_2);
  5605. __Pyx_AddTraceback("gevent.libev.corecext.loop.iteration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5606. __pyx_r = NULL;
  5607. __pyx_L0:;
  5608. __Pyx_XGIVEREF(__pyx_r);
  5609. __Pyx_RefNannyFinishContext();
  5610. return __pyx_r;
  5611. }
  5612. /* Python wrapper */
  5613. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self); /*proto*/
  5614. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(PyObject *__pyx_v_self) {
  5615. PyObject *__pyx_r = 0;
  5616. __Pyx_RefNannyDeclarations
  5617. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5618. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5619. /* function exit code */
  5620. __Pyx_RefNannyFinishContext();
  5621. return __pyx_r;
  5622. }
  5623. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5depth___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5624. PyObject *__pyx_r = NULL;
  5625. __Pyx_RefNannyDeclarations
  5626. int __pyx_t_1;
  5627. PyObject *__pyx_t_2 = NULL;
  5628. __Pyx_RefNannySetupContext("__get__", 0);
  5629. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5630. if (__pyx_t_1) {
  5631. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  5632. __Pyx_GOTREF(__pyx_t_2);
  5633. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5634. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5635. __PYX_ERR(0, 454, __pyx_L1_error)
  5636. }
  5637. __Pyx_XDECREF(__pyx_r);
  5638. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_depth(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
  5639. __Pyx_GOTREF(__pyx_t_2);
  5640. __pyx_r = __pyx_t_2;
  5641. __pyx_t_2 = 0;
  5642. goto __pyx_L0;
  5643. /* function exit code */
  5644. __pyx_L1_error:;
  5645. __Pyx_XDECREF(__pyx_t_2);
  5646. __Pyx_AddTraceback("gevent.libev.corecext.loop.depth.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5647. __pyx_r = NULL;
  5648. __pyx_L0:;
  5649. __Pyx_XGIVEREF(__pyx_r);
  5650. __Pyx_RefNannyFinishContext();
  5651. return __pyx_r;
  5652. }
  5653. /* Python wrapper */
  5654. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self); /*proto*/
  5655. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(PyObject *__pyx_v_self) {
  5656. PyObject *__pyx_r = 0;
  5657. __Pyx_RefNannyDeclarations
  5658. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5659. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5660. /* function exit code */
  5661. __Pyx_RefNannyFinishContext();
  5662. return __pyx_r;
  5663. }
  5664. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11backend_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5665. PyObject *__pyx_r = NULL;
  5666. __Pyx_RefNannyDeclarations
  5667. int __pyx_t_1;
  5668. PyObject *__pyx_t_2 = NULL;
  5669. __Pyx_RefNannySetupContext("__get__", 0);
  5670. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5671. if (__pyx_t_1) {
  5672. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
  5673. __Pyx_GOTREF(__pyx_t_2);
  5674. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5675. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5676. __PYX_ERR(0, 462, __pyx_L1_error)
  5677. }
  5678. __Pyx_XDECREF(__pyx_r);
  5679. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_backend(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  5680. __Pyx_GOTREF(__pyx_t_2);
  5681. __pyx_r = __pyx_t_2;
  5682. __pyx_t_2 = 0;
  5683. goto __pyx_L0;
  5684. /* function exit code */
  5685. __pyx_L1_error:;
  5686. __Pyx_XDECREF(__pyx_t_2);
  5687. __Pyx_AddTraceback("gevent.libev.corecext.loop.backend_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5688. __pyx_r = NULL;
  5689. __pyx_L0:;
  5690. __Pyx_XGIVEREF(__pyx_r);
  5691. __Pyx_RefNannyFinishContext();
  5692. return __pyx_r;
  5693. }
  5694. /* Python wrapper */
  5695. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self); /*proto*/
  5696. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(PyObject *__pyx_v_self) {
  5697. PyObject *__pyx_r = 0;
  5698. __Pyx_RefNannyDeclarations
  5699. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5700. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5701. /* function exit code */
  5702. __Pyx_RefNannyFinishContext();
  5703. return __pyx_r;
  5704. }
  5705. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_7backend___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5706. unsigned int __pyx_v_backend;
  5707. PyObject *__pyx_v_key = NULL;
  5708. PyObject *__pyx_v_value = NULL;
  5709. PyObject *__pyx_r = NULL;
  5710. __Pyx_RefNannyDeclarations
  5711. int __pyx_t_1;
  5712. PyObject *__pyx_t_2 = NULL;
  5713. PyObject *__pyx_t_3 = NULL;
  5714. Py_ssize_t __pyx_t_4;
  5715. PyObject *(*__pyx_t_5)(PyObject *);
  5716. PyObject *__pyx_t_6 = NULL;
  5717. PyObject *__pyx_t_7 = NULL;
  5718. PyObject *__pyx_t_8 = NULL;
  5719. PyObject *(*__pyx_t_9)(PyObject *);
  5720. __Pyx_RefNannySetupContext("__get__", 0);
  5721. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5722. if (__pyx_t_1) {
  5723. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
  5724. __Pyx_GOTREF(__pyx_t_2);
  5725. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5726. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5727. __PYX_ERR(0, 470, __pyx_L1_error)
  5728. }
  5729. __pyx_v_backend = ev_backend(__pyx_v_self->_ptr);
  5730. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
  5731. __Pyx_GOTREF(__pyx_t_2);
  5732. if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
  5733. __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
  5734. __pyx_t_5 = NULL;
  5735. } else {
  5736. __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
  5737. __Pyx_GOTREF(__pyx_t_3);
  5738. __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
  5739. }
  5740. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5741. for (;;) {
  5742. if (likely(!__pyx_t_5)) {
  5743. if (likely(PyList_CheckExact(__pyx_t_3))) {
  5744. if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
  5745. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  5746. __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 472, __pyx_L1_error)
  5747. #else
  5748. __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
  5749. __Pyx_GOTREF(__pyx_t_2);
  5750. #endif
  5751. } else {
  5752. if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
  5753. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  5754. __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 472, __pyx_L1_error)
  5755. #else
  5756. __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
  5757. __Pyx_GOTREF(__pyx_t_2);
  5758. #endif
  5759. }
  5760. } else {
  5761. __pyx_t_2 = __pyx_t_5(__pyx_t_3);
  5762. if (unlikely(!__pyx_t_2)) {
  5763. PyObject* exc_type = PyErr_Occurred();
  5764. if (exc_type) {
  5765. if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
  5766. else __PYX_ERR(0, 472, __pyx_L1_error)
  5767. }
  5768. break;
  5769. }
  5770. __Pyx_GOTREF(__pyx_t_2);
  5771. }
  5772. if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
  5773. PyObject* sequence = __pyx_t_2;
  5774. #if !CYTHON_COMPILING_IN_PYPY
  5775. Py_ssize_t size = Py_SIZE(sequence);
  5776. #else
  5777. Py_ssize_t size = PySequence_Size(sequence);
  5778. #endif
  5779. if (unlikely(size != 2)) {
  5780. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  5781. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  5782. __PYX_ERR(0, 472, __pyx_L1_error)
  5783. }
  5784. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  5785. if (likely(PyTuple_CheckExact(sequence))) {
  5786. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
  5787. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
  5788. } else {
  5789. __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
  5790. __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
  5791. }
  5792. __Pyx_INCREF(__pyx_t_6);
  5793. __Pyx_INCREF(__pyx_t_7);
  5794. #else
  5795. __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
  5796. __Pyx_GOTREF(__pyx_t_6);
  5797. __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
  5798. __Pyx_GOTREF(__pyx_t_7);
  5799. #endif
  5800. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5801. } else {
  5802. Py_ssize_t index = -1;
  5803. __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 472, __pyx_L1_error)
  5804. __Pyx_GOTREF(__pyx_t_8);
  5805. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5806. __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
  5807. index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
  5808. __Pyx_GOTREF(__pyx_t_6);
  5809. index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
  5810. __Pyx_GOTREF(__pyx_t_7);
  5811. if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
  5812. __pyx_t_9 = NULL;
  5813. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  5814. goto __pyx_L7_unpacking_done;
  5815. __pyx_L6_unpacking_failed:;
  5816. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  5817. __pyx_t_9 = NULL;
  5818. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  5819. __PYX_ERR(0, 472, __pyx_L1_error)
  5820. __pyx_L7_unpacking_done:;
  5821. }
  5822. __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
  5823. __pyx_t_6 = 0;
  5824. __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
  5825. __pyx_t_7 = 0;
  5826. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
  5827. __Pyx_GOTREF(__pyx_t_2);
  5828. __pyx_t_7 = PyObject_RichCompare(__pyx_v_key, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 473, __pyx_L1_error)
  5829. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5830. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 473, __pyx_L1_error)
  5831. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  5832. if (__pyx_t_1) {
  5833. __Pyx_XDECREF(__pyx_r);
  5834. __Pyx_INCREF(__pyx_v_value);
  5835. __pyx_r = __pyx_v_value;
  5836. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5837. goto __pyx_L0;
  5838. }
  5839. }
  5840. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5841. __Pyx_XDECREF(__pyx_r);
  5842. __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_backend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error)
  5843. __Pyx_GOTREF(__pyx_t_3);
  5844. __pyx_r = __pyx_t_3;
  5845. __pyx_t_3 = 0;
  5846. goto __pyx_L0;
  5847. /* function exit code */
  5848. __pyx_L1_error:;
  5849. __Pyx_XDECREF(__pyx_t_2);
  5850. __Pyx_XDECREF(__pyx_t_3);
  5851. __Pyx_XDECREF(__pyx_t_6);
  5852. __Pyx_XDECREF(__pyx_t_7);
  5853. __Pyx_XDECREF(__pyx_t_8);
  5854. __Pyx_AddTraceback("gevent.libev.corecext.loop.backend.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5855. __pyx_r = NULL;
  5856. __pyx_L0:;
  5857. __Pyx_XDECREF(__pyx_v_key);
  5858. __Pyx_XDECREF(__pyx_v_value);
  5859. __Pyx_XGIVEREF(__pyx_r);
  5860. __Pyx_RefNannyFinishContext();
  5861. return __pyx_r;
  5862. }
  5863. /* Python wrapper */
  5864. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self); /*proto*/
  5865. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(PyObject *__pyx_v_self) {
  5866. PyObject *__pyx_r = 0;
  5867. __Pyx_RefNannyDeclarations
  5868. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5869. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  5870. /* function exit code */
  5871. __Pyx_RefNannyFinishContext();
  5872. return __pyx_r;
  5873. }
  5874. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10pendingcnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
  5875. PyObject *__pyx_r = NULL;
  5876. __Pyx_RefNannyDeclarations
  5877. int __pyx_t_1;
  5878. PyObject *__pyx_t_2 = NULL;
  5879. __Pyx_RefNannySetupContext("__get__", 0);
  5880. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  5881. if (__pyx_t_1) {
  5882. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
  5883. __Pyx_GOTREF(__pyx_t_2);
  5884. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  5885. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5886. __PYX_ERR(0, 482, __pyx_L1_error)
  5887. }
  5888. __Pyx_XDECREF(__pyx_r);
  5889. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(ev_pending_count(__pyx_v_self->_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
  5890. __Pyx_GOTREF(__pyx_t_2);
  5891. __pyx_r = __pyx_t_2;
  5892. __pyx_t_2 = 0;
  5893. goto __pyx_L0;
  5894. /* function exit code */
  5895. __pyx_L1_error:;
  5896. __Pyx_XDECREF(__pyx_t_2);
  5897. __Pyx_AddTraceback("gevent.libev.corecext.loop.pendingcnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5898. __pyx_r = NULL;
  5899. __pyx_L0:;
  5900. __Pyx_XGIVEREF(__pyx_r);
  5901. __Pyx_RefNannyFinishContext();
  5902. return __pyx_r;
  5903. }
  5904. /* Python wrapper */
  5905. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  5906. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_33io(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  5907. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5908. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  5909. vfd_socket_t __pyx_v_fd;
  5910. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  5911. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5912. int __pyx_v_fd;
  5913. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5914. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5915. int __pyx_v_events;
  5916. PyObject *__pyx_v_ref = 0;
  5917. PyObject *__pyx_v_priority = 0;
  5918. PyObject *__pyx_r = 0;
  5919. __Pyx_RefNannyDeclarations
  5920. __Pyx_RefNannySetupContext("io (wrapper)", 0);
  5921. {
  5922. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_events_2,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  5923. PyObject* values[4] = {0,0,0,0};
  5924. values[2] = ((PyObject *)Py_True);
  5925. values[3] = ((PyObject *)Py_None);
  5926. if (unlikely(__pyx_kwds)) {
  5927. Py_ssize_t kw_args;
  5928. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  5929. switch (pos_args) {
  5930. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  5931. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  5932. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  5933. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5934. case 0: break;
  5935. default: goto __pyx_L5_argtuple_error;
  5936. }
  5937. kw_args = PyDict_Size(__pyx_kwds);
  5938. switch (pos_args) {
  5939. case 0:
  5940. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
  5941. else goto __pyx_L5_argtuple_error;
  5942. case 1:
  5943. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_events_2)) != 0)) kw_args--;
  5944. else {
  5945. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5946. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  5947. __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, 1); __PYX_ERR(0, 486, __pyx_L3_error)
  5948. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  5949. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5950. __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, 1); __PYX_ERR(0, 489, __pyx_L3_error)
  5951. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5952. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5953. }
  5954. case 2:
  5955. if (kw_args > 0) {
  5956. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  5957. if (value) { values[2] = value; kw_args--; }
  5958. }
  5959. case 3:
  5960. if (kw_args > 0) {
  5961. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  5962. if (value) { values[3] = value; kw_args--; }
  5963. }
  5964. }
  5965. if (unlikely(kw_args > 0)) {
  5966. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5967. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  5968. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "io") < 0)) __PYX_ERR(0, 486, __pyx_L3_error)
  5969. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  5970. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5971. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "io") < 0)) __PYX_ERR(0, 489, __pyx_L3_error)
  5972. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5973. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5974. }
  5975. } else {
  5976. switch (PyTuple_GET_SIZE(__pyx_args)) {
  5977. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  5978. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  5979. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  5980. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  5981. break;
  5982. default: goto __pyx_L5_argtuple_error;
  5983. }
  5984. }
  5985. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5986. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  5987. __pyx_v_fd = __Pyx_PyInt_As_vfd_socket_t(values[0]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L3_error)
  5988. __pyx_v_events = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L3_error)
  5989. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  5990. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5991. __pyx_v_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 489, __pyx_L3_error)
  5992. __pyx_v_events = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 489, __pyx_L3_error)
  5993. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  5994. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  5995. __pyx_v_ref = values[2];
  5996. __pyx_v_priority = values[3];
  5997. }
  5998. goto __pyx_L4_argument_unpacking_done;
  5999. __pyx_L5_argtuple_error:;
  6000. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6001. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6002. __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 486, __pyx_L3_error)
  6003. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6004. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6005. __Pyx_RaiseArgtupleInvalid("io", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 489, __pyx_L3_error)
  6006. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6007. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6008. __pyx_L3_error:;
  6009. __Pyx_AddTraceback("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6010. __Pyx_RefNannyFinishContext();
  6011. return NULL;
  6012. __pyx_L4_argument_unpacking_done:;
  6013. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_32io(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);
  6014. /* function exit code */
  6015. __Pyx_RefNannyFinishContext();
  6016. return __pyx_r;
  6017. }
  6018. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6019. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6020. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6021. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6022. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6023. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_32io(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6024. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6025. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6026. PyObject *__pyx_r = NULL;
  6027. __Pyx_RefNannyDeclarations
  6028. PyObject *__pyx_t_1 = NULL;
  6029. PyObject *__pyx_t_2 = NULL;
  6030. PyObject *__pyx_t_3 = NULL;
  6031. __Pyx_RefNannySetupContext("io", 0);
  6032. __Pyx_XDECREF(__pyx_r);
  6033. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6034. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6035. __pyx_t_1 = __Pyx_PyInt_From_vfd_socket_t(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
  6036. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6037. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6038. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
  6039. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6040. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6041. __Pyx_GOTREF(__pyx_t_1);
  6042. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6043. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6044. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
  6045. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6046. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6047. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
  6048. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6049. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6050. __Pyx_GOTREF(__pyx_t_2);
  6051. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6052. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6053. __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  6054. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6055. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6056. __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
  6057. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6058. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6059. __Pyx_GOTREF(__pyx_t_3);
  6060. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6061. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6062. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  6063. __Pyx_GIVEREF(__pyx_t_1);
  6064. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  6065. __Pyx_GIVEREF(__pyx_t_2);
  6066. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  6067. __Pyx_INCREF(__pyx_v_ref);
  6068. __Pyx_GIVEREF(__pyx_v_ref);
  6069. PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_ref);
  6070. __Pyx_INCREF(__pyx_v_priority);
  6071. __Pyx_GIVEREF(__pyx_v_priority);
  6072. PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_priority);
  6073. __pyx_t_1 = 0;
  6074. __pyx_t_2 = 0;
  6075. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6076. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6077. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_io), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
  6078. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6079. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6080. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_io), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
  6081. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6082. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6083. __Pyx_GOTREF(__pyx_t_2);
  6084. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6085. __pyx_r = __pyx_t_2;
  6086. __pyx_t_2 = 0;
  6087. goto __pyx_L0;
  6088. /* function exit code */
  6089. __pyx_L1_error:;
  6090. __Pyx_XDECREF(__pyx_t_1);
  6091. __Pyx_XDECREF(__pyx_t_2);
  6092. __Pyx_XDECREF(__pyx_t_3);
  6093. __Pyx_AddTraceback("gevent.libev.corecext.loop.io", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6094. __pyx_r = NULL;
  6095. __pyx_L0:;
  6096. __Pyx_XGIVEREF(__pyx_r);
  6097. __Pyx_RefNannyFinishContext();
  6098. return __pyx_r;
  6099. }
  6100. /* Python wrapper */
  6101. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6102. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_35timer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6103. double __pyx_v_after;
  6104. double __pyx_v_repeat;
  6105. PyObject *__pyx_v_ref = 0;
  6106. PyObject *__pyx_v_priority = 0;
  6107. PyObject *__pyx_r = 0;
  6108. __Pyx_RefNannyDeclarations
  6109. __Pyx_RefNannySetupContext("timer (wrapper)", 0);
  6110. {
  6111. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_after,&__pyx_n_s_repeat,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6112. PyObject* values[4] = {0,0,0,0};
  6113. values[2] = ((PyObject *)Py_True);
  6114. values[3] = ((PyObject *)Py_None);
  6115. if (unlikely(__pyx_kwds)) {
  6116. Py_ssize_t kw_args;
  6117. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6118. switch (pos_args) {
  6119. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  6120. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6121. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6122. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6123. case 0: break;
  6124. default: goto __pyx_L5_argtuple_error;
  6125. }
  6126. kw_args = PyDict_Size(__pyx_kwds);
  6127. switch (pos_args) {
  6128. case 0:
  6129. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_after)) != 0)) kw_args--;
  6130. else goto __pyx_L5_argtuple_error;
  6131. case 1:
  6132. if (kw_args > 0) {
  6133. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_repeat);
  6134. if (value) { values[1] = value; kw_args--; }
  6135. }
  6136. case 2:
  6137. if (kw_args > 0) {
  6138. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6139. if (value) { values[2] = value; kw_args--; }
  6140. }
  6141. case 3:
  6142. if (kw_args > 0) {
  6143. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6144. if (value) { values[3] = value; kw_args--; }
  6145. }
  6146. }
  6147. if (unlikely(kw_args > 0)) {
  6148. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "timer") < 0)) __PYX_ERR(0, 493, __pyx_L3_error)
  6149. }
  6150. } else {
  6151. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6152. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  6153. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6154. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6155. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6156. break;
  6157. default: goto __pyx_L5_argtuple_error;
  6158. }
  6159. }
  6160. __pyx_v_after = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L3_error)
  6161. if (values[1]) {
  6162. __pyx_v_repeat = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L3_error)
  6163. } else {
  6164. __pyx_v_repeat = ((double)0.0);
  6165. }
  6166. __pyx_v_ref = values[2];
  6167. __pyx_v_priority = values[3];
  6168. }
  6169. goto __pyx_L4_argument_unpacking_done;
  6170. __pyx_L5_argtuple_error:;
  6171. __Pyx_RaiseArgtupleInvalid("timer", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 493, __pyx_L3_error)
  6172. __pyx_L3_error:;
  6173. __Pyx_AddTraceback("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6174. __Pyx_RefNannyFinishContext();
  6175. return NULL;
  6176. __pyx_L4_argument_unpacking_done:;
  6177. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_34timer(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);
  6178. /* function exit code */
  6179. __Pyx_RefNannyFinishContext();
  6180. return __pyx_r;
  6181. }
  6182. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_34timer(struct PyGeventLoopObject *__pyx_v_self, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6183. PyObject *__pyx_r = NULL;
  6184. __Pyx_RefNannyDeclarations
  6185. PyObject *__pyx_t_1 = NULL;
  6186. PyObject *__pyx_t_2 = NULL;
  6187. PyObject *__pyx_t_3 = NULL;
  6188. __Pyx_RefNannySetupContext("timer", 0);
  6189. __Pyx_XDECREF(__pyx_r);
  6190. __pyx_t_1 = PyFloat_FromDouble(__pyx_v_after); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
  6191. __Pyx_GOTREF(__pyx_t_1);
  6192. __pyx_t_2 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
  6193. __Pyx_GOTREF(__pyx_t_2);
  6194. __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error)
  6195. __Pyx_GOTREF(__pyx_t_3);
  6196. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6197. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6198. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  6199. __Pyx_GIVEREF(__pyx_t_1);
  6200. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  6201. __Pyx_GIVEREF(__pyx_t_2);
  6202. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  6203. __Pyx_INCREF(__pyx_v_ref);
  6204. __Pyx_GIVEREF(__pyx_v_ref);
  6205. PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_ref);
  6206. __Pyx_INCREF(__pyx_v_priority);
  6207. __Pyx_GIVEREF(__pyx_v_priority);
  6208. PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_priority);
  6209. __pyx_t_1 = 0;
  6210. __pyx_t_2 = 0;
  6211. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_timer), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
  6212. __Pyx_GOTREF(__pyx_t_2);
  6213. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6214. __pyx_r = __pyx_t_2;
  6215. __pyx_t_2 = 0;
  6216. goto __pyx_L0;
  6217. /* function exit code */
  6218. __pyx_L1_error:;
  6219. __Pyx_XDECREF(__pyx_t_1);
  6220. __Pyx_XDECREF(__pyx_t_2);
  6221. __Pyx_XDECREF(__pyx_t_3);
  6222. __Pyx_AddTraceback("gevent.libev.corecext.loop.timer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6223. __pyx_r = NULL;
  6224. __pyx_L0:;
  6225. __Pyx_XGIVEREF(__pyx_r);
  6226. __Pyx_RefNannyFinishContext();
  6227. return __pyx_r;
  6228. }
  6229. /* Python wrapper */
  6230. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37signal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6231. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_37signal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6232. int __pyx_v_signum;
  6233. PyObject *__pyx_v_ref = 0;
  6234. PyObject *__pyx_v_priority = 0;
  6235. PyObject *__pyx_r = 0;
  6236. __Pyx_RefNannyDeclarations
  6237. __Pyx_RefNannySetupContext("signal (wrapper)", 0);
  6238. {
  6239. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signum,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6240. PyObject* values[3] = {0,0,0};
  6241. values[1] = ((PyObject *)Py_True);
  6242. values[2] = ((PyObject *)Py_None);
  6243. if (unlikely(__pyx_kwds)) {
  6244. Py_ssize_t kw_args;
  6245. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6246. switch (pos_args) {
  6247. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6248. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6249. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6250. case 0: break;
  6251. default: goto __pyx_L5_argtuple_error;
  6252. }
  6253. kw_args = PyDict_Size(__pyx_kwds);
  6254. switch (pos_args) {
  6255. case 0:
  6256. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signum)) != 0)) kw_args--;
  6257. else goto __pyx_L5_argtuple_error;
  6258. case 1:
  6259. if (kw_args > 0) {
  6260. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6261. if (value) { values[1] = value; kw_args--; }
  6262. }
  6263. case 2:
  6264. if (kw_args > 0) {
  6265. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6266. if (value) { values[2] = value; kw_args--; }
  6267. }
  6268. }
  6269. if (unlikely(kw_args > 0)) {
  6270. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "signal") < 0)) __PYX_ERR(0, 496, __pyx_L3_error)
  6271. }
  6272. } else {
  6273. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6274. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6275. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6276. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6277. break;
  6278. default: goto __pyx_L5_argtuple_error;
  6279. }
  6280. }
  6281. __pyx_v_signum = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_signum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L3_error)
  6282. __pyx_v_ref = values[1];
  6283. __pyx_v_priority = values[2];
  6284. }
  6285. goto __pyx_L4_argument_unpacking_done;
  6286. __pyx_L5_argtuple_error:;
  6287. __Pyx_RaiseArgtupleInvalid("signal", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 496, __pyx_L3_error)
  6288. __pyx_L3_error:;
  6289. __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6290. __Pyx_RefNannyFinishContext();
  6291. return NULL;
  6292. __pyx_L4_argument_unpacking_done:;
  6293. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_36signal(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_signum, __pyx_v_ref, __pyx_v_priority);
  6294. /* function exit code */
  6295. __Pyx_RefNannyFinishContext();
  6296. return __pyx_r;
  6297. }
  6298. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_36signal(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_signum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6299. PyObject *__pyx_r = NULL;
  6300. __Pyx_RefNannyDeclarations
  6301. PyObject *__pyx_t_1 = NULL;
  6302. PyObject *__pyx_t_2 = NULL;
  6303. __Pyx_RefNannySetupContext("signal", 0);
  6304. __Pyx_XDECREF(__pyx_r);
  6305. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_signum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  6306. __Pyx_GOTREF(__pyx_t_1);
  6307. __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
  6308. __Pyx_GOTREF(__pyx_t_2);
  6309. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6310. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6311. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  6312. __Pyx_GIVEREF(__pyx_t_1);
  6313. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  6314. __Pyx_INCREF(__pyx_v_ref);
  6315. __Pyx_GIVEREF(__pyx_v_ref);
  6316. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ref);
  6317. __Pyx_INCREF(__pyx_v_priority);
  6318. __Pyx_GIVEREF(__pyx_v_priority);
  6319. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_priority);
  6320. __pyx_t_1 = 0;
  6321. __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_signal), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  6322. __Pyx_GOTREF(__pyx_t_1);
  6323. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6324. __pyx_r = __pyx_t_1;
  6325. __pyx_t_1 = 0;
  6326. goto __pyx_L0;
  6327. /* function exit code */
  6328. __pyx_L1_error:;
  6329. __Pyx_XDECREF(__pyx_t_1);
  6330. __Pyx_XDECREF(__pyx_t_2);
  6331. __Pyx_AddTraceback("gevent.libev.corecext.loop.signal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6332. __pyx_r = NULL;
  6333. __pyx_L0:;
  6334. __Pyx_XGIVEREF(__pyx_r);
  6335. __Pyx_RefNannyFinishContext();
  6336. return __pyx_r;
  6337. }
  6338. /* Python wrapper */
  6339. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39idle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6340. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_39idle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6341. PyObject *__pyx_v_ref = 0;
  6342. PyObject *__pyx_v_priority = 0;
  6343. PyObject *__pyx_r = 0;
  6344. __Pyx_RefNannyDeclarations
  6345. __Pyx_RefNannySetupContext("idle (wrapper)", 0);
  6346. {
  6347. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6348. PyObject* values[2] = {0,0};
  6349. values[0] = ((PyObject *)Py_True);
  6350. values[1] = ((PyObject *)Py_None);
  6351. if (unlikely(__pyx_kwds)) {
  6352. Py_ssize_t kw_args;
  6353. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6354. switch (pos_args) {
  6355. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6356. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6357. case 0: break;
  6358. default: goto __pyx_L5_argtuple_error;
  6359. }
  6360. kw_args = PyDict_Size(__pyx_kwds);
  6361. switch (pos_args) {
  6362. case 0:
  6363. if (kw_args > 0) {
  6364. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6365. if (value) { values[0] = value; kw_args--; }
  6366. }
  6367. case 1:
  6368. if (kw_args > 0) {
  6369. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6370. if (value) { values[1] = value; kw_args--; }
  6371. }
  6372. }
  6373. if (unlikely(kw_args > 0)) {
  6374. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "idle") < 0)) __PYX_ERR(0, 499, __pyx_L3_error)
  6375. }
  6376. } else {
  6377. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6378. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6379. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6380. case 0: break;
  6381. default: goto __pyx_L5_argtuple_error;
  6382. }
  6383. }
  6384. __pyx_v_ref = values[0];
  6385. __pyx_v_priority = values[1];
  6386. }
  6387. goto __pyx_L4_argument_unpacking_done;
  6388. __pyx_L5_argtuple_error:;
  6389. __Pyx_RaiseArgtupleInvalid("idle", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 499, __pyx_L3_error)
  6390. __pyx_L3_error:;
  6391. __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6392. __Pyx_RefNannyFinishContext();
  6393. return NULL;
  6394. __pyx_L4_argument_unpacking_done:;
  6395. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_38idle(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);
  6396. /* function exit code */
  6397. __Pyx_RefNannyFinishContext();
  6398. return __pyx_r;
  6399. }
  6400. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_38idle(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6401. PyObject *__pyx_r = NULL;
  6402. __Pyx_RefNannyDeclarations
  6403. PyObject *__pyx_t_1 = NULL;
  6404. PyObject *__pyx_t_2 = NULL;
  6405. __Pyx_RefNannySetupContext("idle", 0);
  6406. __Pyx_XDECREF(__pyx_r);
  6407. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  6408. __Pyx_GOTREF(__pyx_t_1);
  6409. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6410. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6411. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  6412. __Pyx_INCREF(__pyx_v_ref);
  6413. __Pyx_GIVEREF(__pyx_v_ref);
  6414. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
  6415. __Pyx_INCREF(__pyx_v_priority);
  6416. __Pyx_GIVEREF(__pyx_v_priority);
  6417. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority);
  6418. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_idle), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
  6419. __Pyx_GOTREF(__pyx_t_2);
  6420. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6421. __pyx_r = __pyx_t_2;
  6422. __pyx_t_2 = 0;
  6423. goto __pyx_L0;
  6424. /* function exit code */
  6425. __pyx_L1_error:;
  6426. __Pyx_XDECREF(__pyx_t_1);
  6427. __Pyx_XDECREF(__pyx_t_2);
  6428. __Pyx_AddTraceback("gevent.libev.corecext.loop.idle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6429. __pyx_r = NULL;
  6430. __pyx_L0:;
  6431. __Pyx_XGIVEREF(__pyx_r);
  6432. __Pyx_RefNannyFinishContext();
  6433. return __pyx_r;
  6434. }
  6435. /* Python wrapper */
  6436. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41prepare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6437. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_41prepare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6438. PyObject *__pyx_v_ref = 0;
  6439. PyObject *__pyx_v_priority = 0;
  6440. PyObject *__pyx_r = 0;
  6441. __Pyx_RefNannyDeclarations
  6442. __Pyx_RefNannySetupContext("prepare (wrapper)", 0);
  6443. {
  6444. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6445. PyObject* values[2] = {0,0};
  6446. values[0] = ((PyObject *)Py_True);
  6447. values[1] = ((PyObject *)Py_None);
  6448. if (unlikely(__pyx_kwds)) {
  6449. Py_ssize_t kw_args;
  6450. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6451. switch (pos_args) {
  6452. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6453. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6454. case 0: break;
  6455. default: goto __pyx_L5_argtuple_error;
  6456. }
  6457. kw_args = PyDict_Size(__pyx_kwds);
  6458. switch (pos_args) {
  6459. case 0:
  6460. if (kw_args > 0) {
  6461. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6462. if (value) { values[0] = value; kw_args--; }
  6463. }
  6464. case 1:
  6465. if (kw_args > 0) {
  6466. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6467. if (value) { values[1] = value; kw_args--; }
  6468. }
  6469. }
  6470. if (unlikely(kw_args > 0)) {
  6471. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prepare") < 0)) __PYX_ERR(0, 502, __pyx_L3_error)
  6472. }
  6473. } else {
  6474. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6475. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6476. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6477. case 0: break;
  6478. default: goto __pyx_L5_argtuple_error;
  6479. }
  6480. }
  6481. __pyx_v_ref = values[0];
  6482. __pyx_v_priority = values[1];
  6483. }
  6484. goto __pyx_L4_argument_unpacking_done;
  6485. __pyx_L5_argtuple_error:;
  6486. __Pyx_RaiseArgtupleInvalid("prepare", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 502, __pyx_L3_error)
  6487. __pyx_L3_error:;
  6488. __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6489. __Pyx_RefNannyFinishContext();
  6490. return NULL;
  6491. __pyx_L4_argument_unpacking_done:;
  6492. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_40prepare(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);
  6493. /* function exit code */
  6494. __Pyx_RefNannyFinishContext();
  6495. return __pyx_r;
  6496. }
  6497. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_40prepare(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6498. PyObject *__pyx_r = NULL;
  6499. __Pyx_RefNannyDeclarations
  6500. PyObject *__pyx_t_1 = NULL;
  6501. PyObject *__pyx_t_2 = NULL;
  6502. __Pyx_RefNannySetupContext("prepare", 0);
  6503. __Pyx_XDECREF(__pyx_r);
  6504. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
  6505. __Pyx_GOTREF(__pyx_t_1);
  6506. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6507. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6508. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  6509. __Pyx_INCREF(__pyx_v_ref);
  6510. __Pyx_GIVEREF(__pyx_v_ref);
  6511. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
  6512. __Pyx_INCREF(__pyx_v_priority);
  6513. __Pyx_GIVEREF(__pyx_v_priority);
  6514. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority);
  6515. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_prepare), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
  6516. __Pyx_GOTREF(__pyx_t_2);
  6517. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6518. __pyx_r = __pyx_t_2;
  6519. __pyx_t_2 = 0;
  6520. goto __pyx_L0;
  6521. /* function exit code */
  6522. __pyx_L1_error:;
  6523. __Pyx_XDECREF(__pyx_t_1);
  6524. __Pyx_XDECREF(__pyx_t_2);
  6525. __Pyx_AddTraceback("gevent.libev.corecext.loop.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6526. __pyx_r = NULL;
  6527. __pyx_L0:;
  6528. __Pyx_XGIVEREF(__pyx_r);
  6529. __Pyx_RefNannyFinishContext();
  6530. return __pyx_r;
  6531. }
  6532. /* Python wrapper */
  6533. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43check(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6534. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_43check(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6535. PyObject *__pyx_v_ref = 0;
  6536. PyObject *__pyx_v_priority = 0;
  6537. PyObject *__pyx_r = 0;
  6538. __Pyx_RefNannyDeclarations
  6539. __Pyx_RefNannySetupContext("check (wrapper)", 0);
  6540. {
  6541. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6542. PyObject* values[2] = {0,0};
  6543. values[0] = ((PyObject *)Py_True);
  6544. values[1] = ((PyObject *)Py_None);
  6545. if (unlikely(__pyx_kwds)) {
  6546. Py_ssize_t kw_args;
  6547. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6548. switch (pos_args) {
  6549. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6550. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6551. case 0: break;
  6552. default: goto __pyx_L5_argtuple_error;
  6553. }
  6554. kw_args = PyDict_Size(__pyx_kwds);
  6555. switch (pos_args) {
  6556. case 0:
  6557. if (kw_args > 0) {
  6558. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6559. if (value) { values[0] = value; kw_args--; }
  6560. }
  6561. case 1:
  6562. if (kw_args > 0) {
  6563. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6564. if (value) { values[1] = value; kw_args--; }
  6565. }
  6566. }
  6567. if (unlikely(kw_args > 0)) {
  6568. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "check") < 0)) __PYX_ERR(0, 505, __pyx_L3_error)
  6569. }
  6570. } else {
  6571. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6572. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6573. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6574. case 0: break;
  6575. default: goto __pyx_L5_argtuple_error;
  6576. }
  6577. }
  6578. __pyx_v_ref = values[0];
  6579. __pyx_v_priority = values[1];
  6580. }
  6581. goto __pyx_L4_argument_unpacking_done;
  6582. __pyx_L5_argtuple_error:;
  6583. __Pyx_RaiseArgtupleInvalid("check", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 505, __pyx_L3_error)
  6584. __pyx_L3_error:;
  6585. __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6586. __Pyx_RefNannyFinishContext();
  6587. return NULL;
  6588. __pyx_L4_argument_unpacking_done:;
  6589. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_42check(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);
  6590. /* function exit code */
  6591. __Pyx_RefNannyFinishContext();
  6592. return __pyx_r;
  6593. }
  6594. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_42check(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6595. PyObject *__pyx_r = NULL;
  6596. __Pyx_RefNannyDeclarations
  6597. PyObject *__pyx_t_1 = NULL;
  6598. PyObject *__pyx_t_2 = NULL;
  6599. __Pyx_RefNannySetupContext("check", 0);
  6600. __Pyx_XDECREF(__pyx_r);
  6601. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
  6602. __Pyx_GOTREF(__pyx_t_1);
  6603. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6604. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6605. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  6606. __Pyx_INCREF(__pyx_v_ref);
  6607. __Pyx_GIVEREF(__pyx_v_ref);
  6608. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
  6609. __Pyx_INCREF(__pyx_v_priority);
  6610. __Pyx_GIVEREF(__pyx_v_priority);
  6611. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority);
  6612. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_check), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
  6613. __Pyx_GOTREF(__pyx_t_2);
  6614. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6615. __pyx_r = __pyx_t_2;
  6616. __pyx_t_2 = 0;
  6617. goto __pyx_L0;
  6618. /* function exit code */
  6619. __pyx_L1_error:;
  6620. __Pyx_XDECREF(__pyx_t_1);
  6621. __Pyx_XDECREF(__pyx_t_2);
  6622. __Pyx_AddTraceback("gevent.libev.corecext.loop.check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6623. __pyx_r = NULL;
  6624. __pyx_L0:;
  6625. __Pyx_XGIVEREF(__pyx_r);
  6626. __Pyx_RefNannyFinishContext();
  6627. return __pyx_r;
  6628. }
  6629. /* Python wrapper */
  6630. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45fork(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6631. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_45fork(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6632. PyObject *__pyx_v_ref = 0;
  6633. PyObject *__pyx_v_priority = 0;
  6634. PyObject *__pyx_r = 0;
  6635. __Pyx_RefNannyDeclarations
  6636. __Pyx_RefNannySetupContext("fork (wrapper)", 0);
  6637. {
  6638. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6639. PyObject* values[2] = {0,0};
  6640. values[0] = ((PyObject *)Py_True);
  6641. values[1] = ((PyObject *)Py_None);
  6642. if (unlikely(__pyx_kwds)) {
  6643. Py_ssize_t kw_args;
  6644. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6645. switch (pos_args) {
  6646. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6647. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6648. case 0: break;
  6649. default: goto __pyx_L5_argtuple_error;
  6650. }
  6651. kw_args = PyDict_Size(__pyx_kwds);
  6652. switch (pos_args) {
  6653. case 0:
  6654. if (kw_args > 0) {
  6655. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6656. if (value) { values[0] = value; kw_args--; }
  6657. }
  6658. case 1:
  6659. if (kw_args > 0) {
  6660. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6661. if (value) { values[1] = value; kw_args--; }
  6662. }
  6663. }
  6664. if (unlikely(kw_args > 0)) {
  6665. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fork") < 0)) __PYX_ERR(0, 508, __pyx_L3_error)
  6666. }
  6667. } else {
  6668. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6669. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6670. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6671. case 0: break;
  6672. default: goto __pyx_L5_argtuple_error;
  6673. }
  6674. }
  6675. __pyx_v_ref = values[0];
  6676. __pyx_v_priority = values[1];
  6677. }
  6678. goto __pyx_L4_argument_unpacking_done;
  6679. __pyx_L5_argtuple_error:;
  6680. __Pyx_RaiseArgtupleInvalid("fork", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 508, __pyx_L3_error)
  6681. __pyx_L3_error:;
  6682. __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6683. __Pyx_RefNannyFinishContext();
  6684. return NULL;
  6685. __pyx_L4_argument_unpacking_done:;
  6686. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_44fork(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);
  6687. /* function exit code */
  6688. __Pyx_RefNannyFinishContext();
  6689. return __pyx_r;
  6690. }
  6691. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_44fork(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6692. PyObject *__pyx_r = NULL;
  6693. __Pyx_RefNannyDeclarations
  6694. PyObject *__pyx_t_1 = NULL;
  6695. PyObject *__pyx_t_2 = NULL;
  6696. __Pyx_RefNannySetupContext("fork", 0);
  6697. __Pyx_XDECREF(__pyx_r);
  6698. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
  6699. __Pyx_GOTREF(__pyx_t_1);
  6700. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6701. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6702. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  6703. __Pyx_INCREF(__pyx_v_ref);
  6704. __Pyx_GIVEREF(__pyx_v_ref);
  6705. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
  6706. __Pyx_INCREF(__pyx_v_priority);
  6707. __Pyx_GIVEREF(__pyx_v_priority);
  6708. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority);
  6709. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_fork), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
  6710. __Pyx_GOTREF(__pyx_t_2);
  6711. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6712. __pyx_r = __pyx_t_2;
  6713. __pyx_t_2 = 0;
  6714. goto __pyx_L0;
  6715. /* function exit code */
  6716. __pyx_L1_error:;
  6717. __Pyx_XDECREF(__pyx_t_1);
  6718. __Pyx_XDECREF(__pyx_t_2);
  6719. __Pyx_AddTraceback("gevent.libev.corecext.loop.fork", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6720. __pyx_r = NULL;
  6721. __pyx_L0:;
  6722. __Pyx_XGIVEREF(__pyx_r);
  6723. __Pyx_RefNannyFinishContext();
  6724. return __pyx_r;
  6725. }
  6726. /* Python wrapper */
  6727. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6728. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_47async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6729. PyObject *__pyx_v_ref = 0;
  6730. PyObject *__pyx_v_priority = 0;
  6731. PyObject *__pyx_r = 0;
  6732. __Pyx_RefNannyDeclarations
  6733. __Pyx_RefNannySetupContext("async (wrapper)", 0);
  6734. {
  6735. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  6736. PyObject* values[2] = {0,0};
  6737. values[0] = ((PyObject *)Py_True);
  6738. values[1] = ((PyObject *)Py_None);
  6739. if (unlikely(__pyx_kwds)) {
  6740. Py_ssize_t kw_args;
  6741. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6742. switch (pos_args) {
  6743. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6744. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6745. case 0: break;
  6746. default: goto __pyx_L5_argtuple_error;
  6747. }
  6748. kw_args = PyDict_Size(__pyx_kwds);
  6749. switch (pos_args) {
  6750. case 0:
  6751. if (kw_args > 0) {
  6752. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6753. if (value) { values[0] = value; kw_args--; }
  6754. }
  6755. case 1:
  6756. if (kw_args > 0) {
  6757. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  6758. if (value) { values[1] = value; kw_args--; }
  6759. }
  6760. }
  6761. if (unlikely(kw_args > 0)) {
  6762. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "async") < 0)) __PYX_ERR(0, 511, __pyx_L3_error)
  6763. }
  6764. } else {
  6765. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6766. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6767. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6768. case 0: break;
  6769. default: goto __pyx_L5_argtuple_error;
  6770. }
  6771. }
  6772. __pyx_v_ref = values[0];
  6773. __pyx_v_priority = values[1];
  6774. }
  6775. goto __pyx_L4_argument_unpacking_done;
  6776. __pyx_L5_argtuple_error:;
  6777. __Pyx_RaiseArgtupleInvalid("async", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 511, __pyx_L3_error)
  6778. __pyx_L3_error:;
  6779. __Pyx_AddTraceback("gevent.libev.corecext.loop.async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6780. __Pyx_RefNannyFinishContext();
  6781. return NULL;
  6782. __pyx_L4_argument_unpacking_done:;
  6783. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_46async(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_priority);
  6784. /* function exit code */
  6785. __Pyx_RefNannyFinishContext();
  6786. return __pyx_r;
  6787. }
  6788. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_46async(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  6789. PyObject *__pyx_r = NULL;
  6790. __Pyx_RefNannyDeclarations
  6791. PyObject *__pyx_t_1 = NULL;
  6792. PyObject *__pyx_t_2 = NULL;
  6793. __Pyx_RefNannySetupContext("async", 0);
  6794. __Pyx_XDECREF(__pyx_r);
  6795. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
  6796. __Pyx_GOTREF(__pyx_t_1);
  6797. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6798. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6799. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  6800. __Pyx_INCREF(__pyx_v_ref);
  6801. __Pyx_GIVEREF(__pyx_v_ref);
  6802. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ref);
  6803. __Pyx_INCREF(__pyx_v_priority);
  6804. __Pyx_GIVEREF(__pyx_v_priority);
  6805. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_priority);
  6806. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_async), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  6807. __Pyx_GOTREF(__pyx_t_2);
  6808. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6809. __pyx_r = __pyx_t_2;
  6810. __pyx_t_2 = 0;
  6811. goto __pyx_L0;
  6812. /* function exit code */
  6813. __pyx_L1_error:;
  6814. __Pyx_XDECREF(__pyx_t_1);
  6815. __Pyx_XDECREF(__pyx_t_2);
  6816. __Pyx_AddTraceback("gevent.libev.corecext.loop.async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6817. __pyx_r = NULL;
  6818. __pyx_L0:;
  6819. __Pyx_XGIVEREF(__pyx_r);
  6820. __Pyx_RefNannyFinishContext();
  6821. return __pyx_r;
  6822. }
  6823. /* Python wrapper */
  6824. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6825. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  6826. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49stat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6827. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49stat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6828. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  6829. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6830. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49child(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6831. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_49child(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6832. int __pyx_v_pid;
  6833. int __pyx_v_trace;
  6834. PyObject *__pyx_v_ref = 0;
  6835. PyObject *__pyx_r = 0;
  6836. __Pyx_RefNannyDeclarations
  6837. __Pyx_RefNannySetupContext("child (wrapper)", 0);
  6838. {
  6839. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pid,&__pyx_n_s_trace,&__pyx_n_s_ref,0};
  6840. PyObject* values[3] = {0,0,0};
  6841. values[2] = ((PyObject *)Py_True);
  6842. if (unlikely(__pyx_kwds)) {
  6843. Py_ssize_t kw_args;
  6844. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  6845. switch (pos_args) {
  6846. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6847. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6848. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6849. case 0: break;
  6850. default: goto __pyx_L5_argtuple_error;
  6851. }
  6852. kw_args = PyDict_Size(__pyx_kwds);
  6853. switch (pos_args) {
  6854. case 0:
  6855. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pid)) != 0)) kw_args--;
  6856. else goto __pyx_L5_argtuple_error;
  6857. case 1:
  6858. if (kw_args > 0) {
  6859. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trace);
  6860. if (value) { values[1] = value; kw_args--; }
  6861. }
  6862. case 2:
  6863. if (kw_args > 0) {
  6864. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  6865. if (value) { values[2] = value; kw_args--; }
  6866. }
  6867. }
  6868. if (unlikely(kw_args > 0)) {
  6869. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "child") < 0)) __PYX_ERR(0, 517, __pyx_L3_error)
  6870. }
  6871. } else {
  6872. switch (PyTuple_GET_SIZE(__pyx_args)) {
  6873. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  6874. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  6875. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  6876. break;
  6877. default: goto __pyx_L5_argtuple_error;
  6878. }
  6879. }
  6880. __pyx_v_pid = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 517, __pyx_L3_error)
  6881. if (values[1]) {
  6882. __pyx_v_trace = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 517, __pyx_L3_error)
  6883. } else {
  6884. __pyx_v_trace = ((int)0);
  6885. }
  6886. __pyx_v_ref = values[2];
  6887. }
  6888. goto __pyx_L4_argument_unpacking_done;
  6889. __pyx_L5_argtuple_error:;
  6890. __Pyx_RaiseArgtupleInvalid("child", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 517, __pyx_L3_error)
  6891. __pyx_L3_error:;
  6892. __Pyx_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6893. __Pyx_RefNannyFinishContext();
  6894. return NULL;
  6895. __pyx_L4_argument_unpacking_done:;
  6896. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_48child(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);
  6897. /* function exit code */
  6898. __Pyx_RefNannyFinishContext();
  6899. return __pyx_r;
  6900. }
  6901. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48child(struct PyGeventLoopObject *__pyx_v_self, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref) {
  6902. PyObject *__pyx_r = NULL;
  6903. __Pyx_RefNannyDeclarations
  6904. PyObject *__pyx_t_1 = NULL;
  6905. PyObject *__pyx_t_2 = NULL;
  6906. PyObject *__pyx_t_3 = NULL;
  6907. __Pyx_RefNannySetupContext("child", 0);
  6908. __Pyx_XDECREF(__pyx_r);
  6909. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  6910. __Pyx_GOTREF(__pyx_t_1);
  6911. __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_trace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  6912. __Pyx_GOTREF(__pyx_t_2);
  6913. __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error)
  6914. __Pyx_GOTREF(__pyx_t_3);
  6915. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  6916. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  6917. PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  6918. __Pyx_GIVEREF(__pyx_t_1);
  6919. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  6920. __Pyx_GIVEREF(__pyx_t_2);
  6921. PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  6922. __Pyx_INCREF(__pyx_v_ref);
  6923. __Pyx_GIVEREF(__pyx_v_ref);
  6924. PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_ref);
  6925. __pyx_t_1 = 0;
  6926. __pyx_t_2 = 0;
  6927. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_child), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  6928. __Pyx_GOTREF(__pyx_t_2);
  6929. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6930. __pyx_r = __pyx_t_2;
  6931. __pyx_t_2 = 0;
  6932. goto __pyx_L0;
  6933. /* function exit code */
  6934. __pyx_L1_error:;
  6935. __Pyx_XDECREF(__pyx_t_1);
  6936. __Pyx_XDECREF(__pyx_t_2);
  6937. __Pyx_XDECREF(__pyx_t_3);
  6938. __Pyx_AddTraceback("gevent.libev.corecext.loop.child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6939. __pyx_r = NULL;
  6940. __pyx_L0:;
  6941. __Pyx_XGIVEREF(__pyx_r);
  6942. __Pyx_RefNannyFinishContext();
  6943. return __pyx_r;
  6944. }
  6945. /* Python wrapper */
  6946. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  6947. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51install_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  6948. PyObject *__pyx_r = 0;
  6949. __Pyx_RefNannyDeclarations
  6950. __Pyx_RefNannySetupContext("install_sigchld (wrapper)", 0);
  6951. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_50install_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));
  6952. /* function exit code */
  6953. __Pyx_RefNannyFinishContext();
  6954. return __pyx_r;
  6955. }
  6956. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50install_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  6957. PyObject *__pyx_r = NULL;
  6958. __Pyx_RefNannyDeclarations
  6959. __Pyx_RefNannySetupContext("install_sigchld", 0);
  6960. gevent_install_sigchld_handler();
  6961. /* function exit code */
  6962. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6963. __Pyx_XGIVEREF(__pyx_r);
  6964. __Pyx_RefNannyFinishContext();
  6965. return __pyx_r;
  6966. }
  6967. /* Python wrapper */
  6968. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  6969. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53reset_sigchld(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  6970. PyObject *__pyx_r = 0;
  6971. __Pyx_RefNannyDeclarations
  6972. __Pyx_RefNannySetupContext("reset_sigchld (wrapper)", 0);
  6973. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_52reset_sigchld(((struct PyGeventLoopObject *)__pyx_v_self));
  6974. /* function exit code */
  6975. __Pyx_RefNannyFinishContext();
  6976. return __pyx_r;
  6977. }
  6978. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52reset_sigchld(CYTHON_UNUSED struct PyGeventLoopObject *__pyx_v_self) {
  6979. PyObject *__pyx_r = NULL;
  6980. __Pyx_RefNannyDeclarations
  6981. __Pyx_RefNannySetupContext("reset_sigchld", 0);
  6982. gevent_reset_sigchld_handler();
  6983. /* function exit code */
  6984. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6985. __Pyx_XGIVEREF(__pyx_r);
  6986. __Pyx_RefNannyFinishContext();
  6987. return __pyx_r;
  6988. }
  6989. /* Python wrapper */
  6990. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55stat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  6991. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55stat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  6992. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  6993. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  6994. PyObject *__pyx_v_path = 0;
  6995. float __pyx_v_interval;
  6996. PyObject *__pyx_v_ref = 0;
  6997. PyObject *__pyx_v_priority = 0;
  6998. PyObject *__pyx_r = 0;
  6999. __Pyx_RefNannyDeclarations
  7000. __Pyx_RefNannySetupContext("stat (wrapper)", 0);
  7001. {
  7002. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_interval,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  7003. PyObject* values[4] = {0,0,0,0};
  7004. values[2] = ((PyObject *)Py_True);
  7005. values[3] = ((PyObject *)Py_None);
  7006. if (unlikely(__pyx_kwds)) {
  7007. Py_ssize_t kw_args;
  7008. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  7009. switch (pos_args) {
  7010. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  7011. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  7012. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  7013. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  7014. case 0: break;
  7015. default: goto __pyx_L5_argtuple_error;
  7016. }
  7017. kw_args = PyDict_Size(__pyx_kwds);
  7018. switch (pos_args) {
  7019. case 0:
  7020. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
  7021. else goto __pyx_L5_argtuple_error;
  7022. case 1:
  7023. if (kw_args > 0) {
  7024. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interval);
  7025. if (value) { values[1] = value; kw_args--; }
  7026. }
  7027. case 2:
  7028. if (kw_args > 0) {
  7029. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  7030. if (value) { values[2] = value; kw_args--; }
  7031. }
  7032. case 3:
  7033. if (kw_args > 0) {
  7034. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  7035. if (value) { values[3] = value; kw_args--; }
  7036. }
  7037. }
  7038. if (unlikely(kw_args > 0)) {
  7039. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stat") < 0)) __PYX_ERR(0, 528, __pyx_L3_error)
  7040. }
  7041. } else {
  7042. switch (PyTuple_GET_SIZE(__pyx_args)) {
  7043. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  7044. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  7045. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  7046. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  7047. break;
  7048. default: goto __pyx_L5_argtuple_error;
  7049. }
  7050. }
  7051. __pyx_v_path = ((PyObject*)values[0]);
  7052. if (values[1]) {
  7053. __pyx_v_interval = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L3_error)
  7054. } else {
  7055. __pyx_v_interval = ((float)0.0);
  7056. }
  7057. __pyx_v_ref = values[2];
  7058. __pyx_v_priority = values[3];
  7059. }
  7060. goto __pyx_L4_argument_unpacking_done;
  7061. __pyx_L5_argtuple_error:;
  7062. __Pyx_RaiseArgtupleInvalid("stat", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 528, __pyx_L3_error)
  7063. __pyx_L3_error:;
  7064. __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7065. __Pyx_RefNannyFinishContext();
  7066. return NULL;
  7067. __pyx_L4_argument_unpacking_done:;
  7068. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 528, __pyx_L1_error)
  7069. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7070. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7071. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_48stat(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);
  7072. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7073. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7074. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_54stat(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);
  7075. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7076. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7077. /* function exit code */
  7078. goto __pyx_L0;
  7079. __pyx_L1_error:;
  7080. __pyx_r = NULL;
  7081. __pyx_L0:;
  7082. __Pyx_RefNannyFinishContext();
  7083. return __pyx_r;
  7084. }
  7085. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7086. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7087. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_48stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  7088. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7089. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7090. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54stat(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  7091. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7092. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7093. PyObject *__pyx_r = NULL;
  7094. __Pyx_RefNannyDeclarations
  7095. PyObject *__pyx_t_1 = NULL;
  7096. PyObject *__pyx_t_2 = NULL;
  7097. __Pyx_RefNannySetupContext("stat", 0);
  7098. __Pyx_XDECREF(__pyx_r);
  7099. __pyx_t_1 = PyFloat_FromDouble(__pyx_v_interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  7100. __Pyx_GOTREF(__pyx_t_1);
  7101. __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)
  7102. __Pyx_GOTREF(__pyx_t_2);
  7103. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  7104. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  7105. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  7106. __Pyx_INCREF(__pyx_v_path);
  7107. __Pyx_GIVEREF(__pyx_v_path);
  7108. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path);
  7109. __Pyx_GIVEREF(__pyx_t_1);
  7110. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  7111. __Pyx_INCREF(__pyx_v_ref);
  7112. __Pyx_GIVEREF(__pyx_v_ref);
  7113. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_ref);
  7114. __Pyx_INCREF(__pyx_v_priority);
  7115. __Pyx_GIVEREF(__pyx_v_priority);
  7116. PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_priority);
  7117. __pyx_t_1 = 0;
  7118. __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_stat), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  7119. __Pyx_GOTREF(__pyx_t_1);
  7120. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7121. __pyx_r = __pyx_t_1;
  7122. __pyx_t_1 = 0;
  7123. goto __pyx_L0;
  7124. /* function exit code */
  7125. __pyx_L1_error:;
  7126. __Pyx_XDECREF(__pyx_t_1);
  7127. __Pyx_XDECREF(__pyx_t_2);
  7128. __Pyx_AddTraceback("gevent.libev.corecext.loop.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7129. __pyx_r = NULL;
  7130. __pyx_L0:;
  7131. __Pyx_XGIVEREF(__pyx_r);
  7132. __Pyx_RefNannyFinishContext();
  7133. return __pyx_r;
  7134. }
  7135. /* Python wrapper */
  7136. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7137. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7138. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51run_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  7139. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_51run_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  7140. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7141. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7142. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57run_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  7143. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57run_callback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  7144. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7145. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7146. PyObject *__pyx_v_func = 0;
  7147. PyObject *__pyx_v_args = 0;
  7148. PyObject *__pyx_r = 0;
  7149. __Pyx_RefNannyDeclarations
  7150. __Pyx_RefNannySetupContext("run_callback (wrapper)", 0);
  7151. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  7152. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  7153. if (unlikely(!__pyx_v_args)) {
  7154. __Pyx_RefNannyFinishContext();
  7155. return NULL;
  7156. }
  7157. __Pyx_GOTREF(__pyx_v_args);
  7158. } else {
  7159. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  7160. }
  7161. {
  7162. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,0};
  7163. PyObject* values[1] = {0};
  7164. if (unlikely(__pyx_kwds)) {
  7165. Py_ssize_t kw_args;
  7166. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  7167. switch (pos_args) {
  7168. default:
  7169. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  7170. case 0: break;
  7171. }
  7172. kw_args = PyDict_Size(__pyx_kwds);
  7173. switch (pos_args) {
  7174. case 0:
  7175. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
  7176. else goto __pyx_L5_argtuple_error;
  7177. }
  7178. if (unlikely(kw_args > 0)) {
  7179. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  7180. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "run_callback") < 0)) __PYX_ERR(0, 531, __pyx_L3_error)
  7181. }
  7182. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  7183. goto __pyx_L5_argtuple_error;
  7184. } else {
  7185. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  7186. }
  7187. __pyx_v_func = values[0];
  7188. }
  7189. goto __pyx_L4_argument_unpacking_done;
  7190. __pyx_L5_argtuple_error:;
  7191. __Pyx_RaiseArgtupleInvalid("run_callback", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 531, __pyx_L3_error)
  7192. __pyx_L3_error:;
  7193. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  7194. __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7195. __Pyx_RefNannyFinishContext();
  7196. return NULL;
  7197. __pyx_L4_argument_unpacking_done:;
  7198. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7199. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7200. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_50run_callback(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);
  7201. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7202. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7203. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_56run_callback(((struct PyGeventLoopObject *)__pyx_v_self), __pyx_v_func, __pyx_v_args);
  7204. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7205. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7206. /* function exit code */
  7207. __Pyx_XDECREF(__pyx_v_args);
  7208. __Pyx_RefNannyFinishContext();
  7209. return __pyx_r;
  7210. }
  7211. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7212. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7213. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_50run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
  7214. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7215. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7216. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56run_callback(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_args) {
  7217. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7218. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7219. struct PyGeventCallbackObject *__pyx_v_cb = 0;
  7220. PyObject *__pyx_r = NULL;
  7221. __Pyx_RefNannyDeclarations
  7222. int __pyx_t_1;
  7223. PyObject *__pyx_t_2 = NULL;
  7224. PyObject *__pyx_t_3 = NULL;
  7225. int __pyx_t_4;
  7226. __Pyx_RefNannySetupContext("run_callback", 0);
  7227. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7228. if (__pyx_t_1) {
  7229. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
  7230. __Pyx_GOTREF(__pyx_t_2);
  7231. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7232. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7233. __PYX_ERR(0, 534, __pyx_L1_error)
  7234. }
  7235. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)
  7236. __Pyx_GOTREF(__pyx_t_2);
  7237. __Pyx_INCREF(__pyx_v_func);
  7238. __Pyx_GIVEREF(__pyx_v_func);
  7239. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_func);
  7240. __Pyx_INCREF(__pyx_v_args);
  7241. __Pyx_GIVEREF(__pyx_v_args);
  7242. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args);
  7243. __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext_callback), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
  7244. __Pyx_GOTREF(__pyx_t_3);
  7245. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7246. __pyx_v_cb = ((struct PyGeventCallbackObject *)__pyx_t_3);
  7247. __pyx_t_3 = 0;
  7248. if (unlikely(__pyx_v_self->_callbacks == Py_None)) {
  7249. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
  7250. __PYX_ERR(0, 536, __pyx_L1_error)
  7251. }
  7252. __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_callbacks, ((PyObject *)__pyx_v_cb)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 536, __pyx_L1_error)
  7253. ev_ref(__pyx_v_self->_ptr);
  7254. __Pyx_XDECREF(__pyx_r);
  7255. __Pyx_INCREF(((PyObject *)__pyx_v_cb));
  7256. __pyx_r = ((PyObject *)__pyx_v_cb);
  7257. goto __pyx_L0;
  7258. /* function exit code */
  7259. __pyx_L1_error:;
  7260. __Pyx_XDECREF(__pyx_t_2);
  7261. __Pyx_XDECREF(__pyx_t_3);
  7262. __Pyx_AddTraceback("gevent.libev.corecext.loop.run_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7263. __pyx_r = NULL;
  7264. __pyx_L0:;
  7265. __Pyx_XDECREF((PyObject *)__pyx_v_cb);
  7266. __Pyx_XGIVEREF(__pyx_r);
  7267. __Pyx_RefNannyFinishContext();
  7268. return __pyx_r;
  7269. }
  7270. /* Python wrapper */
  7271. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7272. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7273. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7274. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_53_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7275. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7276. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7277. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7278. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_59_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7279. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7280. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7281. PyObject *__pyx_r = 0;
  7282. __Pyx_RefNannyDeclarations
  7283. __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  7284. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7285. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7286. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_52_format(((struct PyGeventLoopObject *)__pyx_v_self));
  7287. /* function exit code */
  7288. __Pyx_RefNannyFinishContext();
  7289. return __pyx_r;
  7290. }
  7291. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_52_format(struct PyGeventLoopObject *__pyx_v_self) {
  7292. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7293. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7294. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_58_format(((struct PyGeventLoopObject *)__pyx_v_self));
  7295. /* function exit code */
  7296. __Pyx_RefNannyFinishContext();
  7297. return __pyx_r;
  7298. }
  7299. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_58_format(struct PyGeventLoopObject *__pyx_v_self) {
  7300. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7301. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7302. PyObject *__pyx_v_msg = 0;
  7303. PyObject *__pyx_r = NULL;
  7304. __Pyx_RefNannyDeclarations
  7305. int __pyx_t_1;
  7306. PyObject *__pyx_t_2 = NULL;
  7307. PyObject *__pyx_t_3 = NULL;
  7308. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7309. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7310. PyObject *__pyx_t_4 = NULL;
  7311. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7312. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7313. __Pyx_RefNannySetupContext("_format", 0);
  7314. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7315. if (__pyx_t_1) {
  7316. __Pyx_XDECREF(__pyx_r);
  7317. __Pyx_INCREF(__pyx_n_s_destroyed);
  7318. __pyx_r = __pyx_n_s_destroyed;
  7319. goto __pyx_L0;
  7320. }
  7321. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_backend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
  7322. __Pyx_GOTREF(__pyx_t_2);
  7323. __pyx_v_msg = __pyx_t_2;
  7324. __pyx_t_2 = 0;
  7325. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
  7326. __Pyx_GOTREF(__pyx_t_2);
  7327. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
  7328. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7329. if (__pyx_t_1) {
  7330. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_kp_s_default_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
  7331. __Pyx_GOTREF(__pyx_t_2);
  7332. __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
  7333. __pyx_t_2 = 0;
  7334. }
  7335. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pendingcnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  7336. __Pyx_GOTREF(__pyx_t_2);
  7337. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_pending_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
  7338. __Pyx_GOTREF(__pyx_t_3);
  7339. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7340. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
  7341. __Pyx_GOTREF(__pyx_t_2);
  7342. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7343. __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
  7344. __pyx_t_2 = 0;
  7345. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7346. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7347. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_details); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
  7348. __Pyx_GOTREF(__pyx_t_3);
  7349. __pyx_t_4 = NULL;
  7350. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  7351. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  7352. if (likely(__pyx_t_4)) {
  7353. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7354. __Pyx_INCREF(__pyx_t_4);
  7355. __Pyx_INCREF(function);
  7356. __Pyx_DECREF_SET(__pyx_t_3, function);
  7357. }
  7358. }
  7359. if (__pyx_t_4) {
  7360. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
  7361. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7362. } else {
  7363. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
  7364. }
  7365. __Pyx_GOTREF(__pyx_t_2);
  7366. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7367. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
  7368. __Pyx_GOTREF(__pyx_t_3);
  7369. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7370. __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_3);
  7371. __pyx_t_3 = 0;
  7372. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7373. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7374. __Pyx_XDECREF(__pyx_r);
  7375. __Pyx_INCREF(__pyx_v_msg);
  7376. __pyx_r = __pyx_v_msg;
  7377. goto __pyx_L0;
  7378. /* function exit code */
  7379. __pyx_L1_error:;
  7380. __Pyx_XDECREF(__pyx_t_2);
  7381. __Pyx_XDECREF(__pyx_t_3);
  7382. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7383. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7384. __Pyx_XDECREF(__pyx_t_4);
  7385. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7386. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7387. __Pyx_AddTraceback("gevent.libev.corecext.loop._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7388. __pyx_r = NULL;
  7389. __pyx_L0:;
  7390. __Pyx_XDECREF(__pyx_v_msg);
  7391. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7392. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7393. __Pyx_XGIVEREF(__pyx_r);
  7394. __Pyx_RefNannyFinishContext();
  7395. return __pyx_r;
  7396. }
  7397. /* Python wrapper */
  7398. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7399. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7400. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7401. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7402. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7403. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7404. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7405. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_55_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7406. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7407. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7408. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7409. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_61_format_details(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7410. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7411. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7412. PyObject *__pyx_r = 0;
  7413. __Pyx_RefNannyDeclarations
  7414. __Pyx_RefNannySetupContext("_format_details (wrapper)", 0);
  7415. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7416. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7417. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_60_format_details(((struct PyGeventLoopObject *)__pyx_v_self));
  7418. /* function exit code */
  7419. __Pyx_RefNannyFinishContext();
  7420. return __pyx_r;
  7421. }
  7422. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60_format_details(struct PyGeventLoopObject *__pyx_v_self) {
  7423. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7424. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7425. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_54_format_details(((struct PyGeventLoopObject *)__pyx_v_self));
  7426. /* function exit code */
  7427. __Pyx_RefNannyFinishContext();
  7428. return __pyx_r;
  7429. }
  7430. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_54_format_details(struct PyGeventLoopObject *__pyx_v_self) {
  7431. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7432. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7433. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_60_format_details(((struct PyGeventLoopObject *)__pyx_v_self));
  7434. /* function exit code */
  7435. __Pyx_RefNannyFinishContext();
  7436. return __pyx_r;
  7437. }
  7438. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_60_format_details(struct PyGeventLoopObject *__pyx_v_self) {
  7439. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7440. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7441. PyObject *__pyx_v_msg = 0;
  7442. PyObject *__pyx_v_fileno = 0;
  7443. PyObject *__pyx_v_sigfd = 0;
  7444. PyObject *__pyx_v_activecnt = 0;
  7445. PyObject *__pyx_r = NULL;
  7446. __Pyx_RefNannyDeclarations
  7447. PyObject *__pyx_t_1 = NULL;
  7448. PyObject *__pyx_t_2 = NULL;
  7449. PyObject *__pyx_t_3 = NULL;
  7450. PyObject *__pyx_t_4 = NULL;
  7451. PyObject *__pyx_t_5 = NULL;
  7452. PyObject *__pyx_t_6 = NULL;
  7453. int __pyx_t_7;
  7454. int __pyx_t_8;
  7455. int __pyx_t_9;
  7456. int __pyx_t_10;
  7457. __Pyx_RefNannySetupContext("_format_details", 0);
  7458. __Pyx_INCREF(__pyx_kp_s__21);
  7459. __pyx_v_msg = __pyx_kp_s__21;
  7460. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
  7461. __Pyx_GOTREF(__pyx_t_2);
  7462. __pyx_t_3 = NULL;
  7463. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  7464. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  7465. if (likely(__pyx_t_3)) {
  7466. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  7467. __Pyx_INCREF(__pyx_t_3);
  7468. __Pyx_INCREF(function);
  7469. __Pyx_DECREF_SET(__pyx_t_2, function);
  7470. }
  7471. }
  7472. if (__pyx_t_3) {
  7473. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
  7474. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7475. } else {
  7476. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
  7477. }
  7478. __Pyx_GOTREF(__pyx_t_1);
  7479. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7480. __pyx_v_fileno = __pyx_t_1;
  7481. __pyx_t_1 = 0;
  7482. __Pyx_INCREF(Py_None);
  7483. __pyx_v_sigfd = Py_None;
  7484. __Pyx_INCREF(Py_None);
  7485. __pyx_v_activecnt = Py_None;
  7486. {
  7487. __Pyx_PyThreadState_declare
  7488. __Pyx_PyThreadState_assign
  7489. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  7490. __Pyx_XGOTREF(__pyx_t_4);
  7491. __Pyx_XGOTREF(__pyx_t_5);
  7492. __Pyx_XGOTREF(__pyx_t_6);
  7493. /*try:*/ {
  7494. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sigfd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L3_error)
  7495. __Pyx_GOTREF(__pyx_t_1);
  7496. __Pyx_DECREF_SET(__pyx_v_sigfd, __pyx_t_1);
  7497. __pyx_t_1 = 0;
  7498. }
  7499. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7500. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7501. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  7502. goto __pyx_L10_try_end;
  7503. __pyx_L3_error:;
  7504. __Pyx_PyThreadState_assign
  7505. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7506. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  7507. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  7508. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  7509. if (__pyx_t_7) {
  7510. __Pyx_AddTraceback("gevent.libev.corecext.loop._format_details", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7511. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 561, __pyx_L5_except_error)
  7512. __Pyx_GOTREF(__pyx_t_1);
  7513. __Pyx_GOTREF(__pyx_t_2);
  7514. __Pyx_GOTREF(__pyx_t_3);
  7515. __Pyx_INCREF(Py_None);
  7516. __Pyx_DECREF_SET(__pyx_v_sigfd, Py_None);
  7517. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7518. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7519. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7520. goto __pyx_L4_exception_handled;
  7521. }
  7522. goto __pyx_L5_except_error;
  7523. __pyx_L5_except_error:;
  7524. __Pyx_PyThreadState_assign
  7525. __Pyx_XGIVEREF(__pyx_t_4);
  7526. __Pyx_XGIVEREF(__pyx_t_5);
  7527. __Pyx_XGIVEREF(__pyx_t_6);
  7528. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7529. goto __pyx_L1_error;
  7530. __pyx_L4_exception_handled:;
  7531. __Pyx_PyThreadState_assign
  7532. __Pyx_XGIVEREF(__pyx_t_4);
  7533. __Pyx_XGIVEREF(__pyx_t_5);
  7534. __Pyx_XGIVEREF(__pyx_t_6);
  7535. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7536. __pyx_L10_try_end:;
  7537. }
  7538. {
  7539. __Pyx_PyThreadState_declare
  7540. __Pyx_PyThreadState_assign
  7541. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  7542. __Pyx_XGOTREF(__pyx_t_6);
  7543. __Pyx_XGOTREF(__pyx_t_5);
  7544. __Pyx_XGOTREF(__pyx_t_4);
  7545. /*try:*/ {
  7546. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_activecnt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L13_error)
  7547. __Pyx_GOTREF(__pyx_t_3);
  7548. __Pyx_DECREF_SET(__pyx_v_activecnt, __pyx_t_3);
  7549. __pyx_t_3 = 0;
  7550. }
  7551. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  7552. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7553. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7554. goto __pyx_L20_try_end;
  7555. __pyx_L13_error:;
  7556. __Pyx_PyThreadState_assign
  7557. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  7558. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  7559. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7560. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
  7561. if (__pyx_t_7) {
  7562. __Pyx_ErrRestore(0,0,0);
  7563. goto __pyx_L14_exception_handled;
  7564. }
  7565. goto __pyx_L15_except_error;
  7566. __pyx_L15_except_error:;
  7567. __Pyx_PyThreadState_assign
  7568. __Pyx_XGIVEREF(__pyx_t_6);
  7569. __Pyx_XGIVEREF(__pyx_t_5);
  7570. __Pyx_XGIVEREF(__pyx_t_4);
  7571. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  7572. goto __pyx_L1_error;
  7573. __pyx_L14_exception_handled:;
  7574. __Pyx_PyThreadState_assign
  7575. __Pyx_XGIVEREF(__pyx_t_6);
  7576. __Pyx_XGIVEREF(__pyx_t_5);
  7577. __Pyx_XGIVEREF(__pyx_t_4);
  7578. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  7579. __pyx_L20_try_end:;
  7580. }
  7581. __pyx_t_8 = (__pyx_v_activecnt != Py_None);
  7582. __pyx_t_9 = (__pyx_t_8 != 0);
  7583. if (__pyx_t_9) {
  7584. __pyx_t_3 = PyObject_Repr(__pyx_v_activecnt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
  7585. __Pyx_GOTREF(__pyx_t_3);
  7586. __pyx_t_2 = PyNumber_Add(__pyx_kp_s_ref_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
  7587. __Pyx_GOTREF(__pyx_t_2);
  7588. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7589. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
  7590. __Pyx_GOTREF(__pyx_t_3);
  7591. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7592. __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_3));
  7593. __pyx_t_3 = 0;
  7594. }
  7595. __pyx_t_9 = (__pyx_v_fileno != Py_None);
  7596. __pyx_t_8 = (__pyx_t_9 != 0);
  7597. if (__pyx_t_8) {
  7598. __pyx_t_3 = PyObject_Repr(__pyx_v_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
  7599. __Pyx_GOTREF(__pyx_t_3);
  7600. __pyx_t_2 = PyNumber_Add(__pyx_kp_s_fileno_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
  7601. __Pyx_GOTREF(__pyx_t_2);
  7602. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7603. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
  7604. __Pyx_GOTREF(__pyx_t_3);
  7605. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7606. __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_3));
  7607. __pyx_t_3 = 0;
  7608. }
  7609. __pyx_t_9 = (__pyx_v_sigfd != Py_None);
  7610. __pyx_t_10 = (__pyx_t_9 != 0);
  7611. if (__pyx_t_10) {
  7612. } else {
  7613. __pyx_t_8 = __pyx_t_10;
  7614. goto __pyx_L24_bool_binop_done;
  7615. }
  7616. __pyx_t_3 = PyObject_RichCompare(__pyx_v_sigfd, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
  7617. __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 571, __pyx_L1_error)
  7618. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7619. __pyx_t_8 = __pyx_t_10;
  7620. __pyx_L24_bool_binop_done:;
  7621. if (__pyx_t_8) {
  7622. __pyx_t_3 = PyObject_Repr(__pyx_v_sigfd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
  7623. __Pyx_GOTREF(__pyx_t_3);
  7624. __pyx_t_2 = PyNumber_Add(__pyx_kp_s_sigfd_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
  7625. __Pyx_GOTREF(__pyx_t_2);
  7626. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7627. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
  7628. __Pyx_GOTREF(__pyx_t_3);
  7629. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7630. __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_3));
  7631. __pyx_t_3 = 0;
  7632. }
  7633. __Pyx_XDECREF(__pyx_r);
  7634. __Pyx_INCREF(__pyx_v_msg);
  7635. __pyx_r = __pyx_v_msg;
  7636. goto __pyx_L0;
  7637. /* function exit code */
  7638. __pyx_L1_error:;
  7639. __Pyx_XDECREF(__pyx_t_1);
  7640. __Pyx_XDECREF(__pyx_t_2);
  7641. __Pyx_XDECREF(__pyx_t_3);
  7642. __Pyx_AddTraceback("gevent.libev.corecext.loop._format_details", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7643. __pyx_r = NULL;
  7644. __pyx_L0:;
  7645. __Pyx_XDECREF(__pyx_v_msg);
  7646. __Pyx_XDECREF(__pyx_v_fileno);
  7647. __Pyx_XDECREF(__pyx_v_sigfd);
  7648. __Pyx_XDECREF(__pyx_v_activecnt);
  7649. __Pyx_XGIVEREF(__pyx_r);
  7650. __Pyx_RefNannyFinishContext();
  7651. return __pyx_r;
  7652. }
  7653. /* Python wrapper */
  7654. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7655. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7656. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7657. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7658. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7659. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7660. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7661. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_57fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7662. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7663. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7664. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  7665. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_63fileno(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  7666. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7667. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7668. PyObject *__pyx_r = 0;
  7669. __Pyx_RefNannyDeclarations
  7670. __Pyx_RefNannySetupContext("fileno (wrapper)", 0);
  7671. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7672. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7673. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_62fileno(((struct PyGeventLoopObject *)__pyx_v_self));
  7674. /* function exit code */
  7675. __Pyx_RefNannyFinishContext();
  7676. return __pyx_r;
  7677. }
  7678. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62fileno(struct PyGeventLoopObject *__pyx_v_self) {
  7679. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7680. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7681. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_56fileno(((struct PyGeventLoopObject *)__pyx_v_self));
  7682. /* function exit code */
  7683. __Pyx_RefNannyFinishContext();
  7684. return __pyx_r;
  7685. }
  7686. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_56fileno(struct PyGeventLoopObject *__pyx_v_self) {
  7687. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7688. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7689. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_62fileno(((struct PyGeventLoopObject *)__pyx_v_self));
  7690. /* function exit code */
  7691. __Pyx_RefNannyFinishContext();
  7692. return __pyx_r;
  7693. }
  7694. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_62fileno(struct PyGeventLoopObject *__pyx_v_self) {
  7695. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7696. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7697. int __pyx_v_fd;
  7698. PyObject *__pyx_r = NULL;
  7699. __Pyx_RefNannyDeclarations
  7700. int __pyx_t_1;
  7701. int __pyx_t_2;
  7702. PyObject *__pyx_t_3 = NULL;
  7703. __Pyx_RefNannySetupContext("fileno", 0);
  7704. __pyx_t_1 = (__pyx_v_self->_ptr != 0);
  7705. if (__pyx_t_1) {
  7706. __pyx_t_2 = __pyx_v_self->_ptr->backend_fd;
  7707. __pyx_v_fd = __pyx_t_2;
  7708. __pyx_t_1 = ((__pyx_v_fd >= 0) != 0);
  7709. if (__pyx_t_1) {
  7710. __Pyx_XDECREF(__pyx_r);
  7711. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  7712. __Pyx_GOTREF(__pyx_t_3);
  7713. __pyx_r = __pyx_t_3;
  7714. __pyx_t_3 = 0;
  7715. goto __pyx_L0;
  7716. }
  7717. }
  7718. /* function exit code */
  7719. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7720. goto __pyx_L0;
  7721. __pyx_L1_error:;
  7722. __Pyx_XDECREF(__pyx_t_3);
  7723. __Pyx_AddTraceback("gevent.libev.corecext.loop.fileno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7724. __pyx_r = NULL;
  7725. __pyx_L0:;
  7726. __Pyx_XGIVEREF(__pyx_r);
  7727. __Pyx_RefNannyFinishContext();
  7728. return __pyx_r;
  7729. }
  7730. /* Python wrapper */
  7731. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self); /*proto*/
  7732. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(PyObject *__pyx_v_self) {
  7733. PyObject *__pyx_r = 0;
  7734. __Pyx_RefNannyDeclarations
  7735. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7736. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7737. /* function exit code */
  7738. __Pyx_RefNannyFinishContext();
  7739. return __pyx_r;
  7740. }
  7741. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9activecnt___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7742. PyObject *__pyx_r = NULL;
  7743. __Pyx_RefNannyDeclarations
  7744. int __pyx_t_1;
  7745. PyObject *__pyx_t_2 = NULL;
  7746. __Pyx_RefNannySetupContext("__get__", 0);
  7747. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7748. if (__pyx_t_1) {
  7749. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
  7750. __Pyx_GOTREF(__pyx_t_2);
  7751. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7752. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7753. __PYX_ERR(0, 587, __pyx_L1_error)
  7754. }
  7755. __Pyx_XDECREF(__pyx_r);
  7756. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->activecnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
  7757. __Pyx_GOTREF(__pyx_t_2);
  7758. __pyx_r = __pyx_t_2;
  7759. __pyx_t_2 = 0;
  7760. goto __pyx_L0;
  7761. /* function exit code */
  7762. __pyx_L1_error:;
  7763. __Pyx_XDECREF(__pyx_t_2);
  7764. __Pyx_AddTraceback("gevent.libev.corecext.loop.activecnt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7765. __pyx_r = NULL;
  7766. __pyx_L0:;
  7767. __Pyx_XGIVEREF(__pyx_r);
  7768. __Pyx_RefNannyFinishContext();
  7769. return __pyx_r;
  7770. }
  7771. /* Python wrapper */
  7772. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  7773. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(PyObject *__pyx_v_self) {
  7774. PyObject *__pyx_r = 0;
  7775. __Pyx_RefNannyDeclarations
  7776. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7777. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7778. /* function exit code */
  7779. __Pyx_RefNannyFinishContext();
  7780. return __pyx_r;
  7781. }
  7782. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_11sig_pending___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7783. PyObject *__pyx_r = NULL;
  7784. __Pyx_RefNannyDeclarations
  7785. int __pyx_t_1;
  7786. PyObject *__pyx_t_2 = NULL;
  7787. __Pyx_RefNannySetupContext("__get__", 0);
  7788. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7789. if (__pyx_t_1) {
  7790. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
  7791. __Pyx_GOTREF(__pyx_t_2);
  7792. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7793. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7794. __PYX_ERR(0, 595, __pyx_L1_error)
  7795. }
  7796. __Pyx_XDECREF(__pyx_r);
  7797. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->sig_pending); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
  7798. __Pyx_GOTREF(__pyx_t_2);
  7799. __pyx_r = __pyx_t_2;
  7800. __pyx_t_2 = 0;
  7801. goto __pyx_L0;
  7802. /* function exit code */
  7803. __pyx_L1_error:;
  7804. __Pyx_XDECREF(__pyx_t_2);
  7805. __Pyx_AddTraceback("gevent.libev.corecext.loop.sig_pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7806. __pyx_r = NULL;
  7807. __pyx_L0:;
  7808. __Pyx_XGIVEREF(__pyx_r);
  7809. __Pyx_RefNannyFinishContext();
  7810. return __pyx_r;
  7811. }
  7812. /* Python wrapper */
  7813. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7814. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7815. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self); /*proto*/
  7816. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(PyObject *__pyx_v_self) {
  7817. PyObject *__pyx_r = 0;
  7818. __Pyx_RefNannyDeclarations
  7819. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7820. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7821. /* function exit code */
  7822. __Pyx_RefNannyFinishContext();
  7823. return __pyx_r;
  7824. }
  7825. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_5sigfd___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7826. PyObject *__pyx_r = NULL;
  7827. __Pyx_RefNannyDeclarations
  7828. int __pyx_t_1;
  7829. PyObject *__pyx_t_2 = NULL;
  7830. __Pyx_RefNannySetupContext("__get__", 0);
  7831. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7832. if (__pyx_t_1) {
  7833. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
  7834. __Pyx_GOTREF(__pyx_t_2);
  7835. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7836. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7837. __PYX_ERR(0, 604, __pyx_L1_error)
  7838. }
  7839. __Pyx_XDECREF(__pyx_r);
  7840. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->sigfd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
  7841. __Pyx_GOTREF(__pyx_t_2);
  7842. __pyx_r = __pyx_t_2;
  7843. __pyx_t_2 = 0;
  7844. goto __pyx_L0;
  7845. /* function exit code */
  7846. __pyx_L1_error:;
  7847. __Pyx_XDECREF(__pyx_t_2);
  7848. __Pyx_AddTraceback("gevent.libev.corecext.loop.sigfd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7849. __pyx_r = NULL;
  7850. __pyx_L0:;
  7851. __Pyx_XGIVEREF(__pyx_r);
  7852. __Pyx_RefNannyFinishContext();
  7853. return __pyx_r;
  7854. }
  7855. /* Python wrapper */
  7856. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7857. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7858. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self); /*proto*/
  7859. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(PyObject *__pyx_v_self) {
  7860. PyObject *__pyx_r = 0;
  7861. __Pyx_RefNannyDeclarations
  7862. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7863. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7864. /* function exit code */
  7865. __Pyx_RefNannyFinishContext();
  7866. return __pyx_r;
  7867. }
  7868. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_9origflags___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7869. PyObject *__pyx_r = NULL;
  7870. __Pyx_RefNannyDeclarations
  7871. int __pyx_t_1;
  7872. PyObject *__pyx_t_2 = NULL;
  7873. __Pyx_RefNannySetupContext("__get__", 0);
  7874. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7875. if (__pyx_t_1) {
  7876. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7877. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7878. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  7879. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7880. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7881. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
  7882. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7883. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7884. __Pyx_GOTREF(__pyx_t_2);
  7885. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7886. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7887. __PYX_ERR(0, 613, __pyx_L1_error)
  7888. }
  7889. __Pyx_XDECREF(__pyx_r);
  7890. __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_list(__pyx_v_self->_ptr->origflags, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error)
  7891. __Pyx_GOTREF(__pyx_t_2);
  7892. __pyx_r = __pyx_t_2;
  7893. __pyx_t_2 = 0;
  7894. goto __pyx_L0;
  7895. /* function exit code */
  7896. __pyx_L1_error:;
  7897. __Pyx_XDECREF(__pyx_t_2);
  7898. __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7899. __pyx_r = NULL;
  7900. __pyx_L0:;
  7901. __Pyx_XGIVEREF(__pyx_r);
  7902. __Pyx_RefNannyFinishContext();
  7903. return __pyx_r;
  7904. }
  7905. /* Python wrapper */
  7906. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self); /*proto*/
  7907. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(PyObject *__pyx_v_self) {
  7908. PyObject *__pyx_r = 0;
  7909. __Pyx_RefNannyDeclarations
  7910. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7911. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7912. /* function exit code */
  7913. __Pyx_RefNannyFinishContext();
  7914. return __pyx_r;
  7915. }
  7916. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13origflags_int___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7917. PyObject *__pyx_r = NULL;
  7918. __Pyx_RefNannyDeclarations
  7919. int __pyx_t_1;
  7920. PyObject *__pyx_t_2 = NULL;
  7921. __Pyx_RefNannySetupContext("__get__", 0);
  7922. __pyx_t_1 = ((!(__pyx_v_self->_ptr != 0)) != 0);
  7923. if (__pyx_t_1) {
  7924. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7925. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  7926. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
  7927. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  7928. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7929. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
  7930. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7931. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  7932. __Pyx_GOTREF(__pyx_t_2);
  7933. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  7934. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7935. __PYX_ERR(0, 621, __pyx_L1_error)
  7936. }
  7937. __Pyx_XDECREF(__pyx_r);
  7938. __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->origflags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
  7939. __Pyx_GOTREF(__pyx_t_2);
  7940. __pyx_r = __pyx_t_2;
  7941. __pyx_t_2 = 0;
  7942. goto __pyx_L0;
  7943. /* function exit code */
  7944. __pyx_L1_error:;
  7945. __Pyx_XDECREF(__pyx_t_2);
  7946. __Pyx_AddTraceback("gevent.libev.corecext.loop.origflags_int.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7947. __pyx_r = NULL;
  7948. __pyx_L0:;
  7949. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  7950. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  7951. __Pyx_XGIVEREF(__pyx_r);
  7952. __Pyx_RefNannyFinishContext();
  7953. return __pyx_r;
  7954. }
  7955. /* Python wrapper */
  7956. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self); /*proto*/
  7957. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(PyObject *__pyx_v_self) {
  7958. PyObject *__pyx_r = 0;
  7959. __Pyx_RefNannyDeclarations
  7960. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  7961. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  7962. /* function exit code */
  7963. __Pyx_RefNannyFinishContext();
  7964. return __pyx_r;
  7965. }
  7966. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler___get__(struct PyGeventLoopObject *__pyx_v_self) {
  7967. PyObject *__pyx_r = NULL;
  7968. __Pyx_RefNannyDeclarations
  7969. __Pyx_RefNannySetupContext("__get__", 0);
  7970. __Pyx_XDECREF(__pyx_r);
  7971. __Pyx_INCREF(__pyx_v_self->error_handler);
  7972. __pyx_r = __pyx_v_self->error_handler;
  7973. goto __pyx_L0;
  7974. /* function exit code */
  7975. __pyx_L0:;
  7976. __Pyx_XGIVEREF(__pyx_r);
  7977. __Pyx_RefNannyFinishContext();
  7978. return __pyx_r;
  7979. }
  7980. /* Python wrapper */
  7981. static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  7982. static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  7983. int __pyx_r;
  7984. __Pyx_RefNannyDeclarations
  7985. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  7986. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  7987. /* function exit code */
  7988. __Pyx_RefNannyFinishContext();
  7989. return __pyx_r;
  7990. }
  7991. static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
  7992. int __pyx_r;
  7993. __Pyx_RefNannyDeclarations
  7994. __Pyx_RefNannySetupContext("__set__", 0);
  7995. __Pyx_INCREF(__pyx_v_value);
  7996. __Pyx_GIVEREF(__pyx_v_value);
  7997. __Pyx_GOTREF(__pyx_v_self->error_handler);
  7998. __Pyx_DECREF(__pyx_v_self->error_handler);
  7999. __pyx_v_self->error_handler = __pyx_v_value;
  8000. /* function exit code */
  8001. __pyx_r = 0;
  8002. __Pyx_RefNannyFinishContext();
  8003. return __pyx_r;
  8004. }
  8005. /* Python wrapper */
  8006. static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self); /*proto*/
  8007. static int __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(PyObject *__pyx_v_self) {
  8008. int __pyx_r;
  8009. __Pyx_RefNannyDeclarations
  8010. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  8011. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));
  8012. /* function exit code */
  8013. __Pyx_RefNannyFinishContext();
  8014. return __pyx_r;
  8015. }
  8016. static int __pyx_pf_6gevent_5libev_8corecext_4loop_13error_handler_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
  8017. int __pyx_r;
  8018. __Pyx_RefNannyDeclarations
  8019. __Pyx_RefNannySetupContext("__del__", 0);
  8020. __Pyx_INCREF(Py_None);
  8021. __Pyx_GIVEREF(Py_None);
  8022. __Pyx_GOTREF(__pyx_v_self->error_handler);
  8023. __Pyx_DECREF(__pyx_v_self->error_handler);
  8024. __pyx_v_self->error_handler = Py_None;
  8025. /* function exit code */
  8026. __pyx_r = 0;
  8027. __Pyx_RefNannyFinishContext();
  8028. return __pyx_r;
  8029. }
  8030. /* Python wrapper */
  8031. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self); /*proto*/
  8032. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(PyObject *__pyx_v_self) {
  8033. PyObject *__pyx_r = 0;
  8034. __Pyx_RefNannyDeclarations
  8035. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  8036. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(((struct PyGeventLoopObject *)__pyx_v_self));
  8037. /* function exit code */
  8038. __Pyx_RefNannyFinishContext();
  8039. return __pyx_r;
  8040. }
  8041. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks___get__(struct PyGeventLoopObject *__pyx_v_self) {
  8042. PyObject *__pyx_r = NULL;
  8043. __Pyx_RefNannyDeclarations
  8044. __Pyx_RefNannySetupContext("__get__", 0);
  8045. __Pyx_XDECREF(__pyx_r);
  8046. __Pyx_INCREF(__pyx_v_self->_callbacks);
  8047. __pyx_r = __pyx_v_self->_callbacks;
  8048. goto __pyx_L0;
  8049. /* function exit code */
  8050. __pyx_L0:;
  8051. __Pyx_XGIVEREF(__pyx_r);
  8052. __Pyx_RefNannyFinishContext();
  8053. return __pyx_r;
  8054. }
  8055. /* Python wrapper */
  8056. static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  8057. static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8058. int __pyx_r;
  8059. __Pyx_RefNannyDeclarations
  8060. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  8061. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(((struct PyGeventLoopObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  8062. /* function exit code */
  8063. __Pyx_RefNannyFinishContext();
  8064. return __pyx_r;
  8065. }
  8066. static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_2__set__(struct PyGeventLoopObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8067. int __pyx_r;
  8068. __Pyx_RefNannyDeclarations
  8069. PyObject *__pyx_t_1 = NULL;
  8070. __Pyx_RefNannySetupContext("__set__", 0);
  8071. if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 250, __pyx_L1_error)
  8072. __pyx_t_1 = __pyx_v_value;
  8073. __Pyx_INCREF(__pyx_t_1);
  8074. __Pyx_GIVEREF(__pyx_t_1);
  8075. __Pyx_GOTREF(__pyx_v_self->_callbacks);
  8076. __Pyx_DECREF(__pyx_v_self->_callbacks);
  8077. __pyx_v_self->_callbacks = ((PyObject*)__pyx_t_1);
  8078. __pyx_t_1 = 0;
  8079. /* function exit code */
  8080. __pyx_r = 0;
  8081. goto __pyx_L0;
  8082. __pyx_L1_error:;
  8083. __Pyx_XDECREF(__pyx_t_1);
  8084. __Pyx_AddTraceback("gevent.libev.corecext.loop._callbacks.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8085. __pyx_r = -1;
  8086. __pyx_L0:;
  8087. __Pyx_RefNannyFinishContext();
  8088. return __pyx_r;
  8089. }
  8090. /* Python wrapper */
  8091. static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self); /*proto*/
  8092. static int __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(PyObject *__pyx_v_self) {
  8093. int __pyx_r;
  8094. __Pyx_RefNannyDeclarations
  8095. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  8096. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(((struct PyGeventLoopObject *)__pyx_v_self));
  8097. /* function exit code */
  8098. __Pyx_RefNannyFinishContext();
  8099. return __pyx_r;
  8100. }
  8101. static int __pyx_pf_6gevent_5libev_8corecext_4loop_10_callbacks_4__del__(struct PyGeventLoopObject *__pyx_v_self) {
  8102. int __pyx_r;
  8103. __Pyx_RefNannyDeclarations
  8104. __Pyx_RefNannySetupContext("__del__", 0);
  8105. __Pyx_INCREF(Py_None);
  8106. __Pyx_GIVEREF(Py_None);
  8107. __Pyx_GOTREF(__pyx_v_self->_callbacks);
  8108. __Pyx_DECREF(__pyx_v_self->_callbacks);
  8109. __pyx_v_self->_callbacks = ((PyObject*)Py_None);
  8110. /* function exit code */
  8111. __pyx_r = 0;
  8112. __Pyx_RefNannyFinishContext();
  8113. return __pyx_r;
  8114. }
  8115. /* Python wrapper */
  8116. static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  8117. static int __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  8118. PyObject *__pyx_v_callback = 0;
  8119. PyObject *__pyx_v_args = 0;
  8120. int __pyx_r;
  8121. __Pyx_RefNannyDeclarations
  8122. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  8123. {
  8124. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_args,0};
  8125. PyObject* values[2] = {0,0};
  8126. if (unlikely(__pyx_kwds)) {
  8127. Py_ssize_t kw_args;
  8128. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  8129. switch (pos_args) {
  8130. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  8131. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  8132. case 0: break;
  8133. default: goto __pyx_L5_argtuple_error;
  8134. }
  8135. kw_args = PyDict_Size(__pyx_kwds);
  8136. switch (pos_args) {
  8137. case 0:
  8138. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  8139. else goto __pyx_L5_argtuple_error;
  8140. case 1:
  8141. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
  8142. else {
  8143. __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 631, __pyx_L3_error)
  8144. }
  8145. }
  8146. if (unlikely(kw_args > 0)) {
  8147. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 631, __pyx_L3_error)
  8148. }
  8149. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  8150. goto __pyx_L5_argtuple_error;
  8151. } else {
  8152. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  8153. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  8154. }
  8155. __pyx_v_callback = values[0];
  8156. __pyx_v_args = values[1];
  8157. }
  8158. goto __pyx_L4_argument_unpacking_done;
  8159. __pyx_L5_argtuple_error:;
  8160. __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 631, __pyx_L3_error)
  8161. __pyx_L3_error:;
  8162. __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8163. __Pyx_RefNannyFinishContext();
  8164. return -1;
  8165. __pyx_L4_argument_unpacking_done:;
  8166. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback___init__(((struct PyGeventCallbackObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  8167. /* function exit code */
  8168. __Pyx_RefNannyFinishContext();
  8169. return __pyx_r;
  8170. }
  8171. static int __pyx_pf_6gevent_5libev_8corecext_8callback___init__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  8172. int __pyx_r;
  8173. __Pyx_RefNannyDeclarations
  8174. PyObject *__pyx_t_1 = NULL;
  8175. __Pyx_RefNannySetupContext("__init__", 0);
  8176. __Pyx_INCREF(__pyx_v_callback);
  8177. __Pyx_GIVEREF(__pyx_v_callback);
  8178. __Pyx_GOTREF(__pyx_v_self->callback);
  8179. __Pyx_DECREF(__pyx_v_self->callback);
  8180. __pyx_v_self->callback = __pyx_v_callback;
  8181. if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_args)->tp_name), 0))) __PYX_ERR(0, 633, __pyx_L1_error)
  8182. __pyx_t_1 = __pyx_v_args;
  8183. __Pyx_INCREF(__pyx_t_1);
  8184. __Pyx_GIVEREF(__pyx_t_1);
  8185. __Pyx_GOTREF(__pyx_v_self->args);
  8186. __Pyx_DECREF(__pyx_v_self->args);
  8187. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  8188. __pyx_t_1 = 0;
  8189. /* function exit code */
  8190. __pyx_r = 0;
  8191. goto __pyx_L0;
  8192. __pyx_L1_error:;
  8193. __Pyx_XDECREF(__pyx_t_1);
  8194. __Pyx_AddTraceback("gevent.libev.corecext.callback.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8195. __pyx_r = -1;
  8196. __pyx_L0:;
  8197. __Pyx_RefNannyFinishContext();
  8198. return __pyx_r;
  8199. }
  8200. /* Python wrapper */
  8201. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  8202. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  8203. PyObject *__pyx_r = 0;
  8204. __Pyx_RefNannyDeclarations
  8205. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  8206. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_2stop(((struct PyGeventCallbackObject *)__pyx_v_self));
  8207. /* function exit code */
  8208. __Pyx_RefNannyFinishContext();
  8209. return __pyx_r;
  8210. }
  8211. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_2stop(struct PyGeventCallbackObject *__pyx_v_self) {
  8212. PyObject *__pyx_r = NULL;
  8213. __Pyx_RefNannyDeclarations
  8214. __Pyx_RefNannySetupContext("stop", 0);
  8215. __Pyx_INCREF(Py_None);
  8216. __Pyx_GIVEREF(Py_None);
  8217. __Pyx_GOTREF(__pyx_v_self->callback);
  8218. __Pyx_DECREF(__pyx_v_self->callback);
  8219. __pyx_v_self->callback = Py_None;
  8220. __Pyx_INCREF(Py_None);
  8221. __Pyx_GIVEREF(Py_None);
  8222. __Pyx_GOTREF(__pyx_v_self->args);
  8223. __Pyx_DECREF(__pyx_v_self->args);
  8224. __pyx_v_self->args = ((PyObject*)Py_None);
  8225. /* function exit code */
  8226. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  8227. __Pyx_XGIVEREF(__pyx_r);
  8228. __Pyx_RefNannyFinishContext();
  8229. return __pyx_r;
  8230. }
  8231. /* Python wrapper */
  8232. static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
  8233. static int __pyx_pw_6gevent_5libev_8corecext_8callback_5__nonzero__(PyObject *__pyx_v_self) {
  8234. int __pyx_r;
  8235. __Pyx_RefNannyDeclarations
  8236. __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  8237. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4__nonzero__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8238. /* function exit code */
  8239. __Pyx_RefNannyFinishContext();
  8240. return __pyx_r;
  8241. }
  8242. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4__nonzero__(struct PyGeventCallbackObject *__pyx_v_self) {
  8243. int __pyx_r;
  8244. __Pyx_RefNannyDeclarations
  8245. int __pyx_t_1;
  8246. __Pyx_RefNannySetupContext("__nonzero__", 0);
  8247. __pyx_t_1 = (__pyx_v_self->args != ((PyObject*)Py_None));
  8248. __pyx_r = __pyx_t_1;
  8249. goto __pyx_L0;
  8250. /* function exit code */
  8251. __pyx_L0:;
  8252. __Pyx_RefNannyFinishContext();
  8253. return __pyx_r;
  8254. }
  8255. /* Python wrapper */
  8256. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  8257. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(PyObject *__pyx_v_self) {
  8258. PyObject *__pyx_r = 0;
  8259. __Pyx_RefNannyDeclarations
  8260. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  8261. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8262. /* function exit code */
  8263. __Pyx_RefNannyFinishContext();
  8264. return __pyx_r;
  8265. }
  8266. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_7pending___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  8267. PyObject *__pyx_r = NULL;
  8268. __Pyx_RefNannyDeclarations
  8269. int __pyx_t_1;
  8270. PyObject *__pyx_t_2 = NULL;
  8271. __Pyx_RefNannySetupContext("__get__", 0);
  8272. __Pyx_XDECREF(__pyx_r);
  8273. __pyx_t_1 = (__pyx_v_self->callback != Py_None);
  8274. __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
  8275. __Pyx_GOTREF(__pyx_t_2);
  8276. __pyx_r = __pyx_t_2;
  8277. __pyx_t_2 = 0;
  8278. goto __pyx_L0;
  8279. /* function exit code */
  8280. __pyx_L1_error:;
  8281. __Pyx_XDECREF(__pyx_t_2);
  8282. __Pyx_AddTraceback("gevent.libev.corecext.callback.pending.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8283. __pyx_r = NULL;
  8284. __pyx_L0:;
  8285. __Pyx_XGIVEREF(__pyx_r);
  8286. __Pyx_RefNannyFinishContext();
  8287. return __pyx_r;
  8288. }
  8289. /* Python wrapper */
  8290. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self); /*proto*/
  8291. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__(PyObject *__pyx_v_self) {
  8292. PyObject *__pyx_r = 0;
  8293. __Pyx_RefNannyDeclarations
  8294. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  8295. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8296. /* function exit code */
  8297. __Pyx_RefNannyFinishContext();
  8298. return __pyx_r;
  8299. }
  8300. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_6__repr__(struct PyGeventCallbackObject *__pyx_v_self) {
  8301. PyObject *__pyx_v_format = NULL;
  8302. PyObject *__pyx_v_result = NULL;
  8303. PyObject *__pyx_r = NULL;
  8304. __Pyx_RefNannyDeclarations
  8305. int __pyx_t_1;
  8306. PyObject *__pyx_t_2 = NULL;
  8307. PyObject *__pyx_t_3 = NULL;
  8308. PyObject *__pyx_t_4 = NULL;
  8309. int __pyx_t_5;
  8310. int __pyx_t_6;
  8311. int __pyx_t_7;
  8312. int __pyx_t_8;
  8313. char const *__pyx_t_9;
  8314. PyObject *__pyx_t_10 = NULL;
  8315. PyObject *__pyx_t_11 = NULL;
  8316. PyObject *__pyx_t_12 = NULL;
  8317. PyObject *__pyx_t_13 = NULL;
  8318. PyObject *__pyx_t_14 = NULL;
  8319. PyObject *__pyx_t_15 = NULL;
  8320. __Pyx_RefNannySetupContext("__repr__", 0);
  8321. __pyx_t_1 = ((Py_ReprEnter(((PyObject*)__pyx_v_self)) != 0) != 0);
  8322. if (__pyx_t_1) {
  8323. __Pyx_XDECREF(__pyx_r);
  8324. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8325. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8326. __Pyx_INCREF(__pyx_kp_s__26);
  8327. __pyx_r = __pyx_kp_s__26;
  8328. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8329. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  8330. __Pyx_INCREF(__pyx_kp_s__27);
  8331. __pyx_r = __pyx_kp_s__27;
  8332. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  8333. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8334. __Pyx_INCREF(__pyx_kp_s__21);
  8335. __pyx_r = __pyx_kp_s__21;
  8336. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8337. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8338. __Pyx_INCREF(__pyx_kp_s__27);
  8339. __pyx_r = __pyx_kp_s__27;
  8340. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8341. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8342. goto __pyx_L0;
  8343. }
  8344. /*try:*/ {
  8345. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L5_error)
  8346. __Pyx_GOTREF(__pyx_t_3);
  8347. __pyx_t_4 = NULL;
  8348. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  8349. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  8350. if (likely(__pyx_t_4)) {
  8351. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8352. __Pyx_INCREF(__pyx_t_4);
  8353. __Pyx_INCREF(function);
  8354. __Pyx_DECREF_SET(__pyx_t_3, function);
  8355. }
  8356. }
  8357. if (__pyx_t_4) {
  8358. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L5_error)
  8359. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8360. } else {
  8361. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L5_error)
  8362. }
  8363. __Pyx_GOTREF(__pyx_t_2);
  8364. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8365. __pyx_v_format = __pyx_t_2;
  8366. __pyx_t_2 = 0;
  8367. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L5_error)
  8368. __Pyx_GOTREF(__pyx_t_2);
  8369. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L5_error)
  8370. __Pyx_GOTREF(__pyx_t_3);
  8371. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8372. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L5_error)
  8373. __Pyx_GOTREF(__pyx_t_2);
  8374. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  8375. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  8376. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  8377. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L5_error)
  8378. __Pyx_GOTREF(__pyx_t_4);
  8379. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8380. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L5_error)
  8381. __Pyx_GOTREF(__pyx_t_2);
  8382. __Pyx_GIVEREF(__pyx_t_3);
  8383. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  8384. __Pyx_GIVEREF(__pyx_t_4);
  8385. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  8386. __Pyx_INCREF(__pyx_v_format);
  8387. __Pyx_GIVEREF(__pyx_v_format);
  8388. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_format);
  8389. __pyx_t_3 = 0;
  8390. __pyx_t_4 = 0;
  8391. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L5_error)
  8392. __Pyx_GOTREF(__pyx_t_4);
  8393. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8394. __pyx_v_result = ((PyObject*)__pyx_t_4);
  8395. __pyx_t_4 = 0;
  8396. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pending); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L5_error)
  8397. __Pyx_GOTREF(__pyx_t_4);
  8398. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 659, __pyx_L5_error)
  8399. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8400. if (__pyx_t_1) {
  8401. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_pending_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L5_error)
  8402. __Pyx_GOTREF(__pyx_t_4);
  8403. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8404. __pyx_t_4 = 0;
  8405. }
  8406. __pyx_t_1 = (__pyx_v_self->callback != Py_None);
  8407. __pyx_t_5 = (__pyx_t_1 != 0);
  8408. if (__pyx_t_5) {
  8409. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L5_error)
  8410. __Pyx_GOTREF(__pyx_t_4);
  8411. __Pyx_INCREF(__pyx_v_self->callback);
  8412. __Pyx_GIVEREF(__pyx_v_self->callback);
  8413. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->callback);
  8414. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_callback_r, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L5_error)
  8415. __Pyx_GOTREF(__pyx_t_2);
  8416. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8417. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L5_error)
  8418. __Pyx_GOTREF(__pyx_t_4);
  8419. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8420. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8421. __pyx_t_4 = 0;
  8422. }
  8423. __pyx_t_5 = (__pyx_v_self->args != ((PyObject*)Py_None));
  8424. __pyx_t_1 = (__pyx_t_5 != 0);
  8425. if (__pyx_t_1) {
  8426. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L5_error)
  8427. __Pyx_GOTREF(__pyx_t_4);
  8428. __Pyx_INCREF(__pyx_v_self->args);
  8429. __Pyx_GIVEREF(__pyx_v_self->args);
  8430. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->args);
  8431. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_args_r, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L5_error)
  8432. __Pyx_GOTREF(__pyx_t_2);
  8433. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8434. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L5_error)
  8435. __Pyx_GOTREF(__pyx_t_4);
  8436. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8437. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8438. __pyx_t_4 = 0;
  8439. }
  8440. __pyx_t_5 = (__pyx_v_self->callback == Py_None);
  8441. __pyx_t_6 = (__pyx_t_5 != 0);
  8442. if (__pyx_t_6) {
  8443. } else {
  8444. __pyx_t_1 = __pyx_t_6;
  8445. goto __pyx_L11_bool_binop_done;
  8446. }
  8447. __pyx_t_6 = (__pyx_v_self->args == ((PyObject*)Py_None));
  8448. __pyx_t_5 = (__pyx_t_6 != 0);
  8449. __pyx_t_1 = __pyx_t_5;
  8450. __pyx_L11_bool_binop_done:;
  8451. if (__pyx_t_1) {
  8452. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_stopped); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L5_error)
  8453. __Pyx_GOTREF(__pyx_t_4);
  8454. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8455. __pyx_t_4 = 0;
  8456. }
  8457. __Pyx_XDECREF(__pyx_r);
  8458. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8459. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8460. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__27); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L5_error)
  8461. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8462. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  8463. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__28); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L5_error)
  8464. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  8465. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8466. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L5_error)
  8467. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8468. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8469. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__28); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L5_error)
  8470. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8471. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8472. __Pyx_GOTREF(__pyx_t_4);
  8473. __pyx_r = __pyx_t_4;
  8474. __pyx_t_4 = 0;
  8475. goto __pyx_L4_return;
  8476. }
  8477. /*finally:*/ {
  8478. /*exception exit:*/{
  8479. __Pyx_PyThreadState_declare
  8480. __pyx_L5_error:;
  8481. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  8482. __Pyx_PyThreadState_assign
  8483. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8484. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  8485. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8486. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  8487. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
  8488. __Pyx_XGOTREF(__pyx_t_10);
  8489. __Pyx_XGOTREF(__pyx_t_11);
  8490. __Pyx_XGOTREF(__pyx_t_12);
  8491. __Pyx_XGOTREF(__pyx_t_13);
  8492. __Pyx_XGOTREF(__pyx_t_14);
  8493. __Pyx_XGOTREF(__pyx_t_15);
  8494. __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
  8495. {
  8496. Py_ReprLeave(((PyObject*)__pyx_v_self));
  8497. }
  8498. __Pyx_PyThreadState_assign
  8499. if (PY_MAJOR_VERSION >= 3) {
  8500. __Pyx_XGIVEREF(__pyx_t_13);
  8501. __Pyx_XGIVEREF(__pyx_t_14);
  8502. __Pyx_XGIVEREF(__pyx_t_15);
  8503. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  8504. }
  8505. __Pyx_XGIVEREF(__pyx_t_10);
  8506. __Pyx_XGIVEREF(__pyx_t_11);
  8507. __Pyx_XGIVEREF(__pyx_t_12);
  8508. __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  8509. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  8510. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
  8511. goto __pyx_L1_error;
  8512. }
  8513. __pyx_L4_return: {
  8514. __pyx_t_15 = __pyx_r;
  8515. __pyx_r = 0;
  8516. Py_ReprLeave(((PyObject*)__pyx_v_self));
  8517. __pyx_r = __pyx_t_15;
  8518. __pyx_t_15 = 0;
  8519. goto __pyx_L0;
  8520. }
  8521. }
  8522. /* function exit code */
  8523. __pyx_L1_error:;
  8524. __Pyx_XDECREF(__pyx_t_2);
  8525. __Pyx_XDECREF(__pyx_t_3);
  8526. __Pyx_XDECREF(__pyx_t_4);
  8527. __Pyx_AddTraceback("gevent.libev.corecext.callback.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8528. __pyx_r = NULL;
  8529. __pyx_L0:;
  8530. __Pyx_XDECREF(__pyx_v_format);
  8531. __Pyx_XDECREF(__pyx_v_result);
  8532. __Pyx_XGIVEREF(__pyx_r);
  8533. __Pyx_RefNannyFinishContext();
  8534. return __pyx_r;
  8535. }
  8536. /* Python wrapper */
  8537. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  8538. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  8539. PyObject *__pyx_r = 0;
  8540. __Pyx_RefNannyDeclarations
  8541. __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  8542. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8_format(((struct PyGeventCallbackObject *)__pyx_v_self));
  8543. /* function exit code */
  8544. __Pyx_RefNannyFinishContext();
  8545. return __pyx_r;
  8546. }
  8547. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8_format(CYTHON_UNUSED struct PyGeventCallbackObject *__pyx_v_self) {
  8548. PyObject *__pyx_r = NULL;
  8549. __Pyx_RefNannyDeclarations
  8550. __Pyx_RefNannySetupContext("_format", 0);
  8551. __Pyx_XDECREF(__pyx_r);
  8552. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8553. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  8554. __Pyx_INCREF(__pyx_kp_s__21);
  8555. __pyx_r = __pyx_kp_s__21;
  8556. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  8557. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8558. __Pyx_INCREF(__pyx_kp_s__23);
  8559. __pyx_r = __pyx_kp_s__23;
  8560. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8561. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8562. __Pyx_INCREF(__pyx_kp_s__21);
  8563. __pyx_r = __pyx_kp_s__21;
  8564. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8565. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8566. goto __pyx_L0;
  8567. /* function exit code */
  8568. __pyx_L0:;
  8569. __Pyx_XGIVEREF(__pyx_r);
  8570. __Pyx_RefNannyFinishContext();
  8571. return __pyx_r;
  8572. }
  8573. /* Python wrapper */
  8574. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  8575. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(PyObject *__pyx_v_self) {
  8576. PyObject *__pyx_r = 0;
  8577. __Pyx_RefNannyDeclarations
  8578. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  8579. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8580. /* function exit code */
  8581. __Pyx_RefNannyFinishContext();
  8582. return __pyx_r;
  8583. }
  8584. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_8callback___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  8585. PyObject *__pyx_r = NULL;
  8586. __Pyx_RefNannyDeclarations
  8587. __Pyx_RefNannySetupContext("__get__", 0);
  8588. __Pyx_XDECREF(__pyx_r);
  8589. __Pyx_INCREF(__pyx_v_self->callback);
  8590. __pyx_r = __pyx_v_self->callback;
  8591. goto __pyx_L0;
  8592. /* function exit code */
  8593. __pyx_L0:;
  8594. __Pyx_XGIVEREF(__pyx_r);
  8595. __Pyx_RefNannyFinishContext();
  8596. return __pyx_r;
  8597. }
  8598. /* Python wrapper */
  8599. static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  8600. static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8601. int __pyx_r;
  8602. __Pyx_RefNannyDeclarations
  8603. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  8604. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  8605. /* function exit code */
  8606. __Pyx_RefNannyFinishContext();
  8607. return __pyx_r;
  8608. }
  8609. static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8610. int __pyx_r;
  8611. __Pyx_RefNannyDeclarations
  8612. __Pyx_RefNannySetupContext("__set__", 0);
  8613. __Pyx_INCREF(__pyx_v_value);
  8614. __Pyx_GIVEREF(__pyx_v_value);
  8615. __Pyx_GOTREF(__pyx_v_self->callback);
  8616. __Pyx_DECREF(__pyx_v_self->callback);
  8617. __pyx_v_self->callback = __pyx_v_value;
  8618. /* function exit code */
  8619. __pyx_r = 0;
  8620. __Pyx_RefNannyFinishContext();
  8621. return __pyx_r;
  8622. }
  8623. /* Python wrapper */
  8624. static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self); /*proto*/
  8625. static int __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(PyObject *__pyx_v_self) {
  8626. int __pyx_r;
  8627. __Pyx_RefNannyDeclarations
  8628. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  8629. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8630. /* function exit code */
  8631. __Pyx_RefNannyFinishContext();
  8632. return __pyx_r;
  8633. }
  8634. static int __pyx_pf_6gevent_5libev_8corecext_8callback_8callback_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
  8635. int __pyx_r;
  8636. __Pyx_RefNannyDeclarations
  8637. __Pyx_RefNannySetupContext("__del__", 0);
  8638. __Pyx_INCREF(Py_None);
  8639. __Pyx_GIVEREF(Py_None);
  8640. __Pyx_GOTREF(__pyx_v_self->callback);
  8641. __Pyx_DECREF(__pyx_v_self->callback);
  8642. __pyx_v_self->callback = Py_None;
  8643. /* function exit code */
  8644. __pyx_r = 0;
  8645. __Pyx_RefNannyFinishContext();
  8646. return __pyx_r;
  8647. }
  8648. /* Python wrapper */
  8649. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  8650. static PyObject *__pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(PyObject *__pyx_v_self) {
  8651. PyObject *__pyx_r = 0;
  8652. __Pyx_RefNannyDeclarations
  8653. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  8654. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8655. /* function exit code */
  8656. __Pyx_RefNannyFinishContext();
  8657. return __pyx_r;
  8658. }
  8659. static PyObject *__pyx_pf_6gevent_5libev_8corecext_8callback_4args___get__(struct PyGeventCallbackObject *__pyx_v_self) {
  8660. PyObject *__pyx_r = NULL;
  8661. __Pyx_RefNannyDeclarations
  8662. __Pyx_RefNannySetupContext("__get__", 0);
  8663. __Pyx_XDECREF(__pyx_r);
  8664. __Pyx_INCREF(__pyx_v_self->args);
  8665. __pyx_r = __pyx_v_self->args;
  8666. goto __pyx_L0;
  8667. /* function exit code */
  8668. __pyx_L0:;
  8669. __Pyx_XGIVEREF(__pyx_r);
  8670. __Pyx_RefNannyFinishContext();
  8671. return __pyx_r;
  8672. }
  8673. /* Python wrapper */
  8674. static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  8675. static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8676. int __pyx_r;
  8677. __Pyx_RefNannyDeclarations
  8678. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  8679. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(((struct PyGeventCallbackObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  8680. /* function exit code */
  8681. __Pyx_RefNannyFinishContext();
  8682. return __pyx_r;
  8683. }
  8684. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_2__set__(struct PyGeventCallbackObject *__pyx_v_self, PyObject *__pyx_v_value) {
  8685. int __pyx_r;
  8686. __Pyx_RefNannyDeclarations
  8687. PyObject *__pyx_t_1 = NULL;
  8688. __Pyx_RefNannySetupContext("__set__", 0);
  8689. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 629, __pyx_L1_error)
  8690. __pyx_t_1 = __pyx_v_value;
  8691. __Pyx_INCREF(__pyx_t_1);
  8692. __Pyx_GIVEREF(__pyx_t_1);
  8693. __Pyx_GOTREF(__pyx_v_self->args);
  8694. __Pyx_DECREF(__pyx_v_self->args);
  8695. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  8696. __pyx_t_1 = 0;
  8697. /* function exit code */
  8698. __pyx_r = 0;
  8699. goto __pyx_L0;
  8700. __pyx_L1_error:;
  8701. __Pyx_XDECREF(__pyx_t_1);
  8702. __Pyx_AddTraceback("gevent.libev.corecext.callback.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8703. __pyx_r = -1;
  8704. __pyx_L0:;
  8705. __Pyx_RefNannyFinishContext();
  8706. return __pyx_r;
  8707. }
  8708. /* Python wrapper */
  8709. static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  8710. static int __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(PyObject *__pyx_v_self) {
  8711. int __pyx_r;
  8712. __Pyx_RefNannyDeclarations
  8713. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  8714. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(((struct PyGeventCallbackObject *)__pyx_v_self));
  8715. /* function exit code */
  8716. __Pyx_RefNannyFinishContext();
  8717. return __pyx_r;
  8718. }
  8719. static int __pyx_pf_6gevent_5libev_8corecext_8callback_4args_4__del__(struct PyGeventCallbackObject *__pyx_v_self) {
  8720. int __pyx_r;
  8721. __Pyx_RefNannyDeclarations
  8722. __Pyx_RefNannySetupContext("__del__", 0);
  8723. __Pyx_INCREF(Py_None);
  8724. __Pyx_GIVEREF(Py_None);
  8725. __Pyx_GOTREF(__pyx_v_self->args);
  8726. __Pyx_DECREF(__pyx_v_self->args);
  8727. __pyx_v_self->args = ((PyObject*)Py_None);
  8728. /* function exit code */
  8729. __pyx_r = 0;
  8730. __Pyx_RefNannyFinishContext();
  8731. return __pyx_r;
  8732. }
  8733. /* Python wrapper */
  8734. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__(PyObject *__pyx_v_self); /*proto*/
  8735. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__(PyObject *__pyx_v_self) {
  8736. PyObject *__pyx_r = 0;
  8737. __Pyx_RefNannyDeclarations
  8738. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  8739. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher___repr__(((struct PyGeventWatcherObject *)__pyx_v_self));
  8740. /* function exit code */
  8741. __Pyx_RefNannyFinishContext();
  8742. return __pyx_r;
  8743. }
  8744. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher___repr__(struct PyGeventWatcherObject *__pyx_v_self) {
  8745. PyObject *__pyx_v_format = NULL;
  8746. PyObject *__pyx_v_result = NULL;
  8747. PyObject *__pyx_r = NULL;
  8748. __Pyx_RefNannyDeclarations
  8749. int __pyx_t_1;
  8750. PyObject *__pyx_t_2 = NULL;
  8751. PyObject *__pyx_t_3 = NULL;
  8752. PyObject *__pyx_t_4 = NULL;
  8753. int __pyx_t_5;
  8754. int __pyx_t_6;
  8755. int __pyx_t_7;
  8756. char const *__pyx_t_8;
  8757. PyObject *__pyx_t_9 = NULL;
  8758. PyObject *__pyx_t_10 = NULL;
  8759. PyObject *__pyx_t_11 = NULL;
  8760. PyObject *__pyx_t_12 = NULL;
  8761. PyObject *__pyx_t_13 = NULL;
  8762. PyObject *__pyx_t_14 = NULL;
  8763. __Pyx_RefNannySetupContext("__repr__", 0);
  8764. __pyx_t_1 = ((Py_ReprEnter(((PyObject*)__pyx_v_self)) != 0) != 0);
  8765. if (__pyx_t_1) {
  8766. __Pyx_XDECREF(__pyx_r);
  8767. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8768. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8769. __Pyx_INCREF(__pyx_kp_s__26);
  8770. __pyx_r = __pyx_kp_s__26;
  8771. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8772. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  8773. __Pyx_INCREF(__pyx_kp_s__27);
  8774. __pyx_r = __pyx_kp_s__27;
  8775. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  8776. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8777. __Pyx_INCREF(__pyx_kp_s__21);
  8778. __pyx_r = __pyx_kp_s__21;
  8779. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8780. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8781. __Pyx_INCREF(__pyx_kp_s__27);
  8782. __pyx_r = __pyx_kp_s__27;
  8783. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8784. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8785. goto __pyx_L0;
  8786. }
  8787. /*try:*/ {
  8788. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L5_error)
  8789. __Pyx_GOTREF(__pyx_t_3);
  8790. __pyx_t_4 = NULL;
  8791. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  8792. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  8793. if (likely(__pyx_t_4)) {
  8794. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8795. __Pyx_INCREF(__pyx_t_4);
  8796. __Pyx_INCREF(function);
  8797. __Pyx_DECREF_SET(__pyx_t_3, function);
  8798. }
  8799. }
  8800. if (__pyx_t_4) {
  8801. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L5_error)
  8802. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8803. } else {
  8804. __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L5_error)
  8805. }
  8806. __Pyx_GOTREF(__pyx_t_2);
  8807. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8808. __pyx_v_format = __pyx_t_2;
  8809. __pyx_t_2 = 0;
  8810. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L5_error)
  8811. __Pyx_GOTREF(__pyx_t_2);
  8812. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L5_error)
  8813. __Pyx_GOTREF(__pyx_t_3);
  8814. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8815. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L5_error)
  8816. __Pyx_GOTREF(__pyx_t_2);
  8817. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  8818. __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  8819. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  8820. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L5_error)
  8821. __Pyx_GOTREF(__pyx_t_4);
  8822. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8823. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L5_error)
  8824. __Pyx_GOTREF(__pyx_t_2);
  8825. __Pyx_GIVEREF(__pyx_t_3);
  8826. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  8827. __Pyx_GIVEREF(__pyx_t_4);
  8828. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  8829. __Pyx_INCREF(__pyx_v_format);
  8830. __Pyx_GIVEREF(__pyx_v_format);
  8831. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_format);
  8832. __pyx_t_3 = 0;
  8833. __pyx_t_4 = 0;
  8834. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_at_0x_x_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L5_error)
  8835. __Pyx_GOTREF(__pyx_t_4);
  8836. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8837. __pyx_v_result = ((PyObject*)__pyx_t_4);
  8838. __pyx_t_4 = 0;
  8839. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_active); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L5_error)
  8840. __Pyx_GOTREF(__pyx_t_4);
  8841. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 704, __pyx_L5_error)
  8842. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8843. if (__pyx_t_1) {
  8844. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_active_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L5_error)
  8845. __Pyx_GOTREF(__pyx_t_4);
  8846. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8847. __pyx_t_4 = 0;
  8848. }
  8849. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pending); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L5_error)
  8850. __Pyx_GOTREF(__pyx_t_4);
  8851. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 706, __pyx_L5_error)
  8852. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8853. if (__pyx_t_1) {
  8854. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_pending_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L5_error)
  8855. __Pyx_GOTREF(__pyx_t_4);
  8856. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8857. __pyx_t_4 = 0;
  8858. }
  8859. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L5_error)
  8860. __Pyx_GOTREF(__pyx_t_4);
  8861. __pyx_t_1 = (__pyx_t_4 != Py_None);
  8862. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8863. __pyx_t_5 = (__pyx_t_1 != 0);
  8864. if (__pyx_t_5) {
  8865. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L5_error)
  8866. __Pyx_GOTREF(__pyx_t_4);
  8867. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L5_error)
  8868. __Pyx_GOTREF(__pyx_t_2);
  8869. __Pyx_GIVEREF(__pyx_t_4);
  8870. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  8871. __pyx_t_4 = 0;
  8872. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_callback_r, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L5_error)
  8873. __Pyx_GOTREF(__pyx_t_4);
  8874. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8875. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L5_error)
  8876. __Pyx_GOTREF(__pyx_t_2);
  8877. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8878. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
  8879. __pyx_t_2 = 0;
  8880. }
  8881. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L5_error)
  8882. __Pyx_GOTREF(__pyx_t_2);
  8883. __pyx_t_5 = (__pyx_t_2 != Py_None);
  8884. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8885. __pyx_t_1 = (__pyx_t_5 != 0);
  8886. if (__pyx_t_1) {
  8887. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L5_error)
  8888. __Pyx_GOTREF(__pyx_t_2);
  8889. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L5_error)
  8890. __Pyx_GOTREF(__pyx_t_4);
  8891. __Pyx_GIVEREF(__pyx_t_2);
  8892. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  8893. __pyx_t_2 = 0;
  8894. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_args_r, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L5_error)
  8895. __Pyx_GOTREF(__pyx_t_2);
  8896. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8897. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L5_error)
  8898. __Pyx_GOTREF(__pyx_t_4);
  8899. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8900. __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4));
  8901. __pyx_t_4 = 0;
  8902. }
  8903. __Pyx_XDECREF(__pyx_r);
  8904. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8905. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8906. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__27); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L5_error)
  8907. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8908. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  8909. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__28); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L5_error)
  8910. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  8911. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8912. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L5_error)
  8913. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8914. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  8915. __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__28); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L5_error)
  8916. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8917. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  8918. __Pyx_GOTREF(__pyx_t_4);
  8919. __pyx_r = __pyx_t_4;
  8920. __pyx_t_4 = 0;
  8921. goto __pyx_L4_return;
  8922. }
  8923. /*finally:*/ {
  8924. /*exception exit:*/{
  8925. __Pyx_PyThreadState_declare
  8926. __pyx_L5_error:;
  8927. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  8928. __Pyx_PyThreadState_assign
  8929. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8930. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  8931. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8932. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
  8933. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
  8934. __Pyx_XGOTREF(__pyx_t_9);
  8935. __Pyx_XGOTREF(__pyx_t_10);
  8936. __Pyx_XGOTREF(__pyx_t_11);
  8937. __Pyx_XGOTREF(__pyx_t_12);
  8938. __Pyx_XGOTREF(__pyx_t_13);
  8939. __Pyx_XGOTREF(__pyx_t_14);
  8940. __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
  8941. {
  8942. Py_ReprLeave(((PyObject*)__pyx_v_self));
  8943. }
  8944. __Pyx_PyThreadState_assign
  8945. if (PY_MAJOR_VERSION >= 3) {
  8946. __Pyx_XGIVEREF(__pyx_t_12);
  8947. __Pyx_XGIVEREF(__pyx_t_13);
  8948. __Pyx_XGIVEREF(__pyx_t_14);
  8949. __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
  8950. }
  8951. __Pyx_XGIVEREF(__pyx_t_9);
  8952. __Pyx_XGIVEREF(__pyx_t_10);
  8953. __Pyx_XGIVEREF(__pyx_t_11);
  8954. __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  8955. __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
  8956. __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
  8957. goto __pyx_L1_error;
  8958. }
  8959. __pyx_L4_return: {
  8960. __pyx_t_14 = __pyx_r;
  8961. __pyx_r = 0;
  8962. Py_ReprLeave(((PyObject*)__pyx_v_self));
  8963. __pyx_r = __pyx_t_14;
  8964. __pyx_t_14 = 0;
  8965. goto __pyx_L0;
  8966. }
  8967. }
  8968. /* function exit code */
  8969. __pyx_L1_error:;
  8970. __Pyx_XDECREF(__pyx_t_2);
  8971. __Pyx_XDECREF(__pyx_t_3);
  8972. __Pyx_XDECREF(__pyx_t_4);
  8973. __Pyx_AddTraceback("gevent.libev.corecext.watcher.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8974. __pyx_r = NULL;
  8975. __pyx_L0:;
  8976. __Pyx_XDECREF(__pyx_v_format);
  8977. __Pyx_XDECREF(__pyx_v_result);
  8978. __Pyx_XGIVEREF(__pyx_r);
  8979. __Pyx_RefNannyFinishContext();
  8980. return __pyx_r;
  8981. }
  8982. /* Python wrapper */
  8983. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  8984. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7watcher_3_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  8985. PyObject *__pyx_r = 0;
  8986. __Pyx_RefNannyDeclarations
  8987. __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  8988. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7watcher_2_format(((struct PyGeventWatcherObject *)__pyx_v_self));
  8989. /* function exit code */
  8990. __Pyx_RefNannyFinishContext();
  8991. return __pyx_r;
  8992. }
  8993. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7watcher_2_format(CYTHON_UNUSED struct PyGeventWatcherObject *__pyx_v_self) {
  8994. PyObject *__pyx_r = NULL;
  8995. __Pyx_RefNannyDeclarations
  8996. __Pyx_RefNannySetupContext("_format", 0);
  8997. __Pyx_XDECREF(__pyx_r);
  8998. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  8999. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9000. __Pyx_INCREF(__pyx_kp_s__21);
  9001. __pyx_r = __pyx_kp_s__21;
  9002. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9003. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9004. __Pyx_INCREF(__pyx_kp_s__23);
  9005. __pyx_r = __pyx_kp_s__23;
  9006. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9007. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9008. __Pyx_INCREF(__pyx_kp_s__21);
  9009. __pyx_r = __pyx_kp_s__21;
  9010. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9011. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9012. goto __pyx_L0;
  9013. /* function exit code */
  9014. __pyx_L0:;
  9015. __Pyx_XGIVEREF(__pyx_r);
  9016. __Pyx_RefNannyFinishContext();
  9017. return __pyx_r;
  9018. }
  9019. /* Python wrapper */
  9020. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  9021. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_3ref_1__get__(PyObject *__pyx_v_self) {
  9022. PyObject *__pyx_r = 0;
  9023. __Pyx_RefNannyDeclarations
  9024. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  9025. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_3ref___get__(((struct PyGeventIOObject *)__pyx_v_self));
  9026. /* function exit code */
  9027. __Pyx_RefNannyFinishContext();
  9028. return __pyx_r;
  9029. }
  9030. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_3ref___get__(struct PyGeventIOObject *__pyx_v_self) {
  9031. PyObject *__pyx_r = NULL;
  9032. __Pyx_RefNannyDeclarations
  9033. PyObject *__pyx_t_1 = NULL;
  9034. __Pyx_RefNannySetupContext("__get__", 0);
  9035. __Pyx_XDECREF(__pyx_r);
  9036. if (((__pyx_v_self->_flags & 4) != 0)) {
  9037. __Pyx_INCREF(Py_False);
  9038. __pyx_t_1 = Py_False;
  9039. } else {
  9040. __Pyx_INCREF(Py_True);
  9041. __pyx_t_1 = Py_True;
  9042. }
  9043. __pyx_r = __pyx_t_1;
  9044. __pyx_t_1 = 0;
  9045. goto __pyx_L0;
  9046. /* function exit code */
  9047. __pyx_L0:;
  9048. __Pyx_XGIVEREF(__pyx_r);
  9049. __Pyx_RefNannyFinishContext();
  9050. return __pyx_r;
  9051. }
  9052. /* Python wrapper */
  9053. static int __pyx_pw_6gevent_5libev_8corecext_2io_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  9054. static int __pyx_pw_6gevent_5libev_8corecext_2io_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  9055. int __pyx_r;
  9056. __Pyx_RefNannyDeclarations
  9057. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  9058. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_3ref_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  9059. /* function exit code */
  9060. __Pyx_RefNannyFinishContext();
  9061. return __pyx_r;
  9062. }
  9063. static int __pyx_pf_6gevent_5libev_8corecext_2io_3ref_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value) {
  9064. int __pyx_r;
  9065. __Pyx_RefNannyDeclarations
  9066. int __pyx_t_1;
  9067. PyObject *__pyx_t_2 = NULL;
  9068. int __pyx_t_3;
  9069. __Pyx_RefNannySetupContext("__set__", 0);
  9070. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  9071. if (__pyx_t_1) {
  9072. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9073. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9074. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
  9075. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9076. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9077. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
  9078. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9079. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9080. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
  9081. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9082. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9083. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
  9084. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9085. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9086. __Pyx_GOTREF(__pyx_t_2);
  9087. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9088. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9089. __PYX_ERR(0, 737, __pyx_L1_error)
  9090. }
  9091. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 738, __pyx_L1_error)
  9092. if (__pyx_t_1) {
  9093. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  9094. if (__pyx_t_1) {
  9095. __pyx_r = 0;
  9096. goto __pyx_L0;
  9097. }
  9098. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  9099. if (__pyx_t_1) {
  9100. ev_ref(__pyx_v_self->loop->_ptr);
  9101. }
  9102. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  9103. goto __pyx_L4;
  9104. }
  9105. /*else*/ {
  9106. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  9107. if (__pyx_t_1) {
  9108. __pyx_r = 0;
  9109. goto __pyx_L0;
  9110. }
  9111. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  9112. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  9113. if (__pyx_t_3) {
  9114. } else {
  9115. __pyx_t_1 = __pyx_t_3;
  9116. goto __pyx_L9_bool_binop_done;
  9117. }
  9118. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  9119. __pyx_t_1 = __pyx_t_3;
  9120. __pyx_L9_bool_binop_done:;
  9121. if (__pyx_t_1) {
  9122. ev_unref(__pyx_v_self->loop->_ptr);
  9123. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  9124. }
  9125. }
  9126. __pyx_L4:;
  9127. /* function exit code */
  9128. __pyx_r = 0;
  9129. goto __pyx_L0;
  9130. __pyx_L1_error:;
  9131. __Pyx_XDECREF(__pyx_t_2);
  9132. __Pyx_AddTraceback("gevent.libev.corecext.io.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9133. __pyx_r = -1;
  9134. __pyx_L0:;
  9135. __Pyx_RefNannyFinishContext();
  9136. return __pyx_r;
  9137. }
  9138. /* Python wrapper */
  9139. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  9140. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_8callback_1__get__(PyObject *__pyx_v_self) {
  9141. PyObject *__pyx_r = 0;
  9142. __Pyx_RefNannyDeclarations
  9143. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  9144. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8callback___get__(((struct PyGeventIOObject *)__pyx_v_self));
  9145. /* function exit code */
  9146. __Pyx_RefNannyFinishContext();
  9147. return __pyx_r;
  9148. }
  9149. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8callback___get__(struct PyGeventIOObject *__pyx_v_self) {
  9150. PyObject *__pyx_r = NULL;
  9151. __Pyx_RefNannyDeclarations
  9152. __Pyx_RefNannySetupContext("__get__", 0);
  9153. __Pyx_XDECREF(__pyx_r);
  9154. __Pyx_INCREF(__pyx_v_self->_callback);
  9155. __pyx_r = __pyx_v_self->_callback;
  9156. goto __pyx_L0;
  9157. /* function exit code */
  9158. __pyx_L0:;
  9159. __Pyx_XGIVEREF(__pyx_r);
  9160. __Pyx_RefNannyFinishContext();
  9161. return __pyx_r;
  9162. }
  9163. /* Python wrapper */
  9164. static int __pyx_pw_6gevent_5libev_8corecext_2io_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  9165. static int __pyx_pw_6gevent_5libev_8corecext_2io_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  9166. int __pyx_r;
  9167. __Pyx_RefNannyDeclarations
  9168. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  9169. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8callback_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  9170. /* function exit code */
  9171. __Pyx_RefNannyFinishContext();
  9172. return __pyx_r;
  9173. }
  9174. static int __pyx_pf_6gevent_5libev_8corecext_2io_8callback_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  9175. int __pyx_r;
  9176. __Pyx_RefNannyDeclarations
  9177. int __pyx_t_1;
  9178. int __pyx_t_2;
  9179. int __pyx_t_3;
  9180. PyObject *__pyx_t_4 = NULL;
  9181. PyObject *__pyx_t_5 = NULL;
  9182. __Pyx_RefNannySetupContext("__set__", 0);
  9183. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  9184. if (__pyx_t_2) {
  9185. } else {
  9186. __pyx_t_1 = __pyx_t_2;
  9187. goto __pyx_L4_bool_binop_done;
  9188. }
  9189. __pyx_t_2 = (__pyx_v_callback != Py_None);
  9190. __pyx_t_3 = (__pyx_t_2 != 0);
  9191. __pyx_t_1 = __pyx_t_3;
  9192. __pyx_L4_bool_binop_done:;
  9193. if (__pyx_t_1) {
  9194. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
  9195. __Pyx_GOTREF(__pyx_t_4);
  9196. __Pyx_INCREF(__pyx_v_callback);
  9197. __Pyx_GIVEREF(__pyx_v_callback);
  9198. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  9199. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
  9200. __Pyx_GOTREF(__pyx_t_5);
  9201. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9202. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
  9203. __Pyx_GOTREF(__pyx_t_4);
  9204. __Pyx_GIVEREF(__pyx_t_5);
  9205. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  9206. __pyx_t_5 = 0;
  9207. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
  9208. __Pyx_GOTREF(__pyx_t_5);
  9209. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9210. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  9211. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  9212. __PYX_ERR(0, 759, __pyx_L1_error)
  9213. }
  9214. __Pyx_INCREF(__pyx_v_callback);
  9215. __Pyx_GIVEREF(__pyx_v_callback);
  9216. __Pyx_GOTREF(__pyx_v_self->_callback);
  9217. __Pyx_DECREF(__pyx_v_self->_callback);
  9218. __pyx_v_self->_callback = __pyx_v_callback;
  9219. /* function exit code */
  9220. __pyx_r = 0;
  9221. goto __pyx_L0;
  9222. __pyx_L1_error:;
  9223. __Pyx_XDECREF(__pyx_t_4);
  9224. __Pyx_XDECREF(__pyx_t_5);
  9225. __Pyx_AddTraceback("gevent.libev.corecext.io.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9226. __pyx_r = -1;
  9227. __pyx_L0:;
  9228. __Pyx_RefNannyFinishContext();
  9229. return __pyx_r;
  9230. }
  9231. /* Python wrapper */
  9232. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  9233. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  9234. PyObject *__pyx_r = 0;
  9235. __Pyx_RefNannyDeclarations
  9236. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  9237. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_stop(((struct PyGeventIOObject *)__pyx_v_self));
  9238. /* function exit code */
  9239. __Pyx_RefNannyFinishContext();
  9240. return __pyx_r;
  9241. }
  9242. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_stop(struct PyGeventIOObject *__pyx_v_self) {
  9243. PyObject *__pyx_r = NULL;
  9244. __Pyx_RefNannyDeclarations
  9245. int __pyx_t_1;
  9246. PyObject *__pyx_t_2 = NULL;
  9247. __Pyx_RefNannySetupContext("stop", 0);
  9248. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  9249. if (__pyx_t_1) {
  9250. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9251. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9252. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
  9253. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9254. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9255. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
  9256. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9257. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9258. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
  9259. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9260. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9261. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
  9262. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9263. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9264. __Pyx_GOTREF(__pyx_t_2);
  9265. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9266. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9267. __PYX_ERR(0, 765, __pyx_L1_error)
  9268. }
  9269. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  9270. if (__pyx_t_1) {
  9271. ev_ref(__pyx_v_self->loop->_ptr);
  9272. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  9273. }
  9274. ev_io_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  9275. __Pyx_INCREF(Py_None);
  9276. __Pyx_GIVEREF(Py_None);
  9277. __Pyx_GOTREF(__pyx_v_self->_callback);
  9278. __Pyx_DECREF(__pyx_v_self->_callback);
  9279. __pyx_v_self->_callback = Py_None;
  9280. __Pyx_INCREF(Py_None);
  9281. __Pyx_GIVEREF(Py_None);
  9282. __Pyx_GOTREF(__pyx_v_self->args);
  9283. __Pyx_DECREF(__pyx_v_self->args);
  9284. __pyx_v_self->args = ((PyObject*)Py_None);
  9285. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  9286. if (__pyx_t_1) {
  9287. Py_DECREF(((PyObject*)__pyx_v_self));
  9288. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  9289. }
  9290. /* function exit code */
  9291. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9292. goto __pyx_L0;
  9293. __pyx_L1_error:;
  9294. __Pyx_XDECREF(__pyx_t_2);
  9295. __Pyx_AddTraceback("gevent.libev.corecext.io.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9296. __pyx_r = NULL;
  9297. __pyx_L0:;
  9298. __Pyx_XGIVEREF(__pyx_r);
  9299. __Pyx_RefNannyFinishContext();
  9300. return __pyx_r;
  9301. }
  9302. /* Python wrapper */
  9303. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  9304. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_8priority_1__get__(PyObject *__pyx_v_self) {
  9305. PyObject *__pyx_r = 0;
  9306. __Pyx_RefNannyDeclarations
  9307. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  9308. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8priority___get__(((struct PyGeventIOObject *)__pyx_v_self));
  9309. /* function exit code */
  9310. __Pyx_RefNannyFinishContext();
  9311. return __pyx_r;
  9312. }
  9313. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8priority___get__(struct PyGeventIOObject *__pyx_v_self) {
  9314. PyObject *__pyx_r = NULL;
  9315. __Pyx_RefNannyDeclarations
  9316. PyObject *__pyx_t_1 = NULL;
  9317. __Pyx_RefNannySetupContext("__get__", 0);
  9318. __Pyx_XDECREF(__pyx_r);
  9319. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
  9320. __Pyx_GOTREF(__pyx_t_1);
  9321. __pyx_r = __pyx_t_1;
  9322. __pyx_t_1 = 0;
  9323. goto __pyx_L0;
  9324. /* function exit code */
  9325. __pyx_L1_error:;
  9326. __Pyx_XDECREF(__pyx_t_1);
  9327. __Pyx_AddTraceback("gevent.libev.corecext.io.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9328. __pyx_r = NULL;
  9329. __pyx_L0:;
  9330. __Pyx_XGIVEREF(__pyx_r);
  9331. __Pyx_RefNannyFinishContext();
  9332. return __pyx_r;
  9333. }
  9334. /* Python wrapper */
  9335. static int __pyx_pw_6gevent_5libev_8corecext_2io_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  9336. static int __pyx_pw_6gevent_5libev_8corecext_2io_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  9337. int __pyx_v_priority;
  9338. int __pyx_r;
  9339. __Pyx_RefNannyDeclarations
  9340. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  9341. assert(__pyx_arg_priority); {
  9342. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L3_error)
  9343. }
  9344. goto __pyx_L4_argument_unpacking_done;
  9345. __pyx_L3_error:;
  9346. __Pyx_AddTraceback("gevent.libev.corecext.io.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9347. __Pyx_RefNannyFinishContext();
  9348. return -1;
  9349. __pyx_L4_argument_unpacking_done:;
  9350. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8priority_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((int)__pyx_v_priority));
  9351. /* function exit code */
  9352. __Pyx_RefNannyFinishContext();
  9353. return __pyx_r;
  9354. }
  9355. static int __pyx_pf_6gevent_5libev_8corecext_2io_8priority_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_priority) {
  9356. int __pyx_r;
  9357. __Pyx_RefNannyDeclarations
  9358. int __pyx_t_1;
  9359. PyObject *__pyx_t_2 = NULL;
  9360. __Pyx_RefNannySetupContext("__set__", 0);
  9361. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  9362. if (__pyx_t_1) {
  9363. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9364. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9365. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  9366. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9367. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9368. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  9369. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9370. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9371. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  9372. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9373. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9374. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  9375. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9376. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9377. __Pyx_GOTREF(__pyx_t_2);
  9378. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9379. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9380. __PYX_ERR(0, 783, __pyx_L1_error)
  9381. }
  9382. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  9383. /* function exit code */
  9384. __pyx_r = 0;
  9385. goto __pyx_L0;
  9386. __pyx_L1_error:;
  9387. __Pyx_XDECREF(__pyx_t_2);
  9388. __Pyx_AddTraceback("gevent.libev.corecext.io.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9389. __pyx_r = -1;
  9390. __pyx_L0:;
  9391. __Pyx_RefNannyFinishContext();
  9392. return __pyx_r;
  9393. }
  9394. /* Python wrapper */
  9395. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  9396. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  9397. int __pyx_v_revents;
  9398. PyObject *__pyx_v_callback = 0;
  9399. PyObject *__pyx_v_args = 0;
  9400. PyObject *__pyx_r = 0;
  9401. __Pyx_RefNannyDeclarations
  9402. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  9403. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  9404. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  9405. if (unlikely(!__pyx_v_args)) {
  9406. __Pyx_RefNannyFinishContext();
  9407. return NULL;
  9408. }
  9409. __Pyx_GOTREF(__pyx_v_args);
  9410. } else {
  9411. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  9412. }
  9413. {
  9414. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  9415. PyObject* values[2] = {0,0};
  9416. if (unlikely(__pyx_kwds)) {
  9417. Py_ssize_t kw_args;
  9418. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  9419. switch (pos_args) {
  9420. default:
  9421. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9422. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9423. case 0: break;
  9424. }
  9425. kw_args = PyDict_Size(__pyx_kwds);
  9426. switch (pos_args) {
  9427. case 0:
  9428. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  9429. else goto __pyx_L5_argtuple_error;
  9430. case 1:
  9431. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  9432. else {
  9433. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 786, __pyx_L3_error)
  9434. }
  9435. }
  9436. if (unlikely(kw_args > 0)) {
  9437. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  9438. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 786, __pyx_L3_error)
  9439. }
  9440. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  9441. goto __pyx_L5_argtuple_error;
  9442. } else {
  9443. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9444. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9445. }
  9446. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L3_error)
  9447. __pyx_v_callback = values[1];
  9448. }
  9449. goto __pyx_L4_argument_unpacking_done;
  9450. __pyx_L5_argtuple_error:;
  9451. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 786, __pyx_L3_error)
  9452. __pyx_L3_error:;
  9453. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  9454. __Pyx_AddTraceback("gevent.libev.corecext.io.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9455. __Pyx_RefNannyFinishContext();
  9456. return NULL;
  9457. __pyx_L4_argument_unpacking_done:;
  9458. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2feed(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  9459. /* function exit code */
  9460. __Pyx_XDECREF(__pyx_v_args);
  9461. __Pyx_RefNannyFinishContext();
  9462. return __pyx_r;
  9463. }
  9464. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2feed(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  9465. PyObject *__pyx_r = NULL;
  9466. __Pyx_RefNannyDeclarations
  9467. int __pyx_t_1;
  9468. PyObject *__pyx_t_2 = NULL;
  9469. __Pyx_RefNannySetupContext("feed", 0);
  9470. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  9471. if (__pyx_t_1) {
  9472. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9473. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9474. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
  9475. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9476. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9477. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
  9478. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9479. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9480. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
  9481. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9482. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9483. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
  9484. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9485. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9486. __Pyx_GOTREF(__pyx_t_2);
  9487. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9488. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9489. __PYX_ERR(0, 789, __pyx_L1_error)
  9490. }
  9491. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  9492. __Pyx_INCREF(__pyx_v_args);
  9493. __Pyx_GIVEREF(__pyx_v_args);
  9494. __Pyx_GOTREF(__pyx_v_self->args);
  9495. __Pyx_DECREF(__pyx_v_self->args);
  9496. __pyx_v_self->args = __pyx_v_args;
  9497. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  9498. if (__pyx_t_1) {
  9499. ev_unref(__pyx_v_self->loop->_ptr);
  9500. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  9501. }
  9502. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  9503. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  9504. if (__pyx_t_1) {
  9505. Py_INCREF(((PyObject*)__pyx_v_self));
  9506. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  9507. }
  9508. /* function exit code */
  9509. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9510. goto __pyx_L0;
  9511. __pyx_L1_error:;
  9512. __Pyx_XDECREF(__pyx_t_2);
  9513. __Pyx_AddTraceback("gevent.libev.corecext.io.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9514. __pyx_r = NULL;
  9515. __pyx_L0:;
  9516. __Pyx_XGIVEREF(__pyx_r);
  9517. __Pyx_RefNannyFinishContext();
  9518. return __pyx_r;
  9519. }
  9520. /* Python wrapper */
  9521. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  9522. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  9523. PyObject *__pyx_v_callback = 0;
  9524. PyObject *__pyx_v_pass_events = 0;
  9525. PyObject *__pyx_v_args = 0;
  9526. PyObject *__pyx_r = 0;
  9527. __Pyx_RefNannyDeclarations
  9528. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  9529. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  9530. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  9531. if (unlikely(!__pyx_v_args)) {
  9532. __Pyx_RefNannyFinishContext();
  9533. return NULL;
  9534. }
  9535. __Pyx_GOTREF(__pyx_v_args);
  9536. } else {
  9537. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  9538. }
  9539. {
  9540. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_pass_events,0};
  9541. PyObject* values[2] = {0,0};
  9542. values[1] = ((PyObject *)Py_False);
  9543. if (unlikely(__pyx_kwds)) {
  9544. Py_ssize_t kw_args;
  9545. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  9546. switch (pos_args) {
  9547. default:
  9548. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9549. case 0: break;
  9550. }
  9551. kw_args = PyDict_Size(__pyx_kwds);
  9552. switch (pos_args) {
  9553. case 0:
  9554. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  9555. else goto __pyx_L5_argtuple_error;
  9556. }
  9557. if (kw_args == 1) {
  9558. const Py_ssize_t index = 1;
  9559. PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
  9560. if (value) { values[index] = value; kw_args--; }
  9561. }
  9562. if (unlikely(kw_args > 0)) {
  9563. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  9564. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 800, __pyx_L3_error)
  9565. }
  9566. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  9567. goto __pyx_L5_argtuple_error;
  9568. } else {
  9569. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9570. }
  9571. __pyx_v_callback = values[0];
  9572. __pyx_v_pass_events = values[1];
  9573. }
  9574. goto __pyx_L4_argument_unpacking_done;
  9575. __pyx_L5_argtuple_error:;
  9576. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 800, __pyx_L3_error)
  9577. __pyx_L3_error:;
  9578. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  9579. __Pyx_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9580. __Pyx_RefNannyFinishContext();
  9581. return NULL;
  9582. __pyx_L4_argument_unpacking_done:;
  9583. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4start(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_pass_events, __pyx_v_args);
  9584. /* function exit code */
  9585. __Pyx_XDECREF(__pyx_v_args);
  9586. __Pyx_RefNannyFinishContext();
  9587. return __pyx_r;
  9588. }
  9589. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4start(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_pass_events, PyObject *__pyx_v_args) {
  9590. PyObject *__pyx_r = NULL;
  9591. __Pyx_RefNannyDeclarations
  9592. int __pyx_t_1;
  9593. PyObject *__pyx_t_2 = NULL;
  9594. int __pyx_t_3;
  9595. PyObject *__pyx_t_4 = NULL;
  9596. __Pyx_RefNannySetupContext("start", 0);
  9597. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  9598. if (__pyx_t_1) {
  9599. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9600. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9601. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
  9602. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9603. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9604. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
  9605. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9606. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9607. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
  9608. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9609. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9610. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
  9611. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9612. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9613. __Pyx_GOTREF(__pyx_t_2);
  9614. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9615. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9616. __PYX_ERR(0, 803, __pyx_L1_error)
  9617. }
  9618. __pyx_t_1 = (__pyx_v_callback == Py_None);
  9619. __pyx_t_3 = (__pyx_t_1 != 0);
  9620. if (__pyx_t_3) {
  9621. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9622. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9623. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  9624. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9625. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9626. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  9627. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9628. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9629. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  9630. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9631. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  9632. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  9633. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9634. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9635. __Pyx_GOTREF(__pyx_t_2);
  9636. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9637. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9638. __PYX_ERR(0, 805, __pyx_L1_error)
  9639. }
  9640. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  9641. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_pass_events); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
  9642. if (__pyx_t_3) {
  9643. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
  9644. __Pyx_GOTREF(__pyx_t_2);
  9645. __Pyx_INCREF(GEVENT_CORE_EVENTS);
  9646. __Pyx_GIVEREF(GEVENT_CORE_EVENTS);
  9647. PyTuple_SET_ITEM(__pyx_t_2, 0, GEVENT_CORE_EVENTS);
  9648. __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
  9649. __Pyx_GOTREF(__pyx_t_4);
  9650. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9651. __Pyx_GIVEREF(__pyx_t_4);
  9652. __Pyx_GOTREF(__pyx_v_self->args);
  9653. __Pyx_DECREF(__pyx_v_self->args);
  9654. __pyx_v_self->args = ((PyObject*)__pyx_t_4);
  9655. __pyx_t_4 = 0;
  9656. goto __pyx_L5;
  9657. }
  9658. /*else*/ {
  9659. __Pyx_INCREF(__pyx_v_args);
  9660. __Pyx_GIVEREF(__pyx_v_args);
  9661. __Pyx_GOTREF(__pyx_v_self->args);
  9662. __Pyx_DECREF(__pyx_v_self->args);
  9663. __pyx_v_self->args = __pyx_v_args;
  9664. }
  9665. __pyx_L5:;
  9666. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  9667. if (__pyx_t_3) {
  9668. ev_unref(__pyx_v_self->loop->_ptr);
  9669. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  9670. }
  9671. ev_io_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  9672. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  9673. if (__pyx_t_3) {
  9674. Py_INCREF(((PyObject*)__pyx_v_self));
  9675. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  9676. }
  9677. /* function exit code */
  9678. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9679. goto __pyx_L0;
  9680. __pyx_L1_error:;
  9681. __Pyx_XDECREF(__pyx_t_2);
  9682. __Pyx_XDECREF(__pyx_t_4);
  9683. __Pyx_AddTraceback("gevent.libev.corecext.io.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9684. __pyx_r = NULL;
  9685. __pyx_L0:;
  9686. __Pyx_XGIVEREF(__pyx_r);
  9687. __Pyx_RefNannyFinishContext();
  9688. return __pyx_r;
  9689. }
  9690. /* Python wrapper */
  9691. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  9692. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6active_1__get__(PyObject *__pyx_v_self) {
  9693. PyObject *__pyx_r = 0;
  9694. __Pyx_RefNannyDeclarations
  9695. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  9696. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6active___get__(((struct PyGeventIOObject *)__pyx_v_self));
  9697. /* function exit code */
  9698. __Pyx_RefNannyFinishContext();
  9699. return __pyx_r;
  9700. }
  9701. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6active___get__(struct PyGeventIOObject *__pyx_v_self) {
  9702. PyObject *__pyx_r = NULL;
  9703. __Pyx_RefNannyDeclarations
  9704. PyObject *__pyx_t_1 = NULL;
  9705. __Pyx_RefNannySetupContext("__get__", 0);
  9706. __Pyx_XDECREF(__pyx_r);
  9707. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  9708. __Pyx_INCREF(Py_True);
  9709. __pyx_t_1 = Py_True;
  9710. } else {
  9711. __Pyx_INCREF(Py_False);
  9712. __pyx_t_1 = Py_False;
  9713. }
  9714. __pyx_r = __pyx_t_1;
  9715. __pyx_t_1 = 0;
  9716. goto __pyx_L0;
  9717. /* function exit code */
  9718. __pyx_L0:;
  9719. __Pyx_XGIVEREF(__pyx_r);
  9720. __Pyx_RefNannyFinishContext();
  9721. return __pyx_r;
  9722. }
  9723. /* Python wrapper */
  9724. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  9725. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_7pending_1__get__(PyObject *__pyx_v_self) {
  9726. PyObject *__pyx_r = 0;
  9727. __Pyx_RefNannyDeclarations
  9728. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  9729. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_7pending___get__(((struct PyGeventIOObject *)__pyx_v_self));
  9730. /* function exit code */
  9731. __Pyx_RefNannyFinishContext();
  9732. return __pyx_r;
  9733. }
  9734. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_7pending___get__(struct PyGeventIOObject *__pyx_v_self) {
  9735. PyObject *__pyx_r = NULL;
  9736. __Pyx_RefNannyDeclarations
  9737. PyObject *__pyx_t_1 = NULL;
  9738. __Pyx_RefNannySetupContext("__get__", 0);
  9739. __Pyx_XDECREF(__pyx_r);
  9740. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  9741. __Pyx_INCREF(Py_True);
  9742. __pyx_t_1 = Py_True;
  9743. } else {
  9744. __Pyx_INCREF(Py_False);
  9745. __pyx_t_1 = Py_False;
  9746. }
  9747. __pyx_r = __pyx_t_1;
  9748. __pyx_t_1 = 0;
  9749. goto __pyx_L0;
  9750. /* function exit code */
  9751. __pyx_L0:;
  9752. __Pyx_XGIVEREF(__pyx_r);
  9753. __Pyx_RefNannyFinishContext();
  9754. return __pyx_r;
  9755. }
  9756. /* Python wrapper */
  9757. static int __pyx_pw_6gevent_5libev_8corecext_2io_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  9758. static int __pyx_pw_6gevent_5libev_8corecext_2io_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  9759. struct PyGeventLoopObject *__pyx_v_loop = 0;
  9760. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9761. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9762. vfd_socket_t __pyx_v_fd;
  9763. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9764. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9765. int __pyx_v_fd;
  9766. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9767. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9768. int __pyx_v_events;
  9769. PyObject *__pyx_v_ref = 0;
  9770. PyObject *__pyx_v_priority = 0;
  9771. int __pyx_r;
  9772. __Pyx_RefNannyDeclarations
  9773. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  9774. {
  9775. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_fd,&__pyx_n_s_events_2,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  9776. PyObject* values[5] = {0,0,0,0,0};
  9777. values[3] = ((PyObject *)Py_True);
  9778. values[4] = ((PyObject *)Py_None);
  9779. if (unlikely(__pyx_kwds)) {
  9780. Py_ssize_t kw_args;
  9781. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  9782. switch (pos_args) {
  9783. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  9784. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  9785. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  9786. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9787. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9788. case 0: break;
  9789. default: goto __pyx_L5_argtuple_error;
  9790. }
  9791. kw_args = PyDict_Size(__pyx_kwds);
  9792. switch (pos_args) {
  9793. case 0:
  9794. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  9795. else goto __pyx_L5_argtuple_error;
  9796. case 1:
  9797. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
  9798. else {
  9799. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9800. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9801. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 832, __pyx_L3_error)
  9802. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9803. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9804. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 848, __pyx_L3_error)
  9805. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9806. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9807. }
  9808. case 2:
  9809. if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_events_2)) != 0)) kw_args--;
  9810. else {
  9811. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9812. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9813. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 832, __pyx_L3_error)
  9814. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9815. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9816. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 848, __pyx_L3_error)
  9817. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9818. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9819. }
  9820. case 3:
  9821. if (kw_args > 0) {
  9822. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  9823. if (value) { values[3] = value; kw_args--; }
  9824. }
  9825. case 4:
  9826. if (kw_args > 0) {
  9827. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  9828. if (value) { values[4] = value; kw_args--; }
  9829. }
  9830. }
  9831. if (unlikely(kw_args > 0)) {
  9832. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9833. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9834. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 832, __pyx_L3_error)
  9835. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9836. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9837. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 848, __pyx_L3_error)
  9838. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9839. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9840. }
  9841. } else {
  9842. switch (PyTuple_GET_SIZE(__pyx_args)) {
  9843. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  9844. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  9845. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  9846. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9847. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9848. break;
  9849. default: goto __pyx_L5_argtuple_error;
  9850. }
  9851. }
  9852. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  9853. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9854. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9855. __pyx_v_fd = __Pyx_PyInt_As_vfd_socket_t(values[1]); if (unlikely((__pyx_v_fd == ((vfd_socket_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L3_error)
  9856. __pyx_v_events = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L3_error)
  9857. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9858. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9859. __pyx_v_fd = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L3_error)
  9860. __pyx_v_events = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L3_error)
  9861. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9862. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9863. __pyx_v_ref = values[3];
  9864. __pyx_v_priority = values[4];
  9865. }
  9866. goto __pyx_L4_argument_unpacking_done;
  9867. __pyx_L5_argtuple_error:;
  9868. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9869. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9870. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error)
  9871. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9872. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9873. __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error)
  9874. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9875. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9876. __pyx_L3_error:;
  9877. __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9878. __Pyx_RefNannyFinishContext();
  9879. return -1;
  9880. __pyx_L4_argument_unpacking_done:;
  9881. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9882. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9883. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 832, __pyx_L1_error)
  9884. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9885. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9886. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 848, __pyx_L1_error)
  9887. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9888. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9889. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6__init__(((struct PyGeventIOObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_fd, __pyx_v_events, __pyx_v_ref, __pyx_v_priority);
  9890. /* function exit code */
  9891. goto __pyx_L0;
  9892. __pyx_L1_error:;
  9893. __pyx_r = -1;
  9894. __pyx_L0:;
  9895. __Pyx_RefNannyFinishContext();
  9896. return __pyx_r;
  9897. }
  9898. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9899. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9900. static int __pyx_pf_6gevent_5libev_8corecext_2io_6__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, vfd_socket_t __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  9901. int __pyx_v_vfd;
  9902. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9903. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9904. static int __pyx_pf_6gevent_5libev_8corecext_2io_6__init__(struct PyGeventIOObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_fd, int __pyx_v_events, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  9905. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9906. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9907. int __pyx_r;
  9908. __Pyx_RefNannyDeclarations
  9909. int __pyx_t_1;
  9910. PyObject *__pyx_t_2 = NULL;
  9911. PyObject *__pyx_t_3 = NULL;
  9912. int __pyx_t_4;
  9913. int __pyx_t_5;
  9914. __Pyx_RefNannySetupContext("__init__", 0);
  9915. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9916. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9917. __pyx_t_1 = ((__pyx_v_events & (~((EV__IOFDSET | EV_READ) | EV_WRITE))) != 0);
  9918. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9919. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9920. __pyx_t_1 = ((__pyx_v_fd < 0) != 0);
  9921. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9922. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9923. if (__pyx_t_1) {
  9924. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9925. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9926. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
  9927. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9928. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9929. __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
  9930. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9931. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9932. __Pyx_GOTREF(__pyx_t_2);
  9933. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9934. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9935. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_event_mask_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  9936. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9937. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9938. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_fd_must_be_non_negative_r, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error)
  9939. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9940. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9941. __Pyx_GOTREF(__pyx_t_3);
  9942. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9943. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9944. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9945. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
  9946. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9947. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9948. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
  9949. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9950. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9951. __Pyx_GOTREF(__pyx_t_2);
  9952. __Pyx_GIVEREF(__pyx_t_3);
  9953. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  9954. __pyx_t_3 = 0;
  9955. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9956. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9957. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  9958. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9959. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9960. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error)
  9961. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9962. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9963. __Pyx_GOTREF(__pyx_t_3);
  9964. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9965. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  9966. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9967. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  9968. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  9969. __PYX_ERR(0, 834, __pyx_L1_error)
  9970. }
  9971. __pyx_t_4 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 835, __pyx_L1_error)
  9972. __pyx_v_vfd = __pyx_t_4;
  9973. vfd_free(__pyx_v_self->_watcher.fd);
  9974. ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_events);
  9975. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  9976. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  9977. __PYX_ERR(0, 850, __pyx_L1_error)
  9978. }
  9979. __pyx_t_1 = ((__pyx_v_events & (~((EV__IOFDSET | EV_READ) | EV_WRITE))) != 0);
  9980. if (__pyx_t_1) {
  9981. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error)
  9982. __Pyx_GOTREF(__pyx_t_3);
  9983. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_illegal_event_mask_r, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  9984. __Pyx_GOTREF(__pyx_t_2);
  9985. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9986. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error)
  9987. __Pyx_GOTREF(__pyx_t_3);
  9988. __Pyx_GIVEREF(__pyx_t_2);
  9989. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  9990. __pyx_t_2 = 0;
  9991. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  9992. __Pyx_GOTREF(__pyx_t_2);
  9993. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9994. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  9995. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9996. __PYX_ERR(0, 852, __pyx_L1_error)
  9997. }
  9998. ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_fd, __pyx_v_events);
  9999. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10000. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10001. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  10002. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  10003. __Pyx_GOTREF(__pyx_v_self->loop);
  10004. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  10005. __pyx_v_self->loop = __pyx_v_loop;
  10006. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10007. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10008. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 839, __pyx_L1_error)
  10009. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10010. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10011. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
  10012. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10013. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10014. if (__pyx_t_1) {
  10015. __pyx_v_self->_flags = 0;
  10016. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10017. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10018. goto __pyx_L4;
  10019. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10020. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10021. goto __pyx_L5;
  10022. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10023. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10024. }
  10025. /*else*/ {
  10026. __pyx_v_self->_flags = 4;
  10027. }
  10028. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10029. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10030. __pyx_L4:;
  10031. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10032. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10033. __pyx_L5:;
  10034. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10035. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10036. __pyx_t_1 = (__pyx_v_priority != Py_None);
  10037. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10038. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10039. __pyx_t_5 = (__pyx_t_1 != 0);
  10040. if (__pyx_t_5) {
  10041. __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error)
  10042. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_4);
  10043. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10044. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10045. __pyx_t_4 = (__pyx_t_1 != 0);
  10046. if (__pyx_t_4) {
  10047. __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error)
  10048. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_5);
  10049. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10050. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10051. }
  10052. /* function exit code */
  10053. __pyx_r = 0;
  10054. goto __pyx_L0;
  10055. __pyx_L1_error:;
  10056. __Pyx_XDECREF(__pyx_t_2);
  10057. __Pyx_XDECREF(__pyx_t_3);
  10058. __Pyx_AddTraceback("gevent.libev.corecext.io.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10059. __pyx_r = -1;
  10060. __pyx_L0:;
  10061. __Pyx_RefNannyFinishContext();
  10062. return __pyx_r;
  10063. }
  10064. /* Python wrapper */
  10065. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
  10066. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(PyObject *__pyx_v_self) {
  10067. PyObject *__pyx_r = 0;
  10068. __Pyx_RefNannyDeclarations
  10069. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10070. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10071. /* function exit code */
  10072. __Pyx_RefNannyFinishContext();
  10073. return __pyx_r;
  10074. }
  10075. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_2fd___get__(struct PyGeventIOObject *__pyx_v_self) {
  10076. PyObject *__pyx_r = NULL;
  10077. __Pyx_RefNannyDeclarations
  10078. PyObject *__pyx_t_1 = NULL;
  10079. __Pyx_RefNannySetupContext("__get__", 0);
  10080. __Pyx_XDECREF(__pyx_r);
  10081. __pyx_t_1 = __Pyx_PyInt_From_long(vfd_get(__pyx_v_self->_watcher.fd)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
  10082. __Pyx_GOTREF(__pyx_t_1);
  10083. __pyx_r = __pyx_t_1;
  10084. __pyx_t_1 = 0;
  10085. goto __pyx_L0;
  10086. /* function exit code */
  10087. __pyx_L1_error:;
  10088. __Pyx_XDECREF(__pyx_t_1);
  10089. __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10090. __pyx_r = NULL;
  10091. __pyx_L0:;
  10092. __Pyx_XGIVEREF(__pyx_r);
  10093. __Pyx_RefNannyFinishContext();
  10094. return __pyx_r;
  10095. }
  10096. /* Python wrapper */
  10097. static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd); /*proto*/
  10098. static int __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fd) {
  10099. long __pyx_v_fd;
  10100. int __pyx_r;
  10101. __Pyx_RefNannyDeclarations
  10102. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10103. assert(__pyx_arg_fd); {
  10104. __pyx_v_fd = __Pyx_PyInt_As_long(__pyx_arg_fd); if (unlikely((__pyx_v_fd == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 869, __pyx_L3_error)
  10105. }
  10106. goto __pyx_L4_argument_unpacking_done;
  10107. __pyx_L3_error:;
  10108. __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10109. __Pyx_RefNannyFinishContext();
  10110. return -1;
  10111. __pyx_L4_argument_unpacking_done:;
  10112. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((long)__pyx_v_fd));
  10113. /* function exit code */
  10114. __Pyx_RefNannyFinishContext();
  10115. return __pyx_r;
  10116. }
  10117. static int __pyx_pf_6gevent_5libev_8corecext_2io_2fd_2__set__(struct PyGeventIOObject *__pyx_v_self, long __pyx_v_fd) {
  10118. int __pyx_v_vfd;
  10119. int __pyx_r;
  10120. __Pyx_RefNannyDeclarations
  10121. int __pyx_t_1;
  10122. PyObject *__pyx_t_2 = NULL;
  10123. int __pyx_t_3;
  10124. __Pyx_RefNannySetupContext("__set__", 0);
  10125. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  10126. if (__pyx_t_1) {
  10127. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10128. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10129. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  10130. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10131. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10132. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  10133. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10134. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10135. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  10136. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10137. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10138. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  10139. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10140. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10141. __Pyx_GOTREF(__pyx_t_2);
  10142. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  10143. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10144. __PYX_ERR(0, 871, __pyx_L1_error)
  10145. }
  10146. __pyx_t_3 = vfd_open(__pyx_v_fd); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 872, __pyx_L1_error)
  10147. __pyx_v_vfd = __pyx_t_3;
  10148. vfd_free(__pyx_v_self->_watcher.fd);
  10149. ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_vfd, __pyx_v_self->_watcher.events);
  10150. /* function exit code */
  10151. __pyx_r = 0;
  10152. goto __pyx_L0;
  10153. __pyx_L1_error:;
  10154. __Pyx_XDECREF(__pyx_t_2);
  10155. __Pyx_AddTraceback("gevent.libev.corecext.io.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10156. __pyx_r = -1;
  10157. __pyx_L0:;
  10158. __Pyx_RefNannyFinishContext();
  10159. return __pyx_r;
  10160. }
  10161. /* Python wrapper */
  10162. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self); /*proto*/
  10163. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(PyObject *__pyx_v_self) {
  10164. PyObject *__pyx_r = 0;
  10165. __Pyx_RefNannyDeclarations
  10166. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10167. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10168. /* function exit code */
  10169. __Pyx_RefNannyFinishContext();
  10170. return __pyx_r;
  10171. }
  10172. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6events___get__(struct PyGeventIOObject *__pyx_v_self) {
  10173. PyObject *__pyx_r = NULL;
  10174. __Pyx_RefNannyDeclarations
  10175. PyObject *__pyx_t_1 = NULL;
  10176. __Pyx_RefNannySetupContext("__get__", 0);
  10177. __Pyx_XDECREF(__pyx_r);
  10178. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  10179. __Pyx_GOTREF(__pyx_t_1);
  10180. __pyx_r = __pyx_t_1;
  10181. __pyx_t_1 = 0;
  10182. goto __pyx_L0;
  10183. /* function exit code */
  10184. __pyx_L1_error:;
  10185. __Pyx_XDECREF(__pyx_t_1);
  10186. __Pyx_AddTraceback("gevent.libev.corecext.io.events.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10187. __pyx_r = NULL;
  10188. __pyx_L0:;
  10189. __Pyx_XGIVEREF(__pyx_r);
  10190. __Pyx_RefNannyFinishContext();
  10191. return __pyx_r;
  10192. }
  10193. /* Python wrapper */
  10194. static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events); /*proto*/
  10195. static int __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_events) {
  10196. int __pyx_v_events;
  10197. int __pyx_r;
  10198. __Pyx_RefNannyDeclarations
  10199. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10200. assert(__pyx_arg_events); {
  10201. __pyx_v_events = __Pyx_PyInt_As_int(__pyx_arg_events); if (unlikely((__pyx_v_events == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L3_error)
  10202. }
  10203. goto __pyx_L4_argument_unpacking_done;
  10204. __pyx_L3_error:;
  10205. __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10206. __Pyx_RefNannyFinishContext();
  10207. return -1;
  10208. __pyx_L4_argument_unpacking_done:;
  10209. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((int)__pyx_v_events));
  10210. /* function exit code */
  10211. __Pyx_RefNannyFinishContext();
  10212. return __pyx_r;
  10213. }
  10214. static int __pyx_pf_6gevent_5libev_8corecext_2io_6events_2__set__(struct PyGeventIOObject *__pyx_v_self, int __pyx_v_events) {
  10215. int __pyx_r;
  10216. __Pyx_RefNannyDeclarations
  10217. int __pyx_t_1;
  10218. PyObject *__pyx_t_2 = NULL;
  10219. __Pyx_RefNannySetupContext("__set__", 0);
  10220. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  10221. if (__pyx_t_1) {
  10222. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10223. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10224. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
  10225. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10226. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10227. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
  10228. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10229. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10230. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
  10231. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10232. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10233. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
  10234. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10235. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10236. __Pyx_GOTREF(__pyx_t_2);
  10237. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  10238. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10239. __PYX_ERR(0, 883, __pyx_L1_error)
  10240. }
  10241. ev_io_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_io), __pyx_v_self->_watcher.fd, __pyx_v_events);
  10242. /* function exit code */
  10243. __pyx_r = 0;
  10244. goto __pyx_L0;
  10245. __pyx_L1_error:;
  10246. __Pyx_XDECREF(__pyx_t_2);
  10247. __Pyx_AddTraceback("gevent.libev.corecext.io.events.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10248. __pyx_r = -1;
  10249. __pyx_L0:;
  10250. __Pyx_RefNannyFinishContext();
  10251. return __pyx_r;
  10252. }
  10253. /* Python wrapper */
  10254. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self); /*proto*/
  10255. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(PyObject *__pyx_v_self) {
  10256. PyObject *__pyx_r = 0;
  10257. __Pyx_RefNannyDeclarations
  10258. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10259. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10260. /* function exit code */
  10261. __Pyx_RefNannyFinishContext();
  10262. return __pyx_r;
  10263. }
  10264. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_10events_str___get__(struct PyGeventIOObject *__pyx_v_self) {
  10265. PyObject *__pyx_r = NULL;
  10266. __Pyx_RefNannyDeclarations
  10267. PyObject *__pyx_t_1 = NULL;
  10268. __Pyx_RefNannySetupContext("__get__", 0);
  10269. __Pyx_XDECREF(__pyx_r);
  10270. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__events_to_str(__pyx_v_self->_watcher.events, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
  10271. __Pyx_GOTREF(__pyx_t_1);
  10272. __pyx_r = __pyx_t_1;
  10273. __pyx_t_1 = 0;
  10274. goto __pyx_L0;
  10275. /* function exit code */
  10276. __pyx_L1_error:;
  10277. __Pyx_XDECREF(__pyx_t_1);
  10278. __Pyx_AddTraceback("gevent.libev.corecext.io.events_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10279. __pyx_r = NULL;
  10280. __pyx_L0:;
  10281. __Pyx_XGIVEREF(__pyx_r);
  10282. __Pyx_RefNannyFinishContext();
  10283. return __pyx_r;
  10284. }
  10285. /* Python wrapper */
  10286. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  10287. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  10288. PyObject *__pyx_r = 0;
  10289. __Pyx_RefNannyDeclarations
  10290. __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  10291. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_8_format(((struct PyGeventIOObject *)__pyx_v_self));
  10292. /* function exit code */
  10293. __Pyx_RefNannyFinishContext();
  10294. return __pyx_r;
  10295. }
  10296. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_8_format(struct PyGeventIOObject *__pyx_v_self) {
  10297. PyObject *__pyx_r = NULL;
  10298. __Pyx_RefNannyDeclarations
  10299. PyObject *__pyx_t_1 = NULL;
  10300. PyObject *__pyx_t_2 = NULL;
  10301. PyObject *__pyx_t_3 = NULL;
  10302. __Pyx_RefNannySetupContext("_format", 0);
  10303. __Pyx_XDECREF(__pyx_r);
  10304. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  10305. __Pyx_GOTREF(__pyx_t_1);
  10306. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_events_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
  10307. __Pyx_GOTREF(__pyx_t_2);
  10308. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
  10309. __Pyx_GOTREF(__pyx_t_3);
  10310. __Pyx_GIVEREF(__pyx_t_1);
  10311. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  10312. __Pyx_GIVEREF(__pyx_t_2);
  10313. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  10314. __pyx_t_1 = 0;
  10315. __pyx_t_2 = 0;
  10316. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_fd_s_events_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
  10317. __Pyx_GOTREF(__pyx_t_2);
  10318. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  10319. __pyx_r = __pyx_t_2;
  10320. __pyx_t_2 = 0;
  10321. goto __pyx_L0;
  10322. /* function exit code */
  10323. __pyx_L1_error:;
  10324. __Pyx_XDECREF(__pyx_t_1);
  10325. __Pyx_XDECREF(__pyx_t_2);
  10326. __Pyx_XDECREF(__pyx_t_3);
  10327. __Pyx_AddTraceback("gevent.libev.corecext.io._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10328. __pyx_r = NULL;
  10329. __pyx_L0:;
  10330. __Pyx_XGIVEREF(__pyx_r);
  10331. __Pyx_RefNannyFinishContext();
  10332. return __pyx_r;
  10333. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10334. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10335. }
  10336. /* Python wrapper */
  10337. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10338. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10339. static int __pyx_pw_6gevent_5libev_8corecext_2io_11__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  10340. static int __pyx_pw_6gevent_5libev_8corecext_2io_11__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  10341. int __pyx_r;
  10342. __Pyx_RefNannyDeclarations
  10343. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  10344. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  10345. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  10346. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  10347. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_10__cinit__(((struct PyGeventIOObject *)__pyx_v_self));
  10348. /* function exit code */
  10349. __Pyx_RefNannyFinishContext();
  10350. return __pyx_r;
  10351. }
  10352. static int __pyx_pf_6gevent_5libev_8corecext_2io_10__cinit__(struct PyGeventIOObject *__pyx_v_self) {
  10353. int __pyx_r;
  10354. __Pyx_RefNannyDeclarations
  10355. __Pyx_RefNannySetupContext("__cinit__", 0);
  10356. __pyx_v_self->_watcher.fd = -1;
  10357. /* function exit code */
  10358. __pyx_r = 0;
  10359. __Pyx_RefNannyFinishContext();
  10360. return __pyx_r;
  10361. }
  10362. /* Python wrapper */
  10363. static void __pyx_pw_6gevent_5libev_8corecext_2io_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
  10364. static void __pyx_pw_6gevent_5libev_8corecext_2io_13__dealloc__(PyObject *__pyx_v_self) {
  10365. __Pyx_RefNannyDeclarations
  10366. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  10367. __pyx_pf_6gevent_5libev_8corecext_2io_12__dealloc__(((struct PyGeventIOObject *)__pyx_v_self));
  10368. /* function exit code */
  10369. __Pyx_RefNannyFinishContext();
  10370. }
  10371. static void __pyx_pf_6gevent_5libev_8corecext_2io_12__dealloc__(struct PyGeventIOObject *__pyx_v_self) {
  10372. __Pyx_RefNannyDeclarations
  10373. __Pyx_RefNannySetupContext("__dealloc__", 0);
  10374. vfd_free(__pyx_v_self->_watcher.fd);
  10375. /* function exit code */
  10376. __Pyx_RefNannyFinishContext();
  10377. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10378. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10379. }
  10380. /* Python wrapper */
  10381. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10382. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10383. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  10384. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_4loop_1__get__(PyObject *__pyx_v_self) {
  10385. PyObject *__pyx_r = 0;
  10386. __Pyx_RefNannyDeclarations
  10387. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10388. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4loop___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10389. /* function exit code */
  10390. __Pyx_RefNannyFinishContext();
  10391. return __pyx_r;
  10392. }
  10393. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4loop___get__(struct PyGeventIOObject *__pyx_v_self) {
  10394. PyObject *__pyx_r = NULL;
  10395. __Pyx_RefNannyDeclarations
  10396. __Pyx_RefNannySetupContext("__get__", 0);
  10397. __Pyx_XDECREF(__pyx_r);
  10398. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  10399. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  10400. goto __pyx_L0;
  10401. /* function exit code */
  10402. __pyx_L0:;
  10403. __Pyx_XGIVEREF(__pyx_r);
  10404. __Pyx_RefNannyFinishContext();
  10405. return __pyx_r;
  10406. }
  10407. /* Python wrapper */
  10408. static int __pyx_pw_6gevent_5libev_8corecext_2io_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  10409. static int __pyx_pw_6gevent_5libev_8corecext_2io_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10410. int __pyx_r;
  10411. __Pyx_RefNannyDeclarations
  10412. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10413. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4loop_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  10414. /* function exit code */
  10415. __Pyx_RefNannyFinishContext();
  10416. return __pyx_r;
  10417. }
  10418. static int __pyx_pf_6gevent_5libev_8corecext_2io_4loop_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10419. int __pyx_r;
  10420. __Pyx_RefNannyDeclarations
  10421. PyObject *__pyx_t_1 = NULL;
  10422. __Pyx_RefNannySetupContext("__set__", 0);
  10423. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 723, __pyx_L1_error)
  10424. __pyx_t_1 = __pyx_v_value;
  10425. __Pyx_INCREF(__pyx_t_1);
  10426. __Pyx_GIVEREF(__pyx_t_1);
  10427. __Pyx_GOTREF(__pyx_v_self->loop);
  10428. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  10429. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  10430. __pyx_t_1 = 0;
  10431. /* function exit code */
  10432. __pyx_r = 0;
  10433. goto __pyx_L0;
  10434. __pyx_L1_error:;
  10435. __Pyx_XDECREF(__pyx_t_1);
  10436. __Pyx_AddTraceback("gevent.libev.corecext.io.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10437. __pyx_r = -1;
  10438. __pyx_L0:;
  10439. __Pyx_RefNannyFinishContext();
  10440. return __pyx_r;
  10441. }
  10442. /* Python wrapper */
  10443. static int __pyx_pw_6gevent_5libev_8corecext_2io_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  10444. static int __pyx_pw_6gevent_5libev_8corecext_2io_4loop_5__del__(PyObject *__pyx_v_self) {
  10445. int __pyx_r;
  10446. __Pyx_RefNannyDeclarations
  10447. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  10448. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4loop_4__del__(((struct PyGeventIOObject *)__pyx_v_self));
  10449. /* function exit code */
  10450. __Pyx_RefNannyFinishContext();
  10451. return __pyx_r;
  10452. }
  10453. static int __pyx_pf_6gevent_5libev_8corecext_2io_4loop_4__del__(struct PyGeventIOObject *__pyx_v_self) {
  10454. int __pyx_r;
  10455. __Pyx_RefNannyDeclarations
  10456. __Pyx_RefNannySetupContext("__del__", 0);
  10457. __Pyx_INCREF(Py_None);
  10458. __Pyx_GIVEREF(Py_None);
  10459. __Pyx_GOTREF(__pyx_v_self->loop);
  10460. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  10461. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  10462. /* function exit code */
  10463. __pyx_r = 0;
  10464. __Pyx_RefNannyFinishContext();
  10465. return __pyx_r;
  10466. }
  10467. /* Python wrapper */
  10468. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  10469. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_4args_1__get__(PyObject *__pyx_v_self) {
  10470. PyObject *__pyx_r = 0;
  10471. __Pyx_RefNannyDeclarations
  10472. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10473. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4args___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10474. /* function exit code */
  10475. __Pyx_RefNannyFinishContext();
  10476. return __pyx_r;
  10477. }
  10478. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_4args___get__(struct PyGeventIOObject *__pyx_v_self) {
  10479. PyObject *__pyx_r = NULL;
  10480. __Pyx_RefNannyDeclarations
  10481. __Pyx_RefNannySetupContext("__get__", 0);
  10482. __Pyx_XDECREF(__pyx_r);
  10483. __Pyx_INCREF(__pyx_v_self->args);
  10484. __pyx_r = __pyx_v_self->args;
  10485. goto __pyx_L0;
  10486. /* function exit code */
  10487. __pyx_L0:;
  10488. __Pyx_XGIVEREF(__pyx_r);
  10489. __Pyx_RefNannyFinishContext();
  10490. return __pyx_r;
  10491. }
  10492. /* Python wrapper */
  10493. static int __pyx_pw_6gevent_5libev_8corecext_2io_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  10494. static int __pyx_pw_6gevent_5libev_8corecext_2io_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10495. int __pyx_r;
  10496. __Pyx_RefNannyDeclarations
  10497. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10498. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4args_2__set__(((struct PyGeventIOObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  10499. /* function exit code */
  10500. __Pyx_RefNannyFinishContext();
  10501. return __pyx_r;
  10502. }
  10503. static int __pyx_pf_6gevent_5libev_8corecext_2io_4args_2__set__(struct PyGeventIOObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10504. int __pyx_r;
  10505. __Pyx_RefNannyDeclarations
  10506. PyObject *__pyx_t_1 = NULL;
  10507. __Pyx_RefNannySetupContext("__set__", 0);
  10508. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 725, __pyx_L1_error)
  10509. __pyx_t_1 = __pyx_v_value;
  10510. __Pyx_INCREF(__pyx_t_1);
  10511. __Pyx_GIVEREF(__pyx_t_1);
  10512. __Pyx_GOTREF(__pyx_v_self->args);
  10513. __Pyx_DECREF(__pyx_v_self->args);
  10514. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  10515. __pyx_t_1 = 0;
  10516. /* function exit code */
  10517. __pyx_r = 0;
  10518. goto __pyx_L0;
  10519. __pyx_L1_error:;
  10520. __Pyx_XDECREF(__pyx_t_1);
  10521. __Pyx_AddTraceback("gevent.libev.corecext.io.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10522. __pyx_r = -1;
  10523. __pyx_L0:;
  10524. __Pyx_RefNannyFinishContext();
  10525. return __pyx_r;
  10526. }
  10527. /* Python wrapper */
  10528. static int __pyx_pw_6gevent_5libev_8corecext_2io_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  10529. static int __pyx_pw_6gevent_5libev_8corecext_2io_4args_5__del__(PyObject *__pyx_v_self) {
  10530. int __pyx_r;
  10531. __Pyx_RefNannyDeclarations
  10532. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  10533. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_4args_4__del__(((struct PyGeventIOObject *)__pyx_v_self));
  10534. /* function exit code */
  10535. __Pyx_RefNannyFinishContext();
  10536. return __pyx_r;
  10537. }
  10538. static int __pyx_pf_6gevent_5libev_8corecext_2io_4args_4__del__(struct PyGeventIOObject *__pyx_v_self) {
  10539. int __pyx_r;
  10540. __Pyx_RefNannyDeclarations
  10541. __Pyx_RefNannySetupContext("__del__", 0);
  10542. __Pyx_INCREF(Py_None);
  10543. __Pyx_GIVEREF(Py_None);
  10544. __Pyx_GOTREF(__pyx_v_self->args);
  10545. __Pyx_DECREF(__pyx_v_self->args);
  10546. __pyx_v_self->args = ((PyObject*)Py_None);
  10547. /* function exit code */
  10548. __pyx_r = 0;
  10549. __Pyx_RefNannyFinishContext();
  10550. return __pyx_r;
  10551. }
  10552. /* Python wrapper */
  10553. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  10554. static PyObject *__pyx_pw_6gevent_5libev_8corecext_2io_6_flags_1__get__(PyObject *__pyx_v_self) {
  10555. PyObject *__pyx_r = 0;
  10556. __Pyx_RefNannyDeclarations
  10557. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10558. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_2io_6_flags___get__(((struct PyGeventIOObject *)__pyx_v_self));
  10559. /* function exit code */
  10560. __Pyx_RefNannyFinishContext();
  10561. return __pyx_r;
  10562. }
  10563. static PyObject *__pyx_pf_6gevent_5libev_8corecext_2io_6_flags___get__(struct PyGeventIOObject *__pyx_v_self) {
  10564. PyObject *__pyx_r = NULL;
  10565. __Pyx_RefNannyDeclarations
  10566. PyObject *__pyx_t_1 = NULL;
  10567. __Pyx_RefNannySetupContext("__get__", 0);
  10568. __Pyx_XDECREF(__pyx_r);
  10569. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
  10570. __Pyx_GOTREF(__pyx_t_1);
  10571. __pyx_r = __pyx_t_1;
  10572. __pyx_t_1 = 0;
  10573. goto __pyx_L0;
  10574. /* function exit code */
  10575. __pyx_L1_error:;
  10576. __Pyx_XDECREF(__pyx_t_1);
  10577. __Pyx_AddTraceback("gevent.libev.corecext.io._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10578. __pyx_r = NULL;
  10579. __pyx_L0:;
  10580. __Pyx_XGIVEREF(__pyx_r);
  10581. __Pyx_RefNannyFinishContext();
  10582. return __pyx_r;
  10583. }
  10584. /* Python wrapper */
  10585. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  10586. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_3ref_1__get__(PyObject *__pyx_v_self) {
  10587. PyObject *__pyx_r = 0;
  10588. __Pyx_RefNannyDeclarations
  10589. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10590. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_3ref___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  10591. /* function exit code */
  10592. __Pyx_RefNannyFinishContext();
  10593. return __pyx_r;
  10594. }
  10595. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_3ref___get__(struct PyGeventTimerObject *__pyx_v_self) {
  10596. PyObject *__pyx_r = NULL;
  10597. __Pyx_RefNannyDeclarations
  10598. PyObject *__pyx_t_1 = NULL;
  10599. __Pyx_RefNannySetupContext("__get__", 0);
  10600. __Pyx_XDECREF(__pyx_r);
  10601. if (((__pyx_v_self->_flags & 4) != 0)) {
  10602. __Pyx_INCREF(Py_False);
  10603. __pyx_t_1 = Py_False;
  10604. } else {
  10605. __Pyx_INCREF(Py_True);
  10606. __pyx_t_1 = Py_True;
  10607. }
  10608. __pyx_r = __pyx_t_1;
  10609. __pyx_t_1 = 0;
  10610. goto __pyx_L0;
  10611. /* function exit code */
  10612. __pyx_L0:;
  10613. __Pyx_XGIVEREF(__pyx_r);
  10614. __Pyx_RefNannyFinishContext();
  10615. return __pyx_r;
  10616. }
  10617. /* Python wrapper */
  10618. static int __pyx_pw_6gevent_5libev_8corecext_5timer_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  10619. static int __pyx_pw_6gevent_5libev_8corecext_5timer_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10620. int __pyx_r;
  10621. __Pyx_RefNannyDeclarations
  10622. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10623. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_3ref_2__set__(((struct PyGeventTimerObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  10624. /* function exit code */
  10625. __Pyx_RefNannyFinishContext();
  10626. return __pyx_r;
  10627. }
  10628. static int __pyx_pf_6gevent_5libev_8corecext_5timer_3ref_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value) {
  10629. int __pyx_r;
  10630. __Pyx_RefNannyDeclarations
  10631. int __pyx_t_1;
  10632. PyObject *__pyx_t_2 = NULL;
  10633. int __pyx_t_3;
  10634. __Pyx_RefNannySetupContext("__set__", 0);
  10635. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  10636. if (__pyx_t_1) {
  10637. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10638. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10639. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  10640. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10641. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10642. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  10643. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10644. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10645. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  10646. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10647. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10648. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  10649. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10650. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10651. __Pyx_GOTREF(__pyx_t_2);
  10652. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  10653. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10654. __PYX_ERR(0, 922, __pyx_L1_error)
  10655. }
  10656. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
  10657. if (__pyx_t_1) {
  10658. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  10659. if (__pyx_t_1) {
  10660. __pyx_r = 0;
  10661. goto __pyx_L0;
  10662. }
  10663. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  10664. if (__pyx_t_1) {
  10665. ev_ref(__pyx_v_self->loop->_ptr);
  10666. }
  10667. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  10668. goto __pyx_L4;
  10669. }
  10670. /*else*/ {
  10671. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  10672. if (__pyx_t_1) {
  10673. __pyx_r = 0;
  10674. goto __pyx_L0;
  10675. }
  10676. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  10677. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  10678. if (__pyx_t_3) {
  10679. } else {
  10680. __pyx_t_1 = __pyx_t_3;
  10681. goto __pyx_L9_bool_binop_done;
  10682. }
  10683. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  10684. __pyx_t_1 = __pyx_t_3;
  10685. __pyx_L9_bool_binop_done:;
  10686. if (__pyx_t_1) {
  10687. ev_unref(__pyx_v_self->loop->_ptr);
  10688. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  10689. }
  10690. }
  10691. __pyx_L4:;
  10692. /* function exit code */
  10693. __pyx_r = 0;
  10694. goto __pyx_L0;
  10695. __pyx_L1_error:;
  10696. __Pyx_XDECREF(__pyx_t_2);
  10697. __Pyx_AddTraceback("gevent.libev.corecext.timer.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10698. __pyx_r = -1;
  10699. __pyx_L0:;
  10700. __Pyx_RefNannyFinishContext();
  10701. return __pyx_r;
  10702. }
  10703. /* Python wrapper */
  10704. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  10705. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_8callback_1__get__(PyObject *__pyx_v_self) {
  10706. PyObject *__pyx_r = 0;
  10707. __Pyx_RefNannyDeclarations
  10708. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10709. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_8callback___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  10710. /* function exit code */
  10711. __Pyx_RefNannyFinishContext();
  10712. return __pyx_r;
  10713. }
  10714. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8callback___get__(struct PyGeventTimerObject *__pyx_v_self) {
  10715. PyObject *__pyx_r = NULL;
  10716. __Pyx_RefNannyDeclarations
  10717. __Pyx_RefNannySetupContext("__get__", 0);
  10718. __Pyx_XDECREF(__pyx_r);
  10719. __Pyx_INCREF(__pyx_v_self->_callback);
  10720. __pyx_r = __pyx_v_self->_callback;
  10721. goto __pyx_L0;
  10722. /* function exit code */
  10723. __pyx_L0:;
  10724. __Pyx_XGIVEREF(__pyx_r);
  10725. __Pyx_RefNannyFinishContext();
  10726. return __pyx_r;
  10727. }
  10728. /* Python wrapper */
  10729. static int __pyx_pw_6gevent_5libev_8corecext_5timer_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  10730. static int __pyx_pw_6gevent_5libev_8corecext_5timer_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  10731. int __pyx_r;
  10732. __Pyx_RefNannyDeclarations
  10733. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10734. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_8callback_2__set__(((struct PyGeventTimerObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  10735. /* function exit code */
  10736. __Pyx_RefNannyFinishContext();
  10737. return __pyx_r;
  10738. }
  10739. static int __pyx_pf_6gevent_5libev_8corecext_5timer_8callback_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  10740. int __pyx_r;
  10741. __Pyx_RefNannyDeclarations
  10742. int __pyx_t_1;
  10743. int __pyx_t_2;
  10744. int __pyx_t_3;
  10745. PyObject *__pyx_t_4 = NULL;
  10746. PyObject *__pyx_t_5 = NULL;
  10747. __Pyx_RefNannySetupContext("__set__", 0);
  10748. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  10749. if (__pyx_t_2) {
  10750. } else {
  10751. __pyx_t_1 = __pyx_t_2;
  10752. goto __pyx_L4_bool_binop_done;
  10753. }
  10754. __pyx_t_2 = (__pyx_v_callback != Py_None);
  10755. __pyx_t_3 = (__pyx_t_2 != 0);
  10756. __pyx_t_1 = __pyx_t_3;
  10757. __pyx_L4_bool_binop_done:;
  10758. if (__pyx_t_1) {
  10759. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error)
  10760. __Pyx_GOTREF(__pyx_t_4);
  10761. __Pyx_INCREF(__pyx_v_callback);
  10762. __Pyx_GIVEREF(__pyx_v_callback);
  10763. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  10764. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 944, __pyx_L1_error)
  10765. __Pyx_GOTREF(__pyx_t_5);
  10766. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10767. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error)
  10768. __Pyx_GOTREF(__pyx_t_4);
  10769. __Pyx_GIVEREF(__pyx_t_5);
  10770. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  10771. __pyx_t_5 = 0;
  10772. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 944, __pyx_L1_error)
  10773. __Pyx_GOTREF(__pyx_t_5);
  10774. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  10775. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  10776. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  10777. __PYX_ERR(0, 944, __pyx_L1_error)
  10778. }
  10779. __Pyx_INCREF(__pyx_v_callback);
  10780. __Pyx_GIVEREF(__pyx_v_callback);
  10781. __Pyx_GOTREF(__pyx_v_self->_callback);
  10782. __Pyx_DECREF(__pyx_v_self->_callback);
  10783. __pyx_v_self->_callback = __pyx_v_callback;
  10784. /* function exit code */
  10785. __pyx_r = 0;
  10786. goto __pyx_L0;
  10787. __pyx_L1_error:;
  10788. __Pyx_XDECREF(__pyx_t_4);
  10789. __Pyx_XDECREF(__pyx_t_5);
  10790. __Pyx_AddTraceback("gevent.libev.corecext.timer.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10791. __pyx_r = -1;
  10792. __pyx_L0:;
  10793. __Pyx_RefNannyFinishContext();
  10794. return __pyx_r;
  10795. }
  10796. /* Python wrapper */
  10797. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  10798. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  10799. PyObject *__pyx_r = 0;
  10800. __Pyx_RefNannyDeclarations
  10801. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  10802. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_stop(((struct PyGeventTimerObject *)__pyx_v_self));
  10803. /* function exit code */
  10804. __Pyx_RefNannyFinishContext();
  10805. return __pyx_r;
  10806. }
  10807. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_stop(struct PyGeventTimerObject *__pyx_v_self) {
  10808. PyObject *__pyx_r = NULL;
  10809. __Pyx_RefNannyDeclarations
  10810. int __pyx_t_1;
  10811. PyObject *__pyx_t_2 = NULL;
  10812. __Pyx_RefNannySetupContext("stop", 0);
  10813. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  10814. if (__pyx_t_1) {
  10815. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10816. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10817. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  10818. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10819. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10820. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  10821. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10822. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10823. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  10824. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10825. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10826. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  10827. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10828. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10829. __Pyx_GOTREF(__pyx_t_2);
  10830. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  10831. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10832. __PYX_ERR(0, 950, __pyx_L1_error)
  10833. }
  10834. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  10835. if (__pyx_t_1) {
  10836. ev_ref(__pyx_v_self->loop->_ptr);
  10837. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  10838. }
  10839. ev_timer_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  10840. __Pyx_INCREF(Py_None);
  10841. __Pyx_GIVEREF(Py_None);
  10842. __Pyx_GOTREF(__pyx_v_self->_callback);
  10843. __Pyx_DECREF(__pyx_v_self->_callback);
  10844. __pyx_v_self->_callback = Py_None;
  10845. __Pyx_INCREF(Py_None);
  10846. __Pyx_GIVEREF(Py_None);
  10847. __Pyx_GOTREF(__pyx_v_self->args);
  10848. __Pyx_DECREF(__pyx_v_self->args);
  10849. __pyx_v_self->args = ((PyObject*)Py_None);
  10850. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  10851. if (__pyx_t_1) {
  10852. Py_DECREF(((PyObject*)__pyx_v_self));
  10853. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  10854. }
  10855. /* function exit code */
  10856. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  10857. goto __pyx_L0;
  10858. __pyx_L1_error:;
  10859. __Pyx_XDECREF(__pyx_t_2);
  10860. __Pyx_AddTraceback("gevent.libev.corecext.timer.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10861. __pyx_r = NULL;
  10862. __pyx_L0:;
  10863. __Pyx_XGIVEREF(__pyx_r);
  10864. __Pyx_RefNannyFinishContext();
  10865. return __pyx_r;
  10866. }
  10867. /* Python wrapper */
  10868. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  10869. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_8priority_1__get__(PyObject *__pyx_v_self) {
  10870. PyObject *__pyx_r = 0;
  10871. __Pyx_RefNannyDeclarations
  10872. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  10873. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_8priority___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  10874. /* function exit code */
  10875. __Pyx_RefNannyFinishContext();
  10876. return __pyx_r;
  10877. }
  10878. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8priority___get__(struct PyGeventTimerObject *__pyx_v_self) {
  10879. PyObject *__pyx_r = NULL;
  10880. __Pyx_RefNannyDeclarations
  10881. PyObject *__pyx_t_1 = NULL;
  10882. __Pyx_RefNannySetupContext("__get__", 0);
  10883. __Pyx_XDECREF(__pyx_r);
  10884. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
  10885. __Pyx_GOTREF(__pyx_t_1);
  10886. __pyx_r = __pyx_t_1;
  10887. __pyx_t_1 = 0;
  10888. goto __pyx_L0;
  10889. /* function exit code */
  10890. __pyx_L1_error:;
  10891. __Pyx_XDECREF(__pyx_t_1);
  10892. __Pyx_AddTraceback("gevent.libev.corecext.timer.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10893. __pyx_r = NULL;
  10894. __pyx_L0:;
  10895. __Pyx_XGIVEREF(__pyx_r);
  10896. __Pyx_RefNannyFinishContext();
  10897. return __pyx_r;
  10898. }
  10899. /* Python wrapper */
  10900. static int __pyx_pw_6gevent_5libev_8corecext_5timer_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  10901. static int __pyx_pw_6gevent_5libev_8corecext_5timer_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  10902. int __pyx_v_priority;
  10903. int __pyx_r;
  10904. __Pyx_RefNannyDeclarations
  10905. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  10906. assert(__pyx_arg_priority); {
  10907. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 966, __pyx_L3_error)
  10908. }
  10909. goto __pyx_L4_argument_unpacking_done;
  10910. __pyx_L3_error:;
  10911. __Pyx_AddTraceback("gevent.libev.corecext.timer.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10912. __Pyx_RefNannyFinishContext();
  10913. return -1;
  10914. __pyx_L4_argument_unpacking_done:;
  10915. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_8priority_2__set__(((struct PyGeventTimerObject *)__pyx_v_self), ((int)__pyx_v_priority));
  10916. /* function exit code */
  10917. __Pyx_RefNannyFinishContext();
  10918. return __pyx_r;
  10919. }
  10920. static int __pyx_pf_6gevent_5libev_8corecext_5timer_8priority_2__set__(struct PyGeventTimerObject *__pyx_v_self, int __pyx_v_priority) {
  10921. int __pyx_r;
  10922. __Pyx_RefNannyDeclarations
  10923. int __pyx_t_1;
  10924. PyObject *__pyx_t_2 = NULL;
  10925. __Pyx_RefNannySetupContext("__set__", 0);
  10926. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  10927. if (__pyx_t_1) {
  10928. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10929. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10930. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  10931. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10932. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  10933. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  10934. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  10935. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10936. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  10937. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10938. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  10939. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  10940. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  10941. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  10942. __Pyx_GOTREF(__pyx_t_2);
  10943. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  10944. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  10945. __PYX_ERR(0, 968, __pyx_L1_error)
  10946. }
  10947. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  10948. /* function exit code */
  10949. __pyx_r = 0;
  10950. goto __pyx_L0;
  10951. __pyx_L1_error:;
  10952. __Pyx_XDECREF(__pyx_t_2);
  10953. __Pyx_AddTraceback("gevent.libev.corecext.timer.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10954. __pyx_r = -1;
  10955. __pyx_L0:;
  10956. __Pyx_RefNannyFinishContext();
  10957. return __pyx_r;
  10958. }
  10959. /* Python wrapper */
  10960. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  10961. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  10962. int __pyx_v_revents;
  10963. PyObject *__pyx_v_callback = 0;
  10964. PyObject *__pyx_v_args = 0;
  10965. PyObject *__pyx_r = 0;
  10966. __Pyx_RefNannyDeclarations
  10967. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  10968. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  10969. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  10970. if (unlikely(!__pyx_v_args)) {
  10971. __Pyx_RefNannyFinishContext();
  10972. return NULL;
  10973. }
  10974. __Pyx_GOTREF(__pyx_v_args);
  10975. } else {
  10976. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  10977. }
  10978. {
  10979. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  10980. PyObject* values[2] = {0,0};
  10981. if (unlikely(__pyx_kwds)) {
  10982. Py_ssize_t kw_args;
  10983. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  10984. switch (pos_args) {
  10985. default:
  10986. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  10987. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  10988. case 0: break;
  10989. }
  10990. kw_args = PyDict_Size(__pyx_kwds);
  10991. switch (pos_args) {
  10992. case 0:
  10993. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  10994. else goto __pyx_L5_argtuple_error;
  10995. case 1:
  10996. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  10997. else {
  10998. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 971, __pyx_L3_error)
  10999. }
  11000. }
  11001. if (unlikely(kw_args > 0)) {
  11002. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  11003. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 971, __pyx_L3_error)
  11004. }
  11005. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  11006. goto __pyx_L5_argtuple_error;
  11007. } else {
  11008. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11009. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  11010. }
  11011. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 971, __pyx_L3_error)
  11012. __pyx_v_callback = values[1];
  11013. }
  11014. goto __pyx_L4_argument_unpacking_done;
  11015. __pyx_L5_argtuple_error:;
  11016. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 971, __pyx_L3_error)
  11017. __pyx_L3_error:;
  11018. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  11019. __Pyx_AddTraceback("gevent.libev.corecext.timer.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11020. __Pyx_RefNannyFinishContext();
  11021. return NULL;
  11022. __pyx_L4_argument_unpacking_done:;
  11023. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2feed(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  11024. /* function exit code */
  11025. __Pyx_XDECREF(__pyx_v_args);
  11026. __Pyx_RefNannyFinishContext();
  11027. return __pyx_r;
  11028. }
  11029. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2feed(struct PyGeventTimerObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  11030. PyObject *__pyx_r = NULL;
  11031. __Pyx_RefNannyDeclarations
  11032. int __pyx_t_1;
  11033. PyObject *__pyx_t_2 = NULL;
  11034. __Pyx_RefNannySetupContext("feed", 0);
  11035. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  11036. if (__pyx_t_1) {
  11037. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11038. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11039. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  11040. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11041. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  11042. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  11043. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  11044. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11045. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  11046. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11047. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11048. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  11049. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11050. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11051. __Pyx_GOTREF(__pyx_t_2);
  11052. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  11053. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11054. __PYX_ERR(0, 974, __pyx_L1_error)
  11055. }
  11056. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 975, __pyx_L1_error)
  11057. __Pyx_INCREF(__pyx_v_args);
  11058. __Pyx_GIVEREF(__pyx_v_args);
  11059. __Pyx_GOTREF(__pyx_v_self->args);
  11060. __Pyx_DECREF(__pyx_v_self->args);
  11061. __pyx_v_self->args = __pyx_v_args;
  11062. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  11063. if (__pyx_t_1) {
  11064. ev_unref(__pyx_v_self->loop->_ptr);
  11065. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  11066. }
  11067. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  11068. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  11069. if (__pyx_t_1) {
  11070. Py_INCREF(((PyObject*)__pyx_v_self));
  11071. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  11072. }
  11073. /* function exit code */
  11074. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11075. goto __pyx_L0;
  11076. __pyx_L1_error:;
  11077. __Pyx_XDECREF(__pyx_t_2);
  11078. __Pyx_AddTraceback("gevent.libev.corecext.timer.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11079. __pyx_r = NULL;
  11080. __pyx_L0:;
  11081. __Pyx_XGIVEREF(__pyx_r);
  11082. __Pyx_RefNannyFinishContext();
  11083. return __pyx_r;
  11084. }
  11085. /* Python wrapper */
  11086. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  11087. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  11088. PyObject *__pyx_v_callback = 0;
  11089. PyObject *__pyx_v_update = 0;
  11090. PyObject *__pyx_v_args = 0;
  11091. PyObject *__pyx_r = 0;
  11092. __Pyx_RefNannyDeclarations
  11093. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  11094. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  11095. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  11096. if (unlikely(!__pyx_v_args)) {
  11097. __Pyx_RefNannyFinishContext();
  11098. return NULL;
  11099. }
  11100. __Pyx_GOTREF(__pyx_v_args);
  11101. } else {
  11102. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  11103. }
  11104. {
  11105. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_update,0};
  11106. PyObject* values[2] = {0,0};
  11107. values[1] = ((PyObject *)Py_True);
  11108. if (unlikely(__pyx_kwds)) {
  11109. Py_ssize_t kw_args;
  11110. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  11111. switch (pos_args) {
  11112. default:
  11113. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11114. case 0: break;
  11115. }
  11116. kw_args = PyDict_Size(__pyx_kwds);
  11117. switch (pos_args) {
  11118. case 0:
  11119. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  11120. else goto __pyx_L5_argtuple_error;
  11121. }
  11122. if (kw_args == 1) {
  11123. const Py_ssize_t index = 1;
  11124. PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
  11125. if (value) { values[index] = value; kw_args--; }
  11126. }
  11127. if (unlikely(kw_args > 0)) {
  11128. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  11129. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 985, __pyx_L3_error)
  11130. }
  11131. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  11132. goto __pyx_L5_argtuple_error;
  11133. } else {
  11134. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11135. }
  11136. __pyx_v_callback = values[0];
  11137. __pyx_v_update = values[1];
  11138. }
  11139. goto __pyx_L4_argument_unpacking_done;
  11140. __pyx_L5_argtuple_error:;
  11141. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 985, __pyx_L3_error)
  11142. __pyx_L3_error:;
  11143. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  11144. __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11145. __Pyx_RefNannyFinishContext();
  11146. return NULL;
  11147. __pyx_L4_argument_unpacking_done:;
  11148. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4start(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);
  11149. /* function exit code */
  11150. __Pyx_XDECREF(__pyx_v_args);
  11151. __Pyx_RefNannyFinishContext();
  11152. return __pyx_r;
  11153. }
  11154. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4start(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
  11155. PyObject *__pyx_r = NULL;
  11156. __Pyx_RefNannyDeclarations
  11157. int __pyx_t_1;
  11158. PyObject *__pyx_t_2 = NULL;
  11159. int __pyx_t_3;
  11160. __Pyx_RefNannySetupContext("start", 0);
  11161. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  11162. if (__pyx_t_1) {
  11163. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11164. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11165. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  11166. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11167. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  11168. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  11169. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  11170. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11171. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  11172. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11173. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11174. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  11175. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11176. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11177. __Pyx_GOTREF(__pyx_t_2);
  11178. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  11179. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11180. __PYX_ERR(0, 988, __pyx_L1_error)
  11181. }
  11182. __pyx_t_1 = (__pyx_v_callback == Py_None);
  11183. __pyx_t_3 = (__pyx_t_1 != 0);
  11184. if (__pyx_t_3) {
  11185. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11186. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11187. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
  11188. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11189. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  11190. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
  11191. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  11192. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11193. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
  11194. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11195. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11196. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
  11197. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11198. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11199. __Pyx_GOTREF(__pyx_t_2);
  11200. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  11201. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11202. __PYX_ERR(0, 990, __pyx_L1_error)
  11203. }
  11204. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
  11205. __Pyx_INCREF(__pyx_v_args);
  11206. __Pyx_GIVEREF(__pyx_v_args);
  11207. __Pyx_GOTREF(__pyx_v_self->args);
  11208. __Pyx_DECREF(__pyx_v_self->args);
  11209. __pyx_v_self->args = __pyx_v_args;
  11210. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  11211. if (__pyx_t_3) {
  11212. ev_unref(__pyx_v_self->loop->_ptr);
  11213. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  11214. }
  11215. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 996, __pyx_L1_error)
  11216. if (__pyx_t_3) {
  11217. ev_now_update(__pyx_v_self->loop->_ptr);
  11218. }
  11219. ev_timer_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  11220. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  11221. if (__pyx_t_3) {
  11222. Py_INCREF(((PyObject*)__pyx_v_self));
  11223. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  11224. }
  11225. /* function exit code */
  11226. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11227. goto __pyx_L0;
  11228. __pyx_L1_error:;
  11229. __Pyx_XDECREF(__pyx_t_2);
  11230. __Pyx_AddTraceback("gevent.libev.corecext.timer.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11231. __pyx_r = NULL;
  11232. __pyx_L0:;
  11233. __Pyx_XGIVEREF(__pyx_r);
  11234. __Pyx_RefNannyFinishContext();
  11235. return __pyx_r;
  11236. }
  11237. /* Python wrapper */
  11238. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  11239. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_6active_1__get__(PyObject *__pyx_v_self) {
  11240. PyObject *__pyx_r = 0;
  11241. __Pyx_RefNannyDeclarations
  11242. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11243. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_6active___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11244. /* function exit code */
  11245. __Pyx_RefNannyFinishContext();
  11246. return __pyx_r;
  11247. }
  11248. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6active___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11249. PyObject *__pyx_r = NULL;
  11250. __Pyx_RefNannyDeclarations
  11251. PyObject *__pyx_t_1 = NULL;
  11252. __Pyx_RefNannySetupContext("__get__", 0);
  11253. __Pyx_XDECREF(__pyx_r);
  11254. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  11255. __Pyx_INCREF(Py_True);
  11256. __pyx_t_1 = Py_True;
  11257. } else {
  11258. __Pyx_INCREF(Py_False);
  11259. __pyx_t_1 = Py_False;
  11260. }
  11261. __pyx_r = __pyx_t_1;
  11262. __pyx_t_1 = 0;
  11263. goto __pyx_L0;
  11264. /* function exit code */
  11265. __pyx_L0:;
  11266. __Pyx_XGIVEREF(__pyx_r);
  11267. __Pyx_RefNannyFinishContext();
  11268. return __pyx_r;
  11269. }
  11270. /* Python wrapper */
  11271. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  11272. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_7pending_1__get__(PyObject *__pyx_v_self) {
  11273. PyObject *__pyx_r = 0;
  11274. __Pyx_RefNannyDeclarations
  11275. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11276. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_7pending___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11277. /* function exit code */
  11278. __Pyx_RefNannyFinishContext();
  11279. return __pyx_r;
  11280. }
  11281. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_7pending___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11282. PyObject *__pyx_r = NULL;
  11283. __Pyx_RefNannyDeclarations
  11284. PyObject *__pyx_t_1 = NULL;
  11285. __Pyx_RefNannySetupContext("__get__", 0);
  11286. __Pyx_XDECREF(__pyx_r);
  11287. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  11288. __Pyx_INCREF(Py_True);
  11289. __pyx_t_1 = Py_True;
  11290. } else {
  11291. __Pyx_INCREF(Py_False);
  11292. __pyx_t_1 = Py_False;
  11293. }
  11294. __pyx_r = __pyx_t_1;
  11295. __pyx_t_1 = 0;
  11296. goto __pyx_L0;
  11297. /* function exit code */
  11298. __pyx_L0:;
  11299. __Pyx_XGIVEREF(__pyx_r);
  11300. __Pyx_RefNannyFinishContext();
  11301. return __pyx_r;
  11302. }
  11303. /* Python wrapper */
  11304. static int __pyx_pw_6gevent_5libev_8corecext_5timer_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  11305. static int __pyx_pw_6gevent_5libev_8corecext_5timer_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  11306. struct PyGeventLoopObject *__pyx_v_loop = 0;
  11307. double __pyx_v_after;
  11308. double __pyx_v_repeat;
  11309. PyObject *__pyx_v_ref = 0;
  11310. PyObject *__pyx_v_priority = 0;
  11311. int __pyx_r;
  11312. __Pyx_RefNannyDeclarations
  11313. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  11314. {
  11315. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_after,&__pyx_n_s_repeat,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  11316. PyObject* values[5] = {0,0,0,0,0};
  11317. values[3] = ((PyObject *)Py_True);
  11318. values[4] = ((PyObject *)Py_None);
  11319. if (unlikely(__pyx_kwds)) {
  11320. Py_ssize_t kw_args;
  11321. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  11322. switch (pos_args) {
  11323. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  11324. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  11325. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  11326. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  11327. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11328. case 0: break;
  11329. default: goto __pyx_L5_argtuple_error;
  11330. }
  11331. kw_args = PyDict_Size(__pyx_kwds);
  11332. switch (pos_args) {
  11333. case 0:
  11334. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  11335. else goto __pyx_L5_argtuple_error;
  11336. case 1:
  11337. if (kw_args > 0) {
  11338. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_after);
  11339. if (value) { values[1] = value; kw_args--; }
  11340. }
  11341. case 2:
  11342. if (kw_args > 0) {
  11343. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_repeat);
  11344. if (value) { values[2] = value; kw_args--; }
  11345. }
  11346. case 3:
  11347. if (kw_args > 0) {
  11348. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  11349. if (value) { values[3] = value; kw_args--; }
  11350. }
  11351. case 4:
  11352. if (kw_args > 0) {
  11353. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  11354. if (value) { values[4] = value; kw_args--; }
  11355. }
  11356. }
  11357. if (unlikely(kw_args > 0)) {
  11358. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1014, __pyx_L3_error)
  11359. }
  11360. } else {
  11361. switch (PyTuple_GET_SIZE(__pyx_args)) {
  11362. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  11363. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  11364. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  11365. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  11366. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11367. break;
  11368. default: goto __pyx_L5_argtuple_error;
  11369. }
  11370. }
  11371. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  11372. if (values[1]) {
  11373. __pyx_v_after = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_after == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L3_error)
  11374. } else {
  11375. __pyx_v_after = ((double)0.0);
  11376. }
  11377. if (values[2]) {
  11378. __pyx_v_repeat = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_repeat == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L3_error)
  11379. } else {
  11380. __pyx_v_repeat = ((double)0.0);
  11381. }
  11382. __pyx_v_ref = values[3];
  11383. __pyx_v_priority = values[4];
  11384. }
  11385. goto __pyx_L4_argument_unpacking_done;
  11386. __pyx_L5_argtuple_error:;
  11387. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1014, __pyx_L3_error)
  11388. __pyx_L3_error:;
  11389. __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11390. __Pyx_RefNannyFinishContext();
  11391. return -1;
  11392. __pyx_L4_argument_unpacking_done:;
  11393. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1014, __pyx_L1_error)
  11394. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_6__init__(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_after, __pyx_v_repeat, __pyx_v_ref, __pyx_v_priority);
  11395. /* function exit code */
  11396. goto __pyx_L0;
  11397. __pyx_L1_error:;
  11398. __pyx_r = -1;
  11399. __pyx_L0:;
  11400. __Pyx_RefNannyFinishContext();
  11401. return __pyx_r;
  11402. }
  11403. static int __pyx_pf_6gevent_5libev_8corecext_5timer_6__init__(struct PyGeventTimerObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, double __pyx_v_after, double __pyx_v_repeat, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  11404. int __pyx_r;
  11405. __Pyx_RefNannyDeclarations
  11406. int __pyx_t_1;
  11407. PyObject *__pyx_t_2 = NULL;
  11408. PyObject *__pyx_t_3 = NULL;
  11409. int __pyx_t_4;
  11410. int __pyx_t_5;
  11411. __Pyx_RefNannySetupContext("__init__", 0);
  11412. __pyx_t_1 = ((__pyx_v_repeat < 0.0) != 0);
  11413. if (__pyx_t_1) {
  11414. __pyx_t_2 = PyFloat_FromDouble(__pyx_v_repeat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
  11415. __Pyx_GOTREF(__pyx_t_2);
  11416. __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_repeat_must_be_positive_or_zero, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
  11417. __Pyx_GOTREF(__pyx_t_3);
  11418. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11419. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
  11420. __Pyx_GOTREF(__pyx_t_2);
  11421. __Pyx_GIVEREF(__pyx_t_3);
  11422. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  11423. __pyx_t_3 = 0;
  11424. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
  11425. __Pyx_GOTREF(__pyx_t_3);
  11426. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11427. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  11428. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  11429. __PYX_ERR(0, 1016, __pyx_L1_error)
  11430. }
  11431. ev_timer_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_timer), __pyx_v_after, __pyx_v_repeat);
  11432. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  11433. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  11434. __Pyx_GOTREF(__pyx_v_self->loop);
  11435. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  11436. __pyx_v_self->loop = __pyx_v_loop;
  11437. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
  11438. if (__pyx_t_1) {
  11439. __pyx_v_self->_flags = 0;
  11440. goto __pyx_L4;
  11441. }
  11442. /*else*/ {
  11443. __pyx_v_self->_flags = 4;
  11444. }
  11445. __pyx_L4:;
  11446. __pyx_t_1 = (__pyx_v_priority != Py_None);
  11447. __pyx_t_4 = (__pyx_t_1 != 0);
  11448. if (__pyx_t_4) {
  11449. __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L1_error)
  11450. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_5);
  11451. }
  11452. /* function exit code */
  11453. __pyx_r = 0;
  11454. goto __pyx_L0;
  11455. __pyx_L1_error:;
  11456. __Pyx_XDECREF(__pyx_t_2);
  11457. __Pyx_XDECREF(__pyx_t_3);
  11458. __Pyx_AddTraceback("gevent.libev.corecext.timer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11459. __pyx_r = -1;
  11460. __pyx_L0:;
  11461. __Pyx_RefNannyFinishContext();
  11462. return __pyx_r;
  11463. }
  11464. /* Python wrapper */
  11465. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self); /*proto*/
  11466. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(PyObject *__pyx_v_self) {
  11467. PyObject *__pyx_r = 0;
  11468. __Pyx_RefNannyDeclarations
  11469. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11470. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11471. /* function exit code */
  11472. __Pyx_RefNannyFinishContext();
  11473. return __pyx_r;
  11474. }
  11475. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_2at___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11476. PyObject *__pyx_r = NULL;
  11477. __Pyx_RefNannyDeclarations
  11478. PyObject *__pyx_t_1 = NULL;
  11479. __Pyx_RefNannySetupContext("__get__", 0);
  11480. __Pyx_XDECREF(__pyx_r);
  11481. __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.at); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  11482. __Pyx_GOTREF(__pyx_t_1);
  11483. __pyx_r = __pyx_t_1;
  11484. __pyx_t_1 = 0;
  11485. goto __pyx_L0;
  11486. /* function exit code */
  11487. __pyx_L1_error:;
  11488. __Pyx_XDECREF(__pyx_t_1);
  11489. __Pyx_AddTraceback("gevent.libev.corecext.timer.at.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11490. __pyx_r = NULL;
  11491. __pyx_L0:;
  11492. __Pyx_XGIVEREF(__pyx_r);
  11493. __Pyx_RefNannyFinishContext();
  11494. return __pyx_r;
  11495. }
  11496. /* Python wrapper */
  11497. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_9again(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  11498. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_9again(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  11499. PyObject *__pyx_v_callback = 0;
  11500. PyObject *__pyx_v_update = 0;
  11501. PyObject *__pyx_v_args = 0;
  11502. PyObject *__pyx_r = 0;
  11503. __Pyx_RefNannyDeclarations
  11504. __Pyx_RefNannySetupContext("again (wrapper)", 0);
  11505. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  11506. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  11507. if (unlikely(!__pyx_v_args)) {
  11508. __Pyx_RefNannyFinishContext();
  11509. return NULL;
  11510. }
  11511. __Pyx_GOTREF(__pyx_v_args);
  11512. } else {
  11513. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  11514. }
  11515. {
  11516. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_update,0};
  11517. PyObject* values[2] = {0,0};
  11518. values[1] = ((PyObject *)Py_True);
  11519. if (unlikely(__pyx_kwds)) {
  11520. Py_ssize_t kw_args;
  11521. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  11522. switch (pos_args) {
  11523. default:
  11524. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11525. case 0: break;
  11526. }
  11527. kw_args = PyDict_Size(__pyx_kwds);
  11528. switch (pos_args) {
  11529. case 0:
  11530. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  11531. else goto __pyx_L5_argtuple_error;
  11532. }
  11533. if (kw_args == 1) {
  11534. const Py_ssize_t index = 1;
  11535. PyObject* value = PyDict_GetItem(__pyx_kwds, *__pyx_pyargnames[index]);
  11536. if (value) { values[index] = value; kw_args--; }
  11537. }
  11538. if (unlikely(kw_args > 0)) {
  11539. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  11540. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "again") < 0)) __PYX_ERR(0, 1033, __pyx_L3_error)
  11541. }
  11542. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  11543. goto __pyx_L5_argtuple_error;
  11544. } else {
  11545. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  11546. }
  11547. __pyx_v_callback = values[0];
  11548. __pyx_v_update = values[1];
  11549. }
  11550. goto __pyx_L4_argument_unpacking_done;
  11551. __pyx_L5_argtuple_error:;
  11552. __Pyx_RaiseArgtupleInvalid("again", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1033, __pyx_L3_error)
  11553. __pyx_L3_error:;
  11554. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  11555. __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11556. __Pyx_RefNannyFinishContext();
  11557. return NULL;
  11558. __pyx_L4_argument_unpacking_done:;
  11559. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_8again(((struct PyGeventTimerObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_update, __pyx_v_args);
  11560. /* function exit code */
  11561. __Pyx_XDECREF(__pyx_v_args);
  11562. __Pyx_RefNannyFinishContext();
  11563. return __pyx_r;
  11564. }
  11565. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_8again(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_update, PyObject *__pyx_v_args) {
  11566. PyObject *__pyx_r = NULL;
  11567. __Pyx_RefNannyDeclarations
  11568. int __pyx_t_1;
  11569. PyObject *__pyx_t_2 = NULL;
  11570. __Pyx_RefNannySetupContext("again", 0);
  11571. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  11572. if (__pyx_t_1) {
  11573. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11574. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11575. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  11576. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11577. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  11578. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  11579. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  11580. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11581. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  11582. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11583. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11584. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  11585. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11586. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11587. __Pyx_GOTREF(__pyx_t_2);
  11588. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  11589. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11590. __PYX_ERR(0, 1036, __pyx_L1_error)
  11591. }
  11592. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  11593. __Pyx_INCREF(__pyx_v_args);
  11594. __Pyx_GIVEREF(__pyx_v_args);
  11595. __Pyx_GOTREF(__pyx_v_self->args);
  11596. __Pyx_DECREF(__pyx_v_self->args);
  11597. __pyx_v_self->args = __pyx_v_args;
  11598. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  11599. if (__pyx_t_1) {
  11600. ev_unref(__pyx_v_self->loop->_ptr);
  11601. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  11602. }
  11603. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_update); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1042, __pyx_L1_error)
  11604. if (__pyx_t_1) {
  11605. ev_now_update(__pyx_v_self->loop->_ptr);
  11606. }
  11607. ev_timer_again(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  11608. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  11609. if (__pyx_t_1) {
  11610. Py_INCREF(((PyObject*)__pyx_v_self));
  11611. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  11612. }
  11613. /* function exit code */
  11614. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  11615. goto __pyx_L0;
  11616. __pyx_L1_error:;
  11617. __Pyx_XDECREF(__pyx_t_2);
  11618. __Pyx_AddTraceback("gevent.libev.corecext.timer.again", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11619. __pyx_r = NULL;
  11620. __pyx_L0:;
  11621. __Pyx_XGIVEREF(__pyx_r);
  11622. __Pyx_RefNannyFinishContext();
  11623. return __pyx_r;
  11624. }
  11625. /* Python wrapper */
  11626. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  11627. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_4loop_1__get__(PyObject *__pyx_v_self) {
  11628. PyObject *__pyx_r = 0;
  11629. __Pyx_RefNannyDeclarations
  11630. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11631. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4loop___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11632. /* function exit code */
  11633. __Pyx_RefNannyFinishContext();
  11634. return __pyx_r;
  11635. }
  11636. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4loop___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11637. PyObject *__pyx_r = NULL;
  11638. __Pyx_RefNannyDeclarations
  11639. __Pyx_RefNannySetupContext("__get__", 0);
  11640. __Pyx_XDECREF(__pyx_r);
  11641. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  11642. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  11643. goto __pyx_L0;
  11644. /* function exit code */
  11645. __pyx_L0:;
  11646. __Pyx_XGIVEREF(__pyx_r);
  11647. __Pyx_RefNannyFinishContext();
  11648. return __pyx_r;
  11649. }
  11650. /* Python wrapper */
  11651. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  11652. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11653. int __pyx_r;
  11654. __Pyx_RefNannyDeclarations
  11655. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  11656. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_2__set__(((struct PyGeventTimerObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  11657. /* function exit code */
  11658. __Pyx_RefNannyFinishContext();
  11659. return __pyx_r;
  11660. }
  11661. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11662. int __pyx_r;
  11663. __Pyx_RefNannyDeclarations
  11664. PyObject *__pyx_t_1 = NULL;
  11665. __Pyx_RefNannySetupContext("__set__", 0);
  11666. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 908, __pyx_L1_error)
  11667. __pyx_t_1 = __pyx_v_value;
  11668. __Pyx_INCREF(__pyx_t_1);
  11669. __Pyx_GIVEREF(__pyx_t_1);
  11670. __Pyx_GOTREF(__pyx_v_self->loop);
  11671. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  11672. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  11673. __pyx_t_1 = 0;
  11674. /* function exit code */
  11675. __pyx_r = 0;
  11676. goto __pyx_L0;
  11677. __pyx_L1_error:;
  11678. __Pyx_XDECREF(__pyx_t_1);
  11679. __Pyx_AddTraceback("gevent.libev.corecext.timer.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11680. __pyx_r = -1;
  11681. __pyx_L0:;
  11682. __Pyx_RefNannyFinishContext();
  11683. return __pyx_r;
  11684. }
  11685. /* Python wrapper */
  11686. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  11687. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_5__del__(PyObject *__pyx_v_self) {
  11688. int __pyx_r;
  11689. __Pyx_RefNannyDeclarations
  11690. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  11691. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_4__del__(((struct PyGeventTimerObject *)__pyx_v_self));
  11692. /* function exit code */
  11693. __Pyx_RefNannyFinishContext();
  11694. return __pyx_r;
  11695. }
  11696. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4loop_4__del__(struct PyGeventTimerObject *__pyx_v_self) {
  11697. int __pyx_r;
  11698. __Pyx_RefNannyDeclarations
  11699. __Pyx_RefNannySetupContext("__del__", 0);
  11700. __Pyx_INCREF(Py_None);
  11701. __Pyx_GIVEREF(Py_None);
  11702. __Pyx_GOTREF(__pyx_v_self->loop);
  11703. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  11704. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  11705. /* function exit code */
  11706. __pyx_r = 0;
  11707. __Pyx_RefNannyFinishContext();
  11708. return __pyx_r;
  11709. }
  11710. /* Python wrapper */
  11711. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  11712. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_4args_1__get__(PyObject *__pyx_v_self) {
  11713. PyObject *__pyx_r = 0;
  11714. __Pyx_RefNannyDeclarations
  11715. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11716. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4args___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11717. /* function exit code */
  11718. __Pyx_RefNannyFinishContext();
  11719. return __pyx_r;
  11720. }
  11721. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_4args___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11722. PyObject *__pyx_r = NULL;
  11723. __Pyx_RefNannyDeclarations
  11724. __Pyx_RefNannySetupContext("__get__", 0);
  11725. __Pyx_XDECREF(__pyx_r);
  11726. __Pyx_INCREF(__pyx_v_self->args);
  11727. __pyx_r = __pyx_v_self->args;
  11728. goto __pyx_L0;
  11729. /* function exit code */
  11730. __pyx_L0:;
  11731. __Pyx_XGIVEREF(__pyx_r);
  11732. __Pyx_RefNannyFinishContext();
  11733. return __pyx_r;
  11734. }
  11735. /* Python wrapper */
  11736. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  11737. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11738. int __pyx_r;
  11739. __Pyx_RefNannyDeclarations
  11740. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  11741. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4args_2__set__(((struct PyGeventTimerObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  11742. /* function exit code */
  11743. __Pyx_RefNannyFinishContext();
  11744. return __pyx_r;
  11745. }
  11746. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4args_2__set__(struct PyGeventTimerObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11747. int __pyx_r;
  11748. __Pyx_RefNannyDeclarations
  11749. PyObject *__pyx_t_1 = NULL;
  11750. __Pyx_RefNannySetupContext("__set__", 0);
  11751. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 910, __pyx_L1_error)
  11752. __pyx_t_1 = __pyx_v_value;
  11753. __Pyx_INCREF(__pyx_t_1);
  11754. __Pyx_GIVEREF(__pyx_t_1);
  11755. __Pyx_GOTREF(__pyx_v_self->args);
  11756. __Pyx_DECREF(__pyx_v_self->args);
  11757. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  11758. __pyx_t_1 = 0;
  11759. /* function exit code */
  11760. __pyx_r = 0;
  11761. goto __pyx_L0;
  11762. __pyx_L1_error:;
  11763. __Pyx_XDECREF(__pyx_t_1);
  11764. __Pyx_AddTraceback("gevent.libev.corecext.timer.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11765. __pyx_r = -1;
  11766. __pyx_L0:;
  11767. __Pyx_RefNannyFinishContext();
  11768. return __pyx_r;
  11769. }
  11770. /* Python wrapper */
  11771. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  11772. static int __pyx_pw_6gevent_5libev_8corecext_5timer_4args_5__del__(PyObject *__pyx_v_self) {
  11773. int __pyx_r;
  11774. __Pyx_RefNannyDeclarations
  11775. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  11776. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_4args_4__del__(((struct PyGeventTimerObject *)__pyx_v_self));
  11777. /* function exit code */
  11778. __Pyx_RefNannyFinishContext();
  11779. return __pyx_r;
  11780. }
  11781. static int __pyx_pf_6gevent_5libev_8corecext_5timer_4args_4__del__(struct PyGeventTimerObject *__pyx_v_self) {
  11782. int __pyx_r;
  11783. __Pyx_RefNannyDeclarations
  11784. __Pyx_RefNannySetupContext("__del__", 0);
  11785. __Pyx_INCREF(Py_None);
  11786. __Pyx_GIVEREF(Py_None);
  11787. __Pyx_GOTREF(__pyx_v_self->args);
  11788. __Pyx_DECREF(__pyx_v_self->args);
  11789. __pyx_v_self->args = ((PyObject*)Py_None);
  11790. /* function exit code */
  11791. __pyx_r = 0;
  11792. __Pyx_RefNannyFinishContext();
  11793. return __pyx_r;
  11794. }
  11795. /* Python wrapper */
  11796. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  11797. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5timer_6_flags_1__get__(PyObject *__pyx_v_self) {
  11798. PyObject *__pyx_r = 0;
  11799. __Pyx_RefNannyDeclarations
  11800. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11801. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5timer_6_flags___get__(((struct PyGeventTimerObject *)__pyx_v_self));
  11802. /* function exit code */
  11803. __Pyx_RefNannyFinishContext();
  11804. return __pyx_r;
  11805. }
  11806. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5timer_6_flags___get__(struct PyGeventTimerObject *__pyx_v_self) {
  11807. PyObject *__pyx_r = NULL;
  11808. __Pyx_RefNannyDeclarations
  11809. PyObject *__pyx_t_1 = NULL;
  11810. __Pyx_RefNannySetupContext("__get__", 0);
  11811. __Pyx_XDECREF(__pyx_r);
  11812. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  11813. __Pyx_GOTREF(__pyx_t_1);
  11814. __pyx_r = __pyx_t_1;
  11815. __pyx_t_1 = 0;
  11816. goto __pyx_L0;
  11817. /* function exit code */
  11818. __pyx_L1_error:;
  11819. __Pyx_XDECREF(__pyx_t_1);
  11820. __Pyx_AddTraceback("gevent.libev.corecext.timer._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11821. __pyx_r = NULL;
  11822. __pyx_L0:;
  11823. __Pyx_XGIVEREF(__pyx_r);
  11824. __Pyx_RefNannyFinishContext();
  11825. return __pyx_r;
  11826. }
  11827. /* Python wrapper */
  11828. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  11829. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_3ref_1__get__(PyObject *__pyx_v_self) {
  11830. PyObject *__pyx_r = 0;
  11831. __Pyx_RefNannyDeclarations
  11832. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11833. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_3ref___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  11834. /* function exit code */
  11835. __Pyx_RefNannyFinishContext();
  11836. return __pyx_r;
  11837. }
  11838. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_3ref___get__(struct PyGeventSignalObject *__pyx_v_self) {
  11839. PyObject *__pyx_r = NULL;
  11840. __Pyx_RefNannyDeclarations
  11841. PyObject *__pyx_t_1 = NULL;
  11842. __Pyx_RefNannySetupContext("__get__", 0);
  11843. __Pyx_XDECREF(__pyx_r);
  11844. if (((__pyx_v_self->_flags & 4) != 0)) {
  11845. __Pyx_INCREF(Py_False);
  11846. __pyx_t_1 = Py_False;
  11847. } else {
  11848. __Pyx_INCREF(Py_True);
  11849. __pyx_t_1 = Py_True;
  11850. }
  11851. __pyx_r = __pyx_t_1;
  11852. __pyx_t_1 = 0;
  11853. goto __pyx_L0;
  11854. /* function exit code */
  11855. __pyx_L0:;
  11856. __Pyx_XGIVEREF(__pyx_r);
  11857. __Pyx_RefNannyFinishContext();
  11858. return __pyx_r;
  11859. }
  11860. /* Python wrapper */
  11861. static int __pyx_pw_6gevent_5libev_8corecext_6signal_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  11862. static int __pyx_pw_6gevent_5libev_8corecext_6signal_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11863. int __pyx_r;
  11864. __Pyx_RefNannyDeclarations
  11865. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  11866. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_3ref_2__set__(((struct PyGeventSignalObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  11867. /* function exit code */
  11868. __Pyx_RefNannyFinishContext();
  11869. return __pyx_r;
  11870. }
  11871. static int __pyx_pf_6gevent_5libev_8corecext_6signal_3ref_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value) {
  11872. int __pyx_r;
  11873. __Pyx_RefNannyDeclarations
  11874. int __pyx_t_1;
  11875. PyObject *__pyx_t_2 = NULL;
  11876. int __pyx_t_3;
  11877. __Pyx_RefNannySetupContext("__set__", 0);
  11878. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  11879. if (__pyx_t_1) {
  11880. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11881. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11882. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  11883. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11884. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  11885. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  11886. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  11887. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11888. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  11889. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11890. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  11891. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  11892. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  11893. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  11894. __Pyx_GOTREF(__pyx_t_2);
  11895. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  11896. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  11897. __PYX_ERR(0, 1067, __pyx_L1_error)
  11898. }
  11899. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1068, __pyx_L1_error)
  11900. if (__pyx_t_1) {
  11901. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  11902. if (__pyx_t_1) {
  11903. __pyx_r = 0;
  11904. goto __pyx_L0;
  11905. }
  11906. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  11907. if (__pyx_t_1) {
  11908. ev_ref(__pyx_v_self->loop->_ptr);
  11909. }
  11910. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  11911. goto __pyx_L4;
  11912. }
  11913. /*else*/ {
  11914. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  11915. if (__pyx_t_1) {
  11916. __pyx_r = 0;
  11917. goto __pyx_L0;
  11918. }
  11919. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  11920. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  11921. if (__pyx_t_3) {
  11922. } else {
  11923. __pyx_t_1 = __pyx_t_3;
  11924. goto __pyx_L9_bool_binop_done;
  11925. }
  11926. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  11927. __pyx_t_1 = __pyx_t_3;
  11928. __pyx_L9_bool_binop_done:;
  11929. if (__pyx_t_1) {
  11930. ev_unref(__pyx_v_self->loop->_ptr);
  11931. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  11932. }
  11933. }
  11934. __pyx_L4:;
  11935. /* function exit code */
  11936. __pyx_r = 0;
  11937. goto __pyx_L0;
  11938. __pyx_L1_error:;
  11939. __Pyx_XDECREF(__pyx_t_2);
  11940. __Pyx_AddTraceback("gevent.libev.corecext.signal.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11941. __pyx_r = -1;
  11942. __pyx_L0:;
  11943. __Pyx_RefNannyFinishContext();
  11944. return __pyx_r;
  11945. }
  11946. /* Python wrapper */
  11947. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  11948. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_8callback_1__get__(PyObject *__pyx_v_self) {
  11949. PyObject *__pyx_r = 0;
  11950. __Pyx_RefNannyDeclarations
  11951. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  11952. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_8callback___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  11953. /* function exit code */
  11954. __Pyx_RefNannyFinishContext();
  11955. return __pyx_r;
  11956. }
  11957. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_8callback___get__(struct PyGeventSignalObject *__pyx_v_self) {
  11958. PyObject *__pyx_r = NULL;
  11959. __Pyx_RefNannyDeclarations
  11960. __Pyx_RefNannySetupContext("__get__", 0);
  11961. __Pyx_XDECREF(__pyx_r);
  11962. __Pyx_INCREF(__pyx_v_self->_callback);
  11963. __pyx_r = __pyx_v_self->_callback;
  11964. goto __pyx_L0;
  11965. /* function exit code */
  11966. __pyx_L0:;
  11967. __Pyx_XGIVEREF(__pyx_r);
  11968. __Pyx_RefNannyFinishContext();
  11969. return __pyx_r;
  11970. }
  11971. /* Python wrapper */
  11972. static int __pyx_pw_6gevent_5libev_8corecext_6signal_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  11973. static int __pyx_pw_6gevent_5libev_8corecext_6signal_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  11974. int __pyx_r;
  11975. __Pyx_RefNannyDeclarations
  11976. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  11977. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_8callback_2__set__(((struct PyGeventSignalObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  11978. /* function exit code */
  11979. __Pyx_RefNannyFinishContext();
  11980. return __pyx_r;
  11981. }
  11982. static int __pyx_pf_6gevent_5libev_8corecext_6signal_8callback_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  11983. int __pyx_r;
  11984. __Pyx_RefNannyDeclarations
  11985. int __pyx_t_1;
  11986. int __pyx_t_2;
  11987. int __pyx_t_3;
  11988. PyObject *__pyx_t_4 = NULL;
  11989. PyObject *__pyx_t_5 = NULL;
  11990. __Pyx_RefNannySetupContext("__set__", 0);
  11991. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  11992. if (__pyx_t_2) {
  11993. } else {
  11994. __pyx_t_1 = __pyx_t_2;
  11995. goto __pyx_L4_bool_binop_done;
  11996. }
  11997. __pyx_t_2 = (__pyx_v_callback != Py_None);
  11998. __pyx_t_3 = (__pyx_t_2 != 0);
  11999. __pyx_t_1 = __pyx_t_3;
  12000. __pyx_L4_bool_binop_done:;
  12001. if (__pyx_t_1) {
  12002. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1089, __pyx_L1_error)
  12003. __Pyx_GOTREF(__pyx_t_4);
  12004. __Pyx_INCREF(__pyx_v_callback);
  12005. __Pyx_GIVEREF(__pyx_v_callback);
  12006. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  12007. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1089, __pyx_L1_error)
  12008. __Pyx_GOTREF(__pyx_t_5);
  12009. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12010. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1089, __pyx_L1_error)
  12011. __Pyx_GOTREF(__pyx_t_4);
  12012. __Pyx_GIVEREF(__pyx_t_5);
  12013. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  12014. __pyx_t_5 = 0;
  12015. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1089, __pyx_L1_error)
  12016. __Pyx_GOTREF(__pyx_t_5);
  12017. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12018. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  12019. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12020. __PYX_ERR(0, 1089, __pyx_L1_error)
  12021. }
  12022. __Pyx_INCREF(__pyx_v_callback);
  12023. __Pyx_GIVEREF(__pyx_v_callback);
  12024. __Pyx_GOTREF(__pyx_v_self->_callback);
  12025. __Pyx_DECREF(__pyx_v_self->_callback);
  12026. __pyx_v_self->_callback = __pyx_v_callback;
  12027. /* function exit code */
  12028. __pyx_r = 0;
  12029. goto __pyx_L0;
  12030. __pyx_L1_error:;
  12031. __Pyx_XDECREF(__pyx_t_4);
  12032. __Pyx_XDECREF(__pyx_t_5);
  12033. __Pyx_AddTraceback("gevent.libev.corecext.signal.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12034. __pyx_r = -1;
  12035. __pyx_L0:;
  12036. __Pyx_RefNannyFinishContext();
  12037. return __pyx_r;
  12038. }
  12039. /* Python wrapper */
  12040. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  12041. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  12042. PyObject *__pyx_r = 0;
  12043. __Pyx_RefNannyDeclarations
  12044. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  12045. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_stop(((struct PyGeventSignalObject *)__pyx_v_self));
  12046. /* function exit code */
  12047. __Pyx_RefNannyFinishContext();
  12048. return __pyx_r;
  12049. }
  12050. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_stop(struct PyGeventSignalObject *__pyx_v_self) {
  12051. PyObject *__pyx_r = NULL;
  12052. __Pyx_RefNannyDeclarations
  12053. int __pyx_t_1;
  12054. PyObject *__pyx_t_2 = NULL;
  12055. __Pyx_RefNannySetupContext("stop", 0);
  12056. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  12057. if (__pyx_t_1) {
  12058. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12059. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12060. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  12061. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12062. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12063. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  12064. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12065. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12066. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  12067. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12068. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12069. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  12070. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12071. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12072. __Pyx_GOTREF(__pyx_t_2);
  12073. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12074. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12075. __PYX_ERR(0, 1095, __pyx_L1_error)
  12076. }
  12077. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  12078. if (__pyx_t_1) {
  12079. ev_ref(__pyx_v_self->loop->_ptr);
  12080. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  12081. }
  12082. ev_signal_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  12083. __Pyx_INCREF(Py_None);
  12084. __Pyx_GIVEREF(Py_None);
  12085. __Pyx_GOTREF(__pyx_v_self->_callback);
  12086. __Pyx_DECREF(__pyx_v_self->_callback);
  12087. __pyx_v_self->_callback = Py_None;
  12088. __Pyx_INCREF(Py_None);
  12089. __Pyx_GIVEREF(Py_None);
  12090. __Pyx_GOTREF(__pyx_v_self->args);
  12091. __Pyx_DECREF(__pyx_v_self->args);
  12092. __pyx_v_self->args = ((PyObject*)Py_None);
  12093. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  12094. if (__pyx_t_1) {
  12095. Py_DECREF(((PyObject*)__pyx_v_self));
  12096. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  12097. }
  12098. /* function exit code */
  12099. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12100. goto __pyx_L0;
  12101. __pyx_L1_error:;
  12102. __Pyx_XDECREF(__pyx_t_2);
  12103. __Pyx_AddTraceback("gevent.libev.corecext.signal.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12104. __pyx_r = NULL;
  12105. __pyx_L0:;
  12106. __Pyx_XGIVEREF(__pyx_r);
  12107. __Pyx_RefNannyFinishContext();
  12108. return __pyx_r;
  12109. }
  12110. /* Python wrapper */
  12111. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  12112. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_8priority_1__get__(PyObject *__pyx_v_self) {
  12113. PyObject *__pyx_r = 0;
  12114. __Pyx_RefNannyDeclarations
  12115. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12116. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_8priority___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12117. /* function exit code */
  12118. __Pyx_RefNannyFinishContext();
  12119. return __pyx_r;
  12120. }
  12121. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_8priority___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12122. PyObject *__pyx_r = NULL;
  12123. __Pyx_RefNannyDeclarations
  12124. PyObject *__pyx_t_1 = NULL;
  12125. __Pyx_RefNannySetupContext("__get__", 0);
  12126. __Pyx_XDECREF(__pyx_r);
  12127. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
  12128. __Pyx_GOTREF(__pyx_t_1);
  12129. __pyx_r = __pyx_t_1;
  12130. __pyx_t_1 = 0;
  12131. goto __pyx_L0;
  12132. /* function exit code */
  12133. __pyx_L1_error:;
  12134. __Pyx_XDECREF(__pyx_t_1);
  12135. __Pyx_AddTraceback("gevent.libev.corecext.signal.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12136. __pyx_r = NULL;
  12137. __pyx_L0:;
  12138. __Pyx_XGIVEREF(__pyx_r);
  12139. __Pyx_RefNannyFinishContext();
  12140. return __pyx_r;
  12141. }
  12142. /* Python wrapper */
  12143. static int __pyx_pw_6gevent_5libev_8corecext_6signal_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  12144. static int __pyx_pw_6gevent_5libev_8corecext_6signal_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  12145. int __pyx_v_priority;
  12146. int __pyx_r;
  12147. __Pyx_RefNannyDeclarations
  12148. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  12149. assert(__pyx_arg_priority); {
  12150. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
  12151. }
  12152. goto __pyx_L4_argument_unpacking_done;
  12153. __pyx_L3_error:;
  12154. __Pyx_AddTraceback("gevent.libev.corecext.signal.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12155. __Pyx_RefNannyFinishContext();
  12156. return -1;
  12157. __pyx_L4_argument_unpacking_done:;
  12158. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_8priority_2__set__(((struct PyGeventSignalObject *)__pyx_v_self), ((int)__pyx_v_priority));
  12159. /* function exit code */
  12160. __Pyx_RefNannyFinishContext();
  12161. return __pyx_r;
  12162. }
  12163. static int __pyx_pf_6gevent_5libev_8corecext_6signal_8priority_2__set__(struct PyGeventSignalObject *__pyx_v_self, int __pyx_v_priority) {
  12164. int __pyx_r;
  12165. __Pyx_RefNannyDeclarations
  12166. int __pyx_t_1;
  12167. PyObject *__pyx_t_2 = NULL;
  12168. __Pyx_RefNannySetupContext("__set__", 0);
  12169. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  12170. if (__pyx_t_1) {
  12171. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12172. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12173. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
  12174. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12175. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12176. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
  12177. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12178. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12179. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
  12180. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12181. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12182. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error)
  12183. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12184. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12185. __Pyx_GOTREF(__pyx_t_2);
  12186. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12187. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12188. __PYX_ERR(0, 1113, __pyx_L1_error)
  12189. }
  12190. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  12191. /* function exit code */
  12192. __pyx_r = 0;
  12193. goto __pyx_L0;
  12194. __pyx_L1_error:;
  12195. __Pyx_XDECREF(__pyx_t_2);
  12196. __Pyx_AddTraceback("gevent.libev.corecext.signal.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12197. __pyx_r = -1;
  12198. __pyx_L0:;
  12199. __Pyx_RefNannyFinishContext();
  12200. return __pyx_r;
  12201. }
  12202. /* Python wrapper */
  12203. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  12204. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  12205. int __pyx_v_revents;
  12206. PyObject *__pyx_v_callback = 0;
  12207. PyObject *__pyx_v_args = 0;
  12208. PyObject *__pyx_r = 0;
  12209. __Pyx_RefNannyDeclarations
  12210. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  12211. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  12212. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  12213. if (unlikely(!__pyx_v_args)) {
  12214. __Pyx_RefNannyFinishContext();
  12215. return NULL;
  12216. }
  12217. __Pyx_GOTREF(__pyx_v_args);
  12218. } else {
  12219. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  12220. }
  12221. {
  12222. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  12223. PyObject* values[2] = {0,0};
  12224. if (unlikely(__pyx_kwds)) {
  12225. Py_ssize_t kw_args;
  12226. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  12227. switch (pos_args) {
  12228. default:
  12229. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  12230. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12231. case 0: break;
  12232. }
  12233. kw_args = PyDict_Size(__pyx_kwds);
  12234. switch (pos_args) {
  12235. case 0:
  12236. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  12237. else goto __pyx_L5_argtuple_error;
  12238. case 1:
  12239. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  12240. else {
  12241. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1116, __pyx_L3_error)
  12242. }
  12243. }
  12244. if (unlikely(kw_args > 0)) {
  12245. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  12246. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1116, __pyx_L3_error)
  12247. }
  12248. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  12249. goto __pyx_L5_argtuple_error;
  12250. } else {
  12251. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12252. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  12253. }
  12254. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L3_error)
  12255. __pyx_v_callback = values[1];
  12256. }
  12257. goto __pyx_L4_argument_unpacking_done;
  12258. __pyx_L5_argtuple_error:;
  12259. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1116, __pyx_L3_error)
  12260. __pyx_L3_error:;
  12261. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  12262. __Pyx_AddTraceback("gevent.libev.corecext.signal.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12263. __Pyx_RefNannyFinishContext();
  12264. return NULL;
  12265. __pyx_L4_argument_unpacking_done:;
  12266. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_2feed(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  12267. /* function exit code */
  12268. __Pyx_XDECREF(__pyx_v_args);
  12269. __Pyx_RefNannyFinishContext();
  12270. return __pyx_r;
  12271. }
  12272. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_2feed(struct PyGeventSignalObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  12273. PyObject *__pyx_r = NULL;
  12274. __Pyx_RefNannyDeclarations
  12275. int __pyx_t_1;
  12276. PyObject *__pyx_t_2 = NULL;
  12277. __Pyx_RefNannySetupContext("feed", 0);
  12278. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  12279. if (__pyx_t_1) {
  12280. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12281. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12282. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  12283. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12284. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12285. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  12286. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12287. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12288. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  12289. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12290. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12291. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  12292. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12293. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12294. __Pyx_GOTREF(__pyx_t_2);
  12295. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12296. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12297. __PYX_ERR(0, 1119, __pyx_L1_error)
  12298. }
  12299. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1120, __pyx_L1_error)
  12300. __Pyx_INCREF(__pyx_v_args);
  12301. __Pyx_GIVEREF(__pyx_v_args);
  12302. __Pyx_GOTREF(__pyx_v_self->args);
  12303. __Pyx_DECREF(__pyx_v_self->args);
  12304. __pyx_v_self->args = __pyx_v_args;
  12305. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  12306. if (__pyx_t_1) {
  12307. ev_unref(__pyx_v_self->loop->_ptr);
  12308. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  12309. }
  12310. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  12311. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  12312. if (__pyx_t_1) {
  12313. Py_INCREF(((PyObject*)__pyx_v_self));
  12314. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  12315. }
  12316. /* function exit code */
  12317. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12318. goto __pyx_L0;
  12319. __pyx_L1_error:;
  12320. __Pyx_XDECREF(__pyx_t_2);
  12321. __Pyx_AddTraceback("gevent.libev.corecext.signal.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12322. __pyx_r = NULL;
  12323. __pyx_L0:;
  12324. __Pyx_XGIVEREF(__pyx_r);
  12325. __Pyx_RefNannyFinishContext();
  12326. return __pyx_r;
  12327. }
  12328. /* Python wrapper */
  12329. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  12330. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  12331. PyObject *__pyx_v_callback = 0;
  12332. PyObject *__pyx_v_args = 0;
  12333. PyObject *__pyx_r = 0;
  12334. __Pyx_RefNannyDeclarations
  12335. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  12336. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  12337. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  12338. if (unlikely(!__pyx_v_args)) {
  12339. __Pyx_RefNannyFinishContext();
  12340. return NULL;
  12341. }
  12342. __Pyx_GOTREF(__pyx_v_args);
  12343. } else {
  12344. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  12345. }
  12346. {
  12347. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  12348. PyObject* values[1] = {0};
  12349. if (unlikely(__pyx_kwds)) {
  12350. Py_ssize_t kw_args;
  12351. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  12352. switch (pos_args) {
  12353. default:
  12354. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12355. case 0: break;
  12356. }
  12357. kw_args = PyDict_Size(__pyx_kwds);
  12358. switch (pos_args) {
  12359. case 0:
  12360. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  12361. else goto __pyx_L5_argtuple_error;
  12362. }
  12363. if (unlikely(kw_args > 0)) {
  12364. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  12365. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1130, __pyx_L3_error)
  12366. }
  12367. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  12368. goto __pyx_L5_argtuple_error;
  12369. } else {
  12370. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12371. }
  12372. __pyx_v_callback = values[0];
  12373. }
  12374. goto __pyx_L4_argument_unpacking_done;
  12375. __pyx_L5_argtuple_error:;
  12376. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1130, __pyx_L3_error)
  12377. __pyx_L3_error:;
  12378. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  12379. __Pyx_AddTraceback("gevent.libev.corecext.signal.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12380. __Pyx_RefNannyFinishContext();
  12381. return NULL;
  12382. __pyx_L4_argument_unpacking_done:;
  12383. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4start(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  12384. /* function exit code */
  12385. __Pyx_XDECREF(__pyx_v_args);
  12386. __Pyx_RefNannyFinishContext();
  12387. return __pyx_r;
  12388. }
  12389. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4start(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  12390. PyObject *__pyx_r = NULL;
  12391. __Pyx_RefNannyDeclarations
  12392. int __pyx_t_1;
  12393. PyObject *__pyx_t_2 = NULL;
  12394. int __pyx_t_3;
  12395. __Pyx_RefNannySetupContext("start", 0);
  12396. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  12397. if (__pyx_t_1) {
  12398. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12399. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12400. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  12401. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12402. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12403. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  12404. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12405. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12406. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  12407. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12408. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12409. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  12410. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12411. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12412. __Pyx_GOTREF(__pyx_t_2);
  12413. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12414. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12415. __PYX_ERR(0, 1133, __pyx_L1_error)
  12416. }
  12417. __pyx_t_1 = (__pyx_v_callback == Py_None);
  12418. __pyx_t_3 = (__pyx_t_1 != 0);
  12419. if (__pyx_t_3) {
  12420. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12421. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12422. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  12423. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12424. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12425. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  12426. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12427. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12428. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  12429. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12430. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12431. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
  12432. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12433. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12434. __Pyx_GOTREF(__pyx_t_2);
  12435. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12436. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12437. __PYX_ERR(0, 1135, __pyx_L1_error)
  12438. }
  12439. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
  12440. __Pyx_INCREF(__pyx_v_args);
  12441. __Pyx_GIVEREF(__pyx_v_args);
  12442. __Pyx_GOTREF(__pyx_v_self->args);
  12443. __Pyx_DECREF(__pyx_v_self->args);
  12444. __pyx_v_self->args = __pyx_v_args;
  12445. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  12446. if (__pyx_t_3) {
  12447. ev_unref(__pyx_v_self->loop->_ptr);
  12448. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  12449. }
  12450. ev_signal_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  12451. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  12452. if (__pyx_t_3) {
  12453. Py_INCREF(((PyObject*)__pyx_v_self));
  12454. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  12455. }
  12456. /* function exit code */
  12457. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  12458. goto __pyx_L0;
  12459. __pyx_L1_error:;
  12460. __Pyx_XDECREF(__pyx_t_2);
  12461. __Pyx_AddTraceback("gevent.libev.corecext.signal.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12462. __pyx_r = NULL;
  12463. __pyx_L0:;
  12464. __Pyx_XGIVEREF(__pyx_r);
  12465. __Pyx_RefNannyFinishContext();
  12466. return __pyx_r;
  12467. }
  12468. /* Python wrapper */
  12469. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  12470. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_6active_1__get__(PyObject *__pyx_v_self) {
  12471. PyObject *__pyx_r = 0;
  12472. __Pyx_RefNannyDeclarations
  12473. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12474. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_6active___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12475. /* function exit code */
  12476. __Pyx_RefNannyFinishContext();
  12477. return __pyx_r;
  12478. }
  12479. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_6active___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12480. PyObject *__pyx_r = NULL;
  12481. __Pyx_RefNannyDeclarations
  12482. PyObject *__pyx_t_1 = NULL;
  12483. __Pyx_RefNannySetupContext("__get__", 0);
  12484. __Pyx_XDECREF(__pyx_r);
  12485. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  12486. __Pyx_INCREF(Py_True);
  12487. __pyx_t_1 = Py_True;
  12488. } else {
  12489. __Pyx_INCREF(Py_False);
  12490. __pyx_t_1 = Py_False;
  12491. }
  12492. __pyx_r = __pyx_t_1;
  12493. __pyx_t_1 = 0;
  12494. goto __pyx_L0;
  12495. /* function exit code */
  12496. __pyx_L0:;
  12497. __Pyx_XGIVEREF(__pyx_r);
  12498. __Pyx_RefNannyFinishContext();
  12499. return __pyx_r;
  12500. }
  12501. /* Python wrapper */
  12502. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  12503. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_7pending_1__get__(PyObject *__pyx_v_self) {
  12504. PyObject *__pyx_r = 0;
  12505. __Pyx_RefNannyDeclarations
  12506. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12507. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_7pending___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12508. /* function exit code */
  12509. __Pyx_RefNannyFinishContext();
  12510. return __pyx_r;
  12511. }
  12512. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_7pending___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12513. PyObject *__pyx_r = NULL;
  12514. __Pyx_RefNannyDeclarations
  12515. PyObject *__pyx_t_1 = NULL;
  12516. __Pyx_RefNannySetupContext("__get__", 0);
  12517. __Pyx_XDECREF(__pyx_r);
  12518. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  12519. __Pyx_INCREF(Py_True);
  12520. __pyx_t_1 = Py_True;
  12521. } else {
  12522. __Pyx_INCREF(Py_False);
  12523. __pyx_t_1 = Py_False;
  12524. }
  12525. __pyx_r = __pyx_t_1;
  12526. __pyx_t_1 = 0;
  12527. goto __pyx_L0;
  12528. /* function exit code */
  12529. __pyx_L0:;
  12530. __Pyx_XGIVEREF(__pyx_r);
  12531. __Pyx_RefNannyFinishContext();
  12532. return __pyx_r;
  12533. }
  12534. /* Python wrapper */
  12535. static int __pyx_pw_6gevent_5libev_8corecext_6signal_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  12536. static int __pyx_pw_6gevent_5libev_8corecext_6signal_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  12537. struct PyGeventLoopObject *__pyx_v_loop = 0;
  12538. int __pyx_v_signalnum;
  12539. PyObject *__pyx_v_ref = 0;
  12540. PyObject *__pyx_v_priority = 0;
  12541. int __pyx_r;
  12542. __Pyx_RefNannyDeclarations
  12543. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  12544. {
  12545. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_signalnum,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  12546. PyObject* values[4] = {0,0,0,0};
  12547. values[2] = ((PyObject *)Py_True);
  12548. values[3] = ((PyObject *)Py_None);
  12549. if (unlikely(__pyx_kwds)) {
  12550. Py_ssize_t kw_args;
  12551. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  12552. switch (pos_args) {
  12553. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  12554. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  12555. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  12556. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12557. case 0: break;
  12558. default: goto __pyx_L5_argtuple_error;
  12559. }
  12560. kw_args = PyDict_Size(__pyx_kwds);
  12561. switch (pos_args) {
  12562. case 0:
  12563. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  12564. else goto __pyx_L5_argtuple_error;
  12565. case 1:
  12566. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_signalnum)) != 0)) kw_args--;
  12567. else {
  12568. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
  12569. }
  12570. case 2:
  12571. if (kw_args > 0) {
  12572. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  12573. if (value) { values[2] = value; kw_args--; }
  12574. }
  12575. case 3:
  12576. if (kw_args > 0) {
  12577. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  12578. if (value) { values[3] = value; kw_args--; }
  12579. }
  12580. }
  12581. if (unlikely(kw_args > 0)) {
  12582. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
  12583. }
  12584. } else {
  12585. switch (PyTuple_GET_SIZE(__pyx_args)) {
  12586. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  12587. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  12588. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  12589. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  12590. break;
  12591. default: goto __pyx_L5_argtuple_error;
  12592. }
  12593. }
  12594. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  12595. __pyx_v_signalnum = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_signalnum == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L3_error)
  12596. __pyx_v_ref = values[2];
  12597. __pyx_v_priority = values[3];
  12598. }
  12599. goto __pyx_L4_argument_unpacking_done;
  12600. __pyx_L5_argtuple_error:;
  12601. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
  12602. __pyx_L3_error:;
  12603. __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12604. __Pyx_RefNannyFinishContext();
  12605. return -1;
  12606. __pyx_L4_argument_unpacking_done:;
  12607. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1157, __pyx_L1_error)
  12608. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_6__init__(((struct PyGeventSignalObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_signalnum, __pyx_v_ref, __pyx_v_priority);
  12609. /* function exit code */
  12610. goto __pyx_L0;
  12611. __pyx_L1_error:;
  12612. __pyx_r = -1;
  12613. __pyx_L0:;
  12614. __Pyx_RefNannyFinishContext();
  12615. return __pyx_r;
  12616. }
  12617. static int __pyx_pf_6gevent_5libev_8corecext_6signal_6__init__(struct PyGeventSignalObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_signalnum, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  12618. int __pyx_r;
  12619. __Pyx_RefNannyDeclarations
  12620. int __pyx_t_1;
  12621. int __pyx_t_2;
  12622. PyObject *__pyx_t_3 = NULL;
  12623. PyObject *__pyx_t_4 = NULL;
  12624. PyObject *__pyx_t_5 = NULL;
  12625. int __pyx_t_6;
  12626. __Pyx_RefNannySetupContext("__init__", 0);
  12627. __pyx_t_2 = ((__pyx_v_signalnum < 1) != 0);
  12628. if (!__pyx_t_2) {
  12629. } else {
  12630. __pyx_t_1 = __pyx_t_2;
  12631. goto __pyx_L4_bool_binop_done;
  12632. }
  12633. __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  12634. __Pyx_GOTREF(__pyx_t_3);
  12635. __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_signalmodule); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error)
  12636. __Pyx_GOTREF(__pyx_t_4);
  12637. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_NSIG); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error)
  12638. __Pyx_GOTREF(__pyx_t_5);
  12639. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12640. __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error)
  12641. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  12642. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12643. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error)
  12644. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12645. __pyx_t_1 = __pyx_t_2;
  12646. __pyx_L4_bool_binop_done:;
  12647. if (__pyx_t_1) {
  12648. __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_signalnum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
  12649. __Pyx_GOTREF(__pyx_t_4);
  12650. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_illegal_signal_number_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L1_error)
  12651. __Pyx_GOTREF(__pyx_t_5);
  12652. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12653. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
  12654. __Pyx_GOTREF(__pyx_t_4);
  12655. __Pyx_GIVEREF(__pyx_t_5);
  12656. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  12657. __pyx_t_5 = 0;
  12658. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1159, __pyx_L1_error)
  12659. __Pyx_GOTREF(__pyx_t_5);
  12660. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  12661. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  12662. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12663. __PYX_ERR(0, 1159, __pyx_L1_error)
  12664. }
  12665. ev_signal_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_signal), __pyx_v_signalnum);
  12666. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  12667. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  12668. __Pyx_GOTREF(__pyx_v_self->loop);
  12669. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  12670. __pyx_v_self->loop = __pyx_v_loop;
  12671. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1167, __pyx_L1_error)
  12672. if (__pyx_t_1) {
  12673. __pyx_v_self->_flags = 0;
  12674. goto __pyx_L6;
  12675. }
  12676. /*else*/ {
  12677. __pyx_v_self->_flags = 4;
  12678. }
  12679. __pyx_L6:;
  12680. __pyx_t_1 = (__pyx_v_priority != Py_None);
  12681. __pyx_t_2 = (__pyx_t_1 != 0);
  12682. if (__pyx_t_2) {
  12683. __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L1_error)
  12684. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_6);
  12685. }
  12686. /* function exit code */
  12687. __pyx_r = 0;
  12688. goto __pyx_L0;
  12689. __pyx_L1_error:;
  12690. __Pyx_XDECREF(__pyx_t_3);
  12691. __Pyx_XDECREF(__pyx_t_4);
  12692. __Pyx_XDECREF(__pyx_t_5);
  12693. __Pyx_AddTraceback("gevent.libev.corecext.signal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12694. __pyx_r = -1;
  12695. __pyx_L0:;
  12696. __Pyx_RefNannyFinishContext();
  12697. return __pyx_r;
  12698. }
  12699. /* Python wrapper */
  12700. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  12701. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_4loop_1__get__(PyObject *__pyx_v_self) {
  12702. PyObject *__pyx_r = 0;
  12703. __Pyx_RefNannyDeclarations
  12704. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12705. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4loop___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12706. /* function exit code */
  12707. __Pyx_RefNannyFinishContext();
  12708. return __pyx_r;
  12709. }
  12710. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4loop___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12711. PyObject *__pyx_r = NULL;
  12712. __Pyx_RefNannyDeclarations
  12713. __Pyx_RefNannySetupContext("__get__", 0);
  12714. __Pyx_XDECREF(__pyx_r);
  12715. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  12716. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  12717. goto __pyx_L0;
  12718. /* function exit code */
  12719. __pyx_L0:;
  12720. __Pyx_XGIVEREF(__pyx_r);
  12721. __Pyx_RefNannyFinishContext();
  12722. return __pyx_r;
  12723. }
  12724. /* Python wrapper */
  12725. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  12726. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12727. int __pyx_r;
  12728. __Pyx_RefNannyDeclarations
  12729. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  12730. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_2__set__(((struct PyGeventSignalObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  12731. /* function exit code */
  12732. __Pyx_RefNannyFinishContext();
  12733. return __pyx_r;
  12734. }
  12735. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12736. int __pyx_r;
  12737. __Pyx_RefNannyDeclarations
  12738. PyObject *__pyx_t_1 = NULL;
  12739. __Pyx_RefNannySetupContext("__set__", 0);
  12740. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1053, __pyx_L1_error)
  12741. __pyx_t_1 = __pyx_v_value;
  12742. __Pyx_INCREF(__pyx_t_1);
  12743. __Pyx_GIVEREF(__pyx_t_1);
  12744. __Pyx_GOTREF(__pyx_v_self->loop);
  12745. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  12746. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  12747. __pyx_t_1 = 0;
  12748. /* function exit code */
  12749. __pyx_r = 0;
  12750. goto __pyx_L0;
  12751. __pyx_L1_error:;
  12752. __Pyx_XDECREF(__pyx_t_1);
  12753. __Pyx_AddTraceback("gevent.libev.corecext.signal.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12754. __pyx_r = -1;
  12755. __pyx_L0:;
  12756. __Pyx_RefNannyFinishContext();
  12757. return __pyx_r;
  12758. }
  12759. /* Python wrapper */
  12760. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  12761. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_5__del__(PyObject *__pyx_v_self) {
  12762. int __pyx_r;
  12763. __Pyx_RefNannyDeclarations
  12764. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  12765. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_4__del__(((struct PyGeventSignalObject *)__pyx_v_self));
  12766. /* function exit code */
  12767. __Pyx_RefNannyFinishContext();
  12768. return __pyx_r;
  12769. }
  12770. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4loop_4__del__(struct PyGeventSignalObject *__pyx_v_self) {
  12771. int __pyx_r;
  12772. __Pyx_RefNannyDeclarations
  12773. __Pyx_RefNannySetupContext("__del__", 0);
  12774. __Pyx_INCREF(Py_None);
  12775. __Pyx_GIVEREF(Py_None);
  12776. __Pyx_GOTREF(__pyx_v_self->loop);
  12777. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  12778. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  12779. /* function exit code */
  12780. __pyx_r = 0;
  12781. __Pyx_RefNannyFinishContext();
  12782. return __pyx_r;
  12783. }
  12784. /* Python wrapper */
  12785. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  12786. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_4args_1__get__(PyObject *__pyx_v_self) {
  12787. PyObject *__pyx_r = 0;
  12788. __Pyx_RefNannyDeclarations
  12789. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12790. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4args___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12791. /* function exit code */
  12792. __Pyx_RefNannyFinishContext();
  12793. return __pyx_r;
  12794. }
  12795. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_4args___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12796. PyObject *__pyx_r = NULL;
  12797. __Pyx_RefNannyDeclarations
  12798. __Pyx_RefNannySetupContext("__get__", 0);
  12799. __Pyx_XDECREF(__pyx_r);
  12800. __Pyx_INCREF(__pyx_v_self->args);
  12801. __pyx_r = __pyx_v_self->args;
  12802. goto __pyx_L0;
  12803. /* function exit code */
  12804. __pyx_L0:;
  12805. __Pyx_XGIVEREF(__pyx_r);
  12806. __Pyx_RefNannyFinishContext();
  12807. return __pyx_r;
  12808. }
  12809. /* Python wrapper */
  12810. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  12811. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12812. int __pyx_r;
  12813. __Pyx_RefNannyDeclarations
  12814. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  12815. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4args_2__set__(((struct PyGeventSignalObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  12816. /* function exit code */
  12817. __Pyx_RefNannyFinishContext();
  12818. return __pyx_r;
  12819. }
  12820. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4args_2__set__(struct PyGeventSignalObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12821. int __pyx_r;
  12822. __Pyx_RefNannyDeclarations
  12823. PyObject *__pyx_t_1 = NULL;
  12824. __Pyx_RefNannySetupContext("__set__", 0);
  12825. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1055, __pyx_L1_error)
  12826. __pyx_t_1 = __pyx_v_value;
  12827. __Pyx_INCREF(__pyx_t_1);
  12828. __Pyx_GIVEREF(__pyx_t_1);
  12829. __Pyx_GOTREF(__pyx_v_self->args);
  12830. __Pyx_DECREF(__pyx_v_self->args);
  12831. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  12832. __pyx_t_1 = 0;
  12833. /* function exit code */
  12834. __pyx_r = 0;
  12835. goto __pyx_L0;
  12836. __pyx_L1_error:;
  12837. __Pyx_XDECREF(__pyx_t_1);
  12838. __Pyx_AddTraceback("gevent.libev.corecext.signal.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12839. __pyx_r = -1;
  12840. __pyx_L0:;
  12841. __Pyx_RefNannyFinishContext();
  12842. return __pyx_r;
  12843. }
  12844. /* Python wrapper */
  12845. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  12846. static int __pyx_pw_6gevent_5libev_8corecext_6signal_4args_5__del__(PyObject *__pyx_v_self) {
  12847. int __pyx_r;
  12848. __Pyx_RefNannyDeclarations
  12849. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  12850. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_4args_4__del__(((struct PyGeventSignalObject *)__pyx_v_self));
  12851. /* function exit code */
  12852. __Pyx_RefNannyFinishContext();
  12853. return __pyx_r;
  12854. }
  12855. static int __pyx_pf_6gevent_5libev_8corecext_6signal_4args_4__del__(struct PyGeventSignalObject *__pyx_v_self) {
  12856. int __pyx_r;
  12857. __Pyx_RefNannyDeclarations
  12858. __Pyx_RefNannySetupContext("__del__", 0);
  12859. __Pyx_INCREF(Py_None);
  12860. __Pyx_GIVEREF(Py_None);
  12861. __Pyx_GOTREF(__pyx_v_self->args);
  12862. __Pyx_DECREF(__pyx_v_self->args);
  12863. __pyx_v_self->args = ((PyObject*)Py_None);
  12864. /* function exit code */
  12865. __pyx_r = 0;
  12866. __Pyx_RefNannyFinishContext();
  12867. return __pyx_r;
  12868. }
  12869. /* Python wrapper */
  12870. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  12871. static PyObject *__pyx_pw_6gevent_5libev_8corecext_6signal_6_flags_1__get__(PyObject *__pyx_v_self) {
  12872. PyObject *__pyx_r = 0;
  12873. __Pyx_RefNannyDeclarations
  12874. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12875. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_6signal_6_flags___get__(((struct PyGeventSignalObject *)__pyx_v_self));
  12876. /* function exit code */
  12877. __Pyx_RefNannyFinishContext();
  12878. return __pyx_r;
  12879. }
  12880. static PyObject *__pyx_pf_6gevent_5libev_8corecext_6signal_6_flags___get__(struct PyGeventSignalObject *__pyx_v_self) {
  12881. PyObject *__pyx_r = NULL;
  12882. __Pyx_RefNannyDeclarations
  12883. PyObject *__pyx_t_1 = NULL;
  12884. __Pyx_RefNannySetupContext("__get__", 0);
  12885. __Pyx_XDECREF(__pyx_r);
  12886. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
  12887. __Pyx_GOTREF(__pyx_t_1);
  12888. __pyx_r = __pyx_t_1;
  12889. __pyx_t_1 = 0;
  12890. goto __pyx_L0;
  12891. /* function exit code */
  12892. __pyx_L1_error:;
  12893. __Pyx_XDECREF(__pyx_t_1);
  12894. __Pyx_AddTraceback("gevent.libev.corecext.signal._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12895. __pyx_r = NULL;
  12896. __pyx_L0:;
  12897. __Pyx_XGIVEREF(__pyx_r);
  12898. __Pyx_RefNannyFinishContext();
  12899. return __pyx_r;
  12900. }
  12901. /* Python wrapper */
  12902. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  12903. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_3ref_1__get__(PyObject *__pyx_v_self) {
  12904. PyObject *__pyx_r = 0;
  12905. __Pyx_RefNannyDeclarations
  12906. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  12907. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_3ref___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  12908. /* function exit code */
  12909. __Pyx_RefNannyFinishContext();
  12910. return __pyx_r;
  12911. }
  12912. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_3ref___get__(struct PyGeventIdleObject *__pyx_v_self) {
  12913. PyObject *__pyx_r = NULL;
  12914. __Pyx_RefNannyDeclarations
  12915. PyObject *__pyx_t_1 = NULL;
  12916. __Pyx_RefNannySetupContext("__get__", 0);
  12917. __Pyx_XDECREF(__pyx_r);
  12918. if (((__pyx_v_self->_flags & 4) != 0)) {
  12919. __Pyx_INCREF(Py_False);
  12920. __pyx_t_1 = Py_False;
  12921. } else {
  12922. __Pyx_INCREF(Py_True);
  12923. __pyx_t_1 = Py_True;
  12924. }
  12925. __pyx_r = __pyx_t_1;
  12926. __pyx_t_1 = 0;
  12927. goto __pyx_L0;
  12928. /* function exit code */
  12929. __pyx_L0:;
  12930. __Pyx_XGIVEREF(__pyx_r);
  12931. __Pyx_RefNannyFinishContext();
  12932. return __pyx_r;
  12933. }
  12934. /* Python wrapper */
  12935. static int __pyx_pw_6gevent_5libev_8corecext_4idle_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  12936. static int __pyx_pw_6gevent_5libev_8corecext_4idle_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12937. int __pyx_r;
  12938. __Pyx_RefNannyDeclarations
  12939. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  12940. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_3ref_2__set__(((struct PyGeventIdleObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  12941. /* function exit code */
  12942. __Pyx_RefNannyFinishContext();
  12943. return __pyx_r;
  12944. }
  12945. static int __pyx_pf_6gevent_5libev_8corecext_4idle_3ref_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value) {
  12946. int __pyx_r;
  12947. __Pyx_RefNannyDeclarations
  12948. int __pyx_t_1;
  12949. PyObject *__pyx_t_2 = NULL;
  12950. int __pyx_t_3;
  12951. __Pyx_RefNannySetupContext("__set__", 0);
  12952. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  12953. if (__pyx_t_1) {
  12954. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12955. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12956. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error)
  12957. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12958. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  12959. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error)
  12960. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  12961. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12962. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error)
  12963. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12964. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  12965. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error)
  12966. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  12967. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  12968. __Pyx_GOTREF(__pyx_t_2);
  12969. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  12970. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12971. __PYX_ERR(0, 1192, __pyx_L1_error)
  12972. }
  12973. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1193, __pyx_L1_error)
  12974. if (__pyx_t_1) {
  12975. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  12976. if (__pyx_t_1) {
  12977. __pyx_r = 0;
  12978. goto __pyx_L0;
  12979. }
  12980. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  12981. if (__pyx_t_1) {
  12982. ev_ref(__pyx_v_self->loop->_ptr);
  12983. }
  12984. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  12985. goto __pyx_L4;
  12986. }
  12987. /*else*/ {
  12988. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  12989. if (__pyx_t_1) {
  12990. __pyx_r = 0;
  12991. goto __pyx_L0;
  12992. }
  12993. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  12994. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  12995. if (__pyx_t_3) {
  12996. } else {
  12997. __pyx_t_1 = __pyx_t_3;
  12998. goto __pyx_L9_bool_binop_done;
  12999. }
  13000. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  13001. __pyx_t_1 = __pyx_t_3;
  13002. __pyx_L9_bool_binop_done:;
  13003. if (__pyx_t_1) {
  13004. ev_unref(__pyx_v_self->loop->_ptr);
  13005. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  13006. }
  13007. }
  13008. __pyx_L4:;
  13009. /* function exit code */
  13010. __pyx_r = 0;
  13011. goto __pyx_L0;
  13012. __pyx_L1_error:;
  13013. __Pyx_XDECREF(__pyx_t_2);
  13014. __Pyx_AddTraceback("gevent.libev.corecext.idle.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13015. __pyx_r = -1;
  13016. __pyx_L0:;
  13017. __Pyx_RefNannyFinishContext();
  13018. return __pyx_r;
  13019. }
  13020. /* Python wrapper */
  13021. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  13022. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_8callback_1__get__(PyObject *__pyx_v_self) {
  13023. PyObject *__pyx_r = 0;
  13024. __Pyx_RefNannyDeclarations
  13025. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13026. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_8callback___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13027. /* function exit code */
  13028. __Pyx_RefNannyFinishContext();
  13029. return __pyx_r;
  13030. }
  13031. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_8callback___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13032. PyObject *__pyx_r = NULL;
  13033. __Pyx_RefNannyDeclarations
  13034. __Pyx_RefNannySetupContext("__get__", 0);
  13035. __Pyx_XDECREF(__pyx_r);
  13036. __Pyx_INCREF(__pyx_v_self->_callback);
  13037. __pyx_r = __pyx_v_self->_callback;
  13038. goto __pyx_L0;
  13039. /* function exit code */
  13040. __pyx_L0:;
  13041. __Pyx_XGIVEREF(__pyx_r);
  13042. __Pyx_RefNannyFinishContext();
  13043. return __pyx_r;
  13044. }
  13045. /* Python wrapper */
  13046. static int __pyx_pw_6gevent_5libev_8corecext_4idle_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  13047. static int __pyx_pw_6gevent_5libev_8corecext_4idle_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  13048. int __pyx_r;
  13049. __Pyx_RefNannyDeclarations
  13050. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  13051. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_8callback_2__set__(((struct PyGeventIdleObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  13052. /* function exit code */
  13053. __Pyx_RefNannyFinishContext();
  13054. return __pyx_r;
  13055. }
  13056. static int __pyx_pf_6gevent_5libev_8corecext_4idle_8callback_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  13057. int __pyx_r;
  13058. __Pyx_RefNannyDeclarations
  13059. int __pyx_t_1;
  13060. int __pyx_t_2;
  13061. int __pyx_t_3;
  13062. PyObject *__pyx_t_4 = NULL;
  13063. PyObject *__pyx_t_5 = NULL;
  13064. __Pyx_RefNannySetupContext("__set__", 0);
  13065. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  13066. if (__pyx_t_2) {
  13067. } else {
  13068. __pyx_t_1 = __pyx_t_2;
  13069. goto __pyx_L4_bool_binop_done;
  13070. }
  13071. __pyx_t_2 = (__pyx_v_callback != Py_None);
  13072. __pyx_t_3 = (__pyx_t_2 != 0);
  13073. __pyx_t_1 = __pyx_t_3;
  13074. __pyx_L4_bool_binop_done:;
  13075. if (__pyx_t_1) {
  13076. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
  13077. __Pyx_GOTREF(__pyx_t_4);
  13078. __Pyx_INCREF(__pyx_v_callback);
  13079. __Pyx_GIVEREF(__pyx_v_callback);
  13080. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  13081. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error)
  13082. __Pyx_GOTREF(__pyx_t_5);
  13083. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13084. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
  13085. __Pyx_GOTREF(__pyx_t_4);
  13086. __Pyx_GIVEREF(__pyx_t_5);
  13087. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  13088. __pyx_t_5 = 0;
  13089. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error)
  13090. __Pyx_GOTREF(__pyx_t_5);
  13091. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13092. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  13093. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13094. __PYX_ERR(0, 1214, __pyx_L1_error)
  13095. }
  13096. __Pyx_INCREF(__pyx_v_callback);
  13097. __Pyx_GIVEREF(__pyx_v_callback);
  13098. __Pyx_GOTREF(__pyx_v_self->_callback);
  13099. __Pyx_DECREF(__pyx_v_self->_callback);
  13100. __pyx_v_self->_callback = __pyx_v_callback;
  13101. /* function exit code */
  13102. __pyx_r = 0;
  13103. goto __pyx_L0;
  13104. __pyx_L1_error:;
  13105. __Pyx_XDECREF(__pyx_t_4);
  13106. __Pyx_XDECREF(__pyx_t_5);
  13107. __Pyx_AddTraceback("gevent.libev.corecext.idle.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13108. __pyx_r = -1;
  13109. __pyx_L0:;
  13110. __Pyx_RefNannyFinishContext();
  13111. return __pyx_r;
  13112. }
  13113. /* Python wrapper */
  13114. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  13115. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  13116. PyObject *__pyx_r = 0;
  13117. __Pyx_RefNannyDeclarations
  13118. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  13119. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_stop(((struct PyGeventIdleObject *)__pyx_v_self));
  13120. /* function exit code */
  13121. __Pyx_RefNannyFinishContext();
  13122. return __pyx_r;
  13123. }
  13124. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_stop(struct PyGeventIdleObject *__pyx_v_self) {
  13125. PyObject *__pyx_r = NULL;
  13126. __Pyx_RefNannyDeclarations
  13127. int __pyx_t_1;
  13128. PyObject *__pyx_t_2 = NULL;
  13129. __Pyx_RefNannySetupContext("stop", 0);
  13130. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  13131. if (__pyx_t_1) {
  13132. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13133. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13134. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  13135. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13136. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13137. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  13138. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13139. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13140. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  13141. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13142. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13143. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  13144. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13145. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13146. __Pyx_GOTREF(__pyx_t_2);
  13147. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13148. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13149. __PYX_ERR(0, 1220, __pyx_L1_error)
  13150. }
  13151. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  13152. if (__pyx_t_1) {
  13153. ev_ref(__pyx_v_self->loop->_ptr);
  13154. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  13155. }
  13156. ev_idle_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  13157. __Pyx_INCREF(Py_None);
  13158. __Pyx_GIVEREF(Py_None);
  13159. __Pyx_GOTREF(__pyx_v_self->_callback);
  13160. __Pyx_DECREF(__pyx_v_self->_callback);
  13161. __pyx_v_self->_callback = Py_None;
  13162. __Pyx_INCREF(Py_None);
  13163. __Pyx_GIVEREF(Py_None);
  13164. __Pyx_GOTREF(__pyx_v_self->args);
  13165. __Pyx_DECREF(__pyx_v_self->args);
  13166. __pyx_v_self->args = ((PyObject*)Py_None);
  13167. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  13168. if (__pyx_t_1) {
  13169. Py_DECREF(((PyObject*)__pyx_v_self));
  13170. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  13171. }
  13172. /* function exit code */
  13173. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13174. goto __pyx_L0;
  13175. __pyx_L1_error:;
  13176. __Pyx_XDECREF(__pyx_t_2);
  13177. __Pyx_AddTraceback("gevent.libev.corecext.idle.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13178. __pyx_r = NULL;
  13179. __pyx_L0:;
  13180. __Pyx_XGIVEREF(__pyx_r);
  13181. __Pyx_RefNannyFinishContext();
  13182. return __pyx_r;
  13183. }
  13184. /* Python wrapper */
  13185. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  13186. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_8priority_1__get__(PyObject *__pyx_v_self) {
  13187. PyObject *__pyx_r = 0;
  13188. __Pyx_RefNannyDeclarations
  13189. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13190. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_8priority___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13191. /* function exit code */
  13192. __Pyx_RefNannyFinishContext();
  13193. return __pyx_r;
  13194. }
  13195. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_8priority___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13196. PyObject *__pyx_r = NULL;
  13197. __Pyx_RefNannyDeclarations
  13198. PyObject *__pyx_t_1 = NULL;
  13199. __Pyx_RefNannySetupContext("__get__", 0);
  13200. __Pyx_XDECREF(__pyx_r);
  13201. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
  13202. __Pyx_GOTREF(__pyx_t_1);
  13203. __pyx_r = __pyx_t_1;
  13204. __pyx_t_1 = 0;
  13205. goto __pyx_L0;
  13206. /* function exit code */
  13207. __pyx_L1_error:;
  13208. __Pyx_XDECREF(__pyx_t_1);
  13209. __Pyx_AddTraceback("gevent.libev.corecext.idle.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13210. __pyx_r = NULL;
  13211. __pyx_L0:;
  13212. __Pyx_XGIVEREF(__pyx_r);
  13213. __Pyx_RefNannyFinishContext();
  13214. return __pyx_r;
  13215. }
  13216. /* Python wrapper */
  13217. static int __pyx_pw_6gevent_5libev_8corecext_4idle_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  13218. static int __pyx_pw_6gevent_5libev_8corecext_4idle_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  13219. int __pyx_v_priority;
  13220. int __pyx_r;
  13221. __Pyx_RefNannyDeclarations
  13222. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  13223. assert(__pyx_arg_priority); {
  13224. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1236, __pyx_L3_error)
  13225. }
  13226. goto __pyx_L4_argument_unpacking_done;
  13227. __pyx_L3_error:;
  13228. __Pyx_AddTraceback("gevent.libev.corecext.idle.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13229. __Pyx_RefNannyFinishContext();
  13230. return -1;
  13231. __pyx_L4_argument_unpacking_done:;
  13232. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_8priority_2__set__(((struct PyGeventIdleObject *)__pyx_v_self), ((int)__pyx_v_priority));
  13233. /* function exit code */
  13234. __Pyx_RefNannyFinishContext();
  13235. return __pyx_r;
  13236. }
  13237. static int __pyx_pf_6gevent_5libev_8corecext_4idle_8priority_2__set__(struct PyGeventIdleObject *__pyx_v_self, int __pyx_v_priority) {
  13238. int __pyx_r;
  13239. __Pyx_RefNannyDeclarations
  13240. int __pyx_t_1;
  13241. PyObject *__pyx_t_2 = NULL;
  13242. __Pyx_RefNannySetupContext("__set__", 0);
  13243. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  13244. if (__pyx_t_1) {
  13245. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13246. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13247. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
  13248. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13249. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13250. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
  13251. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13252. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13253. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
  13254. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13255. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13256. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
  13257. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13258. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13259. __Pyx_GOTREF(__pyx_t_2);
  13260. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13261. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13262. __PYX_ERR(0, 1238, __pyx_L1_error)
  13263. }
  13264. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  13265. /* function exit code */
  13266. __pyx_r = 0;
  13267. goto __pyx_L0;
  13268. __pyx_L1_error:;
  13269. __Pyx_XDECREF(__pyx_t_2);
  13270. __Pyx_AddTraceback("gevent.libev.corecext.idle.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13271. __pyx_r = -1;
  13272. __pyx_L0:;
  13273. __Pyx_RefNannyFinishContext();
  13274. return __pyx_r;
  13275. }
  13276. /* Python wrapper */
  13277. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  13278. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  13279. int __pyx_v_revents;
  13280. PyObject *__pyx_v_callback = 0;
  13281. PyObject *__pyx_v_args = 0;
  13282. PyObject *__pyx_r = 0;
  13283. __Pyx_RefNannyDeclarations
  13284. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  13285. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  13286. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  13287. if (unlikely(!__pyx_v_args)) {
  13288. __Pyx_RefNannyFinishContext();
  13289. return NULL;
  13290. }
  13291. __Pyx_GOTREF(__pyx_v_args);
  13292. } else {
  13293. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  13294. }
  13295. {
  13296. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  13297. PyObject* values[2] = {0,0};
  13298. if (unlikely(__pyx_kwds)) {
  13299. Py_ssize_t kw_args;
  13300. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  13301. switch (pos_args) {
  13302. default:
  13303. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13304. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13305. case 0: break;
  13306. }
  13307. kw_args = PyDict_Size(__pyx_kwds);
  13308. switch (pos_args) {
  13309. case 0:
  13310. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  13311. else goto __pyx_L5_argtuple_error;
  13312. case 1:
  13313. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  13314. else {
  13315. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1241, __pyx_L3_error)
  13316. }
  13317. }
  13318. if (unlikely(kw_args > 0)) {
  13319. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  13320. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1241, __pyx_L3_error)
  13321. }
  13322. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  13323. goto __pyx_L5_argtuple_error;
  13324. } else {
  13325. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13326. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13327. }
  13328. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1241, __pyx_L3_error)
  13329. __pyx_v_callback = values[1];
  13330. }
  13331. goto __pyx_L4_argument_unpacking_done;
  13332. __pyx_L5_argtuple_error:;
  13333. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1241, __pyx_L3_error)
  13334. __pyx_L3_error:;
  13335. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  13336. __Pyx_AddTraceback("gevent.libev.corecext.idle.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13337. __Pyx_RefNannyFinishContext();
  13338. return NULL;
  13339. __pyx_L4_argument_unpacking_done:;
  13340. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_2feed(((struct PyGeventIdleObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  13341. /* function exit code */
  13342. __Pyx_XDECREF(__pyx_v_args);
  13343. __Pyx_RefNannyFinishContext();
  13344. return __pyx_r;
  13345. }
  13346. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_2feed(struct PyGeventIdleObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  13347. PyObject *__pyx_r = NULL;
  13348. __Pyx_RefNannyDeclarations
  13349. int __pyx_t_1;
  13350. PyObject *__pyx_t_2 = NULL;
  13351. __Pyx_RefNannySetupContext("feed", 0);
  13352. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  13353. if (__pyx_t_1) {
  13354. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13355. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13356. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
  13357. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13358. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13359. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
  13360. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13361. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13362. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
  13363. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13364. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13365. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
  13366. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13367. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13368. __Pyx_GOTREF(__pyx_t_2);
  13369. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13370. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13371. __PYX_ERR(0, 1244, __pyx_L1_error)
  13372. }
  13373. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1245, __pyx_L1_error)
  13374. __Pyx_INCREF(__pyx_v_args);
  13375. __Pyx_GIVEREF(__pyx_v_args);
  13376. __Pyx_GOTREF(__pyx_v_self->args);
  13377. __Pyx_DECREF(__pyx_v_self->args);
  13378. __pyx_v_self->args = __pyx_v_args;
  13379. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  13380. if (__pyx_t_1) {
  13381. ev_unref(__pyx_v_self->loop->_ptr);
  13382. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  13383. }
  13384. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  13385. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  13386. if (__pyx_t_1) {
  13387. Py_INCREF(((PyObject*)__pyx_v_self));
  13388. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  13389. }
  13390. /* function exit code */
  13391. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13392. goto __pyx_L0;
  13393. __pyx_L1_error:;
  13394. __Pyx_XDECREF(__pyx_t_2);
  13395. __Pyx_AddTraceback("gevent.libev.corecext.idle.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13396. __pyx_r = NULL;
  13397. __pyx_L0:;
  13398. __Pyx_XGIVEREF(__pyx_r);
  13399. __Pyx_RefNannyFinishContext();
  13400. return __pyx_r;
  13401. }
  13402. /* Python wrapper */
  13403. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  13404. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  13405. PyObject *__pyx_v_callback = 0;
  13406. PyObject *__pyx_v_args = 0;
  13407. PyObject *__pyx_r = 0;
  13408. __Pyx_RefNannyDeclarations
  13409. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  13410. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  13411. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  13412. if (unlikely(!__pyx_v_args)) {
  13413. __Pyx_RefNannyFinishContext();
  13414. return NULL;
  13415. }
  13416. __Pyx_GOTREF(__pyx_v_args);
  13417. } else {
  13418. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  13419. }
  13420. {
  13421. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  13422. PyObject* values[1] = {0};
  13423. if (unlikely(__pyx_kwds)) {
  13424. Py_ssize_t kw_args;
  13425. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  13426. switch (pos_args) {
  13427. default:
  13428. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13429. case 0: break;
  13430. }
  13431. kw_args = PyDict_Size(__pyx_kwds);
  13432. switch (pos_args) {
  13433. case 0:
  13434. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  13435. else goto __pyx_L5_argtuple_error;
  13436. }
  13437. if (unlikely(kw_args > 0)) {
  13438. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  13439. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1255, __pyx_L3_error)
  13440. }
  13441. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  13442. goto __pyx_L5_argtuple_error;
  13443. } else {
  13444. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13445. }
  13446. __pyx_v_callback = values[0];
  13447. }
  13448. goto __pyx_L4_argument_unpacking_done;
  13449. __pyx_L5_argtuple_error:;
  13450. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1255, __pyx_L3_error)
  13451. __pyx_L3_error:;
  13452. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  13453. __Pyx_AddTraceback("gevent.libev.corecext.idle.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13454. __Pyx_RefNannyFinishContext();
  13455. return NULL;
  13456. __pyx_L4_argument_unpacking_done:;
  13457. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4start(((struct PyGeventIdleObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  13458. /* function exit code */
  13459. __Pyx_XDECREF(__pyx_v_args);
  13460. __Pyx_RefNannyFinishContext();
  13461. return __pyx_r;
  13462. }
  13463. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4start(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  13464. PyObject *__pyx_r = NULL;
  13465. __Pyx_RefNannyDeclarations
  13466. int __pyx_t_1;
  13467. PyObject *__pyx_t_2 = NULL;
  13468. int __pyx_t_3;
  13469. __Pyx_RefNannySetupContext("start", 0);
  13470. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  13471. if (__pyx_t_1) {
  13472. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13473. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13474. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  13475. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13476. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13477. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  13478. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13479. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13480. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  13481. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13482. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13483. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  13484. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13485. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13486. __Pyx_GOTREF(__pyx_t_2);
  13487. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13488. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13489. __PYX_ERR(0, 1258, __pyx_L1_error)
  13490. }
  13491. __pyx_t_1 = (__pyx_v_callback == Py_None);
  13492. __pyx_t_3 = (__pyx_t_1 != 0);
  13493. if (__pyx_t_3) {
  13494. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13495. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13496. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
  13497. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13498. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13499. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
  13500. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13501. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13502. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
  13503. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13504. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13505. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
  13506. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13507. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13508. __Pyx_GOTREF(__pyx_t_2);
  13509. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13510. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13511. __PYX_ERR(0, 1260, __pyx_L1_error)
  13512. }
  13513. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  13514. __Pyx_INCREF(__pyx_v_args);
  13515. __Pyx_GIVEREF(__pyx_v_args);
  13516. __Pyx_GOTREF(__pyx_v_self->args);
  13517. __Pyx_DECREF(__pyx_v_self->args);
  13518. __pyx_v_self->args = __pyx_v_args;
  13519. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  13520. if (__pyx_t_3) {
  13521. ev_unref(__pyx_v_self->loop->_ptr);
  13522. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  13523. }
  13524. ev_idle_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  13525. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  13526. if (__pyx_t_3) {
  13527. Py_INCREF(((PyObject*)__pyx_v_self));
  13528. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  13529. }
  13530. /* function exit code */
  13531. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  13532. goto __pyx_L0;
  13533. __pyx_L1_error:;
  13534. __Pyx_XDECREF(__pyx_t_2);
  13535. __Pyx_AddTraceback("gevent.libev.corecext.idle.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13536. __pyx_r = NULL;
  13537. __pyx_L0:;
  13538. __Pyx_XGIVEREF(__pyx_r);
  13539. __Pyx_RefNannyFinishContext();
  13540. return __pyx_r;
  13541. }
  13542. /* Python wrapper */
  13543. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  13544. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_6active_1__get__(PyObject *__pyx_v_self) {
  13545. PyObject *__pyx_r = 0;
  13546. __Pyx_RefNannyDeclarations
  13547. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13548. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_6active___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13549. /* function exit code */
  13550. __Pyx_RefNannyFinishContext();
  13551. return __pyx_r;
  13552. }
  13553. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_6active___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13554. PyObject *__pyx_r = NULL;
  13555. __Pyx_RefNannyDeclarations
  13556. PyObject *__pyx_t_1 = NULL;
  13557. __Pyx_RefNannySetupContext("__get__", 0);
  13558. __Pyx_XDECREF(__pyx_r);
  13559. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  13560. __Pyx_INCREF(Py_True);
  13561. __pyx_t_1 = Py_True;
  13562. } else {
  13563. __Pyx_INCREF(Py_False);
  13564. __pyx_t_1 = Py_False;
  13565. }
  13566. __pyx_r = __pyx_t_1;
  13567. __pyx_t_1 = 0;
  13568. goto __pyx_L0;
  13569. /* function exit code */
  13570. __pyx_L0:;
  13571. __Pyx_XGIVEREF(__pyx_r);
  13572. __Pyx_RefNannyFinishContext();
  13573. return __pyx_r;
  13574. }
  13575. /* Python wrapper */
  13576. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  13577. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_7pending_1__get__(PyObject *__pyx_v_self) {
  13578. PyObject *__pyx_r = 0;
  13579. __Pyx_RefNannyDeclarations
  13580. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13581. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_7pending___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13582. /* function exit code */
  13583. __Pyx_RefNannyFinishContext();
  13584. return __pyx_r;
  13585. }
  13586. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_7pending___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13587. PyObject *__pyx_r = NULL;
  13588. __Pyx_RefNannyDeclarations
  13589. PyObject *__pyx_t_1 = NULL;
  13590. __Pyx_RefNannySetupContext("__get__", 0);
  13591. __Pyx_XDECREF(__pyx_r);
  13592. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  13593. __Pyx_INCREF(Py_True);
  13594. __pyx_t_1 = Py_True;
  13595. } else {
  13596. __Pyx_INCREF(Py_False);
  13597. __pyx_t_1 = Py_False;
  13598. }
  13599. __pyx_r = __pyx_t_1;
  13600. __pyx_t_1 = 0;
  13601. goto __pyx_L0;
  13602. /* function exit code */
  13603. __pyx_L0:;
  13604. __Pyx_XGIVEREF(__pyx_r);
  13605. __Pyx_RefNannyFinishContext();
  13606. return __pyx_r;
  13607. }
  13608. /* Python wrapper */
  13609. static int __pyx_pw_6gevent_5libev_8corecext_4idle_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  13610. static int __pyx_pw_6gevent_5libev_8corecext_4idle_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  13611. struct PyGeventLoopObject *__pyx_v_loop = 0;
  13612. PyObject *__pyx_v_ref = 0;
  13613. PyObject *__pyx_v_priority = 0;
  13614. int __pyx_r;
  13615. __Pyx_RefNannyDeclarations
  13616. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  13617. {
  13618. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  13619. PyObject* values[3] = {0,0,0};
  13620. values[1] = ((PyObject *)Py_True);
  13621. values[2] = ((PyObject *)Py_None);
  13622. if (unlikely(__pyx_kwds)) {
  13623. Py_ssize_t kw_args;
  13624. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  13625. switch (pos_args) {
  13626. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  13627. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13628. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13629. case 0: break;
  13630. default: goto __pyx_L5_argtuple_error;
  13631. }
  13632. kw_args = PyDict_Size(__pyx_kwds);
  13633. switch (pos_args) {
  13634. case 0:
  13635. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  13636. else goto __pyx_L5_argtuple_error;
  13637. case 1:
  13638. if (kw_args > 0) {
  13639. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  13640. if (value) { values[1] = value; kw_args--; }
  13641. }
  13642. case 2:
  13643. if (kw_args > 0) {
  13644. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  13645. if (value) { values[2] = value; kw_args--; }
  13646. }
  13647. }
  13648. if (unlikely(kw_args > 0)) {
  13649. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1283, __pyx_L3_error)
  13650. }
  13651. } else {
  13652. switch (PyTuple_GET_SIZE(__pyx_args)) {
  13653. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  13654. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13655. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13656. break;
  13657. default: goto __pyx_L5_argtuple_error;
  13658. }
  13659. }
  13660. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  13661. __pyx_v_ref = values[1];
  13662. __pyx_v_priority = values[2];
  13663. }
  13664. goto __pyx_L4_argument_unpacking_done;
  13665. __pyx_L5_argtuple_error:;
  13666. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1283, __pyx_L3_error)
  13667. __pyx_L3_error:;
  13668. __Pyx_AddTraceback("gevent.libev.corecext.idle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13669. __Pyx_RefNannyFinishContext();
  13670. return -1;
  13671. __pyx_L4_argument_unpacking_done:;
  13672. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1283, __pyx_L1_error)
  13673. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_6__init__(((struct PyGeventIdleObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);
  13674. /* function exit code */
  13675. goto __pyx_L0;
  13676. __pyx_L1_error:;
  13677. __pyx_r = -1;
  13678. __pyx_L0:;
  13679. __Pyx_RefNannyFinishContext();
  13680. return __pyx_r;
  13681. }
  13682. static int __pyx_pf_6gevent_5libev_8corecext_4idle_6__init__(struct PyGeventIdleObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  13683. int __pyx_r;
  13684. __Pyx_RefNannyDeclarations
  13685. int __pyx_t_1;
  13686. int __pyx_t_2;
  13687. int __pyx_t_3;
  13688. __Pyx_RefNannySetupContext("__init__", 0);
  13689. ev_idle_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_idle));
  13690. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  13691. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  13692. __Pyx_GOTREF(__pyx_v_self->loop);
  13693. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  13694. __pyx_v_self->loop = __pyx_v_loop;
  13695. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1286, __pyx_L1_error)
  13696. if (__pyx_t_1) {
  13697. __pyx_v_self->_flags = 0;
  13698. goto __pyx_L3;
  13699. }
  13700. /*else*/ {
  13701. __pyx_v_self->_flags = 4;
  13702. }
  13703. __pyx_L3:;
  13704. __pyx_t_1 = (__pyx_v_priority != Py_None);
  13705. __pyx_t_2 = (__pyx_t_1 != 0);
  13706. if (__pyx_t_2) {
  13707. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L1_error)
  13708. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_3);
  13709. }
  13710. /* function exit code */
  13711. __pyx_r = 0;
  13712. goto __pyx_L0;
  13713. __pyx_L1_error:;
  13714. __Pyx_AddTraceback("gevent.libev.corecext.idle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13715. __pyx_r = -1;
  13716. __pyx_L0:;
  13717. __Pyx_RefNannyFinishContext();
  13718. return __pyx_r;
  13719. }
  13720. /* Python wrapper */
  13721. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  13722. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_4loop_1__get__(PyObject *__pyx_v_self) {
  13723. PyObject *__pyx_r = 0;
  13724. __Pyx_RefNannyDeclarations
  13725. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13726. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4loop___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13727. /* function exit code */
  13728. __Pyx_RefNannyFinishContext();
  13729. return __pyx_r;
  13730. }
  13731. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4loop___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13732. PyObject *__pyx_r = NULL;
  13733. __Pyx_RefNannyDeclarations
  13734. __Pyx_RefNannySetupContext("__get__", 0);
  13735. __Pyx_XDECREF(__pyx_r);
  13736. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  13737. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  13738. goto __pyx_L0;
  13739. /* function exit code */
  13740. __pyx_L0:;
  13741. __Pyx_XGIVEREF(__pyx_r);
  13742. __Pyx_RefNannyFinishContext();
  13743. return __pyx_r;
  13744. }
  13745. /* Python wrapper */
  13746. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  13747. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13748. int __pyx_r;
  13749. __Pyx_RefNannyDeclarations
  13750. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  13751. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_2__set__(((struct PyGeventIdleObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  13752. /* function exit code */
  13753. __Pyx_RefNannyFinishContext();
  13754. return __pyx_r;
  13755. }
  13756. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13757. int __pyx_r;
  13758. __Pyx_RefNannyDeclarations
  13759. PyObject *__pyx_t_1 = NULL;
  13760. __Pyx_RefNannySetupContext("__set__", 0);
  13761. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1178, __pyx_L1_error)
  13762. __pyx_t_1 = __pyx_v_value;
  13763. __Pyx_INCREF(__pyx_t_1);
  13764. __Pyx_GIVEREF(__pyx_t_1);
  13765. __Pyx_GOTREF(__pyx_v_self->loop);
  13766. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  13767. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  13768. __pyx_t_1 = 0;
  13769. /* function exit code */
  13770. __pyx_r = 0;
  13771. goto __pyx_L0;
  13772. __pyx_L1_error:;
  13773. __Pyx_XDECREF(__pyx_t_1);
  13774. __Pyx_AddTraceback("gevent.libev.corecext.idle.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13775. __pyx_r = -1;
  13776. __pyx_L0:;
  13777. __Pyx_RefNannyFinishContext();
  13778. return __pyx_r;
  13779. }
  13780. /* Python wrapper */
  13781. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  13782. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_5__del__(PyObject *__pyx_v_self) {
  13783. int __pyx_r;
  13784. __Pyx_RefNannyDeclarations
  13785. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  13786. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_4__del__(((struct PyGeventIdleObject *)__pyx_v_self));
  13787. /* function exit code */
  13788. __Pyx_RefNannyFinishContext();
  13789. return __pyx_r;
  13790. }
  13791. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4loop_4__del__(struct PyGeventIdleObject *__pyx_v_self) {
  13792. int __pyx_r;
  13793. __Pyx_RefNannyDeclarations
  13794. __Pyx_RefNannySetupContext("__del__", 0);
  13795. __Pyx_INCREF(Py_None);
  13796. __Pyx_GIVEREF(Py_None);
  13797. __Pyx_GOTREF(__pyx_v_self->loop);
  13798. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  13799. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  13800. /* function exit code */
  13801. __pyx_r = 0;
  13802. __Pyx_RefNannyFinishContext();
  13803. return __pyx_r;
  13804. }
  13805. /* Python wrapper */
  13806. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  13807. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_4args_1__get__(PyObject *__pyx_v_self) {
  13808. PyObject *__pyx_r = 0;
  13809. __Pyx_RefNannyDeclarations
  13810. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13811. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4args___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13812. /* function exit code */
  13813. __Pyx_RefNannyFinishContext();
  13814. return __pyx_r;
  13815. }
  13816. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_4args___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13817. PyObject *__pyx_r = NULL;
  13818. __Pyx_RefNannyDeclarations
  13819. __Pyx_RefNannySetupContext("__get__", 0);
  13820. __Pyx_XDECREF(__pyx_r);
  13821. __Pyx_INCREF(__pyx_v_self->args);
  13822. __pyx_r = __pyx_v_self->args;
  13823. goto __pyx_L0;
  13824. /* function exit code */
  13825. __pyx_L0:;
  13826. __Pyx_XGIVEREF(__pyx_r);
  13827. __Pyx_RefNannyFinishContext();
  13828. return __pyx_r;
  13829. }
  13830. /* Python wrapper */
  13831. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  13832. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13833. int __pyx_r;
  13834. __Pyx_RefNannyDeclarations
  13835. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  13836. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4args_2__set__(((struct PyGeventIdleObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  13837. /* function exit code */
  13838. __Pyx_RefNannyFinishContext();
  13839. return __pyx_r;
  13840. }
  13841. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4args_2__set__(struct PyGeventIdleObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13842. int __pyx_r;
  13843. __Pyx_RefNannyDeclarations
  13844. PyObject *__pyx_t_1 = NULL;
  13845. __Pyx_RefNannySetupContext("__set__", 0);
  13846. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1180, __pyx_L1_error)
  13847. __pyx_t_1 = __pyx_v_value;
  13848. __Pyx_INCREF(__pyx_t_1);
  13849. __Pyx_GIVEREF(__pyx_t_1);
  13850. __Pyx_GOTREF(__pyx_v_self->args);
  13851. __Pyx_DECREF(__pyx_v_self->args);
  13852. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  13853. __pyx_t_1 = 0;
  13854. /* function exit code */
  13855. __pyx_r = 0;
  13856. goto __pyx_L0;
  13857. __pyx_L1_error:;
  13858. __Pyx_XDECREF(__pyx_t_1);
  13859. __Pyx_AddTraceback("gevent.libev.corecext.idle.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13860. __pyx_r = -1;
  13861. __pyx_L0:;
  13862. __Pyx_RefNannyFinishContext();
  13863. return __pyx_r;
  13864. }
  13865. /* Python wrapper */
  13866. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  13867. static int __pyx_pw_6gevent_5libev_8corecext_4idle_4args_5__del__(PyObject *__pyx_v_self) {
  13868. int __pyx_r;
  13869. __Pyx_RefNannyDeclarations
  13870. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  13871. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_4args_4__del__(((struct PyGeventIdleObject *)__pyx_v_self));
  13872. /* function exit code */
  13873. __Pyx_RefNannyFinishContext();
  13874. return __pyx_r;
  13875. }
  13876. static int __pyx_pf_6gevent_5libev_8corecext_4idle_4args_4__del__(struct PyGeventIdleObject *__pyx_v_self) {
  13877. int __pyx_r;
  13878. __Pyx_RefNannyDeclarations
  13879. __Pyx_RefNannySetupContext("__del__", 0);
  13880. __Pyx_INCREF(Py_None);
  13881. __Pyx_GIVEREF(Py_None);
  13882. __Pyx_GOTREF(__pyx_v_self->args);
  13883. __Pyx_DECREF(__pyx_v_self->args);
  13884. __pyx_v_self->args = ((PyObject*)Py_None);
  13885. /* function exit code */
  13886. __pyx_r = 0;
  13887. __Pyx_RefNannyFinishContext();
  13888. return __pyx_r;
  13889. }
  13890. /* Python wrapper */
  13891. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  13892. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4idle_6_flags_1__get__(PyObject *__pyx_v_self) {
  13893. PyObject *__pyx_r = 0;
  13894. __Pyx_RefNannyDeclarations
  13895. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13896. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4idle_6_flags___get__(((struct PyGeventIdleObject *)__pyx_v_self));
  13897. /* function exit code */
  13898. __Pyx_RefNannyFinishContext();
  13899. return __pyx_r;
  13900. }
  13901. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4idle_6_flags___get__(struct PyGeventIdleObject *__pyx_v_self) {
  13902. PyObject *__pyx_r = NULL;
  13903. __Pyx_RefNannyDeclarations
  13904. PyObject *__pyx_t_1 = NULL;
  13905. __Pyx_RefNannySetupContext("__get__", 0);
  13906. __Pyx_XDECREF(__pyx_r);
  13907. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
  13908. __Pyx_GOTREF(__pyx_t_1);
  13909. __pyx_r = __pyx_t_1;
  13910. __pyx_t_1 = 0;
  13911. goto __pyx_L0;
  13912. /* function exit code */
  13913. __pyx_L1_error:;
  13914. __Pyx_XDECREF(__pyx_t_1);
  13915. __Pyx_AddTraceback("gevent.libev.corecext.idle._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13916. __pyx_r = NULL;
  13917. __pyx_L0:;
  13918. __Pyx_XGIVEREF(__pyx_r);
  13919. __Pyx_RefNannyFinishContext();
  13920. return __pyx_r;
  13921. }
  13922. /* Python wrapper */
  13923. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  13924. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_1__get__(PyObject *__pyx_v_self) {
  13925. PyObject *__pyx_r = 0;
  13926. __Pyx_RefNannyDeclarations
  13927. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  13928. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_3ref___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  13929. /* function exit code */
  13930. __Pyx_RefNannyFinishContext();
  13931. return __pyx_r;
  13932. }
  13933. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_3ref___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  13934. PyObject *__pyx_r = NULL;
  13935. __Pyx_RefNannyDeclarations
  13936. PyObject *__pyx_t_1 = NULL;
  13937. __Pyx_RefNannySetupContext("__get__", 0);
  13938. __Pyx_XDECREF(__pyx_r);
  13939. if (((__pyx_v_self->_flags & 4) != 0)) {
  13940. __Pyx_INCREF(Py_False);
  13941. __pyx_t_1 = Py_False;
  13942. } else {
  13943. __Pyx_INCREF(Py_True);
  13944. __pyx_t_1 = Py_True;
  13945. }
  13946. __pyx_r = __pyx_t_1;
  13947. __pyx_t_1 = 0;
  13948. goto __pyx_L0;
  13949. /* function exit code */
  13950. __pyx_L0:;
  13951. __Pyx_XGIVEREF(__pyx_r);
  13952. __Pyx_RefNannyFinishContext();
  13953. return __pyx_r;
  13954. }
  13955. /* Python wrapper */
  13956. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  13957. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13958. int __pyx_r;
  13959. __Pyx_RefNannyDeclarations
  13960. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  13961. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_3ref_2__set__(((struct PyGeventPrepareObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  13962. /* function exit code */
  13963. __Pyx_RefNannyFinishContext();
  13964. return __pyx_r;
  13965. }
  13966. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_3ref_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value) {
  13967. int __pyx_r;
  13968. __Pyx_RefNannyDeclarations
  13969. int __pyx_t_1;
  13970. PyObject *__pyx_t_2 = NULL;
  13971. int __pyx_t_3;
  13972. __Pyx_RefNannySetupContext("__set__", 0);
  13973. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  13974. if (__pyx_t_1) {
  13975. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13976. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13977. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  13978. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13979. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  13980. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  13981. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  13982. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13983. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  13984. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13985. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  13986. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error)
  13987. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  13988. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  13989. __Pyx_GOTREF(__pyx_t_2);
  13990. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  13991. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13992. __PYX_ERR(0, 1311, __pyx_L1_error)
  13993. }
  13994. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1312, __pyx_L1_error)
  13995. if (__pyx_t_1) {
  13996. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  13997. if (__pyx_t_1) {
  13998. __pyx_r = 0;
  13999. goto __pyx_L0;
  14000. }
  14001. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  14002. if (__pyx_t_1) {
  14003. ev_ref(__pyx_v_self->loop->_ptr);
  14004. }
  14005. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  14006. goto __pyx_L4;
  14007. }
  14008. /*else*/ {
  14009. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  14010. if (__pyx_t_1) {
  14011. __pyx_r = 0;
  14012. goto __pyx_L0;
  14013. }
  14014. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  14015. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  14016. if (__pyx_t_3) {
  14017. } else {
  14018. __pyx_t_1 = __pyx_t_3;
  14019. goto __pyx_L9_bool_binop_done;
  14020. }
  14021. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  14022. __pyx_t_1 = __pyx_t_3;
  14023. __pyx_L9_bool_binop_done:;
  14024. if (__pyx_t_1) {
  14025. ev_unref(__pyx_v_self->loop->_ptr);
  14026. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  14027. }
  14028. }
  14029. __pyx_L4:;
  14030. /* function exit code */
  14031. __pyx_r = 0;
  14032. goto __pyx_L0;
  14033. __pyx_L1_error:;
  14034. __Pyx_XDECREF(__pyx_t_2);
  14035. __Pyx_AddTraceback("gevent.libev.corecext.prepare.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14036. __pyx_r = -1;
  14037. __pyx_L0:;
  14038. __Pyx_RefNannyFinishContext();
  14039. return __pyx_r;
  14040. }
  14041. /* Python wrapper */
  14042. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  14043. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_1__get__(PyObject *__pyx_v_self) {
  14044. PyObject *__pyx_r = 0;
  14045. __Pyx_RefNannyDeclarations
  14046. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14047. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_8callback___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14048. /* function exit code */
  14049. __Pyx_RefNannyFinishContext();
  14050. return __pyx_r;
  14051. }
  14052. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_8callback___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14053. PyObject *__pyx_r = NULL;
  14054. __Pyx_RefNannyDeclarations
  14055. __Pyx_RefNannySetupContext("__get__", 0);
  14056. __Pyx_XDECREF(__pyx_r);
  14057. __Pyx_INCREF(__pyx_v_self->_callback);
  14058. __pyx_r = __pyx_v_self->_callback;
  14059. goto __pyx_L0;
  14060. /* function exit code */
  14061. __pyx_L0:;
  14062. __Pyx_XGIVEREF(__pyx_r);
  14063. __Pyx_RefNannyFinishContext();
  14064. return __pyx_r;
  14065. }
  14066. /* Python wrapper */
  14067. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  14068. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  14069. int __pyx_r;
  14070. __Pyx_RefNannyDeclarations
  14071. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  14072. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_8callback_2__set__(((struct PyGeventPrepareObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  14073. /* function exit code */
  14074. __Pyx_RefNannyFinishContext();
  14075. return __pyx_r;
  14076. }
  14077. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_8callback_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  14078. int __pyx_r;
  14079. __Pyx_RefNannyDeclarations
  14080. int __pyx_t_1;
  14081. int __pyx_t_2;
  14082. int __pyx_t_3;
  14083. PyObject *__pyx_t_4 = NULL;
  14084. PyObject *__pyx_t_5 = NULL;
  14085. __Pyx_RefNannySetupContext("__set__", 0);
  14086. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  14087. if (__pyx_t_2) {
  14088. } else {
  14089. __pyx_t_1 = __pyx_t_2;
  14090. goto __pyx_L4_bool_binop_done;
  14091. }
  14092. __pyx_t_2 = (__pyx_v_callback != Py_None);
  14093. __pyx_t_3 = (__pyx_t_2 != 0);
  14094. __pyx_t_1 = __pyx_t_3;
  14095. __pyx_L4_bool_binop_done:;
  14096. if (__pyx_t_1) {
  14097. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error)
  14098. __Pyx_GOTREF(__pyx_t_4);
  14099. __Pyx_INCREF(__pyx_v_callback);
  14100. __Pyx_GIVEREF(__pyx_v_callback);
  14101. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  14102. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error)
  14103. __Pyx_GOTREF(__pyx_t_5);
  14104. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14105. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error)
  14106. __Pyx_GOTREF(__pyx_t_4);
  14107. __Pyx_GIVEREF(__pyx_t_5);
  14108. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  14109. __pyx_t_5 = 0;
  14110. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error)
  14111. __Pyx_GOTREF(__pyx_t_5);
  14112. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14113. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  14114. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  14115. __PYX_ERR(0, 1333, __pyx_L1_error)
  14116. }
  14117. __Pyx_INCREF(__pyx_v_callback);
  14118. __Pyx_GIVEREF(__pyx_v_callback);
  14119. __Pyx_GOTREF(__pyx_v_self->_callback);
  14120. __Pyx_DECREF(__pyx_v_self->_callback);
  14121. __pyx_v_self->_callback = __pyx_v_callback;
  14122. /* function exit code */
  14123. __pyx_r = 0;
  14124. goto __pyx_L0;
  14125. __pyx_L1_error:;
  14126. __Pyx_XDECREF(__pyx_t_4);
  14127. __Pyx_XDECREF(__pyx_t_5);
  14128. __Pyx_AddTraceback("gevent.libev.corecext.prepare.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14129. __pyx_r = -1;
  14130. __pyx_L0:;
  14131. __Pyx_RefNannyFinishContext();
  14132. return __pyx_r;
  14133. }
  14134. /* Python wrapper */
  14135. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  14136. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  14137. PyObject *__pyx_r = 0;
  14138. __Pyx_RefNannyDeclarations
  14139. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  14140. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_stop(((struct PyGeventPrepareObject *)__pyx_v_self));
  14141. /* function exit code */
  14142. __Pyx_RefNannyFinishContext();
  14143. return __pyx_r;
  14144. }
  14145. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_stop(struct PyGeventPrepareObject *__pyx_v_self) {
  14146. PyObject *__pyx_r = NULL;
  14147. __Pyx_RefNannyDeclarations
  14148. int __pyx_t_1;
  14149. PyObject *__pyx_t_2 = NULL;
  14150. __Pyx_RefNannySetupContext("stop", 0);
  14151. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  14152. if (__pyx_t_1) {
  14153. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14154. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14155. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
  14156. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14157. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  14158. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
  14159. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  14160. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14161. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
  14162. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14163. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14164. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
  14165. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14166. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14167. __Pyx_GOTREF(__pyx_t_2);
  14168. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  14169. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14170. __PYX_ERR(0, 1339, __pyx_L1_error)
  14171. }
  14172. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  14173. if (__pyx_t_1) {
  14174. ev_ref(__pyx_v_self->loop->_ptr);
  14175. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  14176. }
  14177. ev_prepare_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  14178. __Pyx_INCREF(Py_None);
  14179. __Pyx_GIVEREF(Py_None);
  14180. __Pyx_GOTREF(__pyx_v_self->_callback);
  14181. __Pyx_DECREF(__pyx_v_self->_callback);
  14182. __pyx_v_self->_callback = Py_None;
  14183. __Pyx_INCREF(Py_None);
  14184. __Pyx_GIVEREF(Py_None);
  14185. __Pyx_GOTREF(__pyx_v_self->args);
  14186. __Pyx_DECREF(__pyx_v_self->args);
  14187. __pyx_v_self->args = ((PyObject*)Py_None);
  14188. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  14189. if (__pyx_t_1) {
  14190. Py_DECREF(((PyObject*)__pyx_v_self));
  14191. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  14192. }
  14193. /* function exit code */
  14194. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14195. goto __pyx_L0;
  14196. __pyx_L1_error:;
  14197. __Pyx_XDECREF(__pyx_t_2);
  14198. __Pyx_AddTraceback("gevent.libev.corecext.prepare.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14199. __pyx_r = NULL;
  14200. __pyx_L0:;
  14201. __Pyx_XGIVEREF(__pyx_r);
  14202. __Pyx_RefNannyFinishContext();
  14203. return __pyx_r;
  14204. }
  14205. /* Python wrapper */
  14206. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  14207. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_1__get__(PyObject *__pyx_v_self) {
  14208. PyObject *__pyx_r = 0;
  14209. __Pyx_RefNannyDeclarations
  14210. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14211. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_8priority___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14212. /* function exit code */
  14213. __Pyx_RefNannyFinishContext();
  14214. return __pyx_r;
  14215. }
  14216. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_8priority___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14217. PyObject *__pyx_r = NULL;
  14218. __Pyx_RefNannyDeclarations
  14219. PyObject *__pyx_t_1 = NULL;
  14220. __Pyx_RefNannySetupContext("__get__", 0);
  14221. __Pyx_XDECREF(__pyx_r);
  14222. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
  14223. __Pyx_GOTREF(__pyx_t_1);
  14224. __pyx_r = __pyx_t_1;
  14225. __pyx_t_1 = 0;
  14226. goto __pyx_L0;
  14227. /* function exit code */
  14228. __pyx_L1_error:;
  14229. __Pyx_XDECREF(__pyx_t_1);
  14230. __Pyx_AddTraceback("gevent.libev.corecext.prepare.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14231. __pyx_r = NULL;
  14232. __pyx_L0:;
  14233. __Pyx_XGIVEREF(__pyx_r);
  14234. __Pyx_RefNannyFinishContext();
  14235. return __pyx_r;
  14236. }
  14237. /* Python wrapper */
  14238. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  14239. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  14240. int __pyx_v_priority;
  14241. int __pyx_r;
  14242. __Pyx_RefNannyDeclarations
  14243. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  14244. assert(__pyx_arg_priority); {
  14245. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L3_error)
  14246. }
  14247. goto __pyx_L4_argument_unpacking_done;
  14248. __pyx_L3_error:;
  14249. __Pyx_AddTraceback("gevent.libev.corecext.prepare.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14250. __Pyx_RefNannyFinishContext();
  14251. return -1;
  14252. __pyx_L4_argument_unpacking_done:;
  14253. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_8priority_2__set__(((struct PyGeventPrepareObject *)__pyx_v_self), ((int)__pyx_v_priority));
  14254. /* function exit code */
  14255. __Pyx_RefNannyFinishContext();
  14256. return __pyx_r;
  14257. }
  14258. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_8priority_2__set__(struct PyGeventPrepareObject *__pyx_v_self, int __pyx_v_priority) {
  14259. int __pyx_r;
  14260. __Pyx_RefNannyDeclarations
  14261. int __pyx_t_1;
  14262. PyObject *__pyx_t_2 = NULL;
  14263. __Pyx_RefNannySetupContext("__set__", 0);
  14264. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  14265. if (__pyx_t_1) {
  14266. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14267. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14268. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  14269. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14270. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  14271. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  14272. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  14273. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14274. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  14275. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14276. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14277. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  14278. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14279. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14280. __Pyx_GOTREF(__pyx_t_2);
  14281. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  14282. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14283. __PYX_ERR(0, 1357, __pyx_L1_error)
  14284. }
  14285. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  14286. /* function exit code */
  14287. __pyx_r = 0;
  14288. goto __pyx_L0;
  14289. __pyx_L1_error:;
  14290. __Pyx_XDECREF(__pyx_t_2);
  14291. __Pyx_AddTraceback("gevent.libev.corecext.prepare.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14292. __pyx_r = -1;
  14293. __pyx_L0:;
  14294. __Pyx_RefNannyFinishContext();
  14295. return __pyx_r;
  14296. }
  14297. /* Python wrapper */
  14298. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  14299. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  14300. int __pyx_v_revents;
  14301. PyObject *__pyx_v_callback = 0;
  14302. PyObject *__pyx_v_args = 0;
  14303. PyObject *__pyx_r = 0;
  14304. __Pyx_RefNannyDeclarations
  14305. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  14306. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  14307. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  14308. if (unlikely(!__pyx_v_args)) {
  14309. __Pyx_RefNannyFinishContext();
  14310. return NULL;
  14311. }
  14312. __Pyx_GOTREF(__pyx_v_args);
  14313. } else {
  14314. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  14315. }
  14316. {
  14317. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  14318. PyObject* values[2] = {0,0};
  14319. if (unlikely(__pyx_kwds)) {
  14320. Py_ssize_t kw_args;
  14321. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  14322. switch (pos_args) {
  14323. default:
  14324. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14325. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14326. case 0: break;
  14327. }
  14328. kw_args = PyDict_Size(__pyx_kwds);
  14329. switch (pos_args) {
  14330. case 0:
  14331. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  14332. else goto __pyx_L5_argtuple_error;
  14333. case 1:
  14334. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  14335. else {
  14336. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1360, __pyx_L3_error)
  14337. }
  14338. }
  14339. if (unlikely(kw_args > 0)) {
  14340. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  14341. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1360, __pyx_L3_error)
  14342. }
  14343. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  14344. goto __pyx_L5_argtuple_error;
  14345. } else {
  14346. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14347. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14348. }
  14349. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1360, __pyx_L3_error)
  14350. __pyx_v_callback = values[1];
  14351. }
  14352. goto __pyx_L4_argument_unpacking_done;
  14353. __pyx_L5_argtuple_error:;
  14354. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1360, __pyx_L3_error)
  14355. __pyx_L3_error:;
  14356. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  14357. __Pyx_AddTraceback("gevent.libev.corecext.prepare.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14358. __Pyx_RefNannyFinishContext();
  14359. return NULL;
  14360. __pyx_L4_argument_unpacking_done:;
  14361. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_2feed(((struct PyGeventPrepareObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  14362. /* function exit code */
  14363. __Pyx_XDECREF(__pyx_v_args);
  14364. __Pyx_RefNannyFinishContext();
  14365. return __pyx_r;
  14366. }
  14367. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_2feed(struct PyGeventPrepareObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  14368. PyObject *__pyx_r = NULL;
  14369. __Pyx_RefNannyDeclarations
  14370. int __pyx_t_1;
  14371. PyObject *__pyx_t_2 = NULL;
  14372. __Pyx_RefNannySetupContext("feed", 0);
  14373. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  14374. if (__pyx_t_1) {
  14375. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14376. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14377. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
  14378. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14379. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  14380. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
  14381. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  14382. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14383. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
  14384. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14385. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14386. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
  14387. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14388. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14389. __Pyx_GOTREF(__pyx_t_2);
  14390. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  14391. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14392. __PYX_ERR(0, 1363, __pyx_L1_error)
  14393. }
  14394. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1364, __pyx_L1_error)
  14395. __Pyx_INCREF(__pyx_v_args);
  14396. __Pyx_GIVEREF(__pyx_v_args);
  14397. __Pyx_GOTREF(__pyx_v_self->args);
  14398. __Pyx_DECREF(__pyx_v_self->args);
  14399. __pyx_v_self->args = __pyx_v_args;
  14400. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  14401. if (__pyx_t_1) {
  14402. ev_unref(__pyx_v_self->loop->_ptr);
  14403. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  14404. }
  14405. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  14406. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  14407. if (__pyx_t_1) {
  14408. Py_INCREF(((PyObject*)__pyx_v_self));
  14409. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  14410. }
  14411. /* function exit code */
  14412. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14413. goto __pyx_L0;
  14414. __pyx_L1_error:;
  14415. __Pyx_XDECREF(__pyx_t_2);
  14416. __Pyx_AddTraceback("gevent.libev.corecext.prepare.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14417. __pyx_r = NULL;
  14418. __pyx_L0:;
  14419. __Pyx_XGIVEREF(__pyx_r);
  14420. __Pyx_RefNannyFinishContext();
  14421. return __pyx_r;
  14422. }
  14423. /* Python wrapper */
  14424. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  14425. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  14426. PyObject *__pyx_v_callback = 0;
  14427. PyObject *__pyx_v_args = 0;
  14428. PyObject *__pyx_r = 0;
  14429. __Pyx_RefNannyDeclarations
  14430. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  14431. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  14432. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  14433. if (unlikely(!__pyx_v_args)) {
  14434. __Pyx_RefNannyFinishContext();
  14435. return NULL;
  14436. }
  14437. __Pyx_GOTREF(__pyx_v_args);
  14438. } else {
  14439. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  14440. }
  14441. {
  14442. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  14443. PyObject* values[1] = {0};
  14444. if (unlikely(__pyx_kwds)) {
  14445. Py_ssize_t kw_args;
  14446. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  14447. switch (pos_args) {
  14448. default:
  14449. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14450. case 0: break;
  14451. }
  14452. kw_args = PyDict_Size(__pyx_kwds);
  14453. switch (pos_args) {
  14454. case 0:
  14455. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  14456. else goto __pyx_L5_argtuple_error;
  14457. }
  14458. if (unlikely(kw_args > 0)) {
  14459. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  14460. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1374, __pyx_L3_error)
  14461. }
  14462. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  14463. goto __pyx_L5_argtuple_error;
  14464. } else {
  14465. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14466. }
  14467. __pyx_v_callback = values[0];
  14468. }
  14469. goto __pyx_L4_argument_unpacking_done;
  14470. __pyx_L5_argtuple_error:;
  14471. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1374, __pyx_L3_error)
  14472. __pyx_L3_error:;
  14473. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  14474. __Pyx_AddTraceback("gevent.libev.corecext.prepare.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14475. __Pyx_RefNannyFinishContext();
  14476. return NULL;
  14477. __pyx_L4_argument_unpacking_done:;
  14478. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4start(((struct PyGeventPrepareObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  14479. /* function exit code */
  14480. __Pyx_XDECREF(__pyx_v_args);
  14481. __Pyx_RefNannyFinishContext();
  14482. return __pyx_r;
  14483. }
  14484. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4start(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  14485. PyObject *__pyx_r = NULL;
  14486. __Pyx_RefNannyDeclarations
  14487. int __pyx_t_1;
  14488. PyObject *__pyx_t_2 = NULL;
  14489. int __pyx_t_3;
  14490. __Pyx_RefNannySetupContext("start", 0);
  14491. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  14492. if (__pyx_t_1) {
  14493. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14494. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14495. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
  14496. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14497. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  14498. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
  14499. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  14500. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14501. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
  14502. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14503. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14504. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
  14505. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14506. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14507. __Pyx_GOTREF(__pyx_t_2);
  14508. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  14509. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14510. __PYX_ERR(0, 1377, __pyx_L1_error)
  14511. }
  14512. __pyx_t_1 = (__pyx_v_callback == Py_None);
  14513. __pyx_t_3 = (__pyx_t_1 != 0);
  14514. if (__pyx_t_3) {
  14515. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14516. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14517. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
  14518. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14519. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  14520. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
  14521. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  14522. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14523. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
  14524. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14525. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14526. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error)
  14527. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14528. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  14529. __Pyx_GOTREF(__pyx_t_2);
  14530. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  14531. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14532. __PYX_ERR(0, 1379, __pyx_L1_error)
  14533. }
  14534. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  14535. __Pyx_INCREF(__pyx_v_args);
  14536. __Pyx_GIVEREF(__pyx_v_args);
  14537. __Pyx_GOTREF(__pyx_v_self->args);
  14538. __Pyx_DECREF(__pyx_v_self->args);
  14539. __pyx_v_self->args = __pyx_v_args;
  14540. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  14541. if (__pyx_t_3) {
  14542. ev_unref(__pyx_v_self->loop->_ptr);
  14543. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  14544. }
  14545. ev_prepare_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  14546. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  14547. if (__pyx_t_3) {
  14548. Py_INCREF(((PyObject*)__pyx_v_self));
  14549. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  14550. }
  14551. /* function exit code */
  14552. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14553. goto __pyx_L0;
  14554. __pyx_L1_error:;
  14555. __Pyx_XDECREF(__pyx_t_2);
  14556. __Pyx_AddTraceback("gevent.libev.corecext.prepare.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14557. __pyx_r = NULL;
  14558. __pyx_L0:;
  14559. __Pyx_XGIVEREF(__pyx_r);
  14560. __Pyx_RefNannyFinishContext();
  14561. return __pyx_r;
  14562. }
  14563. /* Python wrapper */
  14564. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  14565. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_6active_1__get__(PyObject *__pyx_v_self) {
  14566. PyObject *__pyx_r = 0;
  14567. __Pyx_RefNannyDeclarations
  14568. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14569. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_6active___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14570. /* function exit code */
  14571. __Pyx_RefNannyFinishContext();
  14572. return __pyx_r;
  14573. }
  14574. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_6active___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14575. PyObject *__pyx_r = NULL;
  14576. __Pyx_RefNannyDeclarations
  14577. PyObject *__pyx_t_1 = NULL;
  14578. __Pyx_RefNannySetupContext("__get__", 0);
  14579. __Pyx_XDECREF(__pyx_r);
  14580. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  14581. __Pyx_INCREF(Py_True);
  14582. __pyx_t_1 = Py_True;
  14583. } else {
  14584. __Pyx_INCREF(Py_False);
  14585. __pyx_t_1 = Py_False;
  14586. }
  14587. __pyx_r = __pyx_t_1;
  14588. __pyx_t_1 = 0;
  14589. goto __pyx_L0;
  14590. /* function exit code */
  14591. __pyx_L0:;
  14592. __Pyx_XGIVEREF(__pyx_r);
  14593. __Pyx_RefNannyFinishContext();
  14594. return __pyx_r;
  14595. }
  14596. /* Python wrapper */
  14597. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  14598. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_7pending_1__get__(PyObject *__pyx_v_self) {
  14599. PyObject *__pyx_r = 0;
  14600. __Pyx_RefNannyDeclarations
  14601. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14602. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_7pending___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14603. /* function exit code */
  14604. __Pyx_RefNannyFinishContext();
  14605. return __pyx_r;
  14606. }
  14607. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_7pending___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14608. PyObject *__pyx_r = NULL;
  14609. __Pyx_RefNannyDeclarations
  14610. PyObject *__pyx_t_1 = NULL;
  14611. __Pyx_RefNannySetupContext("__get__", 0);
  14612. __Pyx_XDECREF(__pyx_r);
  14613. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  14614. __Pyx_INCREF(Py_True);
  14615. __pyx_t_1 = Py_True;
  14616. } else {
  14617. __Pyx_INCREF(Py_False);
  14618. __pyx_t_1 = Py_False;
  14619. }
  14620. __pyx_r = __pyx_t_1;
  14621. __pyx_t_1 = 0;
  14622. goto __pyx_L0;
  14623. /* function exit code */
  14624. __pyx_L0:;
  14625. __Pyx_XGIVEREF(__pyx_r);
  14626. __Pyx_RefNannyFinishContext();
  14627. return __pyx_r;
  14628. }
  14629. /* Python wrapper */
  14630. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  14631. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  14632. struct PyGeventLoopObject *__pyx_v_loop = 0;
  14633. PyObject *__pyx_v_ref = 0;
  14634. PyObject *__pyx_v_priority = 0;
  14635. int __pyx_r;
  14636. __Pyx_RefNannyDeclarations
  14637. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  14638. {
  14639. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  14640. PyObject* values[3] = {0,0,0};
  14641. values[1] = ((PyObject *)Py_True);
  14642. values[2] = ((PyObject *)Py_None);
  14643. if (unlikely(__pyx_kwds)) {
  14644. Py_ssize_t kw_args;
  14645. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  14646. switch (pos_args) {
  14647. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  14648. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14649. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14650. case 0: break;
  14651. default: goto __pyx_L5_argtuple_error;
  14652. }
  14653. kw_args = PyDict_Size(__pyx_kwds);
  14654. switch (pos_args) {
  14655. case 0:
  14656. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  14657. else goto __pyx_L5_argtuple_error;
  14658. case 1:
  14659. if (kw_args > 0) {
  14660. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  14661. if (value) { values[1] = value; kw_args--; }
  14662. }
  14663. case 2:
  14664. if (kw_args > 0) {
  14665. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  14666. if (value) { values[2] = value; kw_args--; }
  14667. }
  14668. }
  14669. if (unlikely(kw_args > 0)) {
  14670. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1402, __pyx_L3_error)
  14671. }
  14672. } else {
  14673. switch (PyTuple_GET_SIZE(__pyx_args)) {
  14674. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  14675. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14676. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14677. break;
  14678. default: goto __pyx_L5_argtuple_error;
  14679. }
  14680. }
  14681. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  14682. __pyx_v_ref = values[1];
  14683. __pyx_v_priority = values[2];
  14684. }
  14685. goto __pyx_L4_argument_unpacking_done;
  14686. __pyx_L5_argtuple_error:;
  14687. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1402, __pyx_L3_error)
  14688. __pyx_L3_error:;
  14689. __Pyx_AddTraceback("gevent.libev.corecext.prepare.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14690. __Pyx_RefNannyFinishContext();
  14691. return -1;
  14692. __pyx_L4_argument_unpacking_done:;
  14693. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1402, __pyx_L1_error)
  14694. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_6__init__(((struct PyGeventPrepareObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);
  14695. /* function exit code */
  14696. goto __pyx_L0;
  14697. __pyx_L1_error:;
  14698. __pyx_r = -1;
  14699. __pyx_L0:;
  14700. __Pyx_RefNannyFinishContext();
  14701. return __pyx_r;
  14702. }
  14703. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_6__init__(struct PyGeventPrepareObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  14704. int __pyx_r;
  14705. __Pyx_RefNannyDeclarations
  14706. int __pyx_t_1;
  14707. int __pyx_t_2;
  14708. int __pyx_t_3;
  14709. __Pyx_RefNannySetupContext("__init__", 0);
  14710. ev_prepare_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_prepare));
  14711. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  14712. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  14713. __Pyx_GOTREF(__pyx_v_self->loop);
  14714. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  14715. __pyx_v_self->loop = __pyx_v_loop;
  14716. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1405, __pyx_L1_error)
  14717. if (__pyx_t_1) {
  14718. __pyx_v_self->_flags = 0;
  14719. goto __pyx_L3;
  14720. }
  14721. /*else*/ {
  14722. __pyx_v_self->_flags = 4;
  14723. }
  14724. __pyx_L3:;
  14725. __pyx_t_1 = (__pyx_v_priority != Py_None);
  14726. __pyx_t_2 = (__pyx_t_1 != 0);
  14727. if (__pyx_t_2) {
  14728. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L1_error)
  14729. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_3);
  14730. }
  14731. /* function exit code */
  14732. __pyx_r = 0;
  14733. goto __pyx_L0;
  14734. __pyx_L1_error:;
  14735. __Pyx_AddTraceback("gevent.libev.corecext.prepare.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14736. __pyx_r = -1;
  14737. __pyx_L0:;
  14738. __Pyx_RefNannyFinishContext();
  14739. return __pyx_r;
  14740. }
  14741. /* Python wrapper */
  14742. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  14743. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_1__get__(PyObject *__pyx_v_self) {
  14744. PyObject *__pyx_r = 0;
  14745. __Pyx_RefNannyDeclarations
  14746. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14747. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14748. /* function exit code */
  14749. __Pyx_RefNannyFinishContext();
  14750. return __pyx_r;
  14751. }
  14752. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4loop___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14753. PyObject *__pyx_r = NULL;
  14754. __Pyx_RefNannyDeclarations
  14755. __Pyx_RefNannySetupContext("__get__", 0);
  14756. __Pyx_XDECREF(__pyx_r);
  14757. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  14758. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  14759. goto __pyx_L0;
  14760. /* function exit code */
  14761. __pyx_L0:;
  14762. __Pyx_XGIVEREF(__pyx_r);
  14763. __Pyx_RefNannyFinishContext();
  14764. return __pyx_r;
  14765. }
  14766. /* Python wrapper */
  14767. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  14768. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14769. int __pyx_r;
  14770. __Pyx_RefNannyDeclarations
  14771. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  14772. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_2__set__(((struct PyGeventPrepareObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  14773. /* function exit code */
  14774. __Pyx_RefNannyFinishContext();
  14775. return __pyx_r;
  14776. }
  14777. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14778. int __pyx_r;
  14779. __Pyx_RefNannyDeclarations
  14780. PyObject *__pyx_t_1 = NULL;
  14781. __Pyx_RefNannySetupContext("__set__", 0);
  14782. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1297, __pyx_L1_error)
  14783. __pyx_t_1 = __pyx_v_value;
  14784. __Pyx_INCREF(__pyx_t_1);
  14785. __Pyx_GIVEREF(__pyx_t_1);
  14786. __Pyx_GOTREF(__pyx_v_self->loop);
  14787. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  14788. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  14789. __pyx_t_1 = 0;
  14790. /* function exit code */
  14791. __pyx_r = 0;
  14792. goto __pyx_L0;
  14793. __pyx_L1_error:;
  14794. __Pyx_XDECREF(__pyx_t_1);
  14795. __Pyx_AddTraceback("gevent.libev.corecext.prepare.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14796. __pyx_r = -1;
  14797. __pyx_L0:;
  14798. __Pyx_RefNannyFinishContext();
  14799. return __pyx_r;
  14800. }
  14801. /* Python wrapper */
  14802. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  14803. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_5__del__(PyObject *__pyx_v_self) {
  14804. int __pyx_r;
  14805. __Pyx_RefNannyDeclarations
  14806. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  14807. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_4__del__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14808. /* function exit code */
  14809. __Pyx_RefNannyFinishContext();
  14810. return __pyx_r;
  14811. }
  14812. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4loop_4__del__(struct PyGeventPrepareObject *__pyx_v_self) {
  14813. int __pyx_r;
  14814. __Pyx_RefNannyDeclarations
  14815. __Pyx_RefNannySetupContext("__del__", 0);
  14816. __Pyx_INCREF(Py_None);
  14817. __Pyx_GIVEREF(Py_None);
  14818. __Pyx_GOTREF(__pyx_v_self->loop);
  14819. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  14820. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  14821. /* function exit code */
  14822. __pyx_r = 0;
  14823. __Pyx_RefNannyFinishContext();
  14824. return __pyx_r;
  14825. }
  14826. /* Python wrapper */
  14827. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  14828. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_4args_1__get__(PyObject *__pyx_v_self) {
  14829. PyObject *__pyx_r = 0;
  14830. __Pyx_RefNannyDeclarations
  14831. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14832. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4args___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14833. /* function exit code */
  14834. __Pyx_RefNannyFinishContext();
  14835. return __pyx_r;
  14836. }
  14837. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_4args___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14838. PyObject *__pyx_r = NULL;
  14839. __Pyx_RefNannyDeclarations
  14840. __Pyx_RefNannySetupContext("__get__", 0);
  14841. __Pyx_XDECREF(__pyx_r);
  14842. __Pyx_INCREF(__pyx_v_self->args);
  14843. __pyx_r = __pyx_v_self->args;
  14844. goto __pyx_L0;
  14845. /* function exit code */
  14846. __pyx_L0:;
  14847. __Pyx_XGIVEREF(__pyx_r);
  14848. __Pyx_RefNannyFinishContext();
  14849. return __pyx_r;
  14850. }
  14851. /* Python wrapper */
  14852. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  14853. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14854. int __pyx_r;
  14855. __Pyx_RefNannyDeclarations
  14856. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  14857. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_2__set__(((struct PyGeventPrepareObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  14858. /* function exit code */
  14859. __Pyx_RefNannyFinishContext();
  14860. return __pyx_r;
  14861. }
  14862. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_2__set__(struct PyGeventPrepareObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14863. int __pyx_r;
  14864. __Pyx_RefNannyDeclarations
  14865. PyObject *__pyx_t_1 = NULL;
  14866. __Pyx_RefNannySetupContext("__set__", 0);
  14867. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1299, __pyx_L1_error)
  14868. __pyx_t_1 = __pyx_v_value;
  14869. __Pyx_INCREF(__pyx_t_1);
  14870. __Pyx_GIVEREF(__pyx_t_1);
  14871. __Pyx_GOTREF(__pyx_v_self->args);
  14872. __Pyx_DECREF(__pyx_v_self->args);
  14873. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  14874. __pyx_t_1 = 0;
  14875. /* function exit code */
  14876. __pyx_r = 0;
  14877. goto __pyx_L0;
  14878. __pyx_L1_error:;
  14879. __Pyx_XDECREF(__pyx_t_1);
  14880. __Pyx_AddTraceback("gevent.libev.corecext.prepare.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14881. __pyx_r = -1;
  14882. __pyx_L0:;
  14883. __Pyx_RefNannyFinishContext();
  14884. return __pyx_r;
  14885. }
  14886. /* Python wrapper */
  14887. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  14888. static int __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_5__del__(PyObject *__pyx_v_self) {
  14889. int __pyx_r;
  14890. __Pyx_RefNannyDeclarations
  14891. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  14892. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_4__del__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14893. /* function exit code */
  14894. __Pyx_RefNannyFinishContext();
  14895. return __pyx_r;
  14896. }
  14897. static int __pyx_pf_6gevent_5libev_8corecext_7prepare_4args_4__del__(struct PyGeventPrepareObject *__pyx_v_self) {
  14898. int __pyx_r;
  14899. __Pyx_RefNannyDeclarations
  14900. __Pyx_RefNannySetupContext("__del__", 0);
  14901. __Pyx_INCREF(Py_None);
  14902. __Pyx_GIVEREF(Py_None);
  14903. __Pyx_GOTREF(__pyx_v_self->args);
  14904. __Pyx_DECREF(__pyx_v_self->args);
  14905. __pyx_v_self->args = ((PyObject*)Py_None);
  14906. /* function exit code */
  14907. __pyx_r = 0;
  14908. __Pyx_RefNannyFinishContext();
  14909. return __pyx_r;
  14910. }
  14911. /* Python wrapper */
  14912. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  14913. static PyObject *__pyx_pw_6gevent_5libev_8corecext_7prepare_6_flags_1__get__(PyObject *__pyx_v_self) {
  14914. PyObject *__pyx_r = 0;
  14915. __Pyx_RefNannyDeclarations
  14916. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14917. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_7prepare_6_flags___get__(((struct PyGeventPrepareObject *)__pyx_v_self));
  14918. /* function exit code */
  14919. __Pyx_RefNannyFinishContext();
  14920. return __pyx_r;
  14921. }
  14922. static PyObject *__pyx_pf_6gevent_5libev_8corecext_7prepare_6_flags___get__(struct PyGeventPrepareObject *__pyx_v_self) {
  14923. PyObject *__pyx_r = NULL;
  14924. __Pyx_RefNannyDeclarations
  14925. PyObject *__pyx_t_1 = NULL;
  14926. __Pyx_RefNannySetupContext("__get__", 0);
  14927. __Pyx_XDECREF(__pyx_r);
  14928. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  14929. __Pyx_GOTREF(__pyx_t_1);
  14930. __pyx_r = __pyx_t_1;
  14931. __pyx_t_1 = 0;
  14932. goto __pyx_L0;
  14933. /* function exit code */
  14934. __pyx_L1_error:;
  14935. __Pyx_XDECREF(__pyx_t_1);
  14936. __Pyx_AddTraceback("gevent.libev.corecext.prepare._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14937. __pyx_r = NULL;
  14938. __pyx_L0:;
  14939. __Pyx_XGIVEREF(__pyx_r);
  14940. __Pyx_RefNannyFinishContext();
  14941. return __pyx_r;
  14942. }
  14943. /* Python wrapper */
  14944. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  14945. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_3ref_1__get__(PyObject *__pyx_v_self) {
  14946. PyObject *__pyx_r = 0;
  14947. __Pyx_RefNannyDeclarations
  14948. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  14949. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_3ref___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  14950. /* function exit code */
  14951. __Pyx_RefNannyFinishContext();
  14952. return __pyx_r;
  14953. }
  14954. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_3ref___get__(struct PyGeventCheckObject *__pyx_v_self) {
  14955. PyObject *__pyx_r = NULL;
  14956. __Pyx_RefNannyDeclarations
  14957. PyObject *__pyx_t_1 = NULL;
  14958. __Pyx_RefNannySetupContext("__get__", 0);
  14959. __Pyx_XDECREF(__pyx_r);
  14960. if (((__pyx_v_self->_flags & 4) != 0)) {
  14961. __Pyx_INCREF(Py_False);
  14962. __pyx_t_1 = Py_False;
  14963. } else {
  14964. __Pyx_INCREF(Py_True);
  14965. __pyx_t_1 = Py_True;
  14966. }
  14967. __pyx_r = __pyx_t_1;
  14968. __pyx_t_1 = 0;
  14969. goto __pyx_L0;
  14970. /* function exit code */
  14971. __pyx_L0:;
  14972. __Pyx_XGIVEREF(__pyx_r);
  14973. __Pyx_RefNannyFinishContext();
  14974. return __pyx_r;
  14975. }
  14976. /* Python wrapper */
  14977. static int __pyx_pw_6gevent_5libev_8corecext_5check_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  14978. static int __pyx_pw_6gevent_5libev_8corecext_5check_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14979. int __pyx_r;
  14980. __Pyx_RefNannyDeclarations
  14981. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  14982. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_3ref_2__set__(((struct PyGeventCheckObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  14983. /* function exit code */
  14984. __Pyx_RefNannyFinishContext();
  14985. return __pyx_r;
  14986. }
  14987. static int __pyx_pf_6gevent_5libev_8corecext_5check_3ref_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value) {
  14988. int __pyx_r;
  14989. __Pyx_RefNannyDeclarations
  14990. int __pyx_t_1;
  14991. PyObject *__pyx_t_2 = NULL;
  14992. int __pyx_t_3;
  14993. __Pyx_RefNannySetupContext("__set__", 0);
  14994. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  14995. if (__pyx_t_1) {
  14996. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  14997. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  14998. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  14999. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15000. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15001. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  15002. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15003. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15004. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  15005. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15006. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15007. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
  15008. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15009. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15010. __Pyx_GOTREF(__pyx_t_2);
  15011. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15012. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15013. __PYX_ERR(0, 1430, __pyx_L1_error)
  15014. }
  15015. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1431, __pyx_L1_error)
  15016. if (__pyx_t_1) {
  15017. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  15018. if (__pyx_t_1) {
  15019. __pyx_r = 0;
  15020. goto __pyx_L0;
  15021. }
  15022. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  15023. if (__pyx_t_1) {
  15024. ev_ref(__pyx_v_self->loop->_ptr);
  15025. }
  15026. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  15027. goto __pyx_L4;
  15028. }
  15029. /*else*/ {
  15030. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  15031. if (__pyx_t_1) {
  15032. __pyx_r = 0;
  15033. goto __pyx_L0;
  15034. }
  15035. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  15036. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  15037. if (__pyx_t_3) {
  15038. } else {
  15039. __pyx_t_1 = __pyx_t_3;
  15040. goto __pyx_L9_bool_binop_done;
  15041. }
  15042. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  15043. __pyx_t_1 = __pyx_t_3;
  15044. __pyx_L9_bool_binop_done:;
  15045. if (__pyx_t_1) {
  15046. ev_unref(__pyx_v_self->loop->_ptr);
  15047. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  15048. }
  15049. }
  15050. __pyx_L4:;
  15051. /* function exit code */
  15052. __pyx_r = 0;
  15053. goto __pyx_L0;
  15054. __pyx_L1_error:;
  15055. __Pyx_XDECREF(__pyx_t_2);
  15056. __Pyx_AddTraceback("gevent.libev.corecext.check.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15057. __pyx_r = -1;
  15058. __pyx_L0:;
  15059. __Pyx_RefNannyFinishContext();
  15060. return __pyx_r;
  15061. }
  15062. /* Python wrapper */
  15063. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  15064. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_8callback_1__get__(PyObject *__pyx_v_self) {
  15065. PyObject *__pyx_r = 0;
  15066. __Pyx_RefNannyDeclarations
  15067. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15068. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_8callback___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15069. /* function exit code */
  15070. __Pyx_RefNannyFinishContext();
  15071. return __pyx_r;
  15072. }
  15073. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_8callback___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15074. PyObject *__pyx_r = NULL;
  15075. __Pyx_RefNannyDeclarations
  15076. __Pyx_RefNannySetupContext("__get__", 0);
  15077. __Pyx_XDECREF(__pyx_r);
  15078. __Pyx_INCREF(__pyx_v_self->_callback);
  15079. __pyx_r = __pyx_v_self->_callback;
  15080. goto __pyx_L0;
  15081. /* function exit code */
  15082. __pyx_L0:;
  15083. __Pyx_XGIVEREF(__pyx_r);
  15084. __Pyx_RefNannyFinishContext();
  15085. return __pyx_r;
  15086. }
  15087. /* Python wrapper */
  15088. static int __pyx_pw_6gevent_5libev_8corecext_5check_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  15089. static int __pyx_pw_6gevent_5libev_8corecext_5check_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  15090. int __pyx_r;
  15091. __Pyx_RefNannyDeclarations
  15092. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  15093. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_8callback_2__set__(((struct PyGeventCheckObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  15094. /* function exit code */
  15095. __Pyx_RefNannyFinishContext();
  15096. return __pyx_r;
  15097. }
  15098. static int __pyx_pf_6gevent_5libev_8corecext_5check_8callback_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  15099. int __pyx_r;
  15100. __Pyx_RefNannyDeclarations
  15101. int __pyx_t_1;
  15102. int __pyx_t_2;
  15103. int __pyx_t_3;
  15104. PyObject *__pyx_t_4 = NULL;
  15105. PyObject *__pyx_t_5 = NULL;
  15106. __Pyx_RefNannySetupContext("__set__", 0);
  15107. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  15108. if (__pyx_t_2) {
  15109. } else {
  15110. __pyx_t_1 = __pyx_t_2;
  15111. goto __pyx_L4_bool_binop_done;
  15112. }
  15113. __pyx_t_2 = (__pyx_v_callback != Py_None);
  15114. __pyx_t_3 = (__pyx_t_2 != 0);
  15115. __pyx_t_1 = __pyx_t_3;
  15116. __pyx_L4_bool_binop_done:;
  15117. if (__pyx_t_1) {
  15118. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
  15119. __Pyx_GOTREF(__pyx_t_4);
  15120. __Pyx_INCREF(__pyx_v_callback);
  15121. __Pyx_GIVEREF(__pyx_v_callback);
  15122. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  15123. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1452, __pyx_L1_error)
  15124. __Pyx_GOTREF(__pyx_t_5);
  15125. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15126. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
  15127. __Pyx_GOTREF(__pyx_t_4);
  15128. __Pyx_GIVEREF(__pyx_t_5);
  15129. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  15130. __pyx_t_5 = 0;
  15131. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1452, __pyx_L1_error)
  15132. __Pyx_GOTREF(__pyx_t_5);
  15133. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  15134. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  15135. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  15136. __PYX_ERR(0, 1452, __pyx_L1_error)
  15137. }
  15138. __Pyx_INCREF(__pyx_v_callback);
  15139. __Pyx_GIVEREF(__pyx_v_callback);
  15140. __Pyx_GOTREF(__pyx_v_self->_callback);
  15141. __Pyx_DECREF(__pyx_v_self->_callback);
  15142. __pyx_v_self->_callback = __pyx_v_callback;
  15143. /* function exit code */
  15144. __pyx_r = 0;
  15145. goto __pyx_L0;
  15146. __pyx_L1_error:;
  15147. __Pyx_XDECREF(__pyx_t_4);
  15148. __Pyx_XDECREF(__pyx_t_5);
  15149. __Pyx_AddTraceback("gevent.libev.corecext.check.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15150. __pyx_r = -1;
  15151. __pyx_L0:;
  15152. __Pyx_RefNannyFinishContext();
  15153. return __pyx_r;
  15154. }
  15155. /* Python wrapper */
  15156. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  15157. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  15158. PyObject *__pyx_r = 0;
  15159. __Pyx_RefNannyDeclarations
  15160. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  15161. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_stop(((struct PyGeventCheckObject *)__pyx_v_self));
  15162. /* function exit code */
  15163. __Pyx_RefNannyFinishContext();
  15164. return __pyx_r;
  15165. }
  15166. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_stop(struct PyGeventCheckObject *__pyx_v_self) {
  15167. PyObject *__pyx_r = NULL;
  15168. __Pyx_RefNannyDeclarations
  15169. int __pyx_t_1;
  15170. PyObject *__pyx_t_2 = NULL;
  15171. __Pyx_RefNannySetupContext("stop", 0);
  15172. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  15173. if (__pyx_t_1) {
  15174. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15175. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15176. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error)
  15177. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15178. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15179. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error)
  15180. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15181. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15182. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error)
  15183. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15184. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15185. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error)
  15186. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15187. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15188. __Pyx_GOTREF(__pyx_t_2);
  15189. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15190. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15191. __PYX_ERR(0, 1458, __pyx_L1_error)
  15192. }
  15193. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  15194. if (__pyx_t_1) {
  15195. ev_ref(__pyx_v_self->loop->_ptr);
  15196. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  15197. }
  15198. ev_check_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  15199. __Pyx_INCREF(Py_None);
  15200. __Pyx_GIVEREF(Py_None);
  15201. __Pyx_GOTREF(__pyx_v_self->_callback);
  15202. __Pyx_DECREF(__pyx_v_self->_callback);
  15203. __pyx_v_self->_callback = Py_None;
  15204. __Pyx_INCREF(Py_None);
  15205. __Pyx_GIVEREF(Py_None);
  15206. __Pyx_GOTREF(__pyx_v_self->args);
  15207. __Pyx_DECREF(__pyx_v_self->args);
  15208. __pyx_v_self->args = ((PyObject*)Py_None);
  15209. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  15210. if (__pyx_t_1) {
  15211. Py_DECREF(((PyObject*)__pyx_v_self));
  15212. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  15213. }
  15214. /* function exit code */
  15215. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15216. goto __pyx_L0;
  15217. __pyx_L1_error:;
  15218. __Pyx_XDECREF(__pyx_t_2);
  15219. __Pyx_AddTraceback("gevent.libev.corecext.check.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15220. __pyx_r = NULL;
  15221. __pyx_L0:;
  15222. __Pyx_XGIVEREF(__pyx_r);
  15223. __Pyx_RefNannyFinishContext();
  15224. return __pyx_r;
  15225. }
  15226. /* Python wrapper */
  15227. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  15228. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_8priority_1__get__(PyObject *__pyx_v_self) {
  15229. PyObject *__pyx_r = 0;
  15230. __Pyx_RefNannyDeclarations
  15231. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15232. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_8priority___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15233. /* function exit code */
  15234. __Pyx_RefNannyFinishContext();
  15235. return __pyx_r;
  15236. }
  15237. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_8priority___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15238. PyObject *__pyx_r = NULL;
  15239. __Pyx_RefNannyDeclarations
  15240. PyObject *__pyx_t_1 = NULL;
  15241. __Pyx_RefNannySetupContext("__get__", 0);
  15242. __Pyx_XDECREF(__pyx_r);
  15243. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  15244. __Pyx_GOTREF(__pyx_t_1);
  15245. __pyx_r = __pyx_t_1;
  15246. __pyx_t_1 = 0;
  15247. goto __pyx_L0;
  15248. /* function exit code */
  15249. __pyx_L1_error:;
  15250. __Pyx_XDECREF(__pyx_t_1);
  15251. __Pyx_AddTraceback("gevent.libev.corecext.check.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15252. __pyx_r = NULL;
  15253. __pyx_L0:;
  15254. __Pyx_XGIVEREF(__pyx_r);
  15255. __Pyx_RefNannyFinishContext();
  15256. return __pyx_r;
  15257. }
  15258. /* Python wrapper */
  15259. static int __pyx_pw_6gevent_5libev_8corecext_5check_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  15260. static int __pyx_pw_6gevent_5libev_8corecext_5check_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  15261. int __pyx_v_priority;
  15262. int __pyx_r;
  15263. __Pyx_RefNannyDeclarations
  15264. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  15265. assert(__pyx_arg_priority); {
  15266. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1474, __pyx_L3_error)
  15267. }
  15268. goto __pyx_L4_argument_unpacking_done;
  15269. __pyx_L3_error:;
  15270. __Pyx_AddTraceback("gevent.libev.corecext.check.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15271. __Pyx_RefNannyFinishContext();
  15272. return -1;
  15273. __pyx_L4_argument_unpacking_done:;
  15274. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_8priority_2__set__(((struct PyGeventCheckObject *)__pyx_v_self), ((int)__pyx_v_priority));
  15275. /* function exit code */
  15276. __Pyx_RefNannyFinishContext();
  15277. return __pyx_r;
  15278. }
  15279. static int __pyx_pf_6gevent_5libev_8corecext_5check_8priority_2__set__(struct PyGeventCheckObject *__pyx_v_self, int __pyx_v_priority) {
  15280. int __pyx_r;
  15281. __Pyx_RefNannyDeclarations
  15282. int __pyx_t_1;
  15283. PyObject *__pyx_t_2 = NULL;
  15284. __Pyx_RefNannySetupContext("__set__", 0);
  15285. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  15286. if (__pyx_t_1) {
  15287. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15288. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15289. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
  15290. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15291. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15292. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
  15293. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15294. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15295. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
  15296. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15297. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15298. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error)
  15299. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15300. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15301. __Pyx_GOTREF(__pyx_t_2);
  15302. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15303. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15304. __PYX_ERR(0, 1476, __pyx_L1_error)
  15305. }
  15306. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  15307. /* function exit code */
  15308. __pyx_r = 0;
  15309. goto __pyx_L0;
  15310. __pyx_L1_error:;
  15311. __Pyx_XDECREF(__pyx_t_2);
  15312. __Pyx_AddTraceback("gevent.libev.corecext.check.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15313. __pyx_r = -1;
  15314. __pyx_L0:;
  15315. __Pyx_RefNannyFinishContext();
  15316. return __pyx_r;
  15317. }
  15318. /* Python wrapper */
  15319. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  15320. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  15321. int __pyx_v_revents;
  15322. PyObject *__pyx_v_callback = 0;
  15323. PyObject *__pyx_v_args = 0;
  15324. PyObject *__pyx_r = 0;
  15325. __Pyx_RefNannyDeclarations
  15326. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  15327. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  15328. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  15329. if (unlikely(!__pyx_v_args)) {
  15330. __Pyx_RefNannyFinishContext();
  15331. return NULL;
  15332. }
  15333. __Pyx_GOTREF(__pyx_v_args);
  15334. } else {
  15335. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  15336. }
  15337. {
  15338. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  15339. PyObject* values[2] = {0,0};
  15340. if (unlikely(__pyx_kwds)) {
  15341. Py_ssize_t kw_args;
  15342. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  15343. switch (pos_args) {
  15344. default:
  15345. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  15346. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15347. case 0: break;
  15348. }
  15349. kw_args = PyDict_Size(__pyx_kwds);
  15350. switch (pos_args) {
  15351. case 0:
  15352. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  15353. else goto __pyx_L5_argtuple_error;
  15354. case 1:
  15355. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  15356. else {
  15357. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1479, __pyx_L3_error)
  15358. }
  15359. }
  15360. if (unlikely(kw_args > 0)) {
  15361. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  15362. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1479, __pyx_L3_error)
  15363. }
  15364. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  15365. goto __pyx_L5_argtuple_error;
  15366. } else {
  15367. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15368. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  15369. }
  15370. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1479, __pyx_L3_error)
  15371. __pyx_v_callback = values[1];
  15372. }
  15373. goto __pyx_L4_argument_unpacking_done;
  15374. __pyx_L5_argtuple_error:;
  15375. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1479, __pyx_L3_error)
  15376. __pyx_L3_error:;
  15377. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  15378. __Pyx_AddTraceback("gevent.libev.corecext.check.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15379. __Pyx_RefNannyFinishContext();
  15380. return NULL;
  15381. __pyx_L4_argument_unpacking_done:;
  15382. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_2feed(((struct PyGeventCheckObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  15383. /* function exit code */
  15384. __Pyx_XDECREF(__pyx_v_args);
  15385. __Pyx_RefNannyFinishContext();
  15386. return __pyx_r;
  15387. }
  15388. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_2feed(struct PyGeventCheckObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  15389. PyObject *__pyx_r = NULL;
  15390. __Pyx_RefNannyDeclarations
  15391. int __pyx_t_1;
  15392. PyObject *__pyx_t_2 = NULL;
  15393. __Pyx_RefNannySetupContext("feed", 0);
  15394. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  15395. if (__pyx_t_1) {
  15396. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15397. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15398. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
  15399. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15400. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15401. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
  15402. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15403. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15404. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
  15405. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15406. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15407. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
  15408. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15409. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15410. __Pyx_GOTREF(__pyx_t_2);
  15411. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15412. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15413. __PYX_ERR(0, 1482, __pyx_L1_error)
  15414. }
  15415. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1483, __pyx_L1_error)
  15416. __Pyx_INCREF(__pyx_v_args);
  15417. __Pyx_GIVEREF(__pyx_v_args);
  15418. __Pyx_GOTREF(__pyx_v_self->args);
  15419. __Pyx_DECREF(__pyx_v_self->args);
  15420. __pyx_v_self->args = __pyx_v_args;
  15421. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  15422. if (__pyx_t_1) {
  15423. ev_unref(__pyx_v_self->loop->_ptr);
  15424. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  15425. }
  15426. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  15427. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  15428. if (__pyx_t_1) {
  15429. Py_INCREF(((PyObject*)__pyx_v_self));
  15430. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  15431. }
  15432. /* function exit code */
  15433. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15434. goto __pyx_L0;
  15435. __pyx_L1_error:;
  15436. __Pyx_XDECREF(__pyx_t_2);
  15437. __Pyx_AddTraceback("gevent.libev.corecext.check.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15438. __pyx_r = NULL;
  15439. __pyx_L0:;
  15440. __Pyx_XGIVEREF(__pyx_r);
  15441. __Pyx_RefNannyFinishContext();
  15442. return __pyx_r;
  15443. }
  15444. /* Python wrapper */
  15445. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  15446. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  15447. PyObject *__pyx_v_callback = 0;
  15448. PyObject *__pyx_v_args = 0;
  15449. PyObject *__pyx_r = 0;
  15450. __Pyx_RefNannyDeclarations
  15451. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  15452. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  15453. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  15454. if (unlikely(!__pyx_v_args)) {
  15455. __Pyx_RefNannyFinishContext();
  15456. return NULL;
  15457. }
  15458. __Pyx_GOTREF(__pyx_v_args);
  15459. } else {
  15460. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  15461. }
  15462. {
  15463. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  15464. PyObject* values[1] = {0};
  15465. if (unlikely(__pyx_kwds)) {
  15466. Py_ssize_t kw_args;
  15467. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  15468. switch (pos_args) {
  15469. default:
  15470. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15471. case 0: break;
  15472. }
  15473. kw_args = PyDict_Size(__pyx_kwds);
  15474. switch (pos_args) {
  15475. case 0:
  15476. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  15477. else goto __pyx_L5_argtuple_error;
  15478. }
  15479. if (unlikely(kw_args > 0)) {
  15480. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  15481. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1493, __pyx_L3_error)
  15482. }
  15483. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  15484. goto __pyx_L5_argtuple_error;
  15485. } else {
  15486. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15487. }
  15488. __pyx_v_callback = values[0];
  15489. }
  15490. goto __pyx_L4_argument_unpacking_done;
  15491. __pyx_L5_argtuple_error:;
  15492. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1493, __pyx_L3_error)
  15493. __pyx_L3_error:;
  15494. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  15495. __Pyx_AddTraceback("gevent.libev.corecext.check.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15496. __Pyx_RefNannyFinishContext();
  15497. return NULL;
  15498. __pyx_L4_argument_unpacking_done:;
  15499. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4start(((struct PyGeventCheckObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  15500. /* function exit code */
  15501. __Pyx_XDECREF(__pyx_v_args);
  15502. __Pyx_RefNannyFinishContext();
  15503. return __pyx_r;
  15504. }
  15505. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4start(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  15506. PyObject *__pyx_r = NULL;
  15507. __Pyx_RefNannyDeclarations
  15508. int __pyx_t_1;
  15509. PyObject *__pyx_t_2 = NULL;
  15510. int __pyx_t_3;
  15511. __Pyx_RefNannySetupContext("start", 0);
  15512. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  15513. if (__pyx_t_1) {
  15514. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15515. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15516. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
  15517. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15518. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15519. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
  15520. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15521. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15522. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
  15523. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15524. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15525. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
  15526. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15527. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15528. __Pyx_GOTREF(__pyx_t_2);
  15529. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15530. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15531. __PYX_ERR(0, 1496, __pyx_L1_error)
  15532. }
  15533. __pyx_t_1 = (__pyx_v_callback == Py_None);
  15534. __pyx_t_3 = (__pyx_t_1 != 0);
  15535. if (__pyx_t_3) {
  15536. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15537. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15538. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  15539. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15540. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  15541. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  15542. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  15543. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15544. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  15545. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15546. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  15547. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  15548. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  15549. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  15550. __Pyx_GOTREF(__pyx_t_2);
  15551. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  15552. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  15553. __PYX_ERR(0, 1498, __pyx_L1_error)
  15554. }
  15555. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1499, __pyx_L1_error)
  15556. __Pyx_INCREF(__pyx_v_args);
  15557. __Pyx_GIVEREF(__pyx_v_args);
  15558. __Pyx_GOTREF(__pyx_v_self->args);
  15559. __Pyx_DECREF(__pyx_v_self->args);
  15560. __pyx_v_self->args = __pyx_v_args;
  15561. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  15562. if (__pyx_t_3) {
  15563. ev_unref(__pyx_v_self->loop->_ptr);
  15564. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  15565. }
  15566. ev_check_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  15567. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  15568. if (__pyx_t_3) {
  15569. Py_INCREF(((PyObject*)__pyx_v_self));
  15570. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  15571. }
  15572. /* function exit code */
  15573. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  15574. goto __pyx_L0;
  15575. __pyx_L1_error:;
  15576. __Pyx_XDECREF(__pyx_t_2);
  15577. __Pyx_AddTraceback("gevent.libev.corecext.check.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15578. __pyx_r = NULL;
  15579. __pyx_L0:;
  15580. __Pyx_XGIVEREF(__pyx_r);
  15581. __Pyx_RefNannyFinishContext();
  15582. return __pyx_r;
  15583. }
  15584. /* Python wrapper */
  15585. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  15586. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_6active_1__get__(PyObject *__pyx_v_self) {
  15587. PyObject *__pyx_r = 0;
  15588. __Pyx_RefNannyDeclarations
  15589. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15590. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_6active___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15591. /* function exit code */
  15592. __Pyx_RefNannyFinishContext();
  15593. return __pyx_r;
  15594. }
  15595. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_6active___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15596. PyObject *__pyx_r = NULL;
  15597. __Pyx_RefNannyDeclarations
  15598. PyObject *__pyx_t_1 = NULL;
  15599. __Pyx_RefNannySetupContext("__get__", 0);
  15600. __Pyx_XDECREF(__pyx_r);
  15601. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  15602. __Pyx_INCREF(Py_True);
  15603. __pyx_t_1 = Py_True;
  15604. } else {
  15605. __Pyx_INCREF(Py_False);
  15606. __pyx_t_1 = Py_False;
  15607. }
  15608. __pyx_r = __pyx_t_1;
  15609. __pyx_t_1 = 0;
  15610. goto __pyx_L0;
  15611. /* function exit code */
  15612. __pyx_L0:;
  15613. __Pyx_XGIVEREF(__pyx_r);
  15614. __Pyx_RefNannyFinishContext();
  15615. return __pyx_r;
  15616. }
  15617. /* Python wrapper */
  15618. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  15619. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_7pending_1__get__(PyObject *__pyx_v_self) {
  15620. PyObject *__pyx_r = 0;
  15621. __Pyx_RefNannyDeclarations
  15622. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15623. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_7pending___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15624. /* function exit code */
  15625. __Pyx_RefNannyFinishContext();
  15626. return __pyx_r;
  15627. }
  15628. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_7pending___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15629. PyObject *__pyx_r = NULL;
  15630. __Pyx_RefNannyDeclarations
  15631. PyObject *__pyx_t_1 = NULL;
  15632. __Pyx_RefNannySetupContext("__get__", 0);
  15633. __Pyx_XDECREF(__pyx_r);
  15634. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  15635. __Pyx_INCREF(Py_True);
  15636. __pyx_t_1 = Py_True;
  15637. } else {
  15638. __Pyx_INCREF(Py_False);
  15639. __pyx_t_1 = Py_False;
  15640. }
  15641. __pyx_r = __pyx_t_1;
  15642. __pyx_t_1 = 0;
  15643. goto __pyx_L0;
  15644. /* function exit code */
  15645. __pyx_L0:;
  15646. __Pyx_XGIVEREF(__pyx_r);
  15647. __Pyx_RefNannyFinishContext();
  15648. return __pyx_r;
  15649. }
  15650. /* Python wrapper */
  15651. static int __pyx_pw_6gevent_5libev_8corecext_5check_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  15652. static int __pyx_pw_6gevent_5libev_8corecext_5check_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  15653. struct PyGeventLoopObject *__pyx_v_loop = 0;
  15654. PyObject *__pyx_v_ref = 0;
  15655. PyObject *__pyx_v_priority = 0;
  15656. int __pyx_r;
  15657. __Pyx_RefNannyDeclarations
  15658. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  15659. {
  15660. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  15661. PyObject* values[3] = {0,0,0};
  15662. values[1] = ((PyObject *)Py_True);
  15663. values[2] = ((PyObject *)Py_None);
  15664. if (unlikely(__pyx_kwds)) {
  15665. Py_ssize_t kw_args;
  15666. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  15667. switch (pos_args) {
  15668. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  15669. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  15670. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15671. case 0: break;
  15672. default: goto __pyx_L5_argtuple_error;
  15673. }
  15674. kw_args = PyDict_Size(__pyx_kwds);
  15675. switch (pos_args) {
  15676. case 0:
  15677. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  15678. else goto __pyx_L5_argtuple_error;
  15679. case 1:
  15680. if (kw_args > 0) {
  15681. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  15682. if (value) { values[1] = value; kw_args--; }
  15683. }
  15684. case 2:
  15685. if (kw_args > 0) {
  15686. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  15687. if (value) { values[2] = value; kw_args--; }
  15688. }
  15689. }
  15690. if (unlikely(kw_args > 0)) {
  15691. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1521, __pyx_L3_error)
  15692. }
  15693. } else {
  15694. switch (PyTuple_GET_SIZE(__pyx_args)) {
  15695. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  15696. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  15697. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  15698. break;
  15699. default: goto __pyx_L5_argtuple_error;
  15700. }
  15701. }
  15702. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  15703. __pyx_v_ref = values[1];
  15704. __pyx_v_priority = values[2];
  15705. }
  15706. goto __pyx_L4_argument_unpacking_done;
  15707. __pyx_L5_argtuple_error:;
  15708. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1521, __pyx_L3_error)
  15709. __pyx_L3_error:;
  15710. __Pyx_AddTraceback("gevent.libev.corecext.check.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15711. __Pyx_RefNannyFinishContext();
  15712. return -1;
  15713. __pyx_L4_argument_unpacking_done:;
  15714. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1521, __pyx_L1_error)
  15715. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_6__init__(((struct PyGeventCheckObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);
  15716. /* function exit code */
  15717. goto __pyx_L0;
  15718. __pyx_L1_error:;
  15719. __pyx_r = -1;
  15720. __pyx_L0:;
  15721. __Pyx_RefNannyFinishContext();
  15722. return __pyx_r;
  15723. }
  15724. static int __pyx_pf_6gevent_5libev_8corecext_5check_6__init__(struct PyGeventCheckObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  15725. int __pyx_r;
  15726. __Pyx_RefNannyDeclarations
  15727. int __pyx_t_1;
  15728. int __pyx_t_2;
  15729. int __pyx_t_3;
  15730. __Pyx_RefNannySetupContext("__init__", 0);
  15731. ev_check_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_check));
  15732. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  15733. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  15734. __Pyx_GOTREF(__pyx_v_self->loop);
  15735. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  15736. __pyx_v_self->loop = __pyx_v_loop;
  15737. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1524, __pyx_L1_error)
  15738. if (__pyx_t_1) {
  15739. __pyx_v_self->_flags = 0;
  15740. goto __pyx_L3;
  15741. }
  15742. /*else*/ {
  15743. __pyx_v_self->_flags = 4;
  15744. }
  15745. __pyx_L3:;
  15746. __pyx_t_1 = (__pyx_v_priority != Py_None);
  15747. __pyx_t_2 = (__pyx_t_1 != 0);
  15748. if (__pyx_t_2) {
  15749. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L1_error)
  15750. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_3);
  15751. }
  15752. /* function exit code */
  15753. __pyx_r = 0;
  15754. goto __pyx_L0;
  15755. __pyx_L1_error:;
  15756. __Pyx_AddTraceback("gevent.libev.corecext.check.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15757. __pyx_r = -1;
  15758. __pyx_L0:;
  15759. __Pyx_RefNannyFinishContext();
  15760. return __pyx_r;
  15761. }
  15762. /* Python wrapper */
  15763. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  15764. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_4loop_1__get__(PyObject *__pyx_v_self) {
  15765. PyObject *__pyx_r = 0;
  15766. __Pyx_RefNannyDeclarations
  15767. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15768. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4loop___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15769. /* function exit code */
  15770. __Pyx_RefNannyFinishContext();
  15771. return __pyx_r;
  15772. }
  15773. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4loop___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15774. PyObject *__pyx_r = NULL;
  15775. __Pyx_RefNannyDeclarations
  15776. __Pyx_RefNannySetupContext("__get__", 0);
  15777. __Pyx_XDECREF(__pyx_r);
  15778. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  15779. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  15780. goto __pyx_L0;
  15781. /* function exit code */
  15782. __pyx_L0:;
  15783. __Pyx_XGIVEREF(__pyx_r);
  15784. __Pyx_RefNannyFinishContext();
  15785. return __pyx_r;
  15786. }
  15787. /* Python wrapper */
  15788. static int __pyx_pw_6gevent_5libev_8corecext_5check_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  15789. static int __pyx_pw_6gevent_5libev_8corecext_5check_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  15790. int __pyx_r;
  15791. __Pyx_RefNannyDeclarations
  15792. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  15793. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4loop_2__set__(((struct PyGeventCheckObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  15794. /* function exit code */
  15795. __Pyx_RefNannyFinishContext();
  15796. return __pyx_r;
  15797. }
  15798. static int __pyx_pf_6gevent_5libev_8corecext_5check_4loop_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value) {
  15799. int __pyx_r;
  15800. __Pyx_RefNannyDeclarations
  15801. PyObject *__pyx_t_1 = NULL;
  15802. __Pyx_RefNannySetupContext("__set__", 0);
  15803. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1416, __pyx_L1_error)
  15804. __pyx_t_1 = __pyx_v_value;
  15805. __Pyx_INCREF(__pyx_t_1);
  15806. __Pyx_GIVEREF(__pyx_t_1);
  15807. __Pyx_GOTREF(__pyx_v_self->loop);
  15808. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  15809. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  15810. __pyx_t_1 = 0;
  15811. /* function exit code */
  15812. __pyx_r = 0;
  15813. goto __pyx_L0;
  15814. __pyx_L1_error:;
  15815. __Pyx_XDECREF(__pyx_t_1);
  15816. __Pyx_AddTraceback("gevent.libev.corecext.check.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15817. __pyx_r = -1;
  15818. __pyx_L0:;
  15819. __Pyx_RefNannyFinishContext();
  15820. return __pyx_r;
  15821. }
  15822. /* Python wrapper */
  15823. static int __pyx_pw_6gevent_5libev_8corecext_5check_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  15824. static int __pyx_pw_6gevent_5libev_8corecext_5check_4loop_5__del__(PyObject *__pyx_v_self) {
  15825. int __pyx_r;
  15826. __Pyx_RefNannyDeclarations
  15827. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  15828. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4loop_4__del__(((struct PyGeventCheckObject *)__pyx_v_self));
  15829. /* function exit code */
  15830. __Pyx_RefNannyFinishContext();
  15831. return __pyx_r;
  15832. }
  15833. static int __pyx_pf_6gevent_5libev_8corecext_5check_4loop_4__del__(struct PyGeventCheckObject *__pyx_v_self) {
  15834. int __pyx_r;
  15835. __Pyx_RefNannyDeclarations
  15836. __Pyx_RefNannySetupContext("__del__", 0);
  15837. __Pyx_INCREF(Py_None);
  15838. __Pyx_GIVEREF(Py_None);
  15839. __Pyx_GOTREF(__pyx_v_self->loop);
  15840. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  15841. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  15842. /* function exit code */
  15843. __pyx_r = 0;
  15844. __Pyx_RefNannyFinishContext();
  15845. return __pyx_r;
  15846. }
  15847. /* Python wrapper */
  15848. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  15849. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_4args_1__get__(PyObject *__pyx_v_self) {
  15850. PyObject *__pyx_r = 0;
  15851. __Pyx_RefNannyDeclarations
  15852. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15853. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4args___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15854. /* function exit code */
  15855. __Pyx_RefNannyFinishContext();
  15856. return __pyx_r;
  15857. }
  15858. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_4args___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15859. PyObject *__pyx_r = NULL;
  15860. __Pyx_RefNannyDeclarations
  15861. __Pyx_RefNannySetupContext("__get__", 0);
  15862. __Pyx_XDECREF(__pyx_r);
  15863. __Pyx_INCREF(__pyx_v_self->args);
  15864. __pyx_r = __pyx_v_self->args;
  15865. goto __pyx_L0;
  15866. /* function exit code */
  15867. __pyx_L0:;
  15868. __Pyx_XGIVEREF(__pyx_r);
  15869. __Pyx_RefNannyFinishContext();
  15870. return __pyx_r;
  15871. }
  15872. /* Python wrapper */
  15873. static int __pyx_pw_6gevent_5libev_8corecext_5check_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  15874. static int __pyx_pw_6gevent_5libev_8corecext_5check_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  15875. int __pyx_r;
  15876. __Pyx_RefNannyDeclarations
  15877. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  15878. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4args_2__set__(((struct PyGeventCheckObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  15879. /* function exit code */
  15880. __Pyx_RefNannyFinishContext();
  15881. return __pyx_r;
  15882. }
  15883. static int __pyx_pf_6gevent_5libev_8corecext_5check_4args_2__set__(struct PyGeventCheckObject *__pyx_v_self, PyObject *__pyx_v_value) {
  15884. int __pyx_r;
  15885. __Pyx_RefNannyDeclarations
  15886. PyObject *__pyx_t_1 = NULL;
  15887. __Pyx_RefNannySetupContext("__set__", 0);
  15888. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1418, __pyx_L1_error)
  15889. __pyx_t_1 = __pyx_v_value;
  15890. __Pyx_INCREF(__pyx_t_1);
  15891. __Pyx_GIVEREF(__pyx_t_1);
  15892. __Pyx_GOTREF(__pyx_v_self->args);
  15893. __Pyx_DECREF(__pyx_v_self->args);
  15894. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  15895. __pyx_t_1 = 0;
  15896. /* function exit code */
  15897. __pyx_r = 0;
  15898. goto __pyx_L0;
  15899. __pyx_L1_error:;
  15900. __Pyx_XDECREF(__pyx_t_1);
  15901. __Pyx_AddTraceback("gevent.libev.corecext.check.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15902. __pyx_r = -1;
  15903. __pyx_L0:;
  15904. __Pyx_RefNannyFinishContext();
  15905. return __pyx_r;
  15906. }
  15907. /* Python wrapper */
  15908. static int __pyx_pw_6gevent_5libev_8corecext_5check_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  15909. static int __pyx_pw_6gevent_5libev_8corecext_5check_4args_5__del__(PyObject *__pyx_v_self) {
  15910. int __pyx_r;
  15911. __Pyx_RefNannyDeclarations
  15912. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  15913. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_4args_4__del__(((struct PyGeventCheckObject *)__pyx_v_self));
  15914. /* function exit code */
  15915. __Pyx_RefNannyFinishContext();
  15916. return __pyx_r;
  15917. }
  15918. static int __pyx_pf_6gevent_5libev_8corecext_5check_4args_4__del__(struct PyGeventCheckObject *__pyx_v_self) {
  15919. int __pyx_r;
  15920. __Pyx_RefNannyDeclarations
  15921. __Pyx_RefNannySetupContext("__del__", 0);
  15922. __Pyx_INCREF(Py_None);
  15923. __Pyx_GIVEREF(Py_None);
  15924. __Pyx_GOTREF(__pyx_v_self->args);
  15925. __Pyx_DECREF(__pyx_v_self->args);
  15926. __pyx_v_self->args = ((PyObject*)Py_None);
  15927. /* function exit code */
  15928. __pyx_r = 0;
  15929. __Pyx_RefNannyFinishContext();
  15930. return __pyx_r;
  15931. }
  15932. /* Python wrapper */
  15933. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  15934. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5check_6_flags_1__get__(PyObject *__pyx_v_self) {
  15935. PyObject *__pyx_r = 0;
  15936. __Pyx_RefNannyDeclarations
  15937. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15938. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5check_6_flags___get__(((struct PyGeventCheckObject *)__pyx_v_self));
  15939. /* function exit code */
  15940. __Pyx_RefNannyFinishContext();
  15941. return __pyx_r;
  15942. }
  15943. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5check_6_flags___get__(struct PyGeventCheckObject *__pyx_v_self) {
  15944. PyObject *__pyx_r = NULL;
  15945. __Pyx_RefNannyDeclarations
  15946. PyObject *__pyx_t_1 = NULL;
  15947. __Pyx_RefNannySetupContext("__get__", 0);
  15948. __Pyx_XDECREF(__pyx_r);
  15949. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
  15950. __Pyx_GOTREF(__pyx_t_1);
  15951. __pyx_r = __pyx_t_1;
  15952. __pyx_t_1 = 0;
  15953. goto __pyx_L0;
  15954. /* function exit code */
  15955. __pyx_L1_error:;
  15956. __Pyx_XDECREF(__pyx_t_1);
  15957. __Pyx_AddTraceback("gevent.libev.corecext.check._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  15958. __pyx_r = NULL;
  15959. __pyx_L0:;
  15960. __Pyx_XGIVEREF(__pyx_r);
  15961. __Pyx_RefNannyFinishContext();
  15962. return __pyx_r;
  15963. }
  15964. /* Python wrapper */
  15965. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  15966. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_3ref_1__get__(PyObject *__pyx_v_self) {
  15967. PyObject *__pyx_r = 0;
  15968. __Pyx_RefNannyDeclarations
  15969. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  15970. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_3ref___get__(((struct PyGeventForkObject *)__pyx_v_self));
  15971. /* function exit code */
  15972. __Pyx_RefNannyFinishContext();
  15973. return __pyx_r;
  15974. }
  15975. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_3ref___get__(struct PyGeventForkObject *__pyx_v_self) {
  15976. PyObject *__pyx_r = NULL;
  15977. __Pyx_RefNannyDeclarations
  15978. PyObject *__pyx_t_1 = NULL;
  15979. __Pyx_RefNannySetupContext("__get__", 0);
  15980. __Pyx_XDECREF(__pyx_r);
  15981. if (((__pyx_v_self->_flags & 4) != 0)) {
  15982. __Pyx_INCREF(Py_False);
  15983. __pyx_t_1 = Py_False;
  15984. } else {
  15985. __Pyx_INCREF(Py_True);
  15986. __pyx_t_1 = Py_True;
  15987. }
  15988. __pyx_r = __pyx_t_1;
  15989. __pyx_t_1 = 0;
  15990. goto __pyx_L0;
  15991. /* function exit code */
  15992. __pyx_L0:;
  15993. __Pyx_XGIVEREF(__pyx_r);
  15994. __Pyx_RefNannyFinishContext();
  15995. return __pyx_r;
  15996. }
  15997. /* Python wrapper */
  15998. static int __pyx_pw_6gevent_5libev_8corecext_4fork_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  15999. static int __pyx_pw_6gevent_5libev_8corecext_4fork_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16000. int __pyx_r;
  16001. __Pyx_RefNannyDeclarations
  16002. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  16003. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_3ref_2__set__(((struct PyGeventForkObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  16004. /* function exit code */
  16005. __Pyx_RefNannyFinishContext();
  16006. return __pyx_r;
  16007. }
  16008. static int __pyx_pf_6gevent_5libev_8corecext_4fork_3ref_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16009. int __pyx_r;
  16010. __Pyx_RefNannyDeclarations
  16011. int __pyx_t_1;
  16012. PyObject *__pyx_t_2 = NULL;
  16013. int __pyx_t_3;
  16014. __Pyx_RefNannySetupContext("__set__", 0);
  16015. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  16016. if (__pyx_t_1) {
  16017. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16018. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16019. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  16020. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16021. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16022. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  16023. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16024. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16025. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  16026. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16027. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16028. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  16029. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16030. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16031. __Pyx_GOTREF(__pyx_t_2);
  16032. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16033. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16034. __PYX_ERR(0, 1549, __pyx_L1_error)
  16035. }
  16036. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1550, __pyx_L1_error)
  16037. if (__pyx_t_1) {
  16038. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  16039. if (__pyx_t_1) {
  16040. __pyx_r = 0;
  16041. goto __pyx_L0;
  16042. }
  16043. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  16044. if (__pyx_t_1) {
  16045. ev_ref(__pyx_v_self->loop->_ptr);
  16046. }
  16047. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  16048. goto __pyx_L4;
  16049. }
  16050. /*else*/ {
  16051. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  16052. if (__pyx_t_1) {
  16053. __pyx_r = 0;
  16054. goto __pyx_L0;
  16055. }
  16056. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  16057. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  16058. if (__pyx_t_3) {
  16059. } else {
  16060. __pyx_t_1 = __pyx_t_3;
  16061. goto __pyx_L9_bool_binop_done;
  16062. }
  16063. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  16064. __pyx_t_1 = __pyx_t_3;
  16065. __pyx_L9_bool_binop_done:;
  16066. if (__pyx_t_1) {
  16067. ev_unref(__pyx_v_self->loop->_ptr);
  16068. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  16069. }
  16070. }
  16071. __pyx_L4:;
  16072. /* function exit code */
  16073. __pyx_r = 0;
  16074. goto __pyx_L0;
  16075. __pyx_L1_error:;
  16076. __Pyx_XDECREF(__pyx_t_2);
  16077. __Pyx_AddTraceback("gevent.libev.corecext.fork.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16078. __pyx_r = -1;
  16079. __pyx_L0:;
  16080. __Pyx_RefNannyFinishContext();
  16081. return __pyx_r;
  16082. }
  16083. /* Python wrapper */
  16084. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  16085. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_8callback_1__get__(PyObject *__pyx_v_self) {
  16086. PyObject *__pyx_r = 0;
  16087. __Pyx_RefNannyDeclarations
  16088. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16089. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_8callback___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16090. /* function exit code */
  16091. __Pyx_RefNannyFinishContext();
  16092. return __pyx_r;
  16093. }
  16094. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_8callback___get__(struct PyGeventForkObject *__pyx_v_self) {
  16095. PyObject *__pyx_r = NULL;
  16096. __Pyx_RefNannyDeclarations
  16097. __Pyx_RefNannySetupContext("__get__", 0);
  16098. __Pyx_XDECREF(__pyx_r);
  16099. __Pyx_INCREF(__pyx_v_self->_callback);
  16100. __pyx_r = __pyx_v_self->_callback;
  16101. goto __pyx_L0;
  16102. /* function exit code */
  16103. __pyx_L0:;
  16104. __Pyx_XGIVEREF(__pyx_r);
  16105. __Pyx_RefNannyFinishContext();
  16106. return __pyx_r;
  16107. }
  16108. /* Python wrapper */
  16109. static int __pyx_pw_6gevent_5libev_8corecext_4fork_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  16110. static int __pyx_pw_6gevent_5libev_8corecext_4fork_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  16111. int __pyx_r;
  16112. __Pyx_RefNannyDeclarations
  16113. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  16114. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_8callback_2__set__(((struct PyGeventForkObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  16115. /* function exit code */
  16116. __Pyx_RefNannyFinishContext();
  16117. return __pyx_r;
  16118. }
  16119. static int __pyx_pf_6gevent_5libev_8corecext_4fork_8callback_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  16120. int __pyx_r;
  16121. __Pyx_RefNannyDeclarations
  16122. int __pyx_t_1;
  16123. int __pyx_t_2;
  16124. int __pyx_t_3;
  16125. PyObject *__pyx_t_4 = NULL;
  16126. PyObject *__pyx_t_5 = NULL;
  16127. __Pyx_RefNannySetupContext("__set__", 0);
  16128. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  16129. if (__pyx_t_2) {
  16130. } else {
  16131. __pyx_t_1 = __pyx_t_2;
  16132. goto __pyx_L4_bool_binop_done;
  16133. }
  16134. __pyx_t_2 = (__pyx_v_callback != Py_None);
  16135. __pyx_t_3 = (__pyx_t_2 != 0);
  16136. __pyx_t_1 = __pyx_t_3;
  16137. __pyx_L4_bool_binop_done:;
  16138. if (__pyx_t_1) {
  16139. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
  16140. __Pyx_GOTREF(__pyx_t_4);
  16141. __Pyx_INCREF(__pyx_v_callback);
  16142. __Pyx_GIVEREF(__pyx_v_callback);
  16143. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  16144. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1571, __pyx_L1_error)
  16145. __Pyx_GOTREF(__pyx_t_5);
  16146. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  16147. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error)
  16148. __Pyx_GOTREF(__pyx_t_4);
  16149. __Pyx_GIVEREF(__pyx_t_5);
  16150. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  16151. __pyx_t_5 = 0;
  16152. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1571, __pyx_L1_error)
  16153. __Pyx_GOTREF(__pyx_t_5);
  16154. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  16155. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  16156. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  16157. __PYX_ERR(0, 1571, __pyx_L1_error)
  16158. }
  16159. __Pyx_INCREF(__pyx_v_callback);
  16160. __Pyx_GIVEREF(__pyx_v_callback);
  16161. __Pyx_GOTREF(__pyx_v_self->_callback);
  16162. __Pyx_DECREF(__pyx_v_self->_callback);
  16163. __pyx_v_self->_callback = __pyx_v_callback;
  16164. /* function exit code */
  16165. __pyx_r = 0;
  16166. goto __pyx_L0;
  16167. __pyx_L1_error:;
  16168. __Pyx_XDECREF(__pyx_t_4);
  16169. __Pyx_XDECREF(__pyx_t_5);
  16170. __Pyx_AddTraceback("gevent.libev.corecext.fork.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16171. __pyx_r = -1;
  16172. __pyx_L0:;
  16173. __Pyx_RefNannyFinishContext();
  16174. return __pyx_r;
  16175. }
  16176. /* Python wrapper */
  16177. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  16178. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  16179. PyObject *__pyx_r = 0;
  16180. __Pyx_RefNannyDeclarations
  16181. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  16182. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_stop(((struct PyGeventForkObject *)__pyx_v_self));
  16183. /* function exit code */
  16184. __Pyx_RefNannyFinishContext();
  16185. return __pyx_r;
  16186. }
  16187. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_stop(struct PyGeventForkObject *__pyx_v_self) {
  16188. PyObject *__pyx_r = NULL;
  16189. __Pyx_RefNannyDeclarations
  16190. int __pyx_t_1;
  16191. PyObject *__pyx_t_2 = NULL;
  16192. __Pyx_RefNannySetupContext("stop", 0);
  16193. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  16194. if (__pyx_t_1) {
  16195. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16196. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16197. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  16198. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16199. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16200. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  16201. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16202. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16203. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  16204. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16205. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16206. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  16207. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16208. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16209. __Pyx_GOTREF(__pyx_t_2);
  16210. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16211. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16212. __PYX_ERR(0, 1577, __pyx_L1_error)
  16213. }
  16214. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  16215. if (__pyx_t_1) {
  16216. ev_ref(__pyx_v_self->loop->_ptr);
  16217. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  16218. }
  16219. ev_fork_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  16220. __Pyx_INCREF(Py_None);
  16221. __Pyx_GIVEREF(Py_None);
  16222. __Pyx_GOTREF(__pyx_v_self->_callback);
  16223. __Pyx_DECREF(__pyx_v_self->_callback);
  16224. __pyx_v_self->_callback = Py_None;
  16225. __Pyx_INCREF(Py_None);
  16226. __Pyx_GIVEREF(Py_None);
  16227. __Pyx_GOTREF(__pyx_v_self->args);
  16228. __Pyx_DECREF(__pyx_v_self->args);
  16229. __pyx_v_self->args = ((PyObject*)Py_None);
  16230. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  16231. if (__pyx_t_1) {
  16232. Py_DECREF(((PyObject*)__pyx_v_self));
  16233. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  16234. }
  16235. /* function exit code */
  16236. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  16237. goto __pyx_L0;
  16238. __pyx_L1_error:;
  16239. __Pyx_XDECREF(__pyx_t_2);
  16240. __Pyx_AddTraceback("gevent.libev.corecext.fork.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16241. __pyx_r = NULL;
  16242. __pyx_L0:;
  16243. __Pyx_XGIVEREF(__pyx_r);
  16244. __Pyx_RefNannyFinishContext();
  16245. return __pyx_r;
  16246. }
  16247. /* Python wrapper */
  16248. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  16249. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_8priority_1__get__(PyObject *__pyx_v_self) {
  16250. PyObject *__pyx_r = 0;
  16251. __Pyx_RefNannyDeclarations
  16252. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16253. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_8priority___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16254. /* function exit code */
  16255. __Pyx_RefNannyFinishContext();
  16256. return __pyx_r;
  16257. }
  16258. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_8priority___get__(struct PyGeventForkObject *__pyx_v_self) {
  16259. PyObject *__pyx_r = NULL;
  16260. __Pyx_RefNannyDeclarations
  16261. PyObject *__pyx_t_1 = NULL;
  16262. __Pyx_RefNannySetupContext("__get__", 0);
  16263. __Pyx_XDECREF(__pyx_r);
  16264. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
  16265. __Pyx_GOTREF(__pyx_t_1);
  16266. __pyx_r = __pyx_t_1;
  16267. __pyx_t_1 = 0;
  16268. goto __pyx_L0;
  16269. /* function exit code */
  16270. __pyx_L1_error:;
  16271. __Pyx_XDECREF(__pyx_t_1);
  16272. __Pyx_AddTraceback("gevent.libev.corecext.fork.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16273. __pyx_r = NULL;
  16274. __pyx_L0:;
  16275. __Pyx_XGIVEREF(__pyx_r);
  16276. __Pyx_RefNannyFinishContext();
  16277. return __pyx_r;
  16278. }
  16279. /* Python wrapper */
  16280. static int __pyx_pw_6gevent_5libev_8corecext_4fork_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  16281. static int __pyx_pw_6gevent_5libev_8corecext_4fork_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  16282. int __pyx_v_priority;
  16283. int __pyx_r;
  16284. __Pyx_RefNannyDeclarations
  16285. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  16286. assert(__pyx_arg_priority); {
  16287. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1593, __pyx_L3_error)
  16288. }
  16289. goto __pyx_L4_argument_unpacking_done;
  16290. __pyx_L3_error:;
  16291. __Pyx_AddTraceback("gevent.libev.corecext.fork.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16292. __Pyx_RefNannyFinishContext();
  16293. return -1;
  16294. __pyx_L4_argument_unpacking_done:;
  16295. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_8priority_2__set__(((struct PyGeventForkObject *)__pyx_v_self), ((int)__pyx_v_priority));
  16296. /* function exit code */
  16297. __Pyx_RefNannyFinishContext();
  16298. return __pyx_r;
  16299. }
  16300. static int __pyx_pf_6gevent_5libev_8corecext_4fork_8priority_2__set__(struct PyGeventForkObject *__pyx_v_self, int __pyx_v_priority) {
  16301. int __pyx_r;
  16302. __Pyx_RefNannyDeclarations
  16303. int __pyx_t_1;
  16304. PyObject *__pyx_t_2 = NULL;
  16305. __Pyx_RefNannySetupContext("__set__", 0);
  16306. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  16307. if (__pyx_t_1) {
  16308. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16309. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16310. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
  16311. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16312. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16313. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
  16314. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16315. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16316. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
  16317. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16318. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16319. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
  16320. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16321. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16322. __Pyx_GOTREF(__pyx_t_2);
  16323. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16324. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16325. __PYX_ERR(0, 1595, __pyx_L1_error)
  16326. }
  16327. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  16328. /* function exit code */
  16329. __pyx_r = 0;
  16330. goto __pyx_L0;
  16331. __pyx_L1_error:;
  16332. __Pyx_XDECREF(__pyx_t_2);
  16333. __Pyx_AddTraceback("gevent.libev.corecext.fork.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16334. __pyx_r = -1;
  16335. __pyx_L0:;
  16336. __Pyx_RefNannyFinishContext();
  16337. return __pyx_r;
  16338. }
  16339. /* Python wrapper */
  16340. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  16341. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  16342. int __pyx_v_revents;
  16343. PyObject *__pyx_v_callback = 0;
  16344. PyObject *__pyx_v_args = 0;
  16345. PyObject *__pyx_r = 0;
  16346. __Pyx_RefNannyDeclarations
  16347. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  16348. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  16349. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  16350. if (unlikely(!__pyx_v_args)) {
  16351. __Pyx_RefNannyFinishContext();
  16352. return NULL;
  16353. }
  16354. __Pyx_GOTREF(__pyx_v_args);
  16355. } else {
  16356. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  16357. }
  16358. {
  16359. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  16360. PyObject* values[2] = {0,0};
  16361. if (unlikely(__pyx_kwds)) {
  16362. Py_ssize_t kw_args;
  16363. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  16364. switch (pos_args) {
  16365. default:
  16366. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  16367. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16368. case 0: break;
  16369. }
  16370. kw_args = PyDict_Size(__pyx_kwds);
  16371. switch (pos_args) {
  16372. case 0:
  16373. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  16374. else goto __pyx_L5_argtuple_error;
  16375. case 1:
  16376. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  16377. else {
  16378. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1598, __pyx_L3_error)
  16379. }
  16380. }
  16381. if (unlikely(kw_args > 0)) {
  16382. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  16383. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1598, __pyx_L3_error)
  16384. }
  16385. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  16386. goto __pyx_L5_argtuple_error;
  16387. } else {
  16388. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16389. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  16390. }
  16391. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1598, __pyx_L3_error)
  16392. __pyx_v_callback = values[1];
  16393. }
  16394. goto __pyx_L4_argument_unpacking_done;
  16395. __pyx_L5_argtuple_error:;
  16396. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1598, __pyx_L3_error)
  16397. __pyx_L3_error:;
  16398. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  16399. __Pyx_AddTraceback("gevent.libev.corecext.fork.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16400. __Pyx_RefNannyFinishContext();
  16401. return NULL;
  16402. __pyx_L4_argument_unpacking_done:;
  16403. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_2feed(((struct PyGeventForkObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  16404. /* function exit code */
  16405. __Pyx_XDECREF(__pyx_v_args);
  16406. __Pyx_RefNannyFinishContext();
  16407. return __pyx_r;
  16408. }
  16409. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_2feed(struct PyGeventForkObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  16410. PyObject *__pyx_r = NULL;
  16411. __Pyx_RefNannyDeclarations
  16412. int __pyx_t_1;
  16413. PyObject *__pyx_t_2 = NULL;
  16414. __Pyx_RefNannySetupContext("feed", 0);
  16415. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  16416. if (__pyx_t_1) {
  16417. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16418. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16419. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  16420. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16421. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16422. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  16423. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16424. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16425. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  16426. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16427. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16428. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  16429. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16430. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16431. __Pyx_GOTREF(__pyx_t_2);
  16432. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16433. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16434. __PYX_ERR(0, 1601, __pyx_L1_error)
  16435. }
  16436. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1602, __pyx_L1_error)
  16437. __Pyx_INCREF(__pyx_v_args);
  16438. __Pyx_GIVEREF(__pyx_v_args);
  16439. __Pyx_GOTREF(__pyx_v_self->args);
  16440. __Pyx_DECREF(__pyx_v_self->args);
  16441. __pyx_v_self->args = __pyx_v_args;
  16442. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  16443. if (__pyx_t_1) {
  16444. ev_unref(__pyx_v_self->loop->_ptr);
  16445. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  16446. }
  16447. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  16448. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  16449. if (__pyx_t_1) {
  16450. Py_INCREF(((PyObject*)__pyx_v_self));
  16451. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  16452. }
  16453. /* function exit code */
  16454. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  16455. goto __pyx_L0;
  16456. __pyx_L1_error:;
  16457. __Pyx_XDECREF(__pyx_t_2);
  16458. __Pyx_AddTraceback("gevent.libev.corecext.fork.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16459. __pyx_r = NULL;
  16460. __pyx_L0:;
  16461. __Pyx_XGIVEREF(__pyx_r);
  16462. __Pyx_RefNannyFinishContext();
  16463. return __pyx_r;
  16464. }
  16465. /* Python wrapper */
  16466. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  16467. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  16468. PyObject *__pyx_v_callback = 0;
  16469. PyObject *__pyx_v_args = 0;
  16470. PyObject *__pyx_r = 0;
  16471. __Pyx_RefNannyDeclarations
  16472. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  16473. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  16474. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  16475. if (unlikely(!__pyx_v_args)) {
  16476. __Pyx_RefNannyFinishContext();
  16477. return NULL;
  16478. }
  16479. __Pyx_GOTREF(__pyx_v_args);
  16480. } else {
  16481. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  16482. }
  16483. {
  16484. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  16485. PyObject* values[1] = {0};
  16486. if (unlikely(__pyx_kwds)) {
  16487. Py_ssize_t kw_args;
  16488. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  16489. switch (pos_args) {
  16490. default:
  16491. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16492. case 0: break;
  16493. }
  16494. kw_args = PyDict_Size(__pyx_kwds);
  16495. switch (pos_args) {
  16496. case 0:
  16497. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  16498. else goto __pyx_L5_argtuple_error;
  16499. }
  16500. if (unlikely(kw_args > 0)) {
  16501. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  16502. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1612, __pyx_L3_error)
  16503. }
  16504. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  16505. goto __pyx_L5_argtuple_error;
  16506. } else {
  16507. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16508. }
  16509. __pyx_v_callback = values[0];
  16510. }
  16511. goto __pyx_L4_argument_unpacking_done;
  16512. __pyx_L5_argtuple_error:;
  16513. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1612, __pyx_L3_error)
  16514. __pyx_L3_error:;
  16515. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  16516. __Pyx_AddTraceback("gevent.libev.corecext.fork.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16517. __Pyx_RefNannyFinishContext();
  16518. return NULL;
  16519. __pyx_L4_argument_unpacking_done:;
  16520. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4start(((struct PyGeventForkObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  16521. /* function exit code */
  16522. __Pyx_XDECREF(__pyx_v_args);
  16523. __Pyx_RefNannyFinishContext();
  16524. return __pyx_r;
  16525. }
  16526. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4start(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  16527. PyObject *__pyx_r = NULL;
  16528. __Pyx_RefNannyDeclarations
  16529. int __pyx_t_1;
  16530. PyObject *__pyx_t_2 = NULL;
  16531. int __pyx_t_3;
  16532. __Pyx_RefNannySetupContext("start", 0);
  16533. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  16534. if (__pyx_t_1) {
  16535. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16536. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16537. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
  16538. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16539. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16540. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
  16541. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16542. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16543. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
  16544. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16545. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16546. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
  16547. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16548. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16549. __Pyx_GOTREF(__pyx_t_2);
  16550. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16551. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16552. __PYX_ERR(0, 1615, __pyx_L1_error)
  16553. }
  16554. __pyx_t_1 = (__pyx_v_callback == Py_None);
  16555. __pyx_t_3 = (__pyx_t_1 != 0);
  16556. if (__pyx_t_3) {
  16557. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16558. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16559. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
  16560. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16561. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  16562. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
  16563. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  16564. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16565. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
  16566. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16567. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  16568. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
  16569. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  16570. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  16571. __Pyx_GOTREF(__pyx_t_2);
  16572. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  16573. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16574. __PYX_ERR(0, 1617, __pyx_L1_error)
  16575. }
  16576. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1618, __pyx_L1_error)
  16577. __Pyx_INCREF(__pyx_v_args);
  16578. __Pyx_GIVEREF(__pyx_v_args);
  16579. __Pyx_GOTREF(__pyx_v_self->args);
  16580. __Pyx_DECREF(__pyx_v_self->args);
  16581. __pyx_v_self->args = __pyx_v_args;
  16582. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  16583. if (__pyx_t_3) {
  16584. ev_unref(__pyx_v_self->loop->_ptr);
  16585. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  16586. }
  16587. ev_fork_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  16588. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  16589. if (__pyx_t_3) {
  16590. Py_INCREF(((PyObject*)__pyx_v_self));
  16591. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  16592. }
  16593. /* function exit code */
  16594. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  16595. goto __pyx_L0;
  16596. __pyx_L1_error:;
  16597. __Pyx_XDECREF(__pyx_t_2);
  16598. __Pyx_AddTraceback("gevent.libev.corecext.fork.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16599. __pyx_r = NULL;
  16600. __pyx_L0:;
  16601. __Pyx_XGIVEREF(__pyx_r);
  16602. __Pyx_RefNannyFinishContext();
  16603. return __pyx_r;
  16604. }
  16605. /* Python wrapper */
  16606. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  16607. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_6active_1__get__(PyObject *__pyx_v_self) {
  16608. PyObject *__pyx_r = 0;
  16609. __Pyx_RefNannyDeclarations
  16610. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16611. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_6active___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16612. /* function exit code */
  16613. __Pyx_RefNannyFinishContext();
  16614. return __pyx_r;
  16615. }
  16616. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_6active___get__(struct PyGeventForkObject *__pyx_v_self) {
  16617. PyObject *__pyx_r = NULL;
  16618. __Pyx_RefNannyDeclarations
  16619. PyObject *__pyx_t_1 = NULL;
  16620. __Pyx_RefNannySetupContext("__get__", 0);
  16621. __Pyx_XDECREF(__pyx_r);
  16622. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  16623. __Pyx_INCREF(Py_True);
  16624. __pyx_t_1 = Py_True;
  16625. } else {
  16626. __Pyx_INCREF(Py_False);
  16627. __pyx_t_1 = Py_False;
  16628. }
  16629. __pyx_r = __pyx_t_1;
  16630. __pyx_t_1 = 0;
  16631. goto __pyx_L0;
  16632. /* function exit code */
  16633. __pyx_L0:;
  16634. __Pyx_XGIVEREF(__pyx_r);
  16635. __Pyx_RefNannyFinishContext();
  16636. return __pyx_r;
  16637. }
  16638. /* Python wrapper */
  16639. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  16640. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_7pending_1__get__(PyObject *__pyx_v_self) {
  16641. PyObject *__pyx_r = 0;
  16642. __Pyx_RefNannyDeclarations
  16643. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16644. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_7pending___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16645. /* function exit code */
  16646. __Pyx_RefNannyFinishContext();
  16647. return __pyx_r;
  16648. }
  16649. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_7pending___get__(struct PyGeventForkObject *__pyx_v_self) {
  16650. PyObject *__pyx_r = NULL;
  16651. __Pyx_RefNannyDeclarations
  16652. PyObject *__pyx_t_1 = NULL;
  16653. __Pyx_RefNannySetupContext("__get__", 0);
  16654. __Pyx_XDECREF(__pyx_r);
  16655. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  16656. __Pyx_INCREF(Py_True);
  16657. __pyx_t_1 = Py_True;
  16658. } else {
  16659. __Pyx_INCREF(Py_False);
  16660. __pyx_t_1 = Py_False;
  16661. }
  16662. __pyx_r = __pyx_t_1;
  16663. __pyx_t_1 = 0;
  16664. goto __pyx_L0;
  16665. /* function exit code */
  16666. __pyx_L0:;
  16667. __Pyx_XGIVEREF(__pyx_r);
  16668. __Pyx_RefNannyFinishContext();
  16669. return __pyx_r;
  16670. }
  16671. /* Python wrapper */
  16672. static int __pyx_pw_6gevent_5libev_8corecext_4fork_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  16673. static int __pyx_pw_6gevent_5libev_8corecext_4fork_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  16674. struct PyGeventLoopObject *__pyx_v_loop = 0;
  16675. PyObject *__pyx_v_ref = 0;
  16676. PyObject *__pyx_v_priority = 0;
  16677. int __pyx_r;
  16678. __Pyx_RefNannyDeclarations
  16679. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  16680. {
  16681. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  16682. PyObject* values[3] = {0,0,0};
  16683. values[1] = ((PyObject *)Py_True);
  16684. values[2] = ((PyObject *)Py_None);
  16685. if (unlikely(__pyx_kwds)) {
  16686. Py_ssize_t kw_args;
  16687. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  16688. switch (pos_args) {
  16689. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  16690. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  16691. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16692. case 0: break;
  16693. default: goto __pyx_L5_argtuple_error;
  16694. }
  16695. kw_args = PyDict_Size(__pyx_kwds);
  16696. switch (pos_args) {
  16697. case 0:
  16698. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  16699. else goto __pyx_L5_argtuple_error;
  16700. case 1:
  16701. if (kw_args > 0) {
  16702. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  16703. if (value) { values[1] = value; kw_args--; }
  16704. }
  16705. case 2:
  16706. if (kw_args > 0) {
  16707. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  16708. if (value) { values[2] = value; kw_args--; }
  16709. }
  16710. }
  16711. if (unlikely(kw_args > 0)) {
  16712. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1640, __pyx_L3_error)
  16713. }
  16714. } else {
  16715. switch (PyTuple_GET_SIZE(__pyx_args)) {
  16716. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  16717. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  16718. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  16719. break;
  16720. default: goto __pyx_L5_argtuple_error;
  16721. }
  16722. }
  16723. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  16724. __pyx_v_ref = values[1];
  16725. __pyx_v_priority = values[2];
  16726. }
  16727. goto __pyx_L4_argument_unpacking_done;
  16728. __pyx_L5_argtuple_error:;
  16729. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1640, __pyx_L3_error)
  16730. __pyx_L3_error:;
  16731. __Pyx_AddTraceback("gevent.libev.corecext.fork.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16732. __Pyx_RefNannyFinishContext();
  16733. return -1;
  16734. __pyx_L4_argument_unpacking_done:;
  16735. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1640, __pyx_L1_error)
  16736. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_6__init__(((struct PyGeventForkObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);
  16737. /* function exit code */
  16738. goto __pyx_L0;
  16739. __pyx_L1_error:;
  16740. __pyx_r = -1;
  16741. __pyx_L0:;
  16742. __Pyx_RefNannyFinishContext();
  16743. return __pyx_r;
  16744. }
  16745. static int __pyx_pf_6gevent_5libev_8corecext_4fork_6__init__(struct PyGeventForkObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  16746. int __pyx_r;
  16747. __Pyx_RefNannyDeclarations
  16748. int __pyx_t_1;
  16749. int __pyx_t_2;
  16750. int __pyx_t_3;
  16751. __Pyx_RefNannySetupContext("__init__", 0);
  16752. ev_fork_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_fork));
  16753. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  16754. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  16755. __Pyx_GOTREF(__pyx_v_self->loop);
  16756. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  16757. __pyx_v_self->loop = __pyx_v_loop;
  16758. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1643, __pyx_L1_error)
  16759. if (__pyx_t_1) {
  16760. __pyx_v_self->_flags = 0;
  16761. goto __pyx_L3;
  16762. }
  16763. /*else*/ {
  16764. __pyx_v_self->_flags = 4;
  16765. }
  16766. __pyx_L3:;
  16767. __pyx_t_1 = (__pyx_v_priority != Py_None);
  16768. __pyx_t_2 = (__pyx_t_1 != 0);
  16769. if (__pyx_t_2) {
  16770. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1648, __pyx_L1_error)
  16771. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_3);
  16772. }
  16773. /* function exit code */
  16774. __pyx_r = 0;
  16775. goto __pyx_L0;
  16776. __pyx_L1_error:;
  16777. __Pyx_AddTraceback("gevent.libev.corecext.fork.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16778. __pyx_r = -1;
  16779. __pyx_L0:;
  16780. __Pyx_RefNannyFinishContext();
  16781. return __pyx_r;
  16782. }
  16783. /* Python wrapper */
  16784. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  16785. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_4loop_1__get__(PyObject *__pyx_v_self) {
  16786. PyObject *__pyx_r = 0;
  16787. __Pyx_RefNannyDeclarations
  16788. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16789. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4loop___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16790. /* function exit code */
  16791. __Pyx_RefNannyFinishContext();
  16792. return __pyx_r;
  16793. }
  16794. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4loop___get__(struct PyGeventForkObject *__pyx_v_self) {
  16795. PyObject *__pyx_r = NULL;
  16796. __Pyx_RefNannyDeclarations
  16797. __Pyx_RefNannySetupContext("__get__", 0);
  16798. __Pyx_XDECREF(__pyx_r);
  16799. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  16800. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  16801. goto __pyx_L0;
  16802. /* function exit code */
  16803. __pyx_L0:;
  16804. __Pyx_XGIVEREF(__pyx_r);
  16805. __Pyx_RefNannyFinishContext();
  16806. return __pyx_r;
  16807. }
  16808. /* Python wrapper */
  16809. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  16810. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16811. int __pyx_r;
  16812. __Pyx_RefNannyDeclarations
  16813. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  16814. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_2__set__(((struct PyGeventForkObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  16815. /* function exit code */
  16816. __Pyx_RefNannyFinishContext();
  16817. return __pyx_r;
  16818. }
  16819. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16820. int __pyx_r;
  16821. __Pyx_RefNannyDeclarations
  16822. PyObject *__pyx_t_1 = NULL;
  16823. __Pyx_RefNannySetupContext("__set__", 0);
  16824. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1535, __pyx_L1_error)
  16825. __pyx_t_1 = __pyx_v_value;
  16826. __Pyx_INCREF(__pyx_t_1);
  16827. __Pyx_GIVEREF(__pyx_t_1);
  16828. __Pyx_GOTREF(__pyx_v_self->loop);
  16829. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  16830. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  16831. __pyx_t_1 = 0;
  16832. /* function exit code */
  16833. __pyx_r = 0;
  16834. goto __pyx_L0;
  16835. __pyx_L1_error:;
  16836. __Pyx_XDECREF(__pyx_t_1);
  16837. __Pyx_AddTraceback("gevent.libev.corecext.fork.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16838. __pyx_r = -1;
  16839. __pyx_L0:;
  16840. __Pyx_RefNannyFinishContext();
  16841. return __pyx_r;
  16842. }
  16843. /* Python wrapper */
  16844. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  16845. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_5__del__(PyObject *__pyx_v_self) {
  16846. int __pyx_r;
  16847. __Pyx_RefNannyDeclarations
  16848. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  16849. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_4__del__(((struct PyGeventForkObject *)__pyx_v_self));
  16850. /* function exit code */
  16851. __Pyx_RefNannyFinishContext();
  16852. return __pyx_r;
  16853. }
  16854. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4loop_4__del__(struct PyGeventForkObject *__pyx_v_self) {
  16855. int __pyx_r;
  16856. __Pyx_RefNannyDeclarations
  16857. __Pyx_RefNannySetupContext("__del__", 0);
  16858. __Pyx_INCREF(Py_None);
  16859. __Pyx_GIVEREF(Py_None);
  16860. __Pyx_GOTREF(__pyx_v_self->loop);
  16861. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  16862. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  16863. /* function exit code */
  16864. __pyx_r = 0;
  16865. __Pyx_RefNannyFinishContext();
  16866. return __pyx_r;
  16867. }
  16868. /* Python wrapper */
  16869. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  16870. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_4args_1__get__(PyObject *__pyx_v_self) {
  16871. PyObject *__pyx_r = 0;
  16872. __Pyx_RefNannyDeclarations
  16873. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16874. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4args___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16875. /* function exit code */
  16876. __Pyx_RefNannyFinishContext();
  16877. return __pyx_r;
  16878. }
  16879. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_4args___get__(struct PyGeventForkObject *__pyx_v_self) {
  16880. PyObject *__pyx_r = NULL;
  16881. __Pyx_RefNannyDeclarations
  16882. __Pyx_RefNannySetupContext("__get__", 0);
  16883. __Pyx_XDECREF(__pyx_r);
  16884. __Pyx_INCREF(__pyx_v_self->args);
  16885. __pyx_r = __pyx_v_self->args;
  16886. goto __pyx_L0;
  16887. /* function exit code */
  16888. __pyx_L0:;
  16889. __Pyx_XGIVEREF(__pyx_r);
  16890. __Pyx_RefNannyFinishContext();
  16891. return __pyx_r;
  16892. }
  16893. /* Python wrapper */
  16894. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  16895. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16896. int __pyx_r;
  16897. __Pyx_RefNannyDeclarations
  16898. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  16899. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4args_2__set__(((struct PyGeventForkObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  16900. /* function exit code */
  16901. __Pyx_RefNannyFinishContext();
  16902. return __pyx_r;
  16903. }
  16904. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4args_2__set__(struct PyGeventForkObject *__pyx_v_self, PyObject *__pyx_v_value) {
  16905. int __pyx_r;
  16906. __Pyx_RefNannyDeclarations
  16907. PyObject *__pyx_t_1 = NULL;
  16908. __Pyx_RefNannySetupContext("__set__", 0);
  16909. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1537, __pyx_L1_error)
  16910. __pyx_t_1 = __pyx_v_value;
  16911. __Pyx_INCREF(__pyx_t_1);
  16912. __Pyx_GIVEREF(__pyx_t_1);
  16913. __Pyx_GOTREF(__pyx_v_self->args);
  16914. __Pyx_DECREF(__pyx_v_self->args);
  16915. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  16916. __pyx_t_1 = 0;
  16917. /* function exit code */
  16918. __pyx_r = 0;
  16919. goto __pyx_L0;
  16920. __pyx_L1_error:;
  16921. __Pyx_XDECREF(__pyx_t_1);
  16922. __Pyx_AddTraceback("gevent.libev.corecext.fork.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16923. __pyx_r = -1;
  16924. __pyx_L0:;
  16925. __Pyx_RefNannyFinishContext();
  16926. return __pyx_r;
  16927. }
  16928. /* Python wrapper */
  16929. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  16930. static int __pyx_pw_6gevent_5libev_8corecext_4fork_4args_5__del__(PyObject *__pyx_v_self) {
  16931. int __pyx_r;
  16932. __Pyx_RefNannyDeclarations
  16933. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  16934. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_4args_4__del__(((struct PyGeventForkObject *)__pyx_v_self));
  16935. /* function exit code */
  16936. __Pyx_RefNannyFinishContext();
  16937. return __pyx_r;
  16938. }
  16939. static int __pyx_pf_6gevent_5libev_8corecext_4fork_4args_4__del__(struct PyGeventForkObject *__pyx_v_self) {
  16940. int __pyx_r;
  16941. __Pyx_RefNannyDeclarations
  16942. __Pyx_RefNannySetupContext("__del__", 0);
  16943. __Pyx_INCREF(Py_None);
  16944. __Pyx_GIVEREF(Py_None);
  16945. __Pyx_GOTREF(__pyx_v_self->args);
  16946. __Pyx_DECREF(__pyx_v_self->args);
  16947. __pyx_v_self->args = ((PyObject*)Py_None);
  16948. /* function exit code */
  16949. __pyx_r = 0;
  16950. __Pyx_RefNannyFinishContext();
  16951. return __pyx_r;
  16952. }
  16953. /* Python wrapper */
  16954. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  16955. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4fork_6_flags_1__get__(PyObject *__pyx_v_self) {
  16956. PyObject *__pyx_r = 0;
  16957. __Pyx_RefNannyDeclarations
  16958. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16959. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4fork_6_flags___get__(((struct PyGeventForkObject *)__pyx_v_self));
  16960. /* function exit code */
  16961. __Pyx_RefNannyFinishContext();
  16962. return __pyx_r;
  16963. }
  16964. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4fork_6_flags___get__(struct PyGeventForkObject *__pyx_v_self) {
  16965. PyObject *__pyx_r = NULL;
  16966. __Pyx_RefNannyDeclarations
  16967. PyObject *__pyx_t_1 = NULL;
  16968. __Pyx_RefNannySetupContext("__get__", 0);
  16969. __Pyx_XDECREF(__pyx_r);
  16970. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
  16971. __Pyx_GOTREF(__pyx_t_1);
  16972. __pyx_r = __pyx_t_1;
  16973. __pyx_t_1 = 0;
  16974. goto __pyx_L0;
  16975. /* function exit code */
  16976. __pyx_L1_error:;
  16977. __Pyx_XDECREF(__pyx_t_1);
  16978. __Pyx_AddTraceback("gevent.libev.corecext.fork._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  16979. __pyx_r = NULL;
  16980. __pyx_L0:;
  16981. __Pyx_XGIVEREF(__pyx_r);
  16982. __Pyx_RefNannyFinishContext();
  16983. return __pyx_r;
  16984. }
  16985. /* Python wrapper */
  16986. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  16987. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_3ref_1__get__(PyObject *__pyx_v_self) {
  16988. PyObject *__pyx_r = 0;
  16989. __Pyx_RefNannyDeclarations
  16990. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  16991. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_3ref___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  16992. /* function exit code */
  16993. __Pyx_RefNannyFinishContext();
  16994. return __pyx_r;
  16995. }
  16996. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_3ref___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  16997. PyObject *__pyx_r = NULL;
  16998. __Pyx_RefNannyDeclarations
  16999. PyObject *__pyx_t_1 = NULL;
  17000. __Pyx_RefNannySetupContext("__get__", 0);
  17001. __Pyx_XDECREF(__pyx_r);
  17002. if (((__pyx_v_self->_flags & 4) != 0)) {
  17003. __Pyx_INCREF(Py_False);
  17004. __pyx_t_1 = Py_False;
  17005. } else {
  17006. __Pyx_INCREF(Py_True);
  17007. __pyx_t_1 = Py_True;
  17008. }
  17009. __pyx_r = __pyx_t_1;
  17010. __pyx_t_1 = 0;
  17011. goto __pyx_L0;
  17012. /* function exit code */
  17013. __pyx_L0:;
  17014. __Pyx_XGIVEREF(__pyx_r);
  17015. __Pyx_RefNannyFinishContext();
  17016. return __pyx_r;
  17017. }
  17018. /* Python wrapper */
  17019. static int __pyx_pw_6gevent_5libev_8corecext_5async_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  17020. static int __pyx_pw_6gevent_5libev_8corecext_5async_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17021. int __pyx_r;
  17022. __Pyx_RefNannyDeclarations
  17023. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  17024. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_3ref_2__set__(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  17025. /* function exit code */
  17026. __Pyx_RefNannyFinishContext();
  17027. return __pyx_r;
  17028. }
  17029. static int __pyx_pf_6gevent_5libev_8corecext_5async_3ref_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17030. int __pyx_r;
  17031. __Pyx_RefNannyDeclarations
  17032. int __pyx_t_1;
  17033. PyObject *__pyx_t_2 = NULL;
  17034. int __pyx_t_3;
  17035. __Pyx_RefNannySetupContext("__set__", 0);
  17036. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  17037. if (__pyx_t_1) {
  17038. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17039. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17040. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  17041. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17042. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17043. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  17044. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17045. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17046. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  17047. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17048. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17049. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
  17050. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17051. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17052. __Pyx_GOTREF(__pyx_t_2);
  17053. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17054. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17055. __PYX_ERR(0, 1668, __pyx_L1_error)
  17056. }
  17057. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error)
  17058. if (__pyx_t_1) {
  17059. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  17060. if (__pyx_t_1) {
  17061. __pyx_r = 0;
  17062. goto __pyx_L0;
  17063. }
  17064. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  17065. if (__pyx_t_1) {
  17066. ev_ref(__pyx_v_self->loop->_ptr);
  17067. }
  17068. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  17069. goto __pyx_L4;
  17070. }
  17071. /*else*/ {
  17072. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  17073. if (__pyx_t_1) {
  17074. __pyx_r = 0;
  17075. goto __pyx_L0;
  17076. }
  17077. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  17078. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  17079. if (__pyx_t_3) {
  17080. } else {
  17081. __pyx_t_1 = __pyx_t_3;
  17082. goto __pyx_L9_bool_binop_done;
  17083. }
  17084. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  17085. __pyx_t_1 = __pyx_t_3;
  17086. __pyx_L9_bool_binop_done:;
  17087. if (__pyx_t_1) {
  17088. ev_unref(__pyx_v_self->loop->_ptr);
  17089. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  17090. }
  17091. }
  17092. __pyx_L4:;
  17093. /* function exit code */
  17094. __pyx_r = 0;
  17095. goto __pyx_L0;
  17096. __pyx_L1_error:;
  17097. __Pyx_XDECREF(__pyx_t_2);
  17098. __Pyx_AddTraceback("gevent.libev.corecext.async.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17099. __pyx_r = -1;
  17100. __pyx_L0:;
  17101. __Pyx_RefNannyFinishContext();
  17102. return __pyx_r;
  17103. }
  17104. /* Python wrapper */
  17105. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  17106. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_8callback_1__get__(PyObject *__pyx_v_self) {
  17107. PyObject *__pyx_r = 0;
  17108. __Pyx_RefNannyDeclarations
  17109. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17110. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_8callback___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17111. /* function exit code */
  17112. __Pyx_RefNannyFinishContext();
  17113. return __pyx_r;
  17114. }
  17115. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8callback___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17116. PyObject *__pyx_r = NULL;
  17117. __Pyx_RefNannyDeclarations
  17118. __Pyx_RefNannySetupContext("__get__", 0);
  17119. __Pyx_XDECREF(__pyx_r);
  17120. __Pyx_INCREF(__pyx_v_self->_callback);
  17121. __pyx_r = __pyx_v_self->_callback;
  17122. goto __pyx_L0;
  17123. /* function exit code */
  17124. __pyx_L0:;
  17125. __Pyx_XGIVEREF(__pyx_r);
  17126. __Pyx_RefNannyFinishContext();
  17127. return __pyx_r;
  17128. }
  17129. /* Python wrapper */
  17130. static int __pyx_pw_6gevent_5libev_8corecext_5async_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  17131. static int __pyx_pw_6gevent_5libev_8corecext_5async_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  17132. int __pyx_r;
  17133. __Pyx_RefNannyDeclarations
  17134. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  17135. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_8callback_2__set__(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  17136. /* function exit code */
  17137. __Pyx_RefNannyFinishContext();
  17138. return __pyx_r;
  17139. }
  17140. static int __pyx_pf_6gevent_5libev_8corecext_5async_8callback_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  17141. int __pyx_r;
  17142. __Pyx_RefNannyDeclarations
  17143. int __pyx_t_1;
  17144. int __pyx_t_2;
  17145. int __pyx_t_3;
  17146. PyObject *__pyx_t_4 = NULL;
  17147. PyObject *__pyx_t_5 = NULL;
  17148. __Pyx_RefNannySetupContext("__set__", 0);
  17149. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  17150. if (__pyx_t_2) {
  17151. } else {
  17152. __pyx_t_1 = __pyx_t_2;
  17153. goto __pyx_L4_bool_binop_done;
  17154. }
  17155. __pyx_t_2 = (__pyx_v_callback != Py_None);
  17156. __pyx_t_3 = (__pyx_t_2 != 0);
  17157. __pyx_t_1 = __pyx_t_3;
  17158. __pyx_L4_bool_binop_done:;
  17159. if (__pyx_t_1) {
  17160. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
  17161. __Pyx_GOTREF(__pyx_t_4);
  17162. __Pyx_INCREF(__pyx_v_callback);
  17163. __Pyx_GIVEREF(__pyx_v_callback);
  17164. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  17165. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error)
  17166. __Pyx_GOTREF(__pyx_t_5);
  17167. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  17168. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
  17169. __Pyx_GOTREF(__pyx_t_4);
  17170. __Pyx_GIVEREF(__pyx_t_5);
  17171. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  17172. __pyx_t_5 = 0;
  17173. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error)
  17174. __Pyx_GOTREF(__pyx_t_5);
  17175. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  17176. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  17177. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  17178. __PYX_ERR(0, 1690, __pyx_L1_error)
  17179. }
  17180. __Pyx_INCREF(__pyx_v_callback);
  17181. __Pyx_GIVEREF(__pyx_v_callback);
  17182. __Pyx_GOTREF(__pyx_v_self->_callback);
  17183. __Pyx_DECREF(__pyx_v_self->_callback);
  17184. __pyx_v_self->_callback = __pyx_v_callback;
  17185. /* function exit code */
  17186. __pyx_r = 0;
  17187. goto __pyx_L0;
  17188. __pyx_L1_error:;
  17189. __Pyx_XDECREF(__pyx_t_4);
  17190. __Pyx_XDECREF(__pyx_t_5);
  17191. __Pyx_AddTraceback("gevent.libev.corecext.async.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17192. __pyx_r = -1;
  17193. __pyx_L0:;
  17194. __Pyx_RefNannyFinishContext();
  17195. return __pyx_r;
  17196. }
  17197. /* Python wrapper */
  17198. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  17199. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  17200. PyObject *__pyx_r = 0;
  17201. __Pyx_RefNannyDeclarations
  17202. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  17203. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_stop(((struct PyGeventAsyncObject *)__pyx_v_self));
  17204. /* function exit code */
  17205. __Pyx_RefNannyFinishContext();
  17206. return __pyx_r;
  17207. }
  17208. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_stop(struct PyGeventAsyncObject *__pyx_v_self) {
  17209. PyObject *__pyx_r = NULL;
  17210. __Pyx_RefNannyDeclarations
  17211. int __pyx_t_1;
  17212. PyObject *__pyx_t_2 = NULL;
  17213. __Pyx_RefNannySetupContext("stop", 0);
  17214. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  17215. if (__pyx_t_1) {
  17216. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17217. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17218. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  17219. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17220. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17221. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  17222. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17223. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17224. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  17225. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17226. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17227. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  17228. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17229. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17230. __Pyx_GOTREF(__pyx_t_2);
  17231. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17232. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17233. __PYX_ERR(0, 1696, __pyx_L1_error)
  17234. }
  17235. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  17236. if (__pyx_t_1) {
  17237. ev_ref(__pyx_v_self->loop->_ptr);
  17238. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  17239. }
  17240. ev_async_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  17241. __Pyx_INCREF(Py_None);
  17242. __Pyx_GIVEREF(Py_None);
  17243. __Pyx_GOTREF(__pyx_v_self->_callback);
  17244. __Pyx_DECREF(__pyx_v_self->_callback);
  17245. __pyx_v_self->_callback = Py_None;
  17246. __Pyx_INCREF(Py_None);
  17247. __Pyx_GIVEREF(Py_None);
  17248. __Pyx_GOTREF(__pyx_v_self->args);
  17249. __Pyx_DECREF(__pyx_v_self->args);
  17250. __pyx_v_self->args = ((PyObject*)Py_None);
  17251. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  17252. if (__pyx_t_1) {
  17253. Py_DECREF(((PyObject*)__pyx_v_self));
  17254. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  17255. }
  17256. /* function exit code */
  17257. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  17258. goto __pyx_L0;
  17259. __pyx_L1_error:;
  17260. __Pyx_XDECREF(__pyx_t_2);
  17261. __Pyx_AddTraceback("gevent.libev.corecext.async.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17262. __pyx_r = NULL;
  17263. __pyx_L0:;
  17264. __Pyx_XGIVEREF(__pyx_r);
  17265. __Pyx_RefNannyFinishContext();
  17266. return __pyx_r;
  17267. }
  17268. /* Python wrapper */
  17269. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  17270. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_8priority_1__get__(PyObject *__pyx_v_self) {
  17271. PyObject *__pyx_r = 0;
  17272. __Pyx_RefNannyDeclarations
  17273. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17274. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_8priority___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17275. /* function exit code */
  17276. __Pyx_RefNannyFinishContext();
  17277. return __pyx_r;
  17278. }
  17279. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8priority___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17280. PyObject *__pyx_r = NULL;
  17281. __Pyx_RefNannyDeclarations
  17282. PyObject *__pyx_t_1 = NULL;
  17283. __Pyx_RefNannySetupContext("__get__", 0);
  17284. __Pyx_XDECREF(__pyx_r);
  17285. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
  17286. __Pyx_GOTREF(__pyx_t_1);
  17287. __pyx_r = __pyx_t_1;
  17288. __pyx_t_1 = 0;
  17289. goto __pyx_L0;
  17290. /* function exit code */
  17291. __pyx_L1_error:;
  17292. __Pyx_XDECREF(__pyx_t_1);
  17293. __Pyx_AddTraceback("gevent.libev.corecext.async.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17294. __pyx_r = NULL;
  17295. __pyx_L0:;
  17296. __Pyx_XGIVEREF(__pyx_r);
  17297. __Pyx_RefNannyFinishContext();
  17298. return __pyx_r;
  17299. }
  17300. /* Python wrapper */
  17301. static int __pyx_pw_6gevent_5libev_8corecext_5async_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  17302. static int __pyx_pw_6gevent_5libev_8corecext_5async_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  17303. int __pyx_v_priority;
  17304. int __pyx_r;
  17305. __Pyx_RefNannyDeclarations
  17306. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  17307. assert(__pyx_arg_priority); {
  17308. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1712, __pyx_L3_error)
  17309. }
  17310. goto __pyx_L4_argument_unpacking_done;
  17311. __pyx_L3_error:;
  17312. __Pyx_AddTraceback("gevent.libev.corecext.async.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17313. __Pyx_RefNannyFinishContext();
  17314. return -1;
  17315. __pyx_L4_argument_unpacking_done:;
  17316. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_8priority_2__set__(((struct PyGeventAsyncObject *)__pyx_v_self), ((int)__pyx_v_priority));
  17317. /* function exit code */
  17318. __Pyx_RefNannyFinishContext();
  17319. return __pyx_r;
  17320. }
  17321. static int __pyx_pf_6gevent_5libev_8corecext_5async_8priority_2__set__(struct PyGeventAsyncObject *__pyx_v_self, int __pyx_v_priority) {
  17322. int __pyx_r;
  17323. __Pyx_RefNannyDeclarations
  17324. int __pyx_t_1;
  17325. PyObject *__pyx_t_2 = NULL;
  17326. __Pyx_RefNannySetupContext("__set__", 0);
  17327. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  17328. if (__pyx_t_1) {
  17329. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17330. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17331. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
  17332. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17333. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17334. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
  17335. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17336. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17337. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
  17338. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17339. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17340. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
  17341. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17342. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17343. __Pyx_GOTREF(__pyx_t_2);
  17344. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17345. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17346. __PYX_ERR(0, 1714, __pyx_L1_error)
  17347. }
  17348. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  17349. /* function exit code */
  17350. __pyx_r = 0;
  17351. goto __pyx_L0;
  17352. __pyx_L1_error:;
  17353. __Pyx_XDECREF(__pyx_t_2);
  17354. __Pyx_AddTraceback("gevent.libev.corecext.async.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17355. __pyx_r = -1;
  17356. __pyx_L0:;
  17357. __Pyx_RefNannyFinishContext();
  17358. return __pyx_r;
  17359. }
  17360. /* Python wrapper */
  17361. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  17362. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  17363. int __pyx_v_revents;
  17364. PyObject *__pyx_v_callback = 0;
  17365. PyObject *__pyx_v_args = 0;
  17366. PyObject *__pyx_r = 0;
  17367. __Pyx_RefNannyDeclarations
  17368. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  17369. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  17370. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  17371. if (unlikely(!__pyx_v_args)) {
  17372. __Pyx_RefNannyFinishContext();
  17373. return NULL;
  17374. }
  17375. __Pyx_GOTREF(__pyx_v_args);
  17376. } else {
  17377. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  17378. }
  17379. {
  17380. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  17381. PyObject* values[2] = {0,0};
  17382. if (unlikely(__pyx_kwds)) {
  17383. Py_ssize_t kw_args;
  17384. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  17385. switch (pos_args) {
  17386. default:
  17387. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  17388. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17389. case 0: break;
  17390. }
  17391. kw_args = PyDict_Size(__pyx_kwds);
  17392. switch (pos_args) {
  17393. case 0:
  17394. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  17395. else goto __pyx_L5_argtuple_error;
  17396. case 1:
  17397. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  17398. else {
  17399. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1717, __pyx_L3_error)
  17400. }
  17401. }
  17402. if (unlikely(kw_args > 0)) {
  17403. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  17404. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1717, __pyx_L3_error)
  17405. }
  17406. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  17407. goto __pyx_L5_argtuple_error;
  17408. } else {
  17409. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17410. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  17411. }
  17412. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error)
  17413. __pyx_v_callback = values[1];
  17414. }
  17415. goto __pyx_L4_argument_unpacking_done;
  17416. __pyx_L5_argtuple_error:;
  17417. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1717, __pyx_L3_error)
  17418. __pyx_L3_error:;
  17419. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  17420. __Pyx_AddTraceback("gevent.libev.corecext.async.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17421. __Pyx_RefNannyFinishContext();
  17422. return NULL;
  17423. __pyx_L4_argument_unpacking_done:;
  17424. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_2feed(((struct PyGeventAsyncObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  17425. /* function exit code */
  17426. __Pyx_XDECREF(__pyx_v_args);
  17427. __Pyx_RefNannyFinishContext();
  17428. return __pyx_r;
  17429. }
  17430. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_2feed(struct PyGeventAsyncObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  17431. PyObject *__pyx_r = NULL;
  17432. __Pyx_RefNannyDeclarations
  17433. int __pyx_t_1;
  17434. PyObject *__pyx_t_2 = NULL;
  17435. __Pyx_RefNannySetupContext("feed", 0);
  17436. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  17437. if (__pyx_t_1) {
  17438. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17439. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17440. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  17441. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17442. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17443. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  17444. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17445. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17446. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  17447. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17448. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17449. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
  17450. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17451. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17452. __Pyx_GOTREF(__pyx_t_2);
  17453. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17454. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17455. __PYX_ERR(0, 1720, __pyx_L1_error)
  17456. }
  17457. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1721, __pyx_L1_error)
  17458. __Pyx_INCREF(__pyx_v_args);
  17459. __Pyx_GIVEREF(__pyx_v_args);
  17460. __Pyx_GOTREF(__pyx_v_self->args);
  17461. __Pyx_DECREF(__pyx_v_self->args);
  17462. __pyx_v_self->args = __pyx_v_args;
  17463. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  17464. if (__pyx_t_1) {
  17465. ev_unref(__pyx_v_self->loop->_ptr);
  17466. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  17467. }
  17468. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  17469. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  17470. if (__pyx_t_1) {
  17471. Py_INCREF(((PyObject*)__pyx_v_self));
  17472. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  17473. }
  17474. /* function exit code */
  17475. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  17476. goto __pyx_L0;
  17477. __pyx_L1_error:;
  17478. __Pyx_XDECREF(__pyx_t_2);
  17479. __Pyx_AddTraceback("gevent.libev.corecext.async.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17480. __pyx_r = NULL;
  17481. __pyx_L0:;
  17482. __Pyx_XGIVEREF(__pyx_r);
  17483. __Pyx_RefNannyFinishContext();
  17484. return __pyx_r;
  17485. }
  17486. /* Python wrapper */
  17487. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  17488. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  17489. PyObject *__pyx_v_callback = 0;
  17490. PyObject *__pyx_v_args = 0;
  17491. PyObject *__pyx_r = 0;
  17492. __Pyx_RefNannyDeclarations
  17493. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  17494. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  17495. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  17496. if (unlikely(!__pyx_v_args)) {
  17497. __Pyx_RefNannyFinishContext();
  17498. return NULL;
  17499. }
  17500. __Pyx_GOTREF(__pyx_v_args);
  17501. } else {
  17502. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  17503. }
  17504. {
  17505. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  17506. PyObject* values[1] = {0};
  17507. if (unlikely(__pyx_kwds)) {
  17508. Py_ssize_t kw_args;
  17509. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  17510. switch (pos_args) {
  17511. default:
  17512. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17513. case 0: break;
  17514. }
  17515. kw_args = PyDict_Size(__pyx_kwds);
  17516. switch (pos_args) {
  17517. case 0:
  17518. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  17519. else goto __pyx_L5_argtuple_error;
  17520. }
  17521. if (unlikely(kw_args > 0)) {
  17522. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  17523. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1731, __pyx_L3_error)
  17524. }
  17525. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  17526. goto __pyx_L5_argtuple_error;
  17527. } else {
  17528. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17529. }
  17530. __pyx_v_callback = values[0];
  17531. }
  17532. goto __pyx_L4_argument_unpacking_done;
  17533. __pyx_L5_argtuple_error:;
  17534. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1731, __pyx_L3_error)
  17535. __pyx_L3_error:;
  17536. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  17537. __Pyx_AddTraceback("gevent.libev.corecext.async.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17538. __Pyx_RefNannyFinishContext();
  17539. return NULL;
  17540. __pyx_L4_argument_unpacking_done:;
  17541. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4start(((struct PyGeventAsyncObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  17542. /* function exit code */
  17543. __Pyx_XDECREF(__pyx_v_args);
  17544. __Pyx_RefNannyFinishContext();
  17545. return __pyx_r;
  17546. }
  17547. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4start(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  17548. PyObject *__pyx_r = NULL;
  17549. __Pyx_RefNannyDeclarations
  17550. int __pyx_t_1;
  17551. PyObject *__pyx_t_2 = NULL;
  17552. int __pyx_t_3;
  17553. __Pyx_RefNannySetupContext("start", 0);
  17554. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  17555. if (__pyx_t_1) {
  17556. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17557. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17558. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  17559. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17560. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17561. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  17562. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17563. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17564. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  17565. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17566. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17567. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
  17568. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17569. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17570. __Pyx_GOTREF(__pyx_t_2);
  17571. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17572. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17573. __PYX_ERR(0, 1734, __pyx_L1_error)
  17574. }
  17575. __pyx_t_1 = (__pyx_v_callback == Py_None);
  17576. __pyx_t_3 = (__pyx_t_1 != 0);
  17577. if (__pyx_t_3) {
  17578. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17579. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17580. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
  17581. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17582. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17583. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
  17584. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17585. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17586. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
  17587. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17588. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17589. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L1_error)
  17590. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17591. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17592. __Pyx_GOTREF(__pyx_t_2);
  17593. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17594. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17595. __PYX_ERR(0, 1736, __pyx_L1_error)
  17596. }
  17597. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1737, __pyx_L1_error)
  17598. __Pyx_INCREF(__pyx_v_args);
  17599. __Pyx_GIVEREF(__pyx_v_args);
  17600. __Pyx_GOTREF(__pyx_v_self->args);
  17601. __Pyx_DECREF(__pyx_v_self->args);
  17602. __pyx_v_self->args = __pyx_v_args;
  17603. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  17604. if (__pyx_t_3) {
  17605. ev_unref(__pyx_v_self->loop->_ptr);
  17606. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  17607. }
  17608. ev_async_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  17609. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  17610. if (__pyx_t_3) {
  17611. Py_INCREF(((PyObject*)__pyx_v_self));
  17612. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  17613. }
  17614. /* function exit code */
  17615. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  17616. goto __pyx_L0;
  17617. __pyx_L1_error:;
  17618. __Pyx_XDECREF(__pyx_t_2);
  17619. __Pyx_AddTraceback("gevent.libev.corecext.async.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17620. __pyx_r = NULL;
  17621. __pyx_L0:;
  17622. __Pyx_XGIVEREF(__pyx_r);
  17623. __Pyx_RefNannyFinishContext();
  17624. return __pyx_r;
  17625. }
  17626. /* Python wrapper */
  17627. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  17628. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_6active_1__get__(PyObject *__pyx_v_self) {
  17629. PyObject *__pyx_r = 0;
  17630. __Pyx_RefNannyDeclarations
  17631. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17632. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_6active___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17633. /* function exit code */
  17634. __Pyx_RefNannyFinishContext();
  17635. return __pyx_r;
  17636. }
  17637. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_6active___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17638. PyObject *__pyx_r = NULL;
  17639. __Pyx_RefNannyDeclarations
  17640. PyObject *__pyx_t_1 = NULL;
  17641. __Pyx_RefNannySetupContext("__get__", 0);
  17642. __Pyx_XDECREF(__pyx_r);
  17643. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  17644. __Pyx_INCREF(Py_True);
  17645. __pyx_t_1 = Py_True;
  17646. } else {
  17647. __Pyx_INCREF(Py_False);
  17648. __pyx_t_1 = Py_False;
  17649. }
  17650. __pyx_r = __pyx_t_1;
  17651. __pyx_t_1 = 0;
  17652. goto __pyx_L0;
  17653. /* function exit code */
  17654. __pyx_L0:;
  17655. __Pyx_XGIVEREF(__pyx_r);
  17656. __Pyx_RefNannyFinishContext();
  17657. return __pyx_r;
  17658. }
  17659. /* Python wrapper */
  17660. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  17661. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_7pending_1__get__(PyObject *__pyx_v_self) {
  17662. PyObject *__pyx_r = 0;
  17663. __Pyx_RefNannyDeclarations
  17664. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17665. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_7pending___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17666. /* function exit code */
  17667. __Pyx_RefNannyFinishContext();
  17668. return __pyx_r;
  17669. }
  17670. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_7pending___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17671. PyObject *__pyx_r = NULL;
  17672. __Pyx_RefNannyDeclarations
  17673. PyObject *__pyx_t_1 = NULL;
  17674. __Pyx_RefNannySetupContext("__get__", 0);
  17675. __Pyx_XDECREF(__pyx_r);
  17676. if ((ev_async_pending((&__pyx_v_self->_watcher)) != 0)) {
  17677. __Pyx_INCREF(Py_True);
  17678. __pyx_t_1 = Py_True;
  17679. } else {
  17680. __Pyx_INCREF(Py_False);
  17681. __pyx_t_1 = Py_False;
  17682. }
  17683. __pyx_r = __pyx_t_1;
  17684. __pyx_t_1 = 0;
  17685. goto __pyx_L0;
  17686. /* function exit code */
  17687. __pyx_L0:;
  17688. __Pyx_XGIVEREF(__pyx_r);
  17689. __Pyx_RefNannyFinishContext();
  17690. return __pyx_r;
  17691. }
  17692. /* Python wrapper */
  17693. static int __pyx_pw_6gevent_5libev_8corecext_5async_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  17694. static int __pyx_pw_6gevent_5libev_8corecext_5async_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  17695. struct PyGeventLoopObject *__pyx_v_loop = 0;
  17696. PyObject *__pyx_v_ref = 0;
  17697. PyObject *__pyx_v_priority = 0;
  17698. int __pyx_r;
  17699. __Pyx_RefNannyDeclarations
  17700. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  17701. {
  17702. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  17703. PyObject* values[3] = {0,0,0};
  17704. values[1] = ((PyObject *)Py_True);
  17705. values[2] = ((PyObject *)Py_None);
  17706. if (unlikely(__pyx_kwds)) {
  17707. Py_ssize_t kw_args;
  17708. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  17709. switch (pos_args) {
  17710. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  17711. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  17712. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17713. case 0: break;
  17714. default: goto __pyx_L5_argtuple_error;
  17715. }
  17716. kw_args = PyDict_Size(__pyx_kwds);
  17717. switch (pos_args) {
  17718. case 0:
  17719. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  17720. else goto __pyx_L5_argtuple_error;
  17721. case 1:
  17722. if (kw_args > 0) {
  17723. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  17724. if (value) { values[1] = value; kw_args--; }
  17725. }
  17726. case 2:
  17727. if (kw_args > 0) {
  17728. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  17729. if (value) { values[2] = value; kw_args--; }
  17730. }
  17731. }
  17732. if (unlikely(kw_args > 0)) {
  17733. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1758, __pyx_L3_error)
  17734. }
  17735. } else {
  17736. switch (PyTuple_GET_SIZE(__pyx_args)) {
  17737. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  17738. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  17739. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  17740. break;
  17741. default: goto __pyx_L5_argtuple_error;
  17742. }
  17743. }
  17744. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  17745. __pyx_v_ref = values[1];
  17746. __pyx_v_priority = values[2];
  17747. }
  17748. goto __pyx_L4_argument_unpacking_done;
  17749. __pyx_L5_argtuple_error:;
  17750. __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1758, __pyx_L3_error)
  17751. __pyx_L3_error:;
  17752. __Pyx_AddTraceback("gevent.libev.corecext.async.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17753. __Pyx_RefNannyFinishContext();
  17754. return -1;
  17755. __pyx_L4_argument_unpacking_done:;
  17756. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1758, __pyx_L1_error)
  17757. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_6__init__(((struct PyGeventAsyncObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_ref, __pyx_v_priority);
  17758. /* function exit code */
  17759. goto __pyx_L0;
  17760. __pyx_L1_error:;
  17761. __pyx_r = -1;
  17762. __pyx_L0:;
  17763. __Pyx_RefNannyFinishContext();
  17764. return __pyx_r;
  17765. }
  17766. static int __pyx_pf_6gevent_5libev_8corecext_5async_6__init__(struct PyGeventAsyncObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  17767. int __pyx_r;
  17768. __Pyx_RefNannyDeclarations
  17769. int __pyx_t_1;
  17770. int __pyx_t_2;
  17771. int __pyx_t_3;
  17772. __Pyx_RefNannySetupContext("__init__", 0);
  17773. ev_async_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_async));
  17774. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  17775. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  17776. __Pyx_GOTREF(__pyx_v_self->loop);
  17777. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  17778. __pyx_v_self->loop = __pyx_v_loop;
  17779. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1761, __pyx_L1_error)
  17780. if (__pyx_t_1) {
  17781. __pyx_v_self->_flags = 0;
  17782. goto __pyx_L3;
  17783. }
  17784. /*else*/ {
  17785. __pyx_v_self->_flags = 4;
  17786. }
  17787. __pyx_L3:;
  17788. __pyx_t_1 = (__pyx_v_priority != Py_None);
  17789. __pyx_t_2 = (__pyx_t_1 != 0);
  17790. if (__pyx_t_2) {
  17791. __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1766, __pyx_L1_error)
  17792. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_3);
  17793. }
  17794. /* function exit code */
  17795. __pyx_r = 0;
  17796. goto __pyx_L0;
  17797. __pyx_L1_error:;
  17798. __Pyx_AddTraceback("gevent.libev.corecext.async.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17799. __pyx_r = -1;
  17800. __pyx_L0:;
  17801. __Pyx_RefNannyFinishContext();
  17802. return __pyx_r;
  17803. }
  17804. /* Python wrapper */
  17805. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_9send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  17806. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_9send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  17807. PyObject *__pyx_r = 0;
  17808. __Pyx_RefNannyDeclarations
  17809. __Pyx_RefNannySetupContext("send (wrapper)", 0);
  17810. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_8send(((struct PyGeventAsyncObject *)__pyx_v_self));
  17811. /* function exit code */
  17812. __Pyx_RefNannyFinishContext();
  17813. return __pyx_r;
  17814. }
  17815. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_8send(struct PyGeventAsyncObject *__pyx_v_self) {
  17816. PyObject *__pyx_r = NULL;
  17817. __Pyx_RefNannyDeclarations
  17818. int __pyx_t_1;
  17819. PyObject *__pyx_t_2 = NULL;
  17820. __Pyx_RefNannySetupContext("send", 0);
  17821. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  17822. if (__pyx_t_1) {
  17823. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17824. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17825. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  17826. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17827. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  17828. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  17829. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  17830. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17831. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  17832. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17833. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  17834. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
  17835. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  17836. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  17837. __Pyx_GOTREF(__pyx_t_2);
  17838. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  17839. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17840. __PYX_ERR(0, 1771, __pyx_L1_error)
  17841. }
  17842. ev_async_send(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  17843. /* function exit code */
  17844. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  17845. goto __pyx_L0;
  17846. __pyx_L1_error:;
  17847. __Pyx_XDECREF(__pyx_t_2);
  17848. __Pyx_AddTraceback("gevent.libev.corecext.async.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17849. __pyx_r = NULL;
  17850. __pyx_L0:;
  17851. __Pyx_XGIVEREF(__pyx_r);
  17852. __Pyx_RefNannyFinishContext();
  17853. return __pyx_r;
  17854. }
  17855. /* Python wrapper */
  17856. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  17857. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_4loop_1__get__(PyObject *__pyx_v_self) {
  17858. PyObject *__pyx_r = 0;
  17859. __Pyx_RefNannyDeclarations
  17860. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17861. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4loop___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17862. /* function exit code */
  17863. __Pyx_RefNannyFinishContext();
  17864. return __pyx_r;
  17865. }
  17866. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4loop___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17867. PyObject *__pyx_r = NULL;
  17868. __Pyx_RefNannyDeclarations
  17869. __Pyx_RefNannySetupContext("__get__", 0);
  17870. __Pyx_XDECREF(__pyx_r);
  17871. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  17872. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  17873. goto __pyx_L0;
  17874. /* function exit code */
  17875. __pyx_L0:;
  17876. __Pyx_XGIVEREF(__pyx_r);
  17877. __Pyx_RefNannyFinishContext();
  17878. return __pyx_r;
  17879. }
  17880. /* Python wrapper */
  17881. static int __pyx_pw_6gevent_5libev_8corecext_5async_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  17882. static int __pyx_pw_6gevent_5libev_8corecext_5async_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17883. int __pyx_r;
  17884. __Pyx_RefNannyDeclarations
  17885. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  17886. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4loop_2__set__(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  17887. /* function exit code */
  17888. __Pyx_RefNannyFinishContext();
  17889. return __pyx_r;
  17890. }
  17891. static int __pyx_pf_6gevent_5libev_8corecext_5async_4loop_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17892. int __pyx_r;
  17893. __Pyx_RefNannyDeclarations
  17894. PyObject *__pyx_t_1 = NULL;
  17895. __Pyx_RefNannySetupContext("__set__", 0);
  17896. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1654, __pyx_L1_error)
  17897. __pyx_t_1 = __pyx_v_value;
  17898. __Pyx_INCREF(__pyx_t_1);
  17899. __Pyx_GIVEREF(__pyx_t_1);
  17900. __Pyx_GOTREF(__pyx_v_self->loop);
  17901. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  17902. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  17903. __pyx_t_1 = 0;
  17904. /* function exit code */
  17905. __pyx_r = 0;
  17906. goto __pyx_L0;
  17907. __pyx_L1_error:;
  17908. __Pyx_XDECREF(__pyx_t_1);
  17909. __Pyx_AddTraceback("gevent.libev.corecext.async.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17910. __pyx_r = -1;
  17911. __pyx_L0:;
  17912. __Pyx_RefNannyFinishContext();
  17913. return __pyx_r;
  17914. }
  17915. /* Python wrapper */
  17916. static int __pyx_pw_6gevent_5libev_8corecext_5async_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  17917. static int __pyx_pw_6gevent_5libev_8corecext_5async_4loop_5__del__(PyObject *__pyx_v_self) {
  17918. int __pyx_r;
  17919. __Pyx_RefNannyDeclarations
  17920. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  17921. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4loop_4__del__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17922. /* function exit code */
  17923. __Pyx_RefNannyFinishContext();
  17924. return __pyx_r;
  17925. }
  17926. static int __pyx_pf_6gevent_5libev_8corecext_5async_4loop_4__del__(struct PyGeventAsyncObject *__pyx_v_self) {
  17927. int __pyx_r;
  17928. __Pyx_RefNannyDeclarations
  17929. __Pyx_RefNannySetupContext("__del__", 0);
  17930. __Pyx_INCREF(Py_None);
  17931. __Pyx_GIVEREF(Py_None);
  17932. __Pyx_GOTREF(__pyx_v_self->loop);
  17933. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  17934. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  17935. /* function exit code */
  17936. __pyx_r = 0;
  17937. __Pyx_RefNannyFinishContext();
  17938. return __pyx_r;
  17939. }
  17940. /* Python wrapper */
  17941. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  17942. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_4args_1__get__(PyObject *__pyx_v_self) {
  17943. PyObject *__pyx_r = 0;
  17944. __Pyx_RefNannyDeclarations
  17945. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  17946. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4args___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  17947. /* function exit code */
  17948. __Pyx_RefNannyFinishContext();
  17949. return __pyx_r;
  17950. }
  17951. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_4args___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  17952. PyObject *__pyx_r = NULL;
  17953. __Pyx_RefNannyDeclarations
  17954. __Pyx_RefNannySetupContext("__get__", 0);
  17955. __Pyx_XDECREF(__pyx_r);
  17956. __Pyx_INCREF(__pyx_v_self->args);
  17957. __pyx_r = __pyx_v_self->args;
  17958. goto __pyx_L0;
  17959. /* function exit code */
  17960. __pyx_L0:;
  17961. __Pyx_XGIVEREF(__pyx_r);
  17962. __Pyx_RefNannyFinishContext();
  17963. return __pyx_r;
  17964. }
  17965. /* Python wrapper */
  17966. static int __pyx_pw_6gevent_5libev_8corecext_5async_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  17967. static int __pyx_pw_6gevent_5libev_8corecext_5async_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17968. int __pyx_r;
  17969. __Pyx_RefNannyDeclarations
  17970. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  17971. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4args_2__set__(((struct PyGeventAsyncObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  17972. /* function exit code */
  17973. __Pyx_RefNannyFinishContext();
  17974. return __pyx_r;
  17975. }
  17976. static int __pyx_pf_6gevent_5libev_8corecext_5async_4args_2__set__(struct PyGeventAsyncObject *__pyx_v_self, PyObject *__pyx_v_value) {
  17977. int __pyx_r;
  17978. __Pyx_RefNannyDeclarations
  17979. PyObject *__pyx_t_1 = NULL;
  17980. __Pyx_RefNannySetupContext("__set__", 0);
  17981. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1656, __pyx_L1_error)
  17982. __pyx_t_1 = __pyx_v_value;
  17983. __Pyx_INCREF(__pyx_t_1);
  17984. __Pyx_GIVEREF(__pyx_t_1);
  17985. __Pyx_GOTREF(__pyx_v_self->args);
  17986. __Pyx_DECREF(__pyx_v_self->args);
  17987. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  17988. __pyx_t_1 = 0;
  17989. /* function exit code */
  17990. __pyx_r = 0;
  17991. goto __pyx_L0;
  17992. __pyx_L1_error:;
  17993. __Pyx_XDECREF(__pyx_t_1);
  17994. __Pyx_AddTraceback("gevent.libev.corecext.async.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  17995. __pyx_r = -1;
  17996. __pyx_L0:;
  17997. __Pyx_RefNannyFinishContext();
  17998. return __pyx_r;
  17999. }
  18000. /* Python wrapper */
  18001. static int __pyx_pw_6gevent_5libev_8corecext_5async_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  18002. static int __pyx_pw_6gevent_5libev_8corecext_5async_4args_5__del__(PyObject *__pyx_v_self) {
  18003. int __pyx_r;
  18004. __Pyx_RefNannyDeclarations
  18005. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  18006. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_4args_4__del__(((struct PyGeventAsyncObject *)__pyx_v_self));
  18007. /* function exit code */
  18008. __Pyx_RefNannyFinishContext();
  18009. return __pyx_r;
  18010. }
  18011. static int __pyx_pf_6gevent_5libev_8corecext_5async_4args_4__del__(struct PyGeventAsyncObject *__pyx_v_self) {
  18012. int __pyx_r;
  18013. __Pyx_RefNannyDeclarations
  18014. __Pyx_RefNannySetupContext("__del__", 0);
  18015. __Pyx_INCREF(Py_None);
  18016. __Pyx_GIVEREF(Py_None);
  18017. __Pyx_GOTREF(__pyx_v_self->args);
  18018. __Pyx_DECREF(__pyx_v_self->args);
  18019. __pyx_v_self->args = ((PyObject*)Py_None);
  18020. /* function exit code */
  18021. __pyx_r = 0;
  18022. __Pyx_RefNannyFinishContext();
  18023. return __pyx_r;
  18024. }
  18025. /* Python wrapper */
  18026. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  18027. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5async_6_flags_1__get__(PyObject *__pyx_v_self) {
  18028. PyObject *__pyx_r = 0;
  18029. __Pyx_RefNannyDeclarations
  18030. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18031. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5async_6_flags___get__(((struct PyGeventAsyncObject *)__pyx_v_self));
  18032. /* function exit code */
  18033. __Pyx_RefNannyFinishContext();
  18034. return __pyx_r;
  18035. }
  18036. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5async_6_flags___get__(struct PyGeventAsyncObject *__pyx_v_self) {
  18037. PyObject *__pyx_r = NULL;
  18038. __Pyx_RefNannyDeclarations
  18039. PyObject *__pyx_t_1 = NULL;
  18040. __Pyx_RefNannySetupContext("__get__", 0);
  18041. __Pyx_XDECREF(__pyx_r);
  18042. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error)
  18043. __Pyx_GOTREF(__pyx_t_1);
  18044. __pyx_r = __pyx_t_1;
  18045. __pyx_t_1 = 0;
  18046. goto __pyx_L0;
  18047. /* function exit code */
  18048. __pyx_L1_error:;
  18049. __Pyx_XDECREF(__pyx_t_1);
  18050. __Pyx_AddTraceback("gevent.libev.corecext.async._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18051. __pyx_r = NULL;
  18052. __pyx_L0:;
  18053. __Pyx_XGIVEREF(__pyx_r);
  18054. __Pyx_RefNannyFinishContext();
  18055. return __pyx_r;
  18056. }
  18057. /* Python wrapper */
  18058. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18059. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18060. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  18061. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3ref_1__get__(PyObject *__pyx_v_self) {
  18062. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18063. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18064. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  18065. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3ref_1__get__(PyObject *__pyx_v_self) {
  18066. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18067. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18068. PyObject *__pyx_r = 0;
  18069. __Pyx_RefNannyDeclarations
  18070. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18071. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18072. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18073. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_3ref___get__(((struct PyGeventStatObject *)__pyx_v_self));
  18074. /* function exit code */
  18075. __Pyx_RefNannyFinishContext();
  18076. return __pyx_r;
  18077. }
  18078. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_3ref___get__(struct PyGeventStatObject *__pyx_v_self) {
  18079. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18080. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18081. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_3ref___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18082. /* function exit code */
  18083. __Pyx_RefNannyFinishContext();
  18084. return __pyx_r;
  18085. }
  18086. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3ref___get__(struct PyGeventChildObject *__pyx_v_self) {
  18087. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18088. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18089. PyObject *__pyx_r = NULL;
  18090. __Pyx_RefNannyDeclarations
  18091. PyObject *__pyx_t_1 = NULL;
  18092. __Pyx_RefNannySetupContext("__get__", 0);
  18093. __Pyx_XDECREF(__pyx_r);
  18094. if (((__pyx_v_self->_flags & 4) != 0)) {
  18095. __Pyx_INCREF(Py_False);
  18096. __pyx_t_1 = Py_False;
  18097. } else {
  18098. __Pyx_INCREF(Py_True);
  18099. __pyx_t_1 = Py_True;
  18100. }
  18101. __pyx_r = __pyx_t_1;
  18102. __pyx_t_1 = 0;
  18103. goto __pyx_L0;
  18104. /* function exit code */
  18105. __pyx_L0:;
  18106. __Pyx_XGIVEREF(__pyx_r);
  18107. __Pyx_RefNannyFinishContext();
  18108. return __pyx_r;
  18109. }
  18110. /* Python wrapper */
  18111. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18112. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18113. static int __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  18114. static int __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  18115. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18116. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18117. static int __pyx_pw_6gevent_5libev_8corecext_5child_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  18118. static int __pyx_pw_6gevent_5libev_8corecext_5child_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  18119. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18120. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18121. int __pyx_r;
  18122. __Pyx_RefNannyDeclarations
  18123. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  18124. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18125. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18126. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_3ref_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  18127. /* function exit code */
  18128. __Pyx_RefNannyFinishContext();
  18129. return __pyx_r;
  18130. }
  18131. static int __pyx_pf_6gevent_5libev_8corecext_4stat_3ref_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value) {
  18132. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18133. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18134. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_3ref_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  18135. /* function exit code */
  18136. __Pyx_RefNannyFinishContext();
  18137. return __pyx_r;
  18138. }
  18139. static int __pyx_pf_6gevent_5libev_8corecext_5child_3ref_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value) {
  18140. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18141. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18142. int __pyx_r;
  18143. __Pyx_RefNannyDeclarations
  18144. int __pyx_t_1;
  18145. PyObject *__pyx_t_2 = NULL;
  18146. int __pyx_t_3;
  18147. __Pyx_RefNannySetupContext("__set__", 0);
  18148. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  18149. if (__pyx_t_1) {
  18150. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18151. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18152. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  18153. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18154. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18155. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
  18156. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18157. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  18158. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  18159. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  18160. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18161. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
  18162. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18163. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  18164. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  18165. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  18166. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18167. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
  18168. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18169. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18170. __Pyx_GOTREF(__pyx_t_2);
  18171. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18172. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18173. __PYX_ERR(0, 1794, __pyx_L1_error)
  18174. }
  18175. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1795, __pyx_L1_error)
  18176. if (__pyx_t_1) {
  18177. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  18178. if (__pyx_t_1) {
  18179. __pyx_r = 0;
  18180. goto __pyx_L0;
  18181. }
  18182. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  18183. if (__pyx_t_1) {
  18184. ev_ref(__pyx_v_self->loop->_ptr);
  18185. }
  18186. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  18187. goto __pyx_L4;
  18188. }
  18189. /*else*/ {
  18190. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  18191. if (__pyx_t_1) {
  18192. __pyx_r = 0;
  18193. goto __pyx_L0;
  18194. }
  18195. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  18196. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  18197. if (__pyx_t_3) {
  18198. } else {
  18199. __pyx_t_1 = __pyx_t_3;
  18200. goto __pyx_L9_bool_binop_done;
  18201. }
  18202. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  18203. __pyx_t_1 = __pyx_t_3;
  18204. __pyx_L9_bool_binop_done:;
  18205. if (__pyx_t_1) {
  18206. ev_unref(__pyx_v_self->loop->_ptr);
  18207. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  18208. }
  18209. }
  18210. __pyx_L4:;
  18211. /* function exit code */
  18212. __pyx_r = 0;
  18213. goto __pyx_L0;
  18214. __pyx_L1_error:;
  18215. __Pyx_XDECREF(__pyx_t_2);
  18216. __Pyx_AddTraceback("gevent.libev.corecext.child.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18217. __pyx_r = -1;
  18218. __pyx_L0:;
  18219. __Pyx_RefNannyFinishContext();
  18220. return __pyx_r;
  18221. }
  18222. /* Python wrapper */
  18223. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  18224. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_8callback_1__get__(PyObject *__pyx_v_self) {
  18225. PyObject *__pyx_r = 0;
  18226. __Pyx_RefNannyDeclarations
  18227. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18228. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_8callback___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18229. /* function exit code */
  18230. __Pyx_RefNannyFinishContext();
  18231. return __pyx_r;
  18232. }
  18233. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8callback___get__(struct PyGeventChildObject *__pyx_v_self) {
  18234. PyObject *__pyx_r = NULL;
  18235. __Pyx_RefNannyDeclarations
  18236. __Pyx_RefNannySetupContext("__get__", 0);
  18237. __Pyx_XDECREF(__pyx_r);
  18238. __Pyx_INCREF(__pyx_v_self->_callback);
  18239. __pyx_r = __pyx_v_self->_callback;
  18240. goto __pyx_L0;
  18241. /* function exit code */
  18242. __pyx_L0:;
  18243. __Pyx_XGIVEREF(__pyx_r);
  18244. __Pyx_RefNannyFinishContext();
  18245. return __pyx_r;
  18246. }
  18247. /* Python wrapper */
  18248. static int __pyx_pw_6gevent_5libev_8corecext_5child_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  18249. static int __pyx_pw_6gevent_5libev_8corecext_5child_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  18250. int __pyx_r;
  18251. __Pyx_RefNannyDeclarations
  18252. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  18253. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_8callback_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  18254. /* function exit code */
  18255. __Pyx_RefNannyFinishContext();
  18256. return __pyx_r;
  18257. }
  18258. static int __pyx_pf_6gevent_5libev_8corecext_5child_8callback_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  18259. int __pyx_r;
  18260. __Pyx_RefNannyDeclarations
  18261. int __pyx_t_1;
  18262. int __pyx_t_2;
  18263. int __pyx_t_3;
  18264. PyObject *__pyx_t_4 = NULL;
  18265. PyObject *__pyx_t_5 = NULL;
  18266. __Pyx_RefNannySetupContext("__set__", 0);
  18267. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  18268. if (__pyx_t_2) {
  18269. } else {
  18270. __pyx_t_1 = __pyx_t_2;
  18271. goto __pyx_L4_bool_binop_done;
  18272. }
  18273. __pyx_t_2 = (__pyx_v_callback != Py_None);
  18274. __pyx_t_3 = (__pyx_t_2 != 0);
  18275. __pyx_t_1 = __pyx_t_3;
  18276. __pyx_L4_bool_binop_done:;
  18277. if (__pyx_t_1) {
  18278. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L1_error)
  18279. __Pyx_GOTREF(__pyx_t_4);
  18280. __Pyx_INCREF(__pyx_v_callback);
  18281. __Pyx_GIVEREF(__pyx_v_callback);
  18282. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  18283. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1816, __pyx_L1_error)
  18284. __Pyx_GOTREF(__pyx_t_5);
  18285. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18286. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L1_error)
  18287. __Pyx_GOTREF(__pyx_t_4);
  18288. __Pyx_GIVEREF(__pyx_t_5);
  18289. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  18290. __pyx_t_5 = 0;
  18291. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1816, __pyx_L1_error)
  18292. __Pyx_GOTREF(__pyx_t_5);
  18293. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  18294. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  18295. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  18296. __PYX_ERR(0, 1816, __pyx_L1_error)
  18297. }
  18298. __Pyx_INCREF(__pyx_v_callback);
  18299. __Pyx_GIVEREF(__pyx_v_callback);
  18300. __Pyx_GOTREF(__pyx_v_self->_callback);
  18301. __Pyx_DECREF(__pyx_v_self->_callback);
  18302. __pyx_v_self->_callback = __pyx_v_callback;
  18303. /* function exit code */
  18304. __pyx_r = 0;
  18305. goto __pyx_L0;
  18306. __pyx_L1_error:;
  18307. __Pyx_XDECREF(__pyx_t_4);
  18308. __Pyx_XDECREF(__pyx_t_5);
  18309. __Pyx_AddTraceback("gevent.libev.corecext.child.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18310. __pyx_r = -1;
  18311. __pyx_L0:;
  18312. __Pyx_RefNannyFinishContext();
  18313. return __pyx_r;
  18314. }
  18315. /* Python wrapper */
  18316. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  18317. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  18318. PyObject *__pyx_r = 0;
  18319. __Pyx_RefNannyDeclarations
  18320. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  18321. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_stop(((struct PyGeventChildObject *)__pyx_v_self));
  18322. /* function exit code */
  18323. __Pyx_RefNannyFinishContext();
  18324. return __pyx_r;
  18325. }
  18326. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_stop(struct PyGeventChildObject *__pyx_v_self) {
  18327. PyObject *__pyx_r = NULL;
  18328. __Pyx_RefNannyDeclarations
  18329. int __pyx_t_1;
  18330. PyObject *__pyx_t_2 = NULL;
  18331. __Pyx_RefNannySetupContext("stop", 0);
  18332. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  18333. if (__pyx_t_1) {
  18334. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18335. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18336. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
  18337. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18338. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18339. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
  18340. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18341. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18342. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
  18343. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18344. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18345. __Pyx_GOTREF(__pyx_t_2);
  18346. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18347. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18348. __PYX_ERR(0, 1822, __pyx_L1_error)
  18349. }
  18350. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  18351. if (__pyx_t_1) {
  18352. ev_ref(__pyx_v_self->loop->_ptr);
  18353. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  18354. }
  18355. ev_child_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  18356. __Pyx_INCREF(Py_None);
  18357. __Pyx_GIVEREF(Py_None);
  18358. __Pyx_GOTREF(__pyx_v_self->_callback);
  18359. __Pyx_DECREF(__pyx_v_self->_callback);
  18360. __pyx_v_self->_callback = Py_None;
  18361. __Pyx_INCREF(Py_None);
  18362. __Pyx_GIVEREF(Py_None);
  18363. __Pyx_GOTREF(__pyx_v_self->args);
  18364. __Pyx_DECREF(__pyx_v_self->args);
  18365. __pyx_v_self->args = ((PyObject*)Py_None);
  18366. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  18367. if (__pyx_t_1) {
  18368. Py_DECREF(((PyObject*)__pyx_v_self));
  18369. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  18370. }
  18371. /* function exit code */
  18372. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  18373. goto __pyx_L0;
  18374. __pyx_L1_error:;
  18375. __Pyx_XDECREF(__pyx_t_2);
  18376. __Pyx_AddTraceback("gevent.libev.corecext.child.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18377. __pyx_r = NULL;
  18378. __pyx_L0:;
  18379. __Pyx_XGIVEREF(__pyx_r);
  18380. __Pyx_RefNannyFinishContext();
  18381. return __pyx_r;
  18382. }
  18383. /* Python wrapper */
  18384. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  18385. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_8priority_1__get__(PyObject *__pyx_v_self) {
  18386. PyObject *__pyx_r = 0;
  18387. __Pyx_RefNannyDeclarations
  18388. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18389. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_8priority___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18390. /* function exit code */
  18391. __Pyx_RefNannyFinishContext();
  18392. return __pyx_r;
  18393. }
  18394. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8priority___get__(struct PyGeventChildObject *__pyx_v_self) {
  18395. PyObject *__pyx_r = NULL;
  18396. __Pyx_RefNannyDeclarations
  18397. PyObject *__pyx_t_1 = NULL;
  18398. __Pyx_RefNannySetupContext("__get__", 0);
  18399. __Pyx_XDECREF(__pyx_r);
  18400. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
  18401. __Pyx_GOTREF(__pyx_t_1);
  18402. __pyx_r = __pyx_t_1;
  18403. __pyx_t_1 = 0;
  18404. goto __pyx_L0;
  18405. /* function exit code */
  18406. __pyx_L1_error:;
  18407. __Pyx_XDECREF(__pyx_t_1);
  18408. __Pyx_AddTraceback("gevent.libev.corecext.child.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18409. __pyx_r = NULL;
  18410. __pyx_L0:;
  18411. __Pyx_XGIVEREF(__pyx_r);
  18412. __Pyx_RefNannyFinishContext();
  18413. return __pyx_r;
  18414. }
  18415. /* Python wrapper */
  18416. static int __pyx_pw_6gevent_5libev_8corecext_5child_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  18417. static int __pyx_pw_6gevent_5libev_8corecext_5child_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  18418. int __pyx_v_priority;
  18419. int __pyx_r;
  18420. __Pyx_RefNannyDeclarations
  18421. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  18422. assert(__pyx_arg_priority); {
  18423. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1838, __pyx_L3_error)
  18424. }
  18425. goto __pyx_L4_argument_unpacking_done;
  18426. __pyx_L3_error:;
  18427. __Pyx_AddTraceback("gevent.libev.corecext.child.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18428. __Pyx_RefNannyFinishContext();
  18429. return -1;
  18430. __pyx_L4_argument_unpacking_done:;
  18431. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_8priority_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_priority));
  18432. /* function exit code */
  18433. __Pyx_RefNannyFinishContext();
  18434. return __pyx_r;
  18435. }
  18436. static int __pyx_pf_6gevent_5libev_8corecext_5child_8priority_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_priority) {
  18437. int __pyx_r;
  18438. __Pyx_RefNannyDeclarations
  18439. int __pyx_t_1;
  18440. PyObject *__pyx_t_2 = NULL;
  18441. __Pyx_RefNannySetupContext("__set__", 0);
  18442. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  18443. if (__pyx_t_1) {
  18444. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18445. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18446. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
  18447. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18448. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18449. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
  18450. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18451. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18452. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
  18453. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18454. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18455. __Pyx_GOTREF(__pyx_t_2);
  18456. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18457. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18458. __PYX_ERR(0, 1840, __pyx_L1_error)
  18459. }
  18460. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  18461. /* function exit code */
  18462. __pyx_r = 0;
  18463. goto __pyx_L0;
  18464. __pyx_L1_error:;
  18465. __Pyx_XDECREF(__pyx_t_2);
  18466. __Pyx_AddTraceback("gevent.libev.corecext.child.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18467. __pyx_r = -1;
  18468. __pyx_L0:;
  18469. __Pyx_RefNannyFinishContext();
  18470. return __pyx_r;
  18471. }
  18472. /* Python wrapper */
  18473. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  18474. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  18475. int __pyx_v_revents;
  18476. PyObject *__pyx_v_callback = 0;
  18477. PyObject *__pyx_v_args = 0;
  18478. PyObject *__pyx_r = 0;
  18479. __Pyx_RefNannyDeclarations
  18480. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  18481. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  18482. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  18483. if (unlikely(!__pyx_v_args)) {
  18484. __Pyx_RefNannyFinishContext();
  18485. return NULL;
  18486. }
  18487. __Pyx_GOTREF(__pyx_v_args);
  18488. } else {
  18489. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  18490. }
  18491. {
  18492. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  18493. PyObject* values[2] = {0,0};
  18494. if (unlikely(__pyx_kwds)) {
  18495. Py_ssize_t kw_args;
  18496. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  18497. switch (pos_args) {
  18498. default:
  18499. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  18500. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18501. case 0: break;
  18502. }
  18503. kw_args = PyDict_Size(__pyx_kwds);
  18504. switch (pos_args) {
  18505. case 0:
  18506. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  18507. else goto __pyx_L5_argtuple_error;
  18508. case 1:
  18509. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  18510. else {
  18511. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1843, __pyx_L3_error)
  18512. }
  18513. }
  18514. if (unlikely(kw_args > 0)) {
  18515. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  18516. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1843, __pyx_L3_error)
  18517. }
  18518. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  18519. goto __pyx_L5_argtuple_error;
  18520. } else {
  18521. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18522. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  18523. }
  18524. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1843, __pyx_L3_error)
  18525. __pyx_v_callback = values[1];
  18526. }
  18527. goto __pyx_L4_argument_unpacking_done;
  18528. __pyx_L5_argtuple_error:;
  18529. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1843, __pyx_L3_error)
  18530. __pyx_L3_error:;
  18531. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  18532. __Pyx_AddTraceback("gevent.libev.corecext.child.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18533. __Pyx_RefNannyFinishContext();
  18534. return NULL;
  18535. __pyx_L4_argument_unpacking_done:;
  18536. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_2feed(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  18537. /* function exit code */
  18538. __Pyx_XDECREF(__pyx_v_args);
  18539. __Pyx_RefNannyFinishContext();
  18540. return __pyx_r;
  18541. }
  18542. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_2feed(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  18543. PyObject *__pyx_r = NULL;
  18544. __Pyx_RefNannyDeclarations
  18545. int __pyx_t_1;
  18546. PyObject *__pyx_t_2 = NULL;
  18547. __Pyx_RefNannySetupContext("feed", 0);
  18548. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  18549. if (__pyx_t_1) {
  18550. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18551. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18552. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
  18553. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18554. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18555. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
  18556. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18557. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18558. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
  18559. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18560. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18561. __Pyx_GOTREF(__pyx_t_2);
  18562. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18563. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18564. __PYX_ERR(0, 1846, __pyx_L1_error)
  18565. }
  18566. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)
  18567. __Pyx_INCREF(__pyx_v_args);
  18568. __Pyx_GIVEREF(__pyx_v_args);
  18569. __Pyx_GOTREF(__pyx_v_self->args);
  18570. __Pyx_DECREF(__pyx_v_self->args);
  18571. __pyx_v_self->args = __pyx_v_args;
  18572. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  18573. if (__pyx_t_1) {
  18574. ev_unref(__pyx_v_self->loop->_ptr);
  18575. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  18576. }
  18577. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  18578. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  18579. if (__pyx_t_1) {
  18580. Py_INCREF(((PyObject*)__pyx_v_self));
  18581. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  18582. }
  18583. /* function exit code */
  18584. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  18585. goto __pyx_L0;
  18586. __pyx_L1_error:;
  18587. __Pyx_XDECREF(__pyx_t_2);
  18588. __Pyx_AddTraceback("gevent.libev.corecext.child.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18589. __pyx_r = NULL;
  18590. __pyx_L0:;
  18591. __Pyx_XGIVEREF(__pyx_r);
  18592. __Pyx_RefNannyFinishContext();
  18593. return __pyx_r;
  18594. }
  18595. /* Python wrapper */
  18596. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  18597. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  18598. PyObject *__pyx_v_callback = 0;
  18599. PyObject *__pyx_v_args = 0;
  18600. PyObject *__pyx_r = 0;
  18601. __Pyx_RefNannyDeclarations
  18602. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  18603. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  18604. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  18605. if (unlikely(!__pyx_v_args)) {
  18606. __Pyx_RefNannyFinishContext();
  18607. return NULL;
  18608. }
  18609. __Pyx_GOTREF(__pyx_v_args);
  18610. } else {
  18611. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  18612. }
  18613. {
  18614. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  18615. PyObject* values[1] = {0};
  18616. if (unlikely(__pyx_kwds)) {
  18617. Py_ssize_t kw_args;
  18618. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  18619. switch (pos_args) {
  18620. default:
  18621. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18622. case 0: break;
  18623. }
  18624. kw_args = PyDict_Size(__pyx_kwds);
  18625. switch (pos_args) {
  18626. case 0:
  18627. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  18628. else goto __pyx_L5_argtuple_error;
  18629. }
  18630. if (unlikely(kw_args > 0)) {
  18631. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  18632. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 1857, __pyx_L3_error)
  18633. }
  18634. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  18635. goto __pyx_L5_argtuple_error;
  18636. } else {
  18637. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18638. }
  18639. __pyx_v_callback = values[0];
  18640. }
  18641. goto __pyx_L4_argument_unpacking_done;
  18642. __pyx_L5_argtuple_error:;
  18643. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1857, __pyx_L3_error)
  18644. __pyx_L3_error:;
  18645. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  18646. __Pyx_AddTraceback("gevent.libev.corecext.child.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18647. __Pyx_RefNannyFinishContext();
  18648. return NULL;
  18649. __pyx_L4_argument_unpacking_done:;
  18650. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4start(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  18651. /* function exit code */
  18652. __Pyx_XDECREF(__pyx_v_args);
  18653. __Pyx_RefNannyFinishContext();
  18654. return __pyx_r;
  18655. }
  18656. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4start(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  18657. PyObject *__pyx_r = NULL;
  18658. __Pyx_RefNannyDeclarations
  18659. int __pyx_t_1;
  18660. PyObject *__pyx_t_2 = NULL;
  18661. int __pyx_t_3;
  18662. __Pyx_RefNannySetupContext("start", 0);
  18663. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  18664. if (__pyx_t_1) {
  18665. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18666. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18667. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  18668. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18669. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18670. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  18671. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18672. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18673. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  18674. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18675. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18676. __Pyx_GOTREF(__pyx_t_2);
  18677. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18678. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18679. __PYX_ERR(0, 1860, __pyx_L1_error)
  18680. }
  18681. __pyx_t_1 = (__pyx_v_callback == Py_None);
  18682. __pyx_t_3 = (__pyx_t_1 != 0);
  18683. if (__pyx_t_3) {
  18684. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18685. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18686. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
  18687. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18688. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18689. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
  18690. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18691. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18692. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
  18693. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18694. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18695. __Pyx_GOTREF(__pyx_t_2);
  18696. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  18697. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18698. __PYX_ERR(0, 1862, __pyx_L1_error)
  18699. }
  18700. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1863, __pyx_L1_error)
  18701. __Pyx_INCREF(__pyx_v_args);
  18702. __Pyx_GIVEREF(__pyx_v_args);
  18703. __Pyx_GOTREF(__pyx_v_self->args);
  18704. __Pyx_DECREF(__pyx_v_self->args);
  18705. __pyx_v_self->args = __pyx_v_args;
  18706. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  18707. if (__pyx_t_3) {
  18708. ev_unref(__pyx_v_self->loop->_ptr);
  18709. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  18710. }
  18711. ev_child_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  18712. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  18713. if (__pyx_t_3) {
  18714. Py_INCREF(((PyObject*)__pyx_v_self));
  18715. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  18716. }
  18717. /* function exit code */
  18718. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  18719. goto __pyx_L0;
  18720. __pyx_L1_error:;
  18721. __Pyx_XDECREF(__pyx_t_2);
  18722. __Pyx_AddTraceback("gevent.libev.corecext.child.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18723. __pyx_r = NULL;
  18724. __pyx_L0:;
  18725. __Pyx_XGIVEREF(__pyx_r);
  18726. __Pyx_RefNannyFinishContext();
  18727. return __pyx_r;
  18728. }
  18729. /* Python wrapper */
  18730. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  18731. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_6active_1__get__(PyObject *__pyx_v_self) {
  18732. PyObject *__pyx_r = 0;
  18733. __Pyx_RefNannyDeclarations
  18734. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18735. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_6active___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18736. /* function exit code */
  18737. __Pyx_RefNannyFinishContext();
  18738. return __pyx_r;
  18739. }
  18740. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_6active___get__(struct PyGeventChildObject *__pyx_v_self) {
  18741. PyObject *__pyx_r = NULL;
  18742. __Pyx_RefNannyDeclarations
  18743. PyObject *__pyx_t_1 = NULL;
  18744. __Pyx_RefNannySetupContext("__get__", 0);
  18745. __Pyx_XDECREF(__pyx_r);
  18746. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  18747. __Pyx_INCREF(Py_True);
  18748. __pyx_t_1 = Py_True;
  18749. } else {
  18750. __Pyx_INCREF(Py_False);
  18751. __pyx_t_1 = Py_False;
  18752. }
  18753. __pyx_r = __pyx_t_1;
  18754. __pyx_t_1 = 0;
  18755. goto __pyx_L0;
  18756. /* function exit code */
  18757. __pyx_L0:;
  18758. __Pyx_XGIVEREF(__pyx_r);
  18759. __Pyx_RefNannyFinishContext();
  18760. return __pyx_r;
  18761. }
  18762. /* Python wrapper */
  18763. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  18764. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7pending_1__get__(PyObject *__pyx_v_self) {
  18765. PyObject *__pyx_r = 0;
  18766. __Pyx_RefNannyDeclarations
  18767. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18768. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7pending___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18769. /* function exit code */
  18770. __Pyx_RefNannyFinishContext();
  18771. return __pyx_r;
  18772. }
  18773. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7pending___get__(struct PyGeventChildObject *__pyx_v_self) {
  18774. PyObject *__pyx_r = NULL;
  18775. __Pyx_RefNannyDeclarations
  18776. PyObject *__pyx_t_1 = NULL;
  18777. __Pyx_RefNannySetupContext("__get__", 0);
  18778. __Pyx_XDECREF(__pyx_r);
  18779. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  18780. __Pyx_INCREF(Py_True);
  18781. __pyx_t_1 = Py_True;
  18782. } else {
  18783. __Pyx_INCREF(Py_False);
  18784. __pyx_t_1 = Py_False;
  18785. }
  18786. __pyx_r = __pyx_t_1;
  18787. __pyx_t_1 = 0;
  18788. goto __pyx_L0;
  18789. /* function exit code */
  18790. __pyx_L0:;
  18791. __Pyx_XGIVEREF(__pyx_r);
  18792. __Pyx_RefNannyFinishContext();
  18793. return __pyx_r;
  18794. }
  18795. /* Python wrapper */
  18796. static int __pyx_pw_6gevent_5libev_8corecext_5child_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  18797. static int __pyx_pw_6gevent_5libev_8corecext_5child_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  18798. struct PyGeventLoopObject *__pyx_v_loop = 0;
  18799. int __pyx_v_pid;
  18800. int __pyx_v_trace;
  18801. PyObject *__pyx_v_ref = 0;
  18802. int __pyx_r;
  18803. __Pyx_RefNannyDeclarations
  18804. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  18805. {
  18806. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_pid,&__pyx_n_s_trace,&__pyx_n_s_ref,0};
  18807. PyObject* values[4] = {0,0,0,0};
  18808. values[3] = ((PyObject *)Py_True);
  18809. if (unlikely(__pyx_kwds)) {
  18810. Py_ssize_t kw_args;
  18811. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  18812. switch (pos_args) {
  18813. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  18814. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  18815. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  18816. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18817. case 0: break;
  18818. default: goto __pyx_L5_argtuple_error;
  18819. }
  18820. kw_args = PyDict_Size(__pyx_kwds);
  18821. switch (pos_args) {
  18822. case 0:
  18823. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  18824. else goto __pyx_L5_argtuple_error;
  18825. case 1:
  18826. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pid)) != 0)) kw_args--;
  18827. else {
  18828. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 1884, __pyx_L3_error)
  18829. }
  18830. case 2:
  18831. if (kw_args > 0) {
  18832. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trace);
  18833. if (value) { values[2] = value; kw_args--; }
  18834. }
  18835. case 3:
  18836. if (kw_args > 0) {
  18837. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  18838. if (value) { values[3] = value; kw_args--; }
  18839. }
  18840. }
  18841. if (unlikely(kw_args > 0)) {
  18842. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1884, __pyx_L3_error)
  18843. }
  18844. } else {
  18845. switch (PyTuple_GET_SIZE(__pyx_args)) {
  18846. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  18847. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  18848. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  18849. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  18850. break;
  18851. default: goto __pyx_L5_argtuple_error;
  18852. }
  18853. }
  18854. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  18855. __pyx_v_pid = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_pid == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1884, __pyx_L3_error)
  18856. if (values[2]) {
  18857. __pyx_v_trace = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_trace == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1884, __pyx_L3_error)
  18858. } else {
  18859. __pyx_v_trace = ((int)0);
  18860. }
  18861. __pyx_v_ref = values[3];
  18862. }
  18863. goto __pyx_L4_argument_unpacking_done;
  18864. __pyx_L5_argtuple_error:;
  18865. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1884, __pyx_L3_error)
  18866. __pyx_L3_error:;
  18867. __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18868. __Pyx_RefNannyFinishContext();
  18869. return -1;
  18870. __pyx_L4_argument_unpacking_done:;
  18871. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 1884, __pyx_L1_error)
  18872. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_6__init__(((struct PyGeventChildObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_pid, __pyx_v_trace, __pyx_v_ref);
  18873. /* function exit code */
  18874. goto __pyx_L0;
  18875. __pyx_L1_error:;
  18876. __pyx_r = -1;
  18877. __pyx_L0:;
  18878. __Pyx_RefNannyFinishContext();
  18879. return __pyx_r;
  18880. }
  18881. static int __pyx_pf_6gevent_5libev_8corecext_5child_6__init__(struct PyGeventChildObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, int __pyx_v_pid, int __pyx_v_trace, PyObject *__pyx_v_ref) {
  18882. int __pyx_r;
  18883. __Pyx_RefNannyDeclarations
  18884. PyObject *__pyx_t_1 = NULL;
  18885. int __pyx_t_2;
  18886. int __pyx_t_3;
  18887. __Pyx_RefNannySetupContext("__init__", 0);
  18888. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_loop), __pyx_n_s_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
  18889. __Pyx_GOTREF(__pyx_t_1);
  18890. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error)
  18891. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  18892. __pyx_t_3 = ((!__pyx_t_2) != 0);
  18893. if (__pyx_t_3) {
  18894. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18895. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18896. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
  18897. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18898. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  18899. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
  18900. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18901. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18902. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
  18903. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  18904. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  18905. __Pyx_GOTREF(__pyx_t_1);
  18906. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  18907. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  18908. __PYX_ERR(0, 1886, __pyx_L1_error)
  18909. }
  18910. gevent_install_sigchld_handler();
  18911. ev_child_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_child), __pyx_v_pid, __pyx_v_trace);
  18912. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  18913. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  18914. __Pyx_GOTREF(__pyx_v_self->loop);
  18915. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  18916. __pyx_v_self->loop = __pyx_v_loop;
  18917. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1890, __pyx_L1_error)
  18918. if (__pyx_t_3) {
  18919. __pyx_v_self->_flags = 0;
  18920. goto __pyx_L4;
  18921. }
  18922. /*else*/ {
  18923. __pyx_v_self->_flags = 4;
  18924. }
  18925. __pyx_L4:;
  18926. /* function exit code */
  18927. __pyx_r = 0;
  18928. goto __pyx_L0;
  18929. __pyx_L1_error:;
  18930. __Pyx_XDECREF(__pyx_t_1);
  18931. __Pyx_AddTraceback("gevent.libev.corecext.child.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18932. __pyx_r = -1;
  18933. __pyx_L0:;
  18934. __Pyx_RefNannyFinishContext();
  18935. return __pyx_r;
  18936. }
  18937. /* Python wrapper */
  18938. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  18939. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_9_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  18940. PyObject *__pyx_r = 0;
  18941. __Pyx_RefNannyDeclarations
  18942. __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  18943. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_8_format(((struct PyGeventChildObject *)__pyx_v_self));
  18944. /* function exit code */
  18945. __Pyx_RefNannyFinishContext();
  18946. return __pyx_r;
  18947. }
  18948. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_8_format(struct PyGeventChildObject *__pyx_v_self) {
  18949. PyObject *__pyx_r = NULL;
  18950. __Pyx_RefNannyDeclarations
  18951. PyObject *__pyx_t_1 = NULL;
  18952. PyObject *__pyx_t_2 = NULL;
  18953. PyObject *__pyx_t_3 = NULL;
  18954. __Pyx_RefNannySetupContext("_format", 0);
  18955. __Pyx_XDECREF(__pyx_r);
  18956. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error)
  18957. __Pyx_GOTREF(__pyx_t_1);
  18958. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rstatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
  18959. __Pyx_GOTREF(__pyx_t_2);
  18960. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error)
  18961. __Pyx_GOTREF(__pyx_t_3);
  18962. __Pyx_GIVEREF(__pyx_t_1);
  18963. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  18964. __Pyx_GIVEREF(__pyx_t_2);
  18965. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  18966. __pyx_t_1 = 0;
  18967. __pyx_t_2 = 0;
  18968. __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_pid_r_rstatus_r, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
  18969. __Pyx_GOTREF(__pyx_t_2);
  18970. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  18971. __pyx_r = __pyx_t_2;
  18972. __pyx_t_2 = 0;
  18973. goto __pyx_L0;
  18974. /* function exit code */
  18975. __pyx_L1_error:;
  18976. __Pyx_XDECREF(__pyx_t_1);
  18977. __Pyx_XDECREF(__pyx_t_2);
  18978. __Pyx_XDECREF(__pyx_t_3);
  18979. __Pyx_AddTraceback("gevent.libev.corecext.child._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  18980. __pyx_r = NULL;
  18981. __pyx_L0:;
  18982. __Pyx_XGIVEREF(__pyx_r);
  18983. __Pyx_RefNannyFinishContext();
  18984. return __pyx_r;
  18985. }
  18986. /* Python wrapper */
  18987. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self); /*proto*/
  18988. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(PyObject *__pyx_v_self) {
  18989. PyObject *__pyx_r = 0;
  18990. __Pyx_RefNannyDeclarations
  18991. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  18992. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(((struct PyGeventChildObject *)__pyx_v_self));
  18993. /* function exit code */
  18994. __Pyx_RefNannyFinishContext();
  18995. return __pyx_r;
  18996. }
  18997. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_3pid___get__(struct PyGeventChildObject *__pyx_v_self) {
  18998. PyObject *__pyx_r = NULL;
  18999. __Pyx_RefNannyDeclarations
  19000. PyObject *__pyx_t_1 = NULL;
  19001. __Pyx_RefNannySetupContext("__get__", 0);
  19002. __Pyx_XDECREF(__pyx_r);
  19003. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.pid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
  19004. __Pyx_GOTREF(__pyx_t_1);
  19005. __pyx_r = __pyx_t_1;
  19006. __pyx_t_1 = 0;
  19007. goto __pyx_L0;
  19008. /* function exit code */
  19009. __pyx_L1_error:;
  19010. __Pyx_XDECREF(__pyx_t_1);
  19011. __Pyx_AddTraceback("gevent.libev.corecext.child.pid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19012. __pyx_r = NULL;
  19013. __pyx_L0:;
  19014. __Pyx_XGIVEREF(__pyx_r);
  19015. __Pyx_RefNannyFinishContext();
  19016. return __pyx_r;
  19017. }
  19018. /* Python wrapper */
  19019. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self); /*proto*/
  19020. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(PyObject *__pyx_v_self) {
  19021. PyObject *__pyx_r = 0;
  19022. __Pyx_RefNannyDeclarations
  19023. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19024. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(((struct PyGeventChildObject *)__pyx_v_self));
  19025. /* function exit code */
  19026. __Pyx_RefNannyFinishContext();
  19027. return __pyx_r;
  19028. }
  19029. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4rpid___get__(struct PyGeventChildObject *__pyx_v_self) {
  19030. PyObject *__pyx_r = NULL;
  19031. __Pyx_RefNannyDeclarations
  19032. PyObject *__pyx_t_1 = NULL;
  19033. __Pyx_RefNannySetupContext("__get__", 0);
  19034. __Pyx_XDECREF(__pyx_r);
  19035. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.rpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error)
  19036. __Pyx_GOTREF(__pyx_t_1);
  19037. __pyx_r = __pyx_t_1;
  19038. __pyx_t_1 = 0;
  19039. goto __pyx_L0;
  19040. /* function exit code */
  19041. __pyx_L1_error:;
  19042. __Pyx_XDECREF(__pyx_t_1);
  19043. __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19044. __pyx_r = NULL;
  19045. __pyx_L0:;
  19046. __Pyx_XGIVEREF(__pyx_r);
  19047. __Pyx_RefNannyFinishContext();
  19048. return __pyx_r;
  19049. }
  19050. /* Python wrapper */
  19051. static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
  19052. static int __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  19053. int __pyx_v_value;
  19054. int __pyx_r;
  19055. __Pyx_RefNannyDeclarations
  19056. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19057. assert(__pyx_arg_value); {
  19058. __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L3_error)
  19059. }
  19060. goto __pyx_L4_argument_unpacking_done;
  19061. __pyx_L3_error:;
  19062. __Pyx_AddTraceback("gevent.libev.corecext.child.rpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19063. __Pyx_RefNannyFinishContext();
  19064. return -1;
  19065. __pyx_L4_argument_unpacking_done:;
  19066. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));
  19067. /* function exit code */
  19068. __Pyx_RefNannyFinishContext();
  19069. return __pyx_r;
  19070. }
  19071. static int __pyx_pf_6gevent_5libev_8corecext_5child_4rpid_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
  19072. int __pyx_r;
  19073. __Pyx_RefNannyDeclarations
  19074. __Pyx_RefNannySetupContext("__set__", 0);
  19075. __pyx_v_self->_watcher.rpid = __pyx_v_value;
  19076. /* function exit code */
  19077. __pyx_r = 0;
  19078. __Pyx_RefNannyFinishContext();
  19079. return __pyx_r;
  19080. }
  19081. /* Python wrapper */
  19082. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self); /*proto*/
  19083. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(PyObject *__pyx_v_self) {
  19084. PyObject *__pyx_r = 0;
  19085. __Pyx_RefNannyDeclarations
  19086. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19087. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(((struct PyGeventChildObject *)__pyx_v_self));
  19088. /* function exit code */
  19089. __Pyx_RefNannyFinishContext();
  19090. return __pyx_r;
  19091. }
  19092. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_7rstatus___get__(struct PyGeventChildObject *__pyx_v_self) {
  19093. PyObject *__pyx_r = NULL;
  19094. __Pyx_RefNannyDeclarations
  19095. PyObject *__pyx_t_1 = NULL;
  19096. __Pyx_RefNannySetupContext("__get__", 0);
  19097. __Pyx_XDECREF(__pyx_r);
  19098. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_watcher.rstatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
  19099. __Pyx_GOTREF(__pyx_t_1);
  19100. __pyx_r = __pyx_t_1;
  19101. __pyx_t_1 = 0;
  19102. goto __pyx_L0;
  19103. /* function exit code */
  19104. __pyx_L1_error:;
  19105. __Pyx_XDECREF(__pyx_t_1);
  19106. __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19107. __pyx_r = NULL;
  19108. __pyx_L0:;
  19109. __Pyx_XGIVEREF(__pyx_r);
  19110. __Pyx_RefNannyFinishContext();
  19111. return __pyx_r;
  19112. }
  19113. /* Python wrapper */
  19114. static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
  19115. static int __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  19116. int __pyx_v_value;
  19117. int __pyx_r;
  19118. __Pyx_RefNannyDeclarations
  19119. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19120. assert(__pyx_arg_value); {
  19121. __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L3_error)
  19122. }
  19123. goto __pyx_L4_argument_unpacking_done;
  19124. __pyx_L3_error:;
  19125. __Pyx_AddTraceback("gevent.libev.corecext.child.rstatus.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19126. __Pyx_RefNannyFinishContext();
  19127. return -1;
  19128. __pyx_L4_argument_unpacking_done:;
  19129. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((int)__pyx_v_value));
  19130. /* function exit code */
  19131. __Pyx_RefNannyFinishContext();
  19132. return __pyx_r;
  19133. }
  19134. static int __pyx_pf_6gevent_5libev_8corecext_5child_7rstatus_2__set__(struct PyGeventChildObject *__pyx_v_self, int __pyx_v_value) {
  19135. int __pyx_r;
  19136. __Pyx_RefNannyDeclarations
  19137. __Pyx_RefNannySetupContext("__set__", 0);
  19138. __pyx_v_self->_watcher.rstatus = __pyx_v_value;
  19139. /* function exit code */
  19140. __pyx_r = 0;
  19141. __Pyx_RefNannyFinishContext();
  19142. return __pyx_r;
  19143. }
  19144. /* Python wrapper */
  19145. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  19146. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4loop_1__get__(PyObject *__pyx_v_self) {
  19147. PyObject *__pyx_r = 0;
  19148. __Pyx_RefNannyDeclarations
  19149. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19150. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4loop___get__(((struct PyGeventChildObject *)__pyx_v_self));
  19151. /* function exit code */
  19152. __Pyx_RefNannyFinishContext();
  19153. return __pyx_r;
  19154. }
  19155. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4loop___get__(struct PyGeventChildObject *__pyx_v_self) {
  19156. PyObject *__pyx_r = NULL;
  19157. __Pyx_RefNannyDeclarations
  19158. __Pyx_RefNannySetupContext("__get__", 0);
  19159. __Pyx_XDECREF(__pyx_r);
  19160. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  19161. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  19162. goto __pyx_L0;
  19163. /* function exit code */
  19164. __pyx_L0:;
  19165. __Pyx_XGIVEREF(__pyx_r);
  19166. __Pyx_RefNannyFinishContext();
  19167. return __pyx_r;
  19168. }
  19169. /* Python wrapper */
  19170. static int __pyx_pw_6gevent_5libev_8corecext_5child_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  19171. static int __pyx_pw_6gevent_5libev_8corecext_5child_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19172. int __pyx_r;
  19173. __Pyx_RefNannyDeclarations
  19174. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19175. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4loop_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  19176. /* function exit code */
  19177. __Pyx_RefNannyFinishContext();
  19178. return __pyx_r;
  19179. }
  19180. static int __pyx_pf_6gevent_5libev_8corecext_5child_4loop_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19181. int __pyx_r;
  19182. __Pyx_RefNannyDeclarations
  19183. PyObject *__pyx_t_1 = NULL;
  19184. __Pyx_RefNannySetupContext("__set__", 0);
  19185. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1780, __pyx_L1_error)
  19186. __pyx_t_1 = __pyx_v_value;
  19187. __Pyx_INCREF(__pyx_t_1);
  19188. __Pyx_GIVEREF(__pyx_t_1);
  19189. __Pyx_GOTREF(__pyx_v_self->loop);
  19190. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  19191. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  19192. __pyx_t_1 = 0;
  19193. /* function exit code */
  19194. __pyx_r = 0;
  19195. goto __pyx_L0;
  19196. __pyx_L1_error:;
  19197. __Pyx_XDECREF(__pyx_t_1);
  19198. __Pyx_AddTraceback("gevent.libev.corecext.child.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19199. __pyx_r = -1;
  19200. __pyx_L0:;
  19201. __Pyx_RefNannyFinishContext();
  19202. return __pyx_r;
  19203. }
  19204. /* Python wrapper */
  19205. static int __pyx_pw_6gevent_5libev_8corecext_5child_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  19206. static int __pyx_pw_6gevent_5libev_8corecext_5child_4loop_5__del__(PyObject *__pyx_v_self) {
  19207. int __pyx_r;
  19208. __Pyx_RefNannyDeclarations
  19209. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  19210. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4loop_4__del__(((struct PyGeventChildObject *)__pyx_v_self));
  19211. /* function exit code */
  19212. __Pyx_RefNannyFinishContext();
  19213. return __pyx_r;
  19214. }
  19215. static int __pyx_pf_6gevent_5libev_8corecext_5child_4loop_4__del__(struct PyGeventChildObject *__pyx_v_self) {
  19216. int __pyx_r;
  19217. __Pyx_RefNannyDeclarations
  19218. __Pyx_RefNannySetupContext("__del__", 0);
  19219. __Pyx_INCREF(Py_None);
  19220. __Pyx_GIVEREF(Py_None);
  19221. __Pyx_GOTREF(__pyx_v_self->loop);
  19222. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  19223. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  19224. /* function exit code */
  19225. __pyx_r = 0;
  19226. __Pyx_RefNannyFinishContext();
  19227. return __pyx_r;
  19228. }
  19229. /* Python wrapper */
  19230. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  19231. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_4args_1__get__(PyObject *__pyx_v_self) {
  19232. PyObject *__pyx_r = 0;
  19233. __Pyx_RefNannyDeclarations
  19234. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19235. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4args___get__(((struct PyGeventChildObject *)__pyx_v_self));
  19236. /* function exit code */
  19237. __Pyx_RefNannyFinishContext();
  19238. return __pyx_r;
  19239. }
  19240. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_4args___get__(struct PyGeventChildObject *__pyx_v_self) {
  19241. PyObject *__pyx_r = NULL;
  19242. __Pyx_RefNannyDeclarations
  19243. __Pyx_RefNannySetupContext("__get__", 0);
  19244. __Pyx_XDECREF(__pyx_r);
  19245. __Pyx_INCREF(__pyx_v_self->args);
  19246. __pyx_r = __pyx_v_self->args;
  19247. goto __pyx_L0;
  19248. /* function exit code */
  19249. __pyx_L0:;
  19250. __Pyx_XGIVEREF(__pyx_r);
  19251. __Pyx_RefNannyFinishContext();
  19252. return __pyx_r;
  19253. }
  19254. /* Python wrapper */
  19255. static int __pyx_pw_6gevent_5libev_8corecext_5child_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  19256. static int __pyx_pw_6gevent_5libev_8corecext_5child_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19257. int __pyx_r;
  19258. __Pyx_RefNannyDeclarations
  19259. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19260. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4args_2__set__(((struct PyGeventChildObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  19261. /* function exit code */
  19262. __Pyx_RefNannyFinishContext();
  19263. return __pyx_r;
  19264. }
  19265. static int __pyx_pf_6gevent_5libev_8corecext_5child_4args_2__set__(struct PyGeventChildObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19266. int __pyx_r;
  19267. __Pyx_RefNannyDeclarations
  19268. PyObject *__pyx_t_1 = NULL;
  19269. __Pyx_RefNannySetupContext("__set__", 0);
  19270. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1782, __pyx_L1_error)
  19271. __pyx_t_1 = __pyx_v_value;
  19272. __Pyx_INCREF(__pyx_t_1);
  19273. __Pyx_GIVEREF(__pyx_t_1);
  19274. __Pyx_GOTREF(__pyx_v_self->args);
  19275. __Pyx_DECREF(__pyx_v_self->args);
  19276. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  19277. __pyx_t_1 = 0;
  19278. /* function exit code */
  19279. __pyx_r = 0;
  19280. goto __pyx_L0;
  19281. __pyx_L1_error:;
  19282. __Pyx_XDECREF(__pyx_t_1);
  19283. __Pyx_AddTraceback("gevent.libev.corecext.child.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19284. __pyx_r = -1;
  19285. __pyx_L0:;
  19286. __Pyx_RefNannyFinishContext();
  19287. return __pyx_r;
  19288. }
  19289. /* Python wrapper */
  19290. static int __pyx_pw_6gevent_5libev_8corecext_5child_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  19291. static int __pyx_pw_6gevent_5libev_8corecext_5child_4args_5__del__(PyObject *__pyx_v_self) {
  19292. int __pyx_r;
  19293. __Pyx_RefNannyDeclarations
  19294. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  19295. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_4args_4__del__(((struct PyGeventChildObject *)__pyx_v_self));
  19296. /* function exit code */
  19297. __Pyx_RefNannyFinishContext();
  19298. return __pyx_r;
  19299. }
  19300. static int __pyx_pf_6gevent_5libev_8corecext_5child_4args_4__del__(struct PyGeventChildObject *__pyx_v_self) {
  19301. int __pyx_r;
  19302. __Pyx_RefNannyDeclarations
  19303. __Pyx_RefNannySetupContext("__del__", 0);
  19304. __Pyx_INCREF(Py_None);
  19305. __Pyx_GIVEREF(Py_None);
  19306. __Pyx_GOTREF(__pyx_v_self->args);
  19307. __Pyx_DECREF(__pyx_v_self->args);
  19308. __pyx_v_self->args = ((PyObject*)Py_None);
  19309. /* function exit code */
  19310. __pyx_r = 0;
  19311. __Pyx_RefNannyFinishContext();
  19312. return __pyx_r;
  19313. }
  19314. /* Python wrapper */
  19315. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  19316. static PyObject *__pyx_pw_6gevent_5libev_8corecext_5child_6_flags_1__get__(PyObject *__pyx_v_self) {
  19317. PyObject *__pyx_r = 0;
  19318. __Pyx_RefNannyDeclarations
  19319. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19320. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_5child_6_flags___get__(((struct PyGeventChildObject *)__pyx_v_self));
  19321. /* function exit code */
  19322. __Pyx_RefNannyFinishContext();
  19323. return __pyx_r;
  19324. }
  19325. static PyObject *__pyx_pf_6gevent_5libev_8corecext_5child_6_flags___get__(struct PyGeventChildObject *__pyx_v_self) {
  19326. PyObject *__pyx_r = NULL;
  19327. __Pyx_RefNannyDeclarations
  19328. PyObject *__pyx_t_1 = NULL;
  19329. __Pyx_RefNannySetupContext("__get__", 0);
  19330. __Pyx_XDECREF(__pyx_r);
  19331. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
  19332. __Pyx_GOTREF(__pyx_t_1);
  19333. __pyx_r = __pyx_t_1;
  19334. __pyx_t_1 = 0;
  19335. goto __pyx_L0;
  19336. /* function exit code */
  19337. __pyx_L1_error:;
  19338. __Pyx_XDECREF(__pyx_t_1);
  19339. __Pyx_AddTraceback("gevent.libev.corecext.child._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19340. __pyx_r = NULL;
  19341. __pyx_L0:;
  19342. __Pyx_XGIVEREF(__pyx_r);
  19343. __Pyx_RefNannyFinishContext();
  19344. return __pyx_r;
  19345. }
  19346. /* Python wrapper */
  19347. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/
  19348. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3ref_1__get__(PyObject *__pyx_v_self) {
  19349. PyObject *__pyx_r = 0;
  19350. __Pyx_RefNannyDeclarations
  19351. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19352. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_3ref___get__(((struct PyGeventStatObject *)__pyx_v_self));
  19353. /* function exit code */
  19354. __Pyx_RefNannyFinishContext();
  19355. return __pyx_r;
  19356. }
  19357. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_3ref___get__(struct PyGeventStatObject *__pyx_v_self) {
  19358. PyObject *__pyx_r = NULL;
  19359. __Pyx_RefNannyDeclarations
  19360. PyObject *__pyx_t_1 = NULL;
  19361. __Pyx_RefNannySetupContext("__get__", 0);
  19362. __Pyx_XDECREF(__pyx_r);
  19363. if (((__pyx_v_self->_flags & 4) != 0)) {
  19364. __Pyx_INCREF(Py_False);
  19365. __pyx_t_1 = Py_False;
  19366. } else {
  19367. __Pyx_INCREF(Py_True);
  19368. __pyx_t_1 = Py_True;
  19369. }
  19370. __pyx_r = __pyx_t_1;
  19371. __pyx_t_1 = 0;
  19372. goto __pyx_L0;
  19373. /* function exit code */
  19374. __pyx_L0:;
  19375. __Pyx_XGIVEREF(__pyx_r);
  19376. __Pyx_RefNannyFinishContext();
  19377. return __pyx_r;
  19378. }
  19379. /* Python wrapper */
  19380. static int __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  19381. static int __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19382. int __pyx_r;
  19383. __Pyx_RefNannyDeclarations
  19384. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19385. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_3ref_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  19386. /* function exit code */
  19387. __Pyx_RefNannyFinishContext();
  19388. return __pyx_r;
  19389. }
  19390. static int __pyx_pf_6gevent_5libev_8corecext_4stat_3ref_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value) {
  19391. int __pyx_r;
  19392. __Pyx_RefNannyDeclarations
  19393. int __pyx_t_1;
  19394. PyObject *__pyx_t_2 = NULL;
  19395. int __pyx_t_3;
  19396. __Pyx_RefNannySetupContext("__set__", 0);
  19397. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  19398. if (__pyx_t_1) {
  19399. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19400. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19401. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  19402. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19403. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19404. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  19405. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19406. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19407. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
  19408. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19409. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19410. __Pyx_GOTREF(__pyx_t_2);
  19411. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19412. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19413. __PYX_ERR(0, 1939, __pyx_L1_error)
  19414. }
  19415. __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1940, __pyx_L1_error)
  19416. if (__pyx_t_1) {
  19417. __pyx_t_1 = ((!((__pyx_v_self->_flags & 4) != 0)) != 0);
  19418. if (__pyx_t_1) {
  19419. __pyx_r = 0;
  19420. goto __pyx_L0;
  19421. }
  19422. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  19423. if (__pyx_t_1) {
  19424. ev_ref(__pyx_v_self->loop->_ptr);
  19425. }
  19426. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~6));
  19427. goto __pyx_L4;
  19428. }
  19429. /*else*/ {
  19430. __pyx_t_1 = ((__pyx_v_self->_flags & 4) != 0);
  19431. if (__pyx_t_1) {
  19432. __pyx_r = 0;
  19433. goto __pyx_L0;
  19434. }
  19435. __pyx_v_self->_flags = (__pyx_v_self->_flags | 4);
  19436. __pyx_t_3 = ((!((__pyx_v_self->_flags & 2) != 0)) != 0);
  19437. if (__pyx_t_3) {
  19438. } else {
  19439. __pyx_t_1 = __pyx_t_3;
  19440. goto __pyx_L9_bool_binop_done;
  19441. }
  19442. __pyx_t_3 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  19443. __pyx_t_1 = __pyx_t_3;
  19444. __pyx_L9_bool_binop_done:;
  19445. if (__pyx_t_1) {
  19446. ev_unref(__pyx_v_self->loop->_ptr);
  19447. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  19448. }
  19449. }
  19450. __pyx_L4:;
  19451. /* function exit code */
  19452. __pyx_r = 0;
  19453. goto __pyx_L0;
  19454. __pyx_L1_error:;
  19455. __Pyx_XDECREF(__pyx_t_2);
  19456. __Pyx_AddTraceback("gevent.libev.corecext.stat.ref.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19457. __pyx_r = -1;
  19458. __pyx_L0:;
  19459. __Pyx_RefNannyFinishContext();
  19460. return __pyx_r;
  19461. }
  19462. /* Python wrapper */
  19463. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8callback_1__get__(PyObject *__pyx_v_self); /*proto*/
  19464. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8callback_1__get__(PyObject *__pyx_v_self) {
  19465. PyObject *__pyx_r = 0;
  19466. __Pyx_RefNannyDeclarations
  19467. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19468. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8callback___get__(((struct PyGeventStatObject *)__pyx_v_self));
  19469. /* function exit code */
  19470. __Pyx_RefNannyFinishContext();
  19471. return __pyx_r;
  19472. }
  19473. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8callback___get__(struct PyGeventStatObject *__pyx_v_self) {
  19474. PyObject *__pyx_r = NULL;
  19475. __Pyx_RefNannyDeclarations
  19476. __Pyx_RefNannySetupContext("__get__", 0);
  19477. __Pyx_XDECREF(__pyx_r);
  19478. __Pyx_INCREF(__pyx_v_self->_callback);
  19479. __pyx_r = __pyx_v_self->_callback;
  19480. goto __pyx_L0;
  19481. /* function exit code */
  19482. __pyx_L0:;
  19483. __Pyx_XGIVEREF(__pyx_r);
  19484. __Pyx_RefNannyFinishContext();
  19485. return __pyx_r;
  19486. }
  19487. /* Python wrapper */
  19488. static int __pyx_pw_6gevent_5libev_8corecext_4stat_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
  19489. static int __pyx_pw_6gevent_5libev_8corecext_4stat_8callback_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  19490. int __pyx_r;
  19491. __Pyx_RefNannyDeclarations
  19492. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19493. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8callback_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
  19494. /* function exit code */
  19495. __Pyx_RefNannyFinishContext();
  19496. return __pyx_r;
  19497. }
  19498. static int __pyx_pf_6gevent_5libev_8corecext_4stat_8callback_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  19499. int __pyx_r;
  19500. __Pyx_RefNannyDeclarations
  19501. int __pyx_t_1;
  19502. int __pyx_t_2;
  19503. int __pyx_t_3;
  19504. PyObject *__pyx_t_4 = NULL;
  19505. PyObject *__pyx_t_5 = NULL;
  19506. __Pyx_RefNannySetupContext("__set__", 0);
  19507. __pyx_t_2 = ((!(PyCallable_Check(((PyObject*)__pyx_v_callback)) != 0)) != 0);
  19508. if (__pyx_t_2) {
  19509. } else {
  19510. __pyx_t_1 = __pyx_t_2;
  19511. goto __pyx_L4_bool_binop_done;
  19512. }
  19513. __pyx_t_2 = (__pyx_v_callback != Py_None);
  19514. __pyx_t_3 = (__pyx_t_2 != 0);
  19515. __pyx_t_1 = __pyx_t_3;
  19516. __pyx_L4_bool_binop_done:;
  19517. if (__pyx_t_1) {
  19518. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error)
  19519. __Pyx_GOTREF(__pyx_t_4);
  19520. __Pyx_INCREF(__pyx_v_callback);
  19521. __Pyx_GIVEREF(__pyx_v_callback);
  19522. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_callback);
  19523. __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_not_r, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1961, __pyx_L1_error)
  19524. __Pyx_GOTREF(__pyx_t_5);
  19525. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19526. __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error)
  19527. __Pyx_GOTREF(__pyx_t_4);
  19528. __Pyx_GIVEREF(__pyx_t_5);
  19529. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  19530. __pyx_t_5 = 0;
  19531. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1961, __pyx_L1_error)
  19532. __Pyx_GOTREF(__pyx_t_5);
  19533. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  19534. __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  19535. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  19536. __PYX_ERR(0, 1961, __pyx_L1_error)
  19537. }
  19538. __Pyx_INCREF(__pyx_v_callback);
  19539. __Pyx_GIVEREF(__pyx_v_callback);
  19540. __Pyx_GOTREF(__pyx_v_self->_callback);
  19541. __Pyx_DECREF(__pyx_v_self->_callback);
  19542. __pyx_v_self->_callback = __pyx_v_callback;
  19543. /* function exit code */
  19544. __pyx_r = 0;
  19545. goto __pyx_L0;
  19546. __pyx_L1_error:;
  19547. __Pyx_XDECREF(__pyx_t_4);
  19548. __Pyx_XDECREF(__pyx_t_5);
  19549. __Pyx_AddTraceback("gevent.libev.corecext.stat.callback.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19550. __pyx_r = -1;
  19551. __pyx_L0:;
  19552. __Pyx_RefNannyFinishContext();
  19553. return __pyx_r;
  19554. }
  19555. /* Python wrapper */
  19556. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  19557. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_1stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  19558. PyObject *__pyx_r = 0;
  19559. __Pyx_RefNannyDeclarations
  19560. __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  19561. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_stop(((struct PyGeventStatObject *)__pyx_v_self));
  19562. /* function exit code */
  19563. __Pyx_RefNannyFinishContext();
  19564. return __pyx_r;
  19565. }
  19566. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_stop(struct PyGeventStatObject *__pyx_v_self) {
  19567. PyObject *__pyx_r = NULL;
  19568. __Pyx_RefNannyDeclarations
  19569. int __pyx_t_1;
  19570. PyObject *__pyx_t_2 = NULL;
  19571. __Pyx_RefNannySetupContext("stop", 0);
  19572. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  19573. if (__pyx_t_1) {
  19574. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19575. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19576. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19577. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19578. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19579. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19580. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19581. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  19582. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19583. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  19584. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19585. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19586. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19587. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19588. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19589. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19590. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19591. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
  19592. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19593. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19594. __Pyx_GOTREF(__pyx_t_2);
  19595. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19596. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19597. __PYX_ERR(0, 1967, __pyx_L1_error)
  19598. }
  19599. __pyx_t_1 = ((__pyx_v_self->_flags & 2) != 0);
  19600. if (__pyx_t_1) {
  19601. ev_ref(__pyx_v_self->loop->_ptr);
  19602. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~2));
  19603. }
  19604. ev_stat_stop(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  19605. __Pyx_INCREF(Py_None);
  19606. __Pyx_GIVEREF(Py_None);
  19607. __Pyx_GOTREF(__pyx_v_self->_callback);
  19608. __Pyx_DECREF(__pyx_v_self->_callback);
  19609. __pyx_v_self->_callback = Py_None;
  19610. __Pyx_INCREF(Py_None);
  19611. __Pyx_GIVEREF(Py_None);
  19612. __Pyx_GOTREF(__pyx_v_self->args);
  19613. __Pyx_DECREF(__pyx_v_self->args);
  19614. __pyx_v_self->args = ((PyObject*)Py_None);
  19615. __pyx_t_1 = ((__pyx_v_self->_flags & 1) != 0);
  19616. if (__pyx_t_1) {
  19617. Py_DECREF(((PyObject*)__pyx_v_self));
  19618. __pyx_v_self->_flags = (__pyx_v_self->_flags & (~1));
  19619. }
  19620. /* function exit code */
  19621. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19622. goto __pyx_L0;
  19623. __pyx_L1_error:;
  19624. __Pyx_XDECREF(__pyx_t_2);
  19625. __Pyx_AddTraceback("gevent.libev.corecext.stat.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19626. __pyx_r = NULL;
  19627. __pyx_L0:;
  19628. __Pyx_XGIVEREF(__pyx_r);
  19629. __Pyx_RefNannyFinishContext();
  19630. return __pyx_r;
  19631. }
  19632. /* Python wrapper */
  19633. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8priority_1__get__(PyObject *__pyx_v_self); /*proto*/
  19634. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8priority_1__get__(PyObject *__pyx_v_self) {
  19635. PyObject *__pyx_r = 0;
  19636. __Pyx_RefNannyDeclarations
  19637. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  19638. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8priority___get__(((struct PyGeventStatObject *)__pyx_v_self));
  19639. /* function exit code */
  19640. __Pyx_RefNannyFinishContext();
  19641. return __pyx_r;
  19642. }
  19643. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8priority___get__(struct PyGeventStatObject *__pyx_v_self) {
  19644. PyObject *__pyx_r = NULL;
  19645. __Pyx_RefNannyDeclarations
  19646. PyObject *__pyx_t_1 = NULL;
  19647. __Pyx_RefNannySetupContext("__get__", 0);
  19648. __Pyx_XDECREF(__pyx_r);
  19649. __pyx_t_1 = __Pyx_PyInt_From_int(ev_priority((&__pyx_v_self->_watcher))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __pyx_L1_error)
  19650. __Pyx_GOTREF(__pyx_t_1);
  19651. __pyx_r = __pyx_t_1;
  19652. __pyx_t_1 = 0;
  19653. goto __pyx_L0;
  19654. /* function exit code */
  19655. __pyx_L1_error:;
  19656. __Pyx_XDECREF(__pyx_t_1);
  19657. __Pyx_AddTraceback("gevent.libev.corecext.stat.priority.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19658. __pyx_r = NULL;
  19659. __pyx_L0:;
  19660. __Pyx_XGIVEREF(__pyx_r);
  19661. __Pyx_RefNannyFinishContext();
  19662. return __pyx_r;
  19663. }
  19664. /* Python wrapper */
  19665. static int __pyx_pw_6gevent_5libev_8corecext_4stat_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority); /*proto*/
  19666. static int __pyx_pw_6gevent_5libev_8corecext_4stat_8priority_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_priority) {
  19667. int __pyx_v_priority;
  19668. int __pyx_r;
  19669. __Pyx_RefNannyDeclarations
  19670. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  19671. assert(__pyx_arg_priority); {
  19672. __pyx_v_priority = __Pyx_PyInt_As_int(__pyx_arg_priority); if (unlikely((__pyx_v_priority == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1983, __pyx_L3_error)
  19673. }
  19674. goto __pyx_L4_argument_unpacking_done;
  19675. __pyx_L3_error:;
  19676. __Pyx_AddTraceback("gevent.libev.corecext.stat.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19677. __Pyx_RefNannyFinishContext();
  19678. return -1;
  19679. __pyx_L4_argument_unpacking_done:;
  19680. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8priority_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((int)__pyx_v_priority));
  19681. /* function exit code */
  19682. __Pyx_RefNannyFinishContext();
  19683. return __pyx_r;
  19684. }
  19685. static int __pyx_pf_6gevent_5libev_8corecext_4stat_8priority_2__set__(struct PyGeventStatObject *__pyx_v_self, int __pyx_v_priority) {
  19686. int __pyx_r;
  19687. __Pyx_RefNannyDeclarations
  19688. int __pyx_t_1;
  19689. PyObject *__pyx_t_2 = NULL;
  19690. __Pyx_RefNannySetupContext("__set__", 0);
  19691. __pyx_t_1 = (ev_is_active((&__pyx_v_self->_watcher)) != 0);
  19692. if (__pyx_t_1) {
  19693. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19694. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19695. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19696. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19697. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19698. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19699. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19700. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  19701. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19702. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  19703. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19704. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19705. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19706. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19707. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19708. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19709. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19710. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __pyx_L1_error)
  19711. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19712. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19713. __Pyx_GOTREF(__pyx_t_2);
  19714. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19715. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19716. __PYX_ERR(0, 1985, __pyx_L1_error)
  19717. }
  19718. ev_set_priority((&__pyx_v_self->_watcher), __pyx_v_priority);
  19719. /* function exit code */
  19720. __pyx_r = 0;
  19721. goto __pyx_L0;
  19722. __pyx_L1_error:;
  19723. __Pyx_XDECREF(__pyx_t_2);
  19724. __Pyx_AddTraceback("gevent.libev.corecext.stat.priority.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19725. __pyx_r = -1;
  19726. __pyx_L0:;
  19727. __Pyx_RefNannyFinishContext();
  19728. return __pyx_r;
  19729. }
  19730. /* Python wrapper */
  19731. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  19732. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_3feed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  19733. int __pyx_v_revents;
  19734. PyObject *__pyx_v_callback = 0;
  19735. PyObject *__pyx_v_args = 0;
  19736. PyObject *__pyx_r = 0;
  19737. __Pyx_RefNannyDeclarations
  19738. __Pyx_RefNannySetupContext("feed (wrapper)", 0);
  19739. if (PyTuple_GET_SIZE(__pyx_args) > 2) {
  19740. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
  19741. if (unlikely(!__pyx_v_args)) {
  19742. __Pyx_RefNannyFinishContext();
  19743. return NULL;
  19744. }
  19745. __Pyx_GOTREF(__pyx_v_args);
  19746. } else {
  19747. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  19748. }
  19749. {
  19750. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_revents,&__pyx_n_s_callback,0};
  19751. PyObject* values[2] = {0,0};
  19752. if (unlikely(__pyx_kwds)) {
  19753. Py_ssize_t kw_args;
  19754. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  19755. switch (pos_args) {
  19756. default:
  19757. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  19758. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  19759. case 0: break;
  19760. }
  19761. kw_args = PyDict_Size(__pyx_kwds);
  19762. switch (pos_args) {
  19763. case 0:
  19764. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_revents)) != 0)) kw_args--;
  19765. else goto __pyx_L5_argtuple_error;
  19766. case 1:
  19767. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  19768. else {
  19769. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, 1); __PYX_ERR(0, 1988, __pyx_L3_error)
  19770. }
  19771. }
  19772. if (unlikely(kw_args > 0)) {
  19773. const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
  19774. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "feed") < 0)) __PYX_ERR(0, 1988, __pyx_L3_error)
  19775. }
  19776. } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
  19777. goto __pyx_L5_argtuple_error;
  19778. } else {
  19779. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  19780. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  19781. }
  19782. __pyx_v_revents = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_revents == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1988, __pyx_L3_error)
  19783. __pyx_v_callback = values[1];
  19784. }
  19785. goto __pyx_L4_argument_unpacking_done;
  19786. __pyx_L5_argtuple_error:;
  19787. __Pyx_RaiseArgtupleInvalid("feed", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1988, __pyx_L3_error)
  19788. __pyx_L3_error:;
  19789. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  19790. __Pyx_AddTraceback("gevent.libev.corecext.stat.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19791. __Pyx_RefNannyFinishContext();
  19792. return NULL;
  19793. __pyx_L4_argument_unpacking_done:;
  19794. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_2feed(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_revents, __pyx_v_callback, __pyx_v_args);
  19795. /* function exit code */
  19796. __Pyx_XDECREF(__pyx_v_args);
  19797. __Pyx_RefNannyFinishContext();
  19798. return __pyx_r;
  19799. }
  19800. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_2feed(struct PyGeventStatObject *__pyx_v_self, int __pyx_v_revents, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  19801. PyObject *__pyx_r = NULL;
  19802. __Pyx_RefNannyDeclarations
  19803. int __pyx_t_1;
  19804. PyObject *__pyx_t_2 = NULL;
  19805. __Pyx_RefNannySetupContext("feed", 0);
  19806. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  19807. if (__pyx_t_1) {
  19808. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19809. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19810. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19811. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19812. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19813. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19814. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19815. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  19816. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19817. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  19818. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19819. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19820. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19821. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19822. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19823. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19824. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19825. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  19826. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19827. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19828. __Pyx_GOTREF(__pyx_t_2);
  19829. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19830. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19831. __PYX_ERR(0, 1991, __pyx_L1_error)
  19832. }
  19833. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1992, __pyx_L1_error)
  19834. __Pyx_INCREF(__pyx_v_args);
  19835. __Pyx_GIVEREF(__pyx_v_args);
  19836. __Pyx_GOTREF(__pyx_v_self->args);
  19837. __Pyx_DECREF(__pyx_v_self->args);
  19838. __pyx_v_self->args = __pyx_v_args;
  19839. __pyx_t_1 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  19840. if (__pyx_t_1) {
  19841. ev_unref(__pyx_v_self->loop->_ptr);
  19842. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  19843. }
  19844. ev_feed_event(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher), __pyx_v_revents);
  19845. __pyx_t_1 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  19846. if (__pyx_t_1) {
  19847. Py_INCREF(((PyObject*)__pyx_v_self));
  19848. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  19849. }
  19850. /* function exit code */
  19851. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  19852. goto __pyx_L0;
  19853. __pyx_L1_error:;
  19854. __Pyx_XDECREF(__pyx_t_2);
  19855. __Pyx_AddTraceback("gevent.libev.corecext.stat.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19856. __pyx_r = NULL;
  19857. __pyx_L0:;
  19858. __Pyx_XGIVEREF(__pyx_r);
  19859. __Pyx_RefNannyFinishContext();
  19860. return __pyx_r;
  19861. }
  19862. /* Python wrapper */
  19863. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  19864. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_5start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  19865. PyObject *__pyx_v_callback = 0;
  19866. PyObject *__pyx_v_args = 0;
  19867. PyObject *__pyx_r = 0;
  19868. __Pyx_RefNannyDeclarations
  19869. __Pyx_RefNannySetupContext("start (wrapper)", 0);
  19870. if (PyTuple_GET_SIZE(__pyx_args) > 1) {
  19871. __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
  19872. if (unlikely(!__pyx_v_args)) {
  19873. __Pyx_RefNannyFinishContext();
  19874. return NULL;
  19875. }
  19876. __Pyx_GOTREF(__pyx_v_args);
  19877. } else {
  19878. __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  19879. }
  19880. {
  19881. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};
  19882. PyObject* values[1] = {0};
  19883. if (unlikely(__pyx_kwds)) {
  19884. Py_ssize_t kw_args;
  19885. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  19886. switch (pos_args) {
  19887. default:
  19888. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  19889. case 0: break;
  19890. }
  19891. kw_args = PyDict_Size(__pyx_kwds);
  19892. switch (pos_args) {
  19893. case 0:
  19894. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
  19895. else goto __pyx_L5_argtuple_error;
  19896. }
  19897. if (unlikely(kw_args > 0)) {
  19898. const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
  19899. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "start") < 0)) __PYX_ERR(0, 2002, __pyx_L3_error)
  19900. }
  19901. } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
  19902. goto __pyx_L5_argtuple_error;
  19903. } else {
  19904. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  19905. }
  19906. __pyx_v_callback = values[0];
  19907. }
  19908. goto __pyx_L4_argument_unpacking_done;
  19909. __pyx_L5_argtuple_error:;
  19910. __Pyx_RaiseArgtupleInvalid("start", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2002, __pyx_L3_error)
  19911. __pyx_L3_error:;
  19912. __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  19913. __Pyx_AddTraceback("gevent.libev.corecext.stat.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  19914. __Pyx_RefNannyFinishContext();
  19915. return NULL;
  19916. __pyx_L4_argument_unpacking_done:;
  19917. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4start(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_callback, __pyx_v_args);
  19918. /* function exit code */
  19919. __Pyx_XDECREF(__pyx_v_args);
  19920. __Pyx_RefNannyFinishContext();
  19921. return __pyx_r;
  19922. }
  19923. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4start(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_args) {
  19924. PyObject *__pyx_r = NULL;
  19925. __Pyx_RefNannyDeclarations
  19926. int __pyx_t_1;
  19927. PyObject *__pyx_t_2 = NULL;
  19928. int __pyx_t_3;
  19929. __Pyx_RefNannySetupContext("start", 0);
  19930. __pyx_t_1 = ((!(__pyx_v_self->loop->_ptr != 0)) != 0);
  19931. if (__pyx_t_1) {
  19932. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19933. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19934. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19935. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19936. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19937. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19938. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19939. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  19940. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19941. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  19942. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19943. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19944. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19945. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19946. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19947. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19948. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19949. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  19950. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19951. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19952. __Pyx_GOTREF(__pyx_t_2);
  19953. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19954. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19955. __PYX_ERR(0, 2005, __pyx_L1_error)
  19956. }
  19957. __pyx_t_1 = (__pyx_v_callback == Py_None);
  19958. __pyx_t_3 = (__pyx_t_1 != 0);
  19959. if (__pyx_t_3) {
  19960. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19961. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19962. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19963. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19964. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19965. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19966. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19967. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  19968. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19969. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  19970. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  19971. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19972. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19973. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  19974. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19975. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  19976. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19977. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
  19978. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  19979. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  19980. __Pyx_GOTREF(__pyx_t_2);
  19981. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  19982. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  19983. __PYX_ERR(0, 2007, __pyx_L1_error)
  19984. }
  19985. if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 2008, __pyx_L1_error)
  19986. __Pyx_INCREF(__pyx_v_args);
  19987. __Pyx_GIVEREF(__pyx_v_args);
  19988. __Pyx_GOTREF(__pyx_v_self->args);
  19989. __Pyx_DECREF(__pyx_v_self->args);
  19990. __pyx_v_self->args = __pyx_v_args;
  19991. __pyx_t_3 = (((__pyx_v_self->_flags & 6) == 4) != 0);
  19992. if (__pyx_t_3) {
  19993. ev_unref(__pyx_v_self->loop->_ptr);
  19994. __pyx_v_self->_flags = (__pyx_v_self->_flags | 2);
  19995. }
  19996. ev_stat_start(__pyx_v_self->loop->_ptr, (&__pyx_v_self->_watcher));
  19997. __pyx_t_3 = ((!((__pyx_v_self->_flags & 1) != 0)) != 0);
  19998. if (__pyx_t_3) {
  19999. Py_INCREF(((PyObject*)__pyx_v_self));
  20000. __pyx_v_self->_flags = (__pyx_v_self->_flags | 1);
  20001. }
  20002. /* function exit code */
  20003. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20004. goto __pyx_L0;
  20005. __pyx_L1_error:;
  20006. __Pyx_XDECREF(__pyx_t_2);
  20007. __Pyx_AddTraceback("gevent.libev.corecext.stat.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20008. __pyx_r = NULL;
  20009. __pyx_L0:;
  20010. __Pyx_XGIVEREF(__pyx_r);
  20011. __Pyx_RefNannyFinishContext();
  20012. return __pyx_r;
  20013. }
  20014. /* Python wrapper */
  20015. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6active_1__get__(PyObject *__pyx_v_self); /*proto*/
  20016. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6active_1__get__(PyObject *__pyx_v_self) {
  20017. PyObject *__pyx_r = 0;
  20018. __Pyx_RefNannyDeclarations
  20019. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20020. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6active___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20021. /* function exit code */
  20022. __Pyx_RefNannyFinishContext();
  20023. return __pyx_r;
  20024. }
  20025. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6active___get__(struct PyGeventStatObject *__pyx_v_self) {
  20026. PyObject *__pyx_r = NULL;
  20027. __Pyx_RefNannyDeclarations
  20028. PyObject *__pyx_t_1 = NULL;
  20029. __Pyx_RefNannySetupContext("__get__", 0);
  20030. __Pyx_XDECREF(__pyx_r);
  20031. if ((ev_is_active((&__pyx_v_self->_watcher)) != 0)) {
  20032. __Pyx_INCREF(Py_True);
  20033. __pyx_t_1 = Py_True;
  20034. } else {
  20035. __Pyx_INCREF(Py_False);
  20036. __pyx_t_1 = Py_False;
  20037. }
  20038. __pyx_r = __pyx_t_1;
  20039. __pyx_t_1 = 0;
  20040. goto __pyx_L0;
  20041. /* function exit code */
  20042. __pyx_L0:;
  20043. __Pyx_XGIVEREF(__pyx_r);
  20044. __Pyx_RefNannyFinishContext();
  20045. return __pyx_r;
  20046. }
  20047. /* Python wrapper */
  20048. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_7pending_1__get__(PyObject *__pyx_v_self); /*proto*/
  20049. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_7pending_1__get__(PyObject *__pyx_v_self) {
  20050. PyObject *__pyx_r = 0;
  20051. __Pyx_RefNannyDeclarations
  20052. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20053. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_7pending___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20054. /* function exit code */
  20055. __Pyx_RefNannyFinishContext();
  20056. return __pyx_r;
  20057. }
  20058. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_7pending___get__(struct PyGeventStatObject *__pyx_v_self) {
  20059. PyObject *__pyx_r = NULL;
  20060. __Pyx_RefNannyDeclarations
  20061. PyObject *__pyx_t_1 = NULL;
  20062. __Pyx_RefNannySetupContext("__get__", 0);
  20063. __Pyx_XDECREF(__pyx_r);
  20064. if ((ev_is_pending((&__pyx_v_self->_watcher)) != 0)) {
  20065. __Pyx_INCREF(Py_True);
  20066. __pyx_t_1 = Py_True;
  20067. } else {
  20068. __Pyx_INCREF(Py_False);
  20069. __pyx_t_1 = Py_False;
  20070. }
  20071. __pyx_r = __pyx_t_1;
  20072. __pyx_t_1 = 0;
  20073. goto __pyx_L0;
  20074. /* function exit code */
  20075. __pyx_L0:;
  20076. __Pyx_XGIVEREF(__pyx_r);
  20077. __Pyx_RefNannyFinishContext();
  20078. return __pyx_r;
  20079. }
  20080. /* Python wrapper */
  20081. static int __pyx_pw_6gevent_5libev_8corecext_4stat_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  20082. static int __pyx_pw_6gevent_5libev_8corecext_4stat_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  20083. struct PyGeventLoopObject *__pyx_v_loop = 0;
  20084. PyObject *__pyx_v_path = 0;
  20085. float __pyx_v_interval;
  20086. PyObject *__pyx_v_ref = 0;
  20087. PyObject *__pyx_v_priority = 0;
  20088. int __pyx_r;
  20089. __Pyx_RefNannyDeclarations
  20090. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  20091. {
  20092. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_loop,&__pyx_n_s_path,&__pyx_n_s_interval,&__pyx_n_s_ref,&__pyx_n_s_priority,0};
  20093. PyObject* values[5] = {0,0,0,0,0};
  20094. values[3] = ((PyObject *)Py_True);
  20095. values[4] = ((PyObject *)Py_None);
  20096. if (unlikely(__pyx_kwds)) {
  20097. Py_ssize_t kw_args;
  20098. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  20099. switch (pos_args) {
  20100. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  20101. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  20102. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  20103. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  20104. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  20105. case 0: break;
  20106. default: goto __pyx_L5_argtuple_error;
  20107. }
  20108. kw_args = PyDict_Size(__pyx_kwds);
  20109. switch (pos_args) {
  20110. case 0:
  20111. if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  20112. else goto __pyx_L5_argtuple_error;
  20113. case 1:
  20114. if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
  20115. else {
  20116. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 2031, __pyx_L3_error)
  20117. }
  20118. case 2:
  20119. if (kw_args > 0) {
  20120. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_interval);
  20121. if (value) { values[2] = value; kw_args--; }
  20122. }
  20123. case 3:
  20124. if (kw_args > 0) {
  20125. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref);
  20126. if (value) { values[3] = value; kw_args--; }
  20127. }
  20128. case 4:
  20129. if (kw_args > 0) {
  20130. PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority);
  20131. if (value) { values[4] = value; kw_args--; }
  20132. }
  20133. }
  20134. if (unlikely(kw_args > 0)) {
  20135. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2031, __pyx_L3_error)
  20136. }
  20137. } else {
  20138. switch (PyTuple_GET_SIZE(__pyx_args)) {
  20139. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  20140. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  20141. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  20142. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  20143. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  20144. break;
  20145. default: goto __pyx_L5_argtuple_error;
  20146. }
  20147. }
  20148. __pyx_v_loop = ((struct PyGeventLoopObject *)values[0]);
  20149. __pyx_v_path = ((PyObject*)values[1]);
  20150. if (values[2]) {
  20151. __pyx_v_interval = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_interval == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2031, __pyx_L3_error)
  20152. } else {
  20153. __pyx_v_interval = ((float)0.0);
  20154. }
  20155. __pyx_v_ref = values[3];
  20156. __pyx_v_priority = values[4];
  20157. }
  20158. goto __pyx_L4_argument_unpacking_done;
  20159. __pyx_L5_argtuple_error:;
  20160. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2031, __pyx_L3_error)
  20161. __pyx_L3_error:;
  20162. __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20163. __Pyx_RefNannyFinishContext();
  20164. return -1;
  20165. __pyx_L4_argument_unpacking_done:;
  20166. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_loop), __pyx_ptype_6gevent_5libev_8corecext_loop, 1, "loop", 0))) __PYX_ERR(0, 2031, __pyx_L1_error)
  20167. if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 2031, __pyx_L1_error)
  20168. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6__init__(((struct PyGeventStatObject *)__pyx_v_self), __pyx_v_loop, __pyx_v_path, __pyx_v_interval, __pyx_v_ref, __pyx_v_priority);
  20169. /* function exit code */
  20170. goto __pyx_L0;
  20171. __pyx_L1_error:;
  20172. __pyx_r = -1;
  20173. __pyx_L0:;
  20174. __Pyx_RefNannyFinishContext();
  20175. return __pyx_r;
  20176. }
  20177. static int __pyx_pf_6gevent_5libev_8corecext_4stat_6__init__(struct PyGeventStatObject *__pyx_v_self, struct PyGeventLoopObject *__pyx_v_loop, PyObject *__pyx_v_path, float __pyx_v_interval, PyObject *__pyx_v_ref, PyObject *__pyx_v_priority) {
  20178. PyObject *__pyx_v_paths = 0;
  20179. int __pyx_r;
  20180. __Pyx_RefNannyDeclarations
  20181. int __pyx_t_1;
  20182. int __pyx_t_2;
  20183. PyObject *__pyx_t_3 = NULL;
  20184. PyObject *__pyx_t_4 = NULL;
  20185. PyObject *__pyx_t_5 = NULL;
  20186. PyObject *__pyx_t_6 = NULL;
  20187. PyObject *__pyx_t_7 = NULL;
  20188. char *__pyx_t_8;
  20189. int __pyx_t_9;
  20190. __Pyx_RefNannySetupContext("__init__", 0);
  20191. __Pyx_INCREF(__pyx_v_path);
  20192. __Pyx_GIVEREF(__pyx_v_path);
  20193. __Pyx_GOTREF(__pyx_v_self->path);
  20194. __Pyx_DECREF(__pyx_v_self->path);
  20195. __pyx_v_self->path = __pyx_v_path;
  20196. __pyx_t_1 = PyUnicode_Check(__pyx_v_path);
  20197. __pyx_t_2 = (__pyx_t_1 != 0);
  20198. if (__pyx_t_2) {
  20199. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20200. __Pyx_GOTREF(__pyx_t_4);
  20201. __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20202. __Pyx_GOTREF(__pyx_t_6);
  20203. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20204. __Pyx_GOTREF(__pyx_t_7);
  20205. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20206. __pyx_t_6 = NULL;
  20207. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  20208. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
  20209. if (likely(__pyx_t_6)) {
  20210. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  20211. __Pyx_INCREF(__pyx_t_6);
  20212. __Pyx_INCREF(function);
  20213. __Pyx_DECREF_SET(__pyx_t_7, function);
  20214. }
  20215. }
  20216. if (__pyx_t_6) {
  20217. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20218. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20219. } else {
  20220. __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20221. }
  20222. __Pyx_GOTREF(__pyx_t_5);
  20223. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20224. __pyx_t_7 = NULL;
  20225. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  20226. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  20227. if (likely(__pyx_t_7)) {
  20228. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  20229. __Pyx_INCREF(__pyx_t_7);
  20230. __Pyx_INCREF(function);
  20231. __Pyx_DECREF_SET(__pyx_t_4, function);
  20232. }
  20233. }
  20234. if (!__pyx_t_7) {
  20235. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20236. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20237. __Pyx_GOTREF(__pyx_t_3);
  20238. } else {
  20239. #if CYTHON_FAST_PYCALL
  20240. if (PyFunction_Check(__pyx_t_4)) {
  20241. PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
  20242. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20243. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20244. __Pyx_GOTREF(__pyx_t_3);
  20245. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20246. } else
  20247. #endif
  20248. #if CYTHON_FAST_PYCCALL
  20249. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  20250. PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
  20251. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20252. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20253. __Pyx_GOTREF(__pyx_t_3);
  20254. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20255. } else
  20256. #endif
  20257. {
  20258. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20259. __Pyx_GOTREF(__pyx_t_6);
  20260. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
  20261. __Pyx_GIVEREF(__pyx_t_5);
  20262. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5);
  20263. __pyx_t_5 = 0;
  20264. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
  20265. __Pyx_GOTREF(__pyx_t_3);
  20266. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20267. }
  20268. }
  20269. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20270. if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2038, __pyx_L1_error)
  20271. __pyx_v_paths = ((PyObject*)__pyx_t_3);
  20272. __pyx_t_3 = 0;
  20273. __Pyx_INCREF(__pyx_v_paths);
  20274. __Pyx_GIVEREF(__pyx_v_paths);
  20275. __Pyx_GOTREF(__pyx_v_self->_paths);
  20276. __Pyx_DECREF(__pyx_v_self->_paths);
  20277. __pyx_v_self->_paths = __pyx_v_paths;
  20278. goto __pyx_L3;
  20279. }
  20280. /*else*/ {
  20281. __pyx_t_3 = __pyx_v_path;
  20282. __Pyx_INCREF(__pyx_t_3);
  20283. __pyx_v_paths = ((PyObject*)__pyx_t_3);
  20284. __pyx_t_3 = 0;
  20285. __Pyx_INCREF(__pyx_v_paths);
  20286. __Pyx_GIVEREF(__pyx_v_paths);
  20287. __Pyx_GOTREF(__pyx_v_self->_paths);
  20288. __Pyx_DECREF(__pyx_v_self->_paths);
  20289. __pyx_v_self->_paths = __pyx_v_paths;
  20290. }
  20291. __pyx_L3:;
  20292. __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_paths); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2043, __pyx_L1_error)
  20293. ev_stat_init((&__pyx_v_self->_watcher), ((void *)gevent_callback_stat), ((char *)__pyx_t_8), __pyx_v_interval);
  20294. __Pyx_INCREF(((PyObject *)__pyx_v_loop));
  20295. __Pyx_GIVEREF(((PyObject *)__pyx_v_loop));
  20296. __Pyx_GOTREF(__pyx_v_self->loop);
  20297. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  20298. __pyx_v_self->loop = __pyx_v_loop;
  20299. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2045, __pyx_L1_error)
  20300. if (__pyx_t_2) {
  20301. __pyx_v_self->_flags = 0;
  20302. goto __pyx_L4;
  20303. }
  20304. /*else*/ {
  20305. __pyx_v_self->_flags = 4;
  20306. }
  20307. __pyx_L4:;
  20308. __pyx_t_2 = (__pyx_v_priority != Py_None);
  20309. __pyx_t_1 = (__pyx_t_2 != 0);
  20310. if (__pyx_t_1) {
  20311. __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_priority); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2050, __pyx_L1_error)
  20312. ev_set_priority((&__pyx_v_self->_watcher), __pyx_t_9);
  20313. }
  20314. /* function exit code */
  20315. __pyx_r = 0;
  20316. goto __pyx_L0;
  20317. __pyx_L1_error:;
  20318. __Pyx_XDECREF(__pyx_t_3);
  20319. __Pyx_XDECREF(__pyx_t_4);
  20320. __Pyx_XDECREF(__pyx_t_5);
  20321. __Pyx_XDECREF(__pyx_t_6);
  20322. __Pyx_XDECREF(__pyx_t_7);
  20323. __Pyx_AddTraceback("gevent.libev.corecext.stat.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20324. __pyx_r = -1;
  20325. __pyx_L0:;
  20326. __Pyx_XDECREF(__pyx_v_paths);
  20327. __Pyx_RefNannyFinishContext();
  20328. return __pyx_r;
  20329. }
  20330. /* Python wrapper */
  20331. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self); /*proto*/
  20332. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(PyObject *__pyx_v_self) {
  20333. PyObject *__pyx_r = 0;
  20334. __Pyx_RefNannyDeclarations
  20335. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20336. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20337. /* function exit code */
  20338. __Pyx_RefNannyFinishContext();
  20339. return __pyx_r;
  20340. }
  20341. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4attr___get__(struct PyGeventStatObject *__pyx_v_self) {
  20342. PyObject *__pyx_r = NULL;
  20343. __Pyx_RefNannyDeclarations
  20344. int __pyx_t_1;
  20345. PyObject *__pyx_t_2 = NULL;
  20346. __Pyx_RefNannySetupContext("__get__", 0);
  20347. __pyx_t_1 = ((!(__pyx_v_self->_watcher.attr.st_nlink != 0)) != 0);
  20348. if (__pyx_t_1) {
  20349. __Pyx_XDECREF(__pyx_r);
  20350. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20351. goto __pyx_L0;
  20352. }
  20353. __Pyx_XDECREF(__pyx_r);
  20354. __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.attr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2057, __pyx_L1_error)
  20355. __Pyx_GOTREF(__pyx_t_2);
  20356. __pyx_r = __pyx_t_2;
  20357. __pyx_t_2 = 0;
  20358. goto __pyx_L0;
  20359. /* function exit code */
  20360. __pyx_L1_error:;
  20361. __Pyx_XDECREF(__pyx_t_2);
  20362. __Pyx_AddTraceback("gevent.libev.corecext.stat.attr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20363. __pyx_r = NULL;
  20364. __pyx_L0:;
  20365. __Pyx_XGIVEREF(__pyx_r);
  20366. __Pyx_RefNannyFinishContext();
  20367. return __pyx_r;
  20368. }
  20369. /* Python wrapper */
  20370. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self); /*proto*/
  20371. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(PyObject *__pyx_v_self) {
  20372. PyObject *__pyx_r = 0;
  20373. __Pyx_RefNannyDeclarations
  20374. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20375. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20376. /* function exit code */
  20377. __Pyx_RefNannyFinishContext();
  20378. return __pyx_r;
  20379. }
  20380. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4prev___get__(struct PyGeventStatObject *__pyx_v_self) {
  20381. PyObject *__pyx_r = NULL;
  20382. __Pyx_RefNannyDeclarations
  20383. int __pyx_t_1;
  20384. PyObject *__pyx_t_2 = NULL;
  20385. __Pyx_RefNannySetupContext("__get__", 0);
  20386. __pyx_t_1 = ((!(__pyx_v_self->_watcher.prev.st_nlink != 0)) != 0);
  20387. if (__pyx_t_1) {
  20388. __Pyx_XDECREF(__pyx_r);
  20389. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20390. goto __pyx_L0;
  20391. }
  20392. __Pyx_XDECREF(__pyx_r);
  20393. __pyx_t_2 = _pystat_fromstructstat((&__pyx_v_self->_watcher.prev)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2064, __pyx_L1_error)
  20394. __Pyx_GOTREF(__pyx_t_2);
  20395. __pyx_r = __pyx_t_2;
  20396. __pyx_t_2 = 0;
  20397. goto __pyx_L0;
  20398. /* function exit code */
  20399. __pyx_L1_error:;
  20400. __Pyx_XDECREF(__pyx_t_2);
  20401. __Pyx_AddTraceback("gevent.libev.corecext.stat.prev.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20402. __pyx_r = NULL;
  20403. __pyx_L0:;
  20404. __Pyx_XGIVEREF(__pyx_r);
  20405. __Pyx_RefNannyFinishContext();
  20406. return __pyx_r;
  20407. }
  20408. /* Python wrapper */
  20409. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self); /*proto*/
  20410. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(PyObject *__pyx_v_self) {
  20411. PyObject *__pyx_r = 0;
  20412. __Pyx_RefNannyDeclarations
  20413. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20414. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20415. /* function exit code */
  20416. __Pyx_RefNannyFinishContext();
  20417. return __pyx_r;
  20418. }
  20419. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_8interval___get__(struct PyGeventStatObject *__pyx_v_self) {
  20420. PyObject *__pyx_r = NULL;
  20421. __Pyx_RefNannyDeclarations
  20422. PyObject *__pyx_t_1 = NULL;
  20423. __Pyx_RefNannySetupContext("__get__", 0);
  20424. __Pyx_XDECREF(__pyx_r);
  20425. __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_watcher.interval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L1_error)
  20426. __Pyx_GOTREF(__pyx_t_1);
  20427. __pyx_r = __pyx_t_1;
  20428. __pyx_t_1 = 0;
  20429. goto __pyx_L0;
  20430. /* function exit code */
  20431. __pyx_L1_error:;
  20432. __Pyx_XDECREF(__pyx_t_1);
  20433. __Pyx_AddTraceback("gevent.libev.corecext.stat.interval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20434. __pyx_r = NULL;
  20435. __pyx_L0:;
  20436. __Pyx_XGIVEREF(__pyx_r);
  20437. __Pyx_RefNannyFinishContext();
  20438. return __pyx_r;
  20439. }
  20440. /* Python wrapper */
  20441. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/
  20442. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4loop_1__get__(PyObject *__pyx_v_self) {
  20443. PyObject *__pyx_r = 0;
  20444. __Pyx_RefNannyDeclarations
  20445. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20446. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4loop___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20447. /* function exit code */
  20448. __Pyx_RefNannyFinishContext();
  20449. return __pyx_r;
  20450. }
  20451. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4loop___get__(struct PyGeventStatObject *__pyx_v_self) {
  20452. PyObject *__pyx_r = NULL;
  20453. __Pyx_RefNannyDeclarations
  20454. __Pyx_RefNannySetupContext("__get__", 0);
  20455. __Pyx_XDECREF(__pyx_r);
  20456. __Pyx_INCREF(((PyObject *)__pyx_v_self->loop));
  20457. __pyx_r = ((PyObject *)__pyx_v_self->loop);
  20458. goto __pyx_L0;
  20459. /* function exit code */
  20460. __pyx_L0:;
  20461. __Pyx_XGIVEREF(__pyx_r);
  20462. __Pyx_RefNannyFinishContext();
  20463. return __pyx_r;
  20464. }
  20465. /* Python wrapper */
  20466. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  20467. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  20468. int __pyx_r;
  20469. __Pyx_RefNannyDeclarations
  20470. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  20471. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  20472. /* function exit code */
  20473. __Pyx_RefNannyFinishContext();
  20474. return __pyx_r;
  20475. }
  20476. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value) {
  20477. int __pyx_r;
  20478. __Pyx_RefNannyDeclarations
  20479. PyObject *__pyx_t_1 = NULL;
  20480. __Pyx_RefNannySetupContext("__set__", 0);
  20481. if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6gevent_5libev_8corecext_loop))))) __PYX_ERR(0, 1925, __pyx_L1_error)
  20482. __pyx_t_1 = __pyx_v_value;
  20483. __Pyx_INCREF(__pyx_t_1);
  20484. __Pyx_GIVEREF(__pyx_t_1);
  20485. __Pyx_GOTREF(__pyx_v_self->loop);
  20486. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  20487. __pyx_v_self->loop = ((struct PyGeventLoopObject *)__pyx_t_1);
  20488. __pyx_t_1 = 0;
  20489. /* function exit code */
  20490. __pyx_r = 0;
  20491. goto __pyx_L0;
  20492. __pyx_L1_error:;
  20493. __Pyx_XDECREF(__pyx_t_1);
  20494. __Pyx_AddTraceback("gevent.libev.corecext.stat.loop.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20495. __pyx_r = -1;
  20496. __pyx_L0:;
  20497. __Pyx_RefNannyFinishContext();
  20498. return __pyx_r;
  20499. }
  20500. /* Python wrapper */
  20501. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_5__del__(PyObject *__pyx_v_self); /*proto*/
  20502. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_5__del__(PyObject *__pyx_v_self) {
  20503. int __pyx_r;
  20504. __Pyx_RefNannyDeclarations
  20505. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  20506. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_4__del__(((struct PyGeventStatObject *)__pyx_v_self));
  20507. /* function exit code */
  20508. __Pyx_RefNannyFinishContext();
  20509. return __pyx_r;
  20510. }
  20511. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4loop_4__del__(struct PyGeventStatObject *__pyx_v_self) {
  20512. int __pyx_r;
  20513. __Pyx_RefNannyDeclarations
  20514. __Pyx_RefNannySetupContext("__del__", 0);
  20515. __Pyx_INCREF(Py_None);
  20516. __Pyx_GIVEREF(Py_None);
  20517. __Pyx_GOTREF(__pyx_v_self->loop);
  20518. __Pyx_DECREF(((PyObject *)__pyx_v_self->loop));
  20519. __pyx_v_self->loop = ((struct PyGeventLoopObject *)Py_None);
  20520. /* function exit code */
  20521. __pyx_r = 0;
  20522. __Pyx_RefNannyFinishContext();
  20523. return __pyx_r;
  20524. }
  20525. /* Python wrapper */
  20526. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4args_1__get__(PyObject *__pyx_v_self); /*proto*/
  20527. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4args_1__get__(PyObject *__pyx_v_self) {
  20528. PyObject *__pyx_r = 0;
  20529. __Pyx_RefNannyDeclarations
  20530. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20531. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4args___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20532. /* function exit code */
  20533. __Pyx_RefNannyFinishContext();
  20534. return __pyx_r;
  20535. }
  20536. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4args___get__(struct PyGeventStatObject *__pyx_v_self) {
  20537. PyObject *__pyx_r = NULL;
  20538. __Pyx_RefNannyDeclarations
  20539. __Pyx_RefNannySetupContext("__get__", 0);
  20540. __Pyx_XDECREF(__pyx_r);
  20541. __Pyx_INCREF(__pyx_v_self->args);
  20542. __pyx_r = __pyx_v_self->args;
  20543. goto __pyx_L0;
  20544. /* function exit code */
  20545. __pyx_L0:;
  20546. __Pyx_XGIVEREF(__pyx_r);
  20547. __Pyx_RefNannyFinishContext();
  20548. return __pyx_r;
  20549. }
  20550. /* Python wrapper */
  20551. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
  20552. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4args_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  20553. int __pyx_r;
  20554. __Pyx_RefNannyDeclarations
  20555. __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  20556. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4args_2__set__(((struct PyGeventStatObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  20557. /* function exit code */
  20558. __Pyx_RefNannyFinishContext();
  20559. return __pyx_r;
  20560. }
  20561. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4args_2__set__(struct PyGeventStatObject *__pyx_v_self, PyObject *__pyx_v_value) {
  20562. int __pyx_r;
  20563. __Pyx_RefNannyDeclarations
  20564. PyObject *__pyx_t_1 = NULL;
  20565. __Pyx_RefNannySetupContext("__set__", 0);
  20566. if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1927, __pyx_L1_error)
  20567. __pyx_t_1 = __pyx_v_value;
  20568. __Pyx_INCREF(__pyx_t_1);
  20569. __Pyx_GIVEREF(__pyx_t_1);
  20570. __Pyx_GOTREF(__pyx_v_self->args);
  20571. __Pyx_DECREF(__pyx_v_self->args);
  20572. __pyx_v_self->args = ((PyObject*)__pyx_t_1);
  20573. __pyx_t_1 = 0;
  20574. /* function exit code */
  20575. __pyx_r = 0;
  20576. goto __pyx_L0;
  20577. __pyx_L1_error:;
  20578. __Pyx_XDECREF(__pyx_t_1);
  20579. __Pyx_AddTraceback("gevent.libev.corecext.stat.args.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20580. __pyx_r = -1;
  20581. __pyx_L0:;
  20582. __Pyx_RefNannyFinishContext();
  20583. return __pyx_r;
  20584. }
  20585. /* Python wrapper */
  20586. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4args_5__del__(PyObject *__pyx_v_self); /*proto*/
  20587. static int __pyx_pw_6gevent_5libev_8corecext_4stat_4args_5__del__(PyObject *__pyx_v_self) {
  20588. int __pyx_r;
  20589. __Pyx_RefNannyDeclarations
  20590. __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  20591. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4args_4__del__(((struct PyGeventStatObject *)__pyx_v_self));
  20592. /* function exit code */
  20593. __Pyx_RefNannyFinishContext();
  20594. return __pyx_r;
  20595. }
  20596. static int __pyx_pf_6gevent_5libev_8corecext_4stat_4args_4__del__(struct PyGeventStatObject *__pyx_v_self) {
  20597. int __pyx_r;
  20598. __Pyx_RefNannyDeclarations
  20599. __Pyx_RefNannySetupContext("__del__", 0);
  20600. __Pyx_INCREF(Py_None);
  20601. __Pyx_GIVEREF(Py_None);
  20602. __Pyx_GOTREF(__pyx_v_self->args);
  20603. __Pyx_DECREF(__pyx_v_self->args);
  20604. __pyx_v_self->args = ((PyObject*)Py_None);
  20605. /* function exit code */
  20606. __pyx_r = 0;
  20607. __Pyx_RefNannyFinishContext();
  20608. return __pyx_r;
  20609. }
  20610. /* Python wrapper */
  20611. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_flags_1__get__(PyObject *__pyx_v_self); /*proto*/
  20612. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_flags_1__get__(PyObject *__pyx_v_self) {
  20613. PyObject *__pyx_r = 0;
  20614. __Pyx_RefNannyDeclarations
  20615. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20616. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6_flags___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20617. /* function exit code */
  20618. __Pyx_RefNannyFinishContext();
  20619. return __pyx_r;
  20620. }
  20621. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_flags___get__(struct PyGeventStatObject *__pyx_v_self) {
  20622. PyObject *__pyx_r = NULL;
  20623. __Pyx_RefNannyDeclarations
  20624. PyObject *__pyx_t_1 = NULL;
  20625. __Pyx_RefNannySetupContext("__get__", 0);
  20626. __Pyx_XDECREF(__pyx_r);
  20627. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
  20628. __Pyx_GOTREF(__pyx_t_1);
  20629. __pyx_r = __pyx_t_1;
  20630. __pyx_t_1 = 0;
  20631. goto __pyx_L0;
  20632. /* function exit code */
  20633. __pyx_L1_error:;
  20634. __Pyx_XDECREF(__pyx_t_1);
  20635. __Pyx_AddTraceback("gevent.libev.corecext.stat._flags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20636. __pyx_r = NULL;
  20637. __pyx_L0:;
  20638. __Pyx_XGIVEREF(__pyx_r);
  20639. __Pyx_RefNannyFinishContext();
  20640. return __pyx_r;
  20641. }
  20642. /* Python wrapper */
  20643. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
  20644. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(PyObject *__pyx_v_self) {
  20645. PyObject *__pyx_r = 0;
  20646. __Pyx_RefNannyDeclarations
  20647. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20648. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20649. /* function exit code */
  20650. __Pyx_RefNannyFinishContext();
  20651. return __pyx_r;
  20652. }
  20653. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_4path___get__(struct PyGeventStatObject *__pyx_v_self) {
  20654. PyObject *__pyx_r = NULL;
  20655. __Pyx_RefNannyDeclarations
  20656. __Pyx_RefNannySetupContext("__get__", 0);
  20657. __Pyx_XDECREF(__pyx_r);
  20658. __Pyx_INCREF(__pyx_v_self->path);
  20659. __pyx_r = __pyx_v_self->path;
  20660. goto __pyx_L0;
  20661. /* function exit code */
  20662. __pyx_L0:;
  20663. __Pyx_XGIVEREF(__pyx_r);
  20664. __Pyx_RefNannyFinishContext();
  20665. return __pyx_r;
  20666. }
  20667. /* Python wrapper */
  20668. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self); /*proto*/
  20669. static PyObject *__pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(PyObject *__pyx_v_self) {
  20670. PyObject *__pyx_r = 0;
  20671. __Pyx_RefNannyDeclarations
  20672. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  20673. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(((struct PyGeventStatObject *)__pyx_v_self));
  20674. /* function exit code */
  20675. __Pyx_RefNannyFinishContext();
  20676. return __pyx_r;
  20677. }
  20678. static PyObject *__pyx_pf_6gevent_5libev_8corecext_4stat_6_paths___get__(struct PyGeventStatObject *__pyx_v_self) {
  20679. PyObject *__pyx_r = NULL;
  20680. __Pyx_RefNannyDeclarations
  20681. __Pyx_RefNannySetupContext("__get__", 0);
  20682. __Pyx_XDECREF(__pyx_r);
  20683. __Pyx_INCREF(__pyx_v_self->_paths);
  20684. __pyx_r = __pyx_v_self->_paths;
  20685. goto __pyx_L0;
  20686. /* function exit code */
  20687. __pyx_L0:;
  20688. __Pyx_XGIVEREF(__pyx_r);
  20689. __Pyx_RefNannyFinishContext();
  20690. return __pyx_r;
  20691. }
  20692. static void __pyx_f_6gevent_5libev_8corecext__syserr_cb(char *__pyx_v_msg) {
  20693. PyObject *__pyx_v_print_exc = NULL;
  20694. __Pyx_RefNannyDeclarations
  20695. PyObject *__pyx_t_1 = NULL;
  20696. PyObject *__pyx_t_2 = NULL;
  20697. PyObject *__pyx_t_3 = NULL;
  20698. PyObject *__pyx_t_4 = NULL;
  20699. PyObject *__pyx_t_5 = NULL;
  20700. PyObject *__pyx_t_6 = NULL;
  20701. PyObject *__pyx_t_7 = NULL;
  20702. PyObject *__pyx_t_8 = NULL;
  20703. int __pyx_t_9;
  20704. PyObject *__pyx_t_10 = NULL;
  20705. int __pyx_t_11;
  20706. int __pyx_t_12;
  20707. #ifdef WITH_THREAD
  20708. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
  20709. #endif
  20710. __Pyx_RefNannySetupContext("_syserr_cb", 0);
  20711. {
  20712. __Pyx_PyThreadState_declare
  20713. __Pyx_PyThreadState_assign
  20714. __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
  20715. __Pyx_XGOTREF(__pyx_t_1);
  20716. __Pyx_XGOTREF(__pyx_t_2);
  20717. __Pyx_XGOTREF(__pyx_t_3);
  20718. /*try:*/ {
  20719. __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_SYSERR_CALLBACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20720. __Pyx_GOTREF(__pyx_t_5);
  20721. __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_msg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20722. __Pyx_GOTREF(__pyx_t_6);
  20723. __pyx_t_7 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20724. __Pyx_GOTREF(__pyx_t_7);
  20725. __pyx_t_8 = NULL;
  20726. __pyx_t_9 = 0;
  20727. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
  20728. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
  20729. if (likely(__pyx_t_8)) {
  20730. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  20731. __Pyx_INCREF(__pyx_t_8);
  20732. __Pyx_INCREF(function);
  20733. __Pyx_DECREF_SET(__pyx_t_5, function);
  20734. __pyx_t_9 = 1;
  20735. }
  20736. }
  20737. #if CYTHON_FAST_PYCALL
  20738. if (PyFunction_Check(__pyx_t_5)) {
  20739. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
  20740. __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20741. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  20742. __Pyx_GOTREF(__pyx_t_4);
  20743. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20744. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20745. } else
  20746. #endif
  20747. #if CYTHON_FAST_PYCCALL
  20748. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  20749. PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
  20750. __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20751. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  20752. __Pyx_GOTREF(__pyx_t_4);
  20753. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20754. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20755. } else
  20756. #endif
  20757. {
  20758. __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20759. __Pyx_GOTREF(__pyx_t_10);
  20760. if (__pyx_t_8) {
  20761. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
  20762. }
  20763. __Pyx_GIVEREF(__pyx_t_6);
  20764. PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_6);
  20765. __Pyx_GIVEREF(__pyx_t_7);
  20766. PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
  20767. __pyx_t_6 = 0;
  20768. __pyx_t_7 = 0;
  20769. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L3_error)
  20770. __Pyx_GOTREF(__pyx_t_4);
  20771. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  20772. }
  20773. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20774. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20775. }
  20776. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  20777. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  20778. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  20779. goto __pyx_L10_try_end;
  20780. __pyx_L3_error:;
  20781. __Pyx_PyThreadState_assign
  20782. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  20783. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  20784. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  20785. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  20786. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  20787. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  20788. /*except:*/ {
  20789. __Pyx_AddTraceback("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20790. if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(0, 2078, __pyx_L5_except_error)
  20791. __Pyx_GOTREF(__pyx_t_4);
  20792. __Pyx_GOTREF(__pyx_t_5);
  20793. __Pyx_GOTREF(__pyx_t_10);
  20794. __pyx_t_7 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(Py_None, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2079, __pyx_L5_except_error)
  20795. __Pyx_GOTREF(__pyx_t_7);
  20796. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20797. __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2080, __pyx_L5_except_error)
  20798. __Pyx_GOTREF(__pyx_t_7);
  20799. __pyx_t_6 = __Pyx_GetAttr3(__pyx_t_7, __pyx_n_s_print_exc, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2080, __pyx_L5_except_error)
  20800. __Pyx_GOTREF(__pyx_t_6);
  20801. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20802. __pyx_v_print_exc = __pyx_t_6;
  20803. __pyx_t_6 = 0;
  20804. __pyx_t_11 = (__pyx_v_print_exc != Py_None);
  20805. __pyx_t_12 = (__pyx_t_11 != 0);
  20806. if (__pyx_t_12) {
  20807. __Pyx_INCREF(__pyx_v_print_exc);
  20808. __pyx_t_7 = __pyx_v_print_exc; __pyx_t_8 = NULL;
  20809. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  20810. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  20811. if (likely(__pyx_t_8)) {
  20812. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  20813. __Pyx_INCREF(__pyx_t_8);
  20814. __Pyx_INCREF(function);
  20815. __Pyx_DECREF_SET(__pyx_t_7, function);
  20816. }
  20817. }
  20818. if (__pyx_t_8) {
  20819. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2082, __pyx_L5_except_error)
  20820. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  20821. } else {
  20822. __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2082, __pyx_L5_except_error)
  20823. }
  20824. __Pyx_GOTREF(__pyx_t_6);
  20825. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  20826. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  20827. }
  20828. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20829. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  20830. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  20831. goto __pyx_L4_exception_handled;
  20832. }
  20833. __pyx_L5_except_error:;
  20834. __Pyx_PyThreadState_assign
  20835. __Pyx_XGIVEREF(__pyx_t_1);
  20836. __Pyx_XGIVEREF(__pyx_t_2);
  20837. __Pyx_XGIVEREF(__pyx_t_3);
  20838. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20839. goto __pyx_L1_error;
  20840. __pyx_L4_exception_handled:;
  20841. __Pyx_PyThreadState_assign
  20842. __Pyx_XGIVEREF(__pyx_t_1);
  20843. __Pyx_XGIVEREF(__pyx_t_2);
  20844. __Pyx_XGIVEREF(__pyx_t_3);
  20845. __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  20846. __pyx_L10_try_end:;
  20847. }
  20848. /* function exit code */
  20849. goto __pyx_L0;
  20850. __pyx_L1_error:;
  20851. __Pyx_XDECREF(__pyx_t_4);
  20852. __Pyx_XDECREF(__pyx_t_5);
  20853. __Pyx_XDECREF(__pyx_t_6);
  20854. __Pyx_XDECREF(__pyx_t_7);
  20855. __Pyx_XDECREF(__pyx_t_8);
  20856. __Pyx_XDECREF(__pyx_t_10);
  20857. __Pyx_WriteUnraisable("gevent.libev.corecext._syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  20858. __pyx_L0:;
  20859. __Pyx_XDECREF(__pyx_v_print_exc);
  20860. __Pyx_RefNannyFinishContext();
  20861. #ifdef WITH_THREAD
  20862. PyGILState_Release(__pyx_gilstate_save);
  20863. #endif
  20864. }
  20865. static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
  20866. static PyObject *__pyx_f_6gevent_5libev_8corecext_set_syserr_cb(PyObject *__pyx_v_callback, CYTHON_UNUSED int __pyx_skip_dispatch) {
  20867. PyObject *__pyx_r = NULL;
  20868. __Pyx_RefNannyDeclarations
  20869. int __pyx_t_1;
  20870. int __pyx_t_2;
  20871. PyObject *__pyx_t_3 = NULL;
  20872. PyObject *__pyx_t_4 = NULL;
  20873. __Pyx_RefNannySetupContext("set_syserr_cb", 0);
  20874. __pyx_t_1 = (__pyx_v_callback == Py_None);
  20875. __pyx_t_2 = (__pyx_t_1 != 0);
  20876. if (__pyx_t_2) {
  20877. ev_set_syserr_cb(NULL);
  20878. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYSERR_CALLBACK, Py_None) < 0) __PYX_ERR(0, 2089, __pyx_L1_error)
  20879. goto __pyx_L3;
  20880. }
  20881. __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2090, __pyx_L1_error)
  20882. __pyx_t_1 = (__pyx_t_2 != 0);
  20883. if (__pyx_t_1) {
  20884. ev_set_syserr_cb(((void *)__pyx_f_6gevent_5libev_8corecext__syserr_cb));
  20885. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYSERR_CALLBACK, __pyx_v_callback) < 0) __PYX_ERR(0, 2092, __pyx_L1_error)
  20886. goto __pyx_L3;
  20887. }
  20888. /*else*/ {
  20889. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error)
  20890. __Pyx_GOTREF(__pyx_t_3);
  20891. __Pyx_INCREF(__pyx_v_callback);
  20892. __Pyx_GIVEREF(__pyx_v_callback);
  20893. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callback);
  20894. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_or_None_got_r, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L1_error)
  20895. __Pyx_GOTREF(__pyx_t_4);
  20896. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  20897. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error)
  20898. __Pyx_GOTREF(__pyx_t_3);
  20899. __Pyx_GIVEREF(__pyx_t_4);
  20900. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  20901. __pyx_t_4 = 0;
  20902. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L1_error)
  20903. __Pyx_GOTREF(__pyx_t_4);
  20904. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  20905. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  20906. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  20907. __PYX_ERR(0, 2094, __pyx_L1_error)
  20908. }
  20909. __pyx_L3:;
  20910. /* function exit code */
  20911. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  20912. goto __pyx_L0;
  20913. __pyx_L1_error:;
  20914. __Pyx_XDECREF(__pyx_t_3);
  20915. __Pyx_XDECREF(__pyx_t_4);
  20916. __Pyx_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20917. __pyx_r = 0;
  20918. __pyx_L0:;
  20919. __Pyx_XGIVEREF(__pyx_r);
  20920. __Pyx_RefNannyFinishContext();
  20921. return __pyx_r;
  20922. }
  20923. /* Python wrapper */
  20924. static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback); /*proto*/
  20925. static PyObject *__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb(PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  20926. PyObject *__pyx_r = 0;
  20927. __Pyx_RefNannyDeclarations
  20928. __Pyx_RefNannySetupContext("set_syserr_cb (wrapper)", 0);
  20929. __pyx_r = __pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(__pyx_self, ((PyObject *)__pyx_v_callback));
  20930. /* function exit code */
  20931. __Pyx_RefNannyFinishContext();
  20932. return __pyx_r;
  20933. }
  20934. static PyObject *__pyx_pf_6gevent_5libev_8corecext_20set_syserr_cb(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_callback) {
  20935. PyObject *__pyx_r = NULL;
  20936. __Pyx_RefNannyDeclarations
  20937. PyObject *__pyx_t_1 = NULL;
  20938. __Pyx_RefNannySetupContext("set_syserr_cb", 0);
  20939. __Pyx_XDECREF(__pyx_r);
  20940. __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext_set_syserr_cb(__pyx_v_callback, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error)
  20941. __Pyx_GOTREF(__pyx_t_1);
  20942. __pyx_r = __pyx_t_1;
  20943. __pyx_t_1 = 0;
  20944. goto __pyx_L0;
  20945. /* function exit code */
  20946. __pyx_L1_error:;
  20947. __Pyx_XDECREF(__pyx_t_1);
  20948. __Pyx_AddTraceback("gevent.libev.corecext.set_syserr_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  20949. __pyx_r = NULL;
  20950. __pyx_L0:;
  20951. __Pyx_XGIVEREF(__pyx_r);
  20952. __Pyx_RefNannyFinishContext();
  20953. return __pyx_r;
  20954. }
  20955. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext__EVENTSType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  20956. PyObject *o;
  20957. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  20958. o = (*t->tp_alloc)(t, 0);
  20959. } else {
  20960. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  20961. }
  20962. if (unlikely(!o)) return 0;
  20963. return o;
  20964. }
  20965. static void __pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType(PyObject *o) {
  20966. #if PY_VERSION_HEX >= 0x030400a1
  20967. if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
  20968. if (PyObject_CallFinalizerFromDealloc(o)) return;
  20969. }
  20970. #endif
  20971. (*Py_TYPE(o)->tp_free)(o);
  20972. }
  20973. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext__EVENTSType[] = {
  20974. {0, 0, 0, 0}
  20975. };
  20976. static PyTypeObject __pyx_type_6gevent_5libev_8corecext__EVENTSType = {
  20977. PyVarObject_HEAD_INIT(0, 0)
  20978. "gevent.libev.corecext._EVENTSType", /*tp_name*/
  20979. sizeof(struct __pyx_obj_6gevent_5libev_8corecext__EVENTSType), /*tp_basicsize*/
  20980. 0, /*tp_itemsize*/
  20981. __pyx_tp_dealloc_6gevent_5libev_8corecext__EVENTSType, /*tp_dealloc*/
  20982. 0, /*tp_print*/
  20983. 0, /*tp_getattr*/
  20984. 0, /*tp_setattr*/
  20985. #if PY_MAJOR_VERSION < 3
  20986. 0, /*tp_compare*/
  20987. #endif
  20988. #if PY_MAJOR_VERSION >= 3
  20989. 0, /*tp_as_async*/
  20990. #endif
  20991. __pyx_pw_6gevent_5libev_8corecext_11_EVENTSType_1__repr__, /*tp_repr*/
  20992. 0, /*tp_as_number*/
  20993. 0, /*tp_as_sequence*/
  20994. 0, /*tp_as_mapping*/
  20995. 0, /*tp_hash*/
  20996. 0, /*tp_call*/
  20997. 0, /*tp_str*/
  20998. 0, /*tp_getattro*/
  20999. 0, /*tp_setattro*/
  21000. 0, /*tp_as_buffer*/
  21001. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  21002. 0, /*tp_doc*/
  21003. 0, /*tp_traverse*/
  21004. 0, /*tp_clear*/
  21005. 0, /*tp_richcompare*/
  21006. 0, /*tp_weaklistoffset*/
  21007. 0, /*tp_iter*/
  21008. 0, /*tp_iternext*/
  21009. __pyx_methods_6gevent_5libev_8corecext__EVENTSType, /*tp_methods*/
  21010. 0, /*tp_members*/
  21011. 0, /*tp_getset*/
  21012. 0, /*tp_base*/
  21013. 0, /*tp_dict*/
  21014. 0, /*tp_descr_get*/
  21015. 0, /*tp_descr_set*/
  21016. 0, /*tp_dictoffset*/
  21017. 0, /*tp_init*/
  21018. 0, /*tp_alloc*/
  21019. __pyx_tp_new_6gevent_5libev_8corecext__EVENTSType, /*tp_new*/
  21020. 0, /*tp_free*/
  21021. 0, /*tp_is_gc*/
  21022. 0, /*tp_bases*/
  21023. 0, /*tp_mro*/
  21024. 0, /*tp_cache*/
  21025. 0, /*tp_subclasses*/
  21026. 0, /*tp_weaklist*/
  21027. 0, /*tp_del*/
  21028. 0, /*tp_version_tag*/
  21029. #if PY_VERSION_HEX >= 0x030400a1
  21030. 0, /*tp_finalize*/
  21031. #endif
  21032. };
  21033. static struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop __pyx_vtable_6gevent_5libev_8corecext_loop;
  21034. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_loop(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  21035. struct PyGeventLoopObject *p;
  21036. PyObject *o;
  21037. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  21038. o = (*t->tp_alloc)(t, 0);
  21039. } else {
  21040. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  21041. }
  21042. if (unlikely(!o)) return 0;
  21043. p = ((struct PyGeventLoopObject *)o);
  21044. p->__pyx_vtab = __pyx_vtabptr_6gevent_5libev_8corecext_loop;
  21045. p->error_handler = Py_None; Py_INCREF(Py_None);
  21046. p->_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21047. return o;
  21048. }
  21049. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_loop(PyObject *o) {
  21050. struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  21051. #if PY_VERSION_HEX >= 0x030400a1
  21052. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  21053. if (PyObject_CallFinalizerFromDealloc(o)) return;
  21054. }
  21055. #endif
  21056. PyObject_GC_UnTrack(o);
  21057. {
  21058. PyObject *etype, *eval, *etb;
  21059. PyErr_Fetch(&etype, &eval, &etb);
  21060. ++Py_REFCNT(o);
  21061. __pyx_pw_6gevent_5libev_8corecext_4loop_7__dealloc__(o);
  21062. --Py_REFCNT(o);
  21063. PyErr_Restore(etype, eval, etb);
  21064. }
  21065. Py_CLEAR(p->error_handler);
  21066. Py_CLEAR(p->_callbacks);
  21067. (*Py_TYPE(o)->tp_free)(o);
  21068. }
  21069. static int __pyx_tp_traverse_6gevent_5libev_8corecext_loop(PyObject *o, visitproc v, void *a) {
  21070. int e;
  21071. struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  21072. if (p->error_handler) {
  21073. e = (*v)(p->error_handler, a); if (e) return e;
  21074. }
  21075. if (p->_callbacks) {
  21076. e = (*v)(p->_callbacks, a); if (e) return e;
  21077. }
  21078. return 0;
  21079. }
  21080. static int __pyx_tp_clear_6gevent_5libev_8corecext_loop(PyObject *o) {
  21081. PyObject* tmp;
  21082. struct PyGeventLoopObject *p = (struct PyGeventLoopObject *)o;
  21083. tmp = ((PyObject*)p->error_handler);
  21084. p->error_handler = Py_None; Py_INCREF(Py_None);
  21085. Py_XDECREF(tmp);
  21086. tmp = ((PyObject*)p->_callbacks);
  21087. p->_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21088. Py_XDECREF(tmp);
  21089. return 0;
  21090. }
  21091. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_ptr(PyObject *o, CYTHON_UNUSED void *x) {
  21092. return __pyx_pw_6gevent_5libev_8corecext_4loop_3ptr_1__get__(o);
  21093. }
  21094. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_WatcherType(PyObject *o, CYTHON_UNUSED void *x) {
  21095. return __pyx_pw_6gevent_5libev_8corecext_4loop_11WatcherType_1__get__(o);
  21096. }
  21097. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_MAXPRI(PyObject *o, CYTHON_UNUSED void *x) {
  21098. return __pyx_pw_6gevent_5libev_8corecext_4loop_6MAXPRI_1__get__(o);
  21099. }
  21100. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_MINPRI(PyObject *o, CYTHON_UNUSED void *x) {
  21101. return __pyx_pw_6gevent_5libev_8corecext_4loop_6MINPRI_1__get__(o);
  21102. }
  21103. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_default(PyObject *o, CYTHON_UNUSED void *x) {
  21104. return __pyx_pw_6gevent_5libev_8corecext_4loop_7default_1__get__(o);
  21105. }
  21106. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_iteration(PyObject *o, CYTHON_UNUSED void *x) {
  21107. return __pyx_pw_6gevent_5libev_8corecext_4loop_9iteration_1__get__(o);
  21108. }
  21109. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_depth(PyObject *o, CYTHON_UNUSED void *x) {
  21110. return __pyx_pw_6gevent_5libev_8corecext_4loop_5depth_1__get__(o);
  21111. }
  21112. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_backend_int(PyObject *o, CYTHON_UNUSED void *x) {
  21113. return __pyx_pw_6gevent_5libev_8corecext_4loop_11backend_int_1__get__(o);
  21114. }
  21115. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_backend(PyObject *o, CYTHON_UNUSED void *x) {
  21116. return __pyx_pw_6gevent_5libev_8corecext_4loop_7backend_1__get__(o);
  21117. }
  21118. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_pendingcnt(PyObject *o, CYTHON_UNUSED void *x) {
  21119. return __pyx_pw_6gevent_5libev_8corecext_4loop_10pendingcnt_1__get__(o);
  21120. }
  21121. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21122. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21123. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_activecnt(PyObject *o, CYTHON_UNUSED void *x) {
  21124. return __pyx_pw_6gevent_5libev_8corecext_4loop_9activecnt_1__get__(o);
  21125. }
  21126. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_sig_pending(PyObject *o, CYTHON_UNUSED void *x) {
  21127. return __pyx_pw_6gevent_5libev_8corecext_4loop_11sig_pending_1__get__(o);
  21128. }
  21129. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21130. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21131. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_sigfd(PyObject *o, CYTHON_UNUSED void *x) {
  21132. return __pyx_pw_6gevent_5libev_8corecext_4loop_5sigfd_1__get__(o);
  21133. }
  21134. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21135. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21136. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_origflags(PyObject *o, CYTHON_UNUSED void *x) {
  21137. return __pyx_pw_6gevent_5libev_8corecext_4loop_9origflags_1__get__(o);
  21138. }
  21139. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_origflags_int(PyObject *o, CYTHON_UNUSED void *x) {
  21140. return __pyx_pw_6gevent_5libev_8corecext_4loop_13origflags_int_1__get__(o);
  21141. }
  21142. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21143. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21144. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop_error_handler(PyObject *o, CYTHON_UNUSED void *x) {
  21145. return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_1__get__(o);
  21146. }
  21147. static int __pyx_setprop_6gevent_5libev_8corecext_4loop_error_handler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21148. if (v) {
  21149. return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_3__set__(o, v);
  21150. }
  21151. else {
  21152. return __pyx_pw_6gevent_5libev_8corecext_4loop_13error_handler_5__del__(o);
  21153. }
  21154. }
  21155. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4loop__callbacks(PyObject *o, CYTHON_UNUSED void *x) {
  21156. return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_1__get__(o);
  21157. }
  21158. static int __pyx_setprop_6gevent_5libev_8corecext_4loop__callbacks(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21159. if (v) {
  21160. return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_3__set__(o, v);
  21161. }
  21162. else {
  21163. return __pyx_pw_6gevent_5libev_8corecext_4loop_10_callbacks_5__del__(o);
  21164. }
  21165. }
  21166. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_loop[] = {
  21167. {"_stop_watchers", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_3_stop_watchers, METH_NOARGS, 0},
  21168. {"destroy", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_5destroy, METH_NOARGS, 0},
  21169. {"_handle_syserr", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_9_handle_syserr, METH_VARARGS|METH_KEYWORDS, 0},
  21170. {"handle_error", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_11handle_error, METH_VARARGS|METH_KEYWORDS, 0},
  21171. {"_default_handle_error", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_13_default_handle_error, METH_VARARGS|METH_KEYWORDS, 0},
  21172. {"run", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_15run, METH_VARARGS|METH_KEYWORDS, 0},
  21173. {"reinit", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_17reinit, METH_NOARGS, 0},
  21174. {"ref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_19ref, METH_NOARGS, 0},
  21175. {"unref", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_21unref, METH_NOARGS, 0},
  21176. {"break_", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_23break_, METH_VARARGS|METH_KEYWORDS, 0},
  21177. {"verify", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_25verify, METH_NOARGS, 0},
  21178. {"now", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_27now, METH_NOARGS, 0},
  21179. {"update", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_29update, METH_NOARGS, 0},
  21180. {"io", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_33io, METH_VARARGS|METH_KEYWORDS, 0},
  21181. {"timer", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_35timer, METH_VARARGS|METH_KEYWORDS, 0},
  21182. {"signal", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_37signal, METH_VARARGS|METH_KEYWORDS, 0},
  21183. {"idle", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_39idle, METH_VARARGS|METH_KEYWORDS, 0},
  21184. {"prepare", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_41prepare, METH_VARARGS|METH_KEYWORDS, 0},
  21185. {"check", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_43check, METH_VARARGS|METH_KEYWORDS, 0},
  21186. {"fork", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_45fork, METH_VARARGS|METH_KEYWORDS, 0},
  21187. {"async", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_47async, METH_VARARGS|METH_KEYWORDS, 0},
  21188. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21189. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21190. {"stat", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_49stat, METH_VARARGS|METH_KEYWORDS, 0},
  21191. {"run_callback", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_51run_callback, METH_VARARGS|METH_KEYWORDS, 0},
  21192. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_53_format, METH_NOARGS, 0},
  21193. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21194. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21195. {"_format_details", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_55_format_details, METH_NOARGS, 0},
  21196. {"fileno", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_57fileno, METH_NOARGS, 0},
  21197. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21198. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21199. {"child", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_49child, METH_VARARGS|METH_KEYWORDS, 0},
  21200. {"install_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_51install_sigchld, METH_NOARGS, 0},
  21201. {"reset_sigchld", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_53reset_sigchld, METH_NOARGS, 0},
  21202. {"stat", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_55stat, METH_VARARGS|METH_KEYWORDS, 0},
  21203. {"run_callback", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_57run_callback, METH_VARARGS|METH_KEYWORDS, 0},
  21204. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_59_format, METH_NOARGS, 0},
  21205. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21206. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  21207. {"_format_details", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_61_format_details, METH_NOARGS, 0},
  21208. {"fileno", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4loop_63fileno, METH_NOARGS, 0},
  21209. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21210. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21211. {0, 0, 0, 0}
  21212. };
  21213. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_loop[] = {
  21214. {(char *)"ptr", __pyx_getprop_6gevent_5libev_8corecext_4loop_ptr, 0, (char *)0, 0},
  21215. {(char *)"WatcherType", __pyx_getprop_6gevent_5libev_8corecext_4loop_WatcherType, 0, (char *)0, 0},
  21216. {(char *)"MAXPRI", __pyx_getprop_6gevent_5libev_8corecext_4loop_MAXPRI, 0, (char *)0, 0},
  21217. {(char *)"MINPRI", __pyx_getprop_6gevent_5libev_8corecext_4loop_MINPRI, 0, (char *)0, 0},
  21218. {(char *)"default", __pyx_getprop_6gevent_5libev_8corecext_4loop_default, 0, (char *)0, 0},
  21219. {(char *)"iteration", __pyx_getprop_6gevent_5libev_8corecext_4loop_iteration, 0, (char *)0, 0},
  21220. {(char *)"depth", __pyx_getprop_6gevent_5libev_8corecext_4loop_depth, 0, (char *)0, 0},
  21221. {(char *)"backend_int", __pyx_getprop_6gevent_5libev_8corecext_4loop_backend_int, 0, (char *)0, 0},
  21222. {(char *)"backend", __pyx_getprop_6gevent_5libev_8corecext_4loop_backend, 0, (char *)0, 0},
  21223. {(char *)"pendingcnt", __pyx_getprop_6gevent_5libev_8corecext_4loop_pendingcnt, 0, (char *)0, 0},
  21224. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21225. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21226. {(char *)"activecnt", __pyx_getprop_6gevent_5libev_8corecext_4loop_activecnt, 0, (char *)0, 0},
  21227. {(char *)"sig_pending", __pyx_getprop_6gevent_5libev_8corecext_4loop_sig_pending, 0, (char *)0, 0},
  21228. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21229. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21230. {(char *)"sigfd", __pyx_getprop_6gevent_5libev_8corecext_4loop_sigfd, 0, (char *)0, 0},
  21231. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21232. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21233. {(char *)"origflags", __pyx_getprop_6gevent_5libev_8corecext_4loop_origflags, 0, (char *)0, 0},
  21234. {(char *)"origflags_int", __pyx_getprop_6gevent_5libev_8corecext_4loop_origflags_int, 0, (char *)0, 0},
  21235. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21236. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21237. {(char *)"error_handler", __pyx_getprop_6gevent_5libev_8corecext_4loop_error_handler, __pyx_setprop_6gevent_5libev_8corecext_4loop_error_handler, (char *)0, 0},
  21238. {(char *)"_callbacks", __pyx_getprop_6gevent_5libev_8corecext_4loop__callbacks, __pyx_setprop_6gevent_5libev_8corecext_4loop__callbacks, (char *)0, 0},
  21239. {0, 0, 0, 0, 0}
  21240. };
  21241. DL_EXPORT(PyTypeObject) PyGeventLoop_Type = {
  21242. PyVarObject_HEAD_INIT(0, 0)
  21243. "gevent.libev.corecext.loop", /*tp_name*/
  21244. sizeof(struct PyGeventLoopObject), /*tp_basicsize*/
  21245. 0, /*tp_itemsize*/
  21246. __pyx_tp_dealloc_6gevent_5libev_8corecext_loop, /*tp_dealloc*/
  21247. 0, /*tp_print*/
  21248. 0, /*tp_getattr*/
  21249. 0, /*tp_setattr*/
  21250. #if PY_MAJOR_VERSION < 3
  21251. 0, /*tp_compare*/
  21252. #endif
  21253. #if PY_MAJOR_VERSION >= 3
  21254. 0, /*tp_as_async*/
  21255. #endif
  21256. __pyx_pw_6gevent_5libev_8corecext_4loop_31__repr__, /*tp_repr*/
  21257. 0, /*tp_as_number*/
  21258. 0, /*tp_as_sequence*/
  21259. 0, /*tp_as_mapping*/
  21260. 0, /*tp_hash*/
  21261. 0, /*tp_call*/
  21262. 0, /*tp_str*/
  21263. 0, /*tp_getattro*/
  21264. 0, /*tp_setattro*/
  21265. 0, /*tp_as_buffer*/
  21266. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  21267. 0, /*tp_doc*/
  21268. __pyx_tp_traverse_6gevent_5libev_8corecext_loop, /*tp_traverse*/
  21269. __pyx_tp_clear_6gevent_5libev_8corecext_loop, /*tp_clear*/
  21270. 0, /*tp_richcompare*/
  21271. 0, /*tp_weaklistoffset*/
  21272. 0, /*tp_iter*/
  21273. 0, /*tp_iternext*/
  21274. __pyx_methods_6gevent_5libev_8corecext_loop, /*tp_methods*/
  21275. 0, /*tp_members*/
  21276. __pyx_getsets_6gevent_5libev_8corecext_loop, /*tp_getset*/
  21277. 0, /*tp_base*/
  21278. 0, /*tp_dict*/
  21279. 0, /*tp_descr_get*/
  21280. 0, /*tp_descr_set*/
  21281. 0, /*tp_dictoffset*/
  21282. __pyx_pw_6gevent_5libev_8corecext_4loop_1__init__, /*tp_init*/
  21283. 0, /*tp_alloc*/
  21284. __pyx_tp_new_6gevent_5libev_8corecext_loop, /*tp_new*/
  21285. 0, /*tp_free*/
  21286. 0, /*tp_is_gc*/
  21287. 0, /*tp_bases*/
  21288. 0, /*tp_mro*/
  21289. 0, /*tp_cache*/
  21290. 0, /*tp_subclasses*/
  21291. 0, /*tp_weaklist*/
  21292. 0, /*tp_del*/
  21293. 0, /*tp_version_tag*/
  21294. #if PY_VERSION_HEX >= 0x030400a1
  21295. 0, /*tp_finalize*/
  21296. #endif
  21297. };
  21298. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_callback(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  21299. struct PyGeventCallbackObject *p;
  21300. PyObject *o;
  21301. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  21302. o = (*t->tp_alloc)(t, 0);
  21303. } else {
  21304. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  21305. }
  21306. if (unlikely(!o)) return 0;
  21307. p = ((struct PyGeventCallbackObject *)o);
  21308. p->callback = Py_None; Py_INCREF(Py_None);
  21309. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21310. return o;
  21311. }
  21312. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_callback(PyObject *o) {
  21313. struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  21314. #if PY_VERSION_HEX >= 0x030400a1
  21315. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  21316. if (PyObject_CallFinalizerFromDealloc(o)) return;
  21317. }
  21318. #endif
  21319. PyObject_GC_UnTrack(o);
  21320. Py_CLEAR(p->callback);
  21321. Py_CLEAR(p->args);
  21322. (*Py_TYPE(o)->tp_free)(o);
  21323. }
  21324. static int __pyx_tp_traverse_6gevent_5libev_8corecext_callback(PyObject *o, visitproc v, void *a) {
  21325. int e;
  21326. struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  21327. if (p->callback) {
  21328. e = (*v)(p->callback, a); if (e) return e;
  21329. }
  21330. if (p->args) {
  21331. e = (*v)(p->args, a); if (e) return e;
  21332. }
  21333. return 0;
  21334. }
  21335. static int __pyx_tp_clear_6gevent_5libev_8corecext_callback(PyObject *o) {
  21336. PyObject* tmp;
  21337. struct PyGeventCallbackObject *p = (struct PyGeventCallbackObject *)o;
  21338. tmp = ((PyObject*)p->callback);
  21339. p->callback = Py_None; Py_INCREF(Py_None);
  21340. Py_XDECREF(tmp);
  21341. tmp = ((PyObject*)p->args);
  21342. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21343. Py_XDECREF(tmp);
  21344. return 0;
  21345. }
  21346. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_pending(PyObject *o, CYTHON_UNUSED void *x) {
  21347. return __pyx_pw_6gevent_5libev_8corecext_8callback_7pending_1__get__(o);
  21348. }
  21349. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_callback(PyObject *o, CYTHON_UNUSED void *x) {
  21350. return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_1__get__(o);
  21351. }
  21352. static int __pyx_setprop_6gevent_5libev_8corecext_8callback_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21353. if (v) {
  21354. return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_3__set__(o, v);
  21355. }
  21356. else {
  21357. return __pyx_pw_6gevent_5libev_8corecext_8callback_8callback_5__del__(o);
  21358. }
  21359. }
  21360. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_8callback_args(PyObject *o, CYTHON_UNUSED void *x) {
  21361. return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_1__get__(o);
  21362. }
  21363. static int __pyx_setprop_6gevent_5libev_8corecext_8callback_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21364. if (v) {
  21365. return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_3__set__(o, v);
  21366. }
  21367. else {
  21368. return __pyx_pw_6gevent_5libev_8corecext_8callback_4args_5__del__(o);
  21369. }
  21370. }
  21371. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_callback[] = {
  21372. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_3stop, METH_NOARGS, 0},
  21373. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_8callback_9_format, METH_NOARGS, 0},
  21374. {0, 0, 0, 0}
  21375. };
  21376. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_callback[] = {
  21377. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_8callback_pending, 0, (char *)0, 0},
  21378. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_8callback_callback, __pyx_setprop_6gevent_5libev_8corecext_8callback_callback, (char *)0, 0},
  21379. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_8callback_args, __pyx_setprop_6gevent_5libev_8corecext_8callback_args, (char *)0, 0},
  21380. {0, 0, 0, 0, 0}
  21381. };
  21382. static PyNumberMethods __pyx_tp_as_number_callback = {
  21383. 0, /*nb_add*/
  21384. 0, /*nb_subtract*/
  21385. 0, /*nb_multiply*/
  21386. #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
  21387. 0, /*nb_divide*/
  21388. #endif
  21389. 0, /*nb_remainder*/
  21390. 0, /*nb_divmod*/
  21391. 0, /*nb_power*/
  21392. 0, /*nb_negative*/
  21393. 0, /*nb_positive*/
  21394. 0, /*nb_absolute*/
  21395. __pyx_pw_6gevent_5libev_8corecext_8callback_5__nonzero__, /*nb_nonzero*/
  21396. 0, /*nb_invert*/
  21397. 0, /*nb_lshift*/
  21398. 0, /*nb_rshift*/
  21399. 0, /*nb_and*/
  21400. 0, /*nb_xor*/
  21401. 0, /*nb_or*/
  21402. #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
  21403. 0, /*nb_coerce*/
  21404. #endif
  21405. 0, /*nb_int*/
  21406. #if PY_MAJOR_VERSION < 3
  21407. 0, /*nb_long*/
  21408. #else
  21409. 0, /*reserved*/
  21410. #endif
  21411. 0, /*nb_float*/
  21412. #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
  21413. 0, /*nb_oct*/
  21414. #endif
  21415. #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
  21416. 0, /*nb_hex*/
  21417. #endif
  21418. 0, /*nb_inplace_add*/
  21419. 0, /*nb_inplace_subtract*/
  21420. 0, /*nb_inplace_multiply*/
  21421. #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
  21422. 0, /*nb_inplace_divide*/
  21423. #endif
  21424. 0, /*nb_inplace_remainder*/
  21425. 0, /*nb_inplace_power*/
  21426. 0, /*nb_inplace_lshift*/
  21427. 0, /*nb_inplace_rshift*/
  21428. 0, /*nb_inplace_and*/
  21429. 0, /*nb_inplace_xor*/
  21430. 0, /*nb_inplace_or*/
  21431. 0, /*nb_floor_divide*/
  21432. 0, /*nb_true_divide*/
  21433. 0, /*nb_inplace_floor_divide*/
  21434. 0, /*nb_inplace_true_divide*/
  21435. 0, /*nb_index*/
  21436. #if PY_VERSION_HEX >= 0x03050000
  21437. 0, /*nb_matrix_multiply*/
  21438. #endif
  21439. #if PY_VERSION_HEX >= 0x03050000
  21440. 0, /*nb_inplace_matrix_multiply*/
  21441. #endif
  21442. };
  21443. DL_EXPORT(PyTypeObject) PyGeventCallback_Type = {
  21444. PyVarObject_HEAD_INIT(0, 0)
  21445. "gevent.libev.corecext.callback", /*tp_name*/
  21446. sizeof(struct PyGeventCallbackObject), /*tp_basicsize*/
  21447. 0, /*tp_itemsize*/
  21448. __pyx_tp_dealloc_6gevent_5libev_8corecext_callback, /*tp_dealloc*/
  21449. 0, /*tp_print*/
  21450. 0, /*tp_getattr*/
  21451. 0, /*tp_setattr*/
  21452. #if PY_MAJOR_VERSION < 3
  21453. 0, /*tp_compare*/
  21454. #endif
  21455. #if PY_MAJOR_VERSION >= 3
  21456. 0, /*tp_as_async*/
  21457. #endif
  21458. __pyx_pw_6gevent_5libev_8corecext_8callback_7__repr__, /*tp_repr*/
  21459. &__pyx_tp_as_number_callback, /*tp_as_number*/
  21460. 0, /*tp_as_sequence*/
  21461. 0, /*tp_as_mapping*/
  21462. 0, /*tp_hash*/
  21463. 0, /*tp_call*/
  21464. 0, /*tp_str*/
  21465. 0, /*tp_getattro*/
  21466. 0, /*tp_setattro*/
  21467. 0, /*tp_as_buffer*/
  21468. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  21469. 0, /*tp_doc*/
  21470. __pyx_tp_traverse_6gevent_5libev_8corecext_callback, /*tp_traverse*/
  21471. __pyx_tp_clear_6gevent_5libev_8corecext_callback, /*tp_clear*/
  21472. 0, /*tp_richcompare*/
  21473. 0, /*tp_weaklistoffset*/
  21474. 0, /*tp_iter*/
  21475. 0, /*tp_iternext*/
  21476. __pyx_methods_6gevent_5libev_8corecext_callback, /*tp_methods*/
  21477. 0, /*tp_members*/
  21478. __pyx_getsets_6gevent_5libev_8corecext_callback, /*tp_getset*/
  21479. 0, /*tp_base*/
  21480. 0, /*tp_dict*/
  21481. 0, /*tp_descr_get*/
  21482. 0, /*tp_descr_set*/
  21483. 0, /*tp_dictoffset*/
  21484. __pyx_pw_6gevent_5libev_8corecext_8callback_1__init__, /*tp_init*/
  21485. 0, /*tp_alloc*/
  21486. __pyx_tp_new_6gevent_5libev_8corecext_callback, /*tp_new*/
  21487. 0, /*tp_free*/
  21488. 0, /*tp_is_gc*/
  21489. 0, /*tp_bases*/
  21490. 0, /*tp_mro*/
  21491. 0, /*tp_cache*/
  21492. 0, /*tp_subclasses*/
  21493. 0, /*tp_weaklist*/
  21494. 0, /*tp_del*/
  21495. 0, /*tp_version_tag*/
  21496. #if PY_VERSION_HEX >= 0x030400a1
  21497. 0, /*tp_finalize*/
  21498. #endif
  21499. };
  21500. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_watcher(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  21501. PyObject *o;
  21502. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  21503. o = (*t->tp_alloc)(t, 0);
  21504. } else {
  21505. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  21506. }
  21507. if (unlikely(!o)) return 0;
  21508. return o;
  21509. }
  21510. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(PyObject *o) {
  21511. #if PY_VERSION_HEX >= 0x030400a1
  21512. if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
  21513. if (PyObject_CallFinalizerFromDealloc(o)) return;
  21514. }
  21515. #endif
  21516. (*Py_TYPE(o)->tp_free)(o);
  21517. }
  21518. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_watcher[] = {
  21519. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7watcher_3_format, METH_NOARGS, 0},
  21520. {0, 0, 0, 0}
  21521. };
  21522. DL_EXPORT(PyTypeObject) PyGeventWatcher_Type = {
  21523. PyVarObject_HEAD_INIT(0, 0)
  21524. "gevent.libev.corecext.watcher", /*tp_name*/
  21525. sizeof(struct PyGeventWatcherObject), /*tp_basicsize*/
  21526. 0, /*tp_itemsize*/
  21527. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher, /*tp_dealloc*/
  21528. 0, /*tp_print*/
  21529. 0, /*tp_getattr*/
  21530. 0, /*tp_setattr*/
  21531. #if PY_MAJOR_VERSION < 3
  21532. 0, /*tp_compare*/
  21533. #endif
  21534. #if PY_MAJOR_VERSION >= 3
  21535. 0, /*tp_as_async*/
  21536. #endif
  21537. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  21538. 0, /*tp_as_number*/
  21539. 0, /*tp_as_sequence*/
  21540. 0, /*tp_as_mapping*/
  21541. 0, /*tp_hash*/
  21542. 0, /*tp_call*/
  21543. 0, /*tp_str*/
  21544. 0, /*tp_getattro*/
  21545. 0, /*tp_setattro*/
  21546. 0, /*tp_as_buffer*/
  21547. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  21548. "Abstract base class for all the watchers", /*tp_doc*/
  21549. 0, /*tp_traverse*/
  21550. 0, /*tp_clear*/
  21551. 0, /*tp_richcompare*/
  21552. 0, /*tp_weaklistoffset*/
  21553. 0, /*tp_iter*/
  21554. 0, /*tp_iternext*/
  21555. __pyx_methods_6gevent_5libev_8corecext_watcher, /*tp_methods*/
  21556. 0, /*tp_members*/
  21557. 0, /*tp_getset*/
  21558. 0, /*tp_base*/
  21559. 0, /*tp_dict*/
  21560. 0, /*tp_descr_get*/
  21561. 0, /*tp_descr_set*/
  21562. 0, /*tp_dictoffset*/
  21563. 0, /*tp_init*/
  21564. 0, /*tp_alloc*/
  21565. __pyx_tp_new_6gevent_5libev_8corecext_watcher, /*tp_new*/
  21566. 0, /*tp_free*/
  21567. 0, /*tp_is_gc*/
  21568. 0, /*tp_bases*/
  21569. 0, /*tp_mro*/
  21570. 0, /*tp_cache*/
  21571. 0, /*tp_subclasses*/
  21572. 0, /*tp_weaklist*/
  21573. 0, /*tp_del*/
  21574. 0, /*tp_version_tag*/
  21575. #if PY_VERSION_HEX >= 0x030400a1
  21576. 0, /*tp_finalize*/
  21577. #endif
  21578. };
  21579. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_io(PyTypeObject *t, PyObject *a, PyObject *k) {
  21580. struct PyGeventIOObject *p;
  21581. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  21582. if (unlikely(!o)) return 0;
  21583. p = ((struct PyGeventIOObject *)o);
  21584. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  21585. p->_callback = Py_None; Py_INCREF(Py_None);
  21586. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21587. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21588. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21589. if (unlikely(__pyx_pw_6gevent_5libev_8corecext_2io_11__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  21590. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21591. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21592. return o;
  21593. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21594. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21595. bad:
  21596. Py_DECREF(o); o = 0;
  21597. return NULL;
  21598. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21599. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21600. }
  21601. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_io(PyObject *o) {
  21602. struct PyGeventIOObject *p = (struct PyGeventIOObject *)o;
  21603. #if PY_VERSION_HEX >= 0x030400a1
  21604. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  21605. if (PyObject_CallFinalizerFromDealloc(o)) return;
  21606. }
  21607. #endif
  21608. PyObject_GC_UnTrack(o);
  21609. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  21610. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  21611. {
  21612. PyObject *etype, *eval, *etb;
  21613. PyErr_Fetch(&etype, &eval, &etb);
  21614. ++Py_REFCNT(o);
  21615. __pyx_pw_6gevent_5libev_8corecext_2io_13__dealloc__(o);
  21616. --Py_REFCNT(o);
  21617. PyErr_Restore(etype, eval, etb);
  21618. }
  21619. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  21620. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  21621. Py_CLEAR(p->loop);
  21622. Py_CLEAR(p->_callback);
  21623. Py_CLEAR(p->args);
  21624. #if CYTHON_USE_TYPE_SLOTS
  21625. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  21626. #endif
  21627. PyObject_GC_Track(o);
  21628. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  21629. }
  21630. static int __pyx_tp_traverse_6gevent_5libev_8corecext_io(PyObject *o, visitproc v, void *a) {
  21631. int e;
  21632. struct PyGeventIOObject *p = (struct PyGeventIOObject *)o;
  21633. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_io)); if (e) return e;
  21634. if (p->loop) {
  21635. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  21636. }
  21637. if (p->_callback) {
  21638. e = (*v)(p->_callback, a); if (e) return e;
  21639. }
  21640. if (p->args) {
  21641. e = (*v)(p->args, a); if (e) return e;
  21642. }
  21643. return 0;
  21644. }
  21645. static int __pyx_tp_clear_6gevent_5libev_8corecext_io(PyObject *o) {
  21646. PyObject* tmp;
  21647. struct PyGeventIOObject *p = (struct PyGeventIOObject *)o;
  21648. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_io);
  21649. tmp = ((PyObject*)p->loop);
  21650. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  21651. Py_XDECREF(tmp);
  21652. tmp = ((PyObject*)p->_callback);
  21653. p->_callback = Py_None; Py_INCREF(Py_None);
  21654. Py_XDECREF(tmp);
  21655. tmp = ((PyObject*)p->args);
  21656. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21657. Py_XDECREF(tmp);
  21658. return 0;
  21659. }
  21660. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_ref(PyObject *o, CYTHON_UNUSED void *x) {
  21661. return __pyx_pw_6gevent_5libev_8corecext_2io_3ref_1__get__(o);
  21662. }
  21663. static int __pyx_setprop_6gevent_5libev_8corecext_2io_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21664. if (v) {
  21665. return __pyx_pw_6gevent_5libev_8corecext_2io_3ref_3__set__(o, v);
  21666. }
  21667. else {
  21668. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21669. return -1;
  21670. }
  21671. }
  21672. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_callback(PyObject *o, CYTHON_UNUSED void *x) {
  21673. return __pyx_pw_6gevent_5libev_8corecext_2io_8callback_1__get__(o);
  21674. }
  21675. static int __pyx_setprop_6gevent_5libev_8corecext_2io_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21676. if (v) {
  21677. return __pyx_pw_6gevent_5libev_8corecext_2io_8callback_3__set__(o, v);
  21678. }
  21679. else {
  21680. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21681. return -1;
  21682. }
  21683. }
  21684. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_priority(PyObject *o, CYTHON_UNUSED void *x) {
  21685. return __pyx_pw_6gevent_5libev_8corecext_2io_8priority_1__get__(o);
  21686. }
  21687. static int __pyx_setprop_6gevent_5libev_8corecext_2io_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21688. if (v) {
  21689. return __pyx_pw_6gevent_5libev_8corecext_2io_8priority_3__set__(o, v);
  21690. }
  21691. else {
  21692. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21693. return -1;
  21694. }
  21695. }
  21696. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_active(PyObject *o, CYTHON_UNUSED void *x) {
  21697. return __pyx_pw_6gevent_5libev_8corecext_2io_6active_1__get__(o);
  21698. }
  21699. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_pending(PyObject *o, CYTHON_UNUSED void *x) {
  21700. return __pyx_pw_6gevent_5libev_8corecext_2io_7pending_1__get__(o);
  21701. }
  21702. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_fd(PyObject *o, CYTHON_UNUSED void *x) {
  21703. return __pyx_pw_6gevent_5libev_8corecext_2io_2fd_1__get__(o);
  21704. }
  21705. static int __pyx_setprop_6gevent_5libev_8corecext_2io_fd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21706. if (v) {
  21707. return __pyx_pw_6gevent_5libev_8corecext_2io_2fd_3__set__(o, v);
  21708. }
  21709. else {
  21710. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21711. return -1;
  21712. }
  21713. }
  21714. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_events(PyObject *o, CYTHON_UNUSED void *x) {
  21715. return __pyx_pw_6gevent_5libev_8corecext_2io_6events_1__get__(o);
  21716. }
  21717. static int __pyx_setprop_6gevent_5libev_8corecext_2io_events(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21718. if (v) {
  21719. return __pyx_pw_6gevent_5libev_8corecext_2io_6events_3__set__(o, v);
  21720. }
  21721. else {
  21722. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21723. return -1;
  21724. }
  21725. }
  21726. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_events_str(PyObject *o, CYTHON_UNUSED void *x) {
  21727. return __pyx_pw_6gevent_5libev_8corecext_2io_10events_str_1__get__(o);
  21728. }
  21729. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_loop(PyObject *o, CYTHON_UNUSED void *x) {
  21730. return __pyx_pw_6gevent_5libev_8corecext_2io_4loop_1__get__(o);
  21731. }
  21732. static int __pyx_setprop_6gevent_5libev_8corecext_2io_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21733. if (v) {
  21734. return __pyx_pw_6gevent_5libev_8corecext_2io_4loop_3__set__(o, v);
  21735. }
  21736. else {
  21737. return __pyx_pw_6gevent_5libev_8corecext_2io_4loop_5__del__(o);
  21738. }
  21739. }
  21740. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io_args(PyObject *o, CYTHON_UNUSED void *x) {
  21741. return __pyx_pw_6gevent_5libev_8corecext_2io_4args_1__get__(o);
  21742. }
  21743. static int __pyx_setprop_6gevent_5libev_8corecext_2io_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21744. if (v) {
  21745. return __pyx_pw_6gevent_5libev_8corecext_2io_4args_3__set__(o, v);
  21746. }
  21747. else {
  21748. return __pyx_pw_6gevent_5libev_8corecext_2io_4args_5__del__(o);
  21749. }
  21750. }
  21751. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_2io__flags(PyObject *o, CYTHON_UNUSED void *x) {
  21752. return __pyx_pw_6gevent_5libev_8corecext_2io_6_flags_1__get__(o);
  21753. }
  21754. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_io[] = {
  21755. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_1stop, METH_NOARGS, 0},
  21756. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  21757. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_5start, METH_VARARGS|METH_KEYWORDS, 0},
  21758. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_2io_9_format, METH_NOARGS, 0},
  21759. {0, 0, 0, 0}
  21760. };
  21761. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_io[] = {
  21762. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_2io_ref, __pyx_setprop_6gevent_5libev_8corecext_2io_ref, (char *)0, 0},
  21763. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_2io_callback, __pyx_setprop_6gevent_5libev_8corecext_2io_callback, (char *)0, 0},
  21764. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_2io_priority, __pyx_setprop_6gevent_5libev_8corecext_2io_priority, (char *)0, 0},
  21765. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_2io_active, 0, (char *)0, 0},
  21766. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_2io_pending, 0, (char *)0, 0},
  21767. {(char *)"fd", __pyx_getprop_6gevent_5libev_8corecext_2io_fd, __pyx_setprop_6gevent_5libev_8corecext_2io_fd, (char *)0, 0},
  21768. {(char *)"events", __pyx_getprop_6gevent_5libev_8corecext_2io_events, __pyx_setprop_6gevent_5libev_8corecext_2io_events, (char *)0, 0},
  21769. {(char *)"events_str", __pyx_getprop_6gevent_5libev_8corecext_2io_events_str, 0, (char *)0, 0},
  21770. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_2io_loop, __pyx_setprop_6gevent_5libev_8corecext_2io_loop, (char *)0, 0},
  21771. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_2io_args, __pyx_setprop_6gevent_5libev_8corecext_2io_args, (char *)0, 0},
  21772. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_2io__flags, 0, (char *)0, 0},
  21773. {0, 0, 0, 0, 0}
  21774. };
  21775. DL_EXPORT(PyTypeObject) PyGeventIO_Type = {
  21776. PyVarObject_HEAD_INIT(0, 0)
  21777. "gevent.libev.corecext.io", /*tp_name*/
  21778. sizeof(struct PyGeventIOObject), /*tp_basicsize*/
  21779. 0, /*tp_itemsize*/
  21780. __pyx_tp_dealloc_6gevent_5libev_8corecext_io, /*tp_dealloc*/
  21781. 0, /*tp_print*/
  21782. 0, /*tp_getattr*/
  21783. 0, /*tp_setattr*/
  21784. #if PY_MAJOR_VERSION < 3
  21785. 0, /*tp_compare*/
  21786. #endif
  21787. #if PY_MAJOR_VERSION >= 3
  21788. 0, /*tp_as_async*/
  21789. #endif
  21790. #if CYTHON_COMPILING_IN_PYPY
  21791. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  21792. #else
  21793. 0, /*tp_repr*/
  21794. #endif
  21795. 0, /*tp_as_number*/
  21796. 0, /*tp_as_sequence*/
  21797. 0, /*tp_as_mapping*/
  21798. 0, /*tp_hash*/
  21799. 0, /*tp_call*/
  21800. 0, /*tp_str*/
  21801. 0, /*tp_getattro*/
  21802. 0, /*tp_setattro*/
  21803. 0, /*tp_as_buffer*/
  21804. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  21805. 0, /*tp_doc*/
  21806. __pyx_tp_traverse_6gevent_5libev_8corecext_io, /*tp_traverse*/
  21807. __pyx_tp_clear_6gevent_5libev_8corecext_io, /*tp_clear*/
  21808. 0, /*tp_richcompare*/
  21809. 0, /*tp_weaklistoffset*/
  21810. 0, /*tp_iter*/
  21811. 0, /*tp_iternext*/
  21812. __pyx_methods_6gevent_5libev_8corecext_io, /*tp_methods*/
  21813. 0, /*tp_members*/
  21814. __pyx_getsets_6gevent_5libev_8corecext_io, /*tp_getset*/
  21815. 0, /*tp_base*/
  21816. 0, /*tp_dict*/
  21817. 0, /*tp_descr_get*/
  21818. 0, /*tp_descr_set*/
  21819. 0, /*tp_dictoffset*/
  21820. __pyx_pw_6gevent_5libev_8corecext_2io_7__init__, /*tp_init*/
  21821. 0, /*tp_alloc*/
  21822. __pyx_tp_new_6gevent_5libev_8corecext_io, /*tp_new*/
  21823. 0, /*tp_free*/
  21824. 0, /*tp_is_gc*/
  21825. 0, /*tp_bases*/
  21826. 0, /*tp_mro*/
  21827. 0, /*tp_cache*/
  21828. 0, /*tp_subclasses*/
  21829. 0, /*tp_weaklist*/
  21830. 0, /*tp_del*/
  21831. 0, /*tp_version_tag*/
  21832. #if PY_VERSION_HEX >= 0x030400a1
  21833. 0, /*tp_finalize*/
  21834. #endif
  21835. };
  21836. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_timer(PyTypeObject *t, PyObject *a, PyObject *k) {
  21837. struct PyGeventTimerObject *p;
  21838. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  21839. if (unlikely(!o)) return 0;
  21840. p = ((struct PyGeventTimerObject *)o);
  21841. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  21842. p->_callback = Py_None; Py_INCREF(Py_None);
  21843. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21844. return o;
  21845. }
  21846. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_timer(PyObject *o) {
  21847. struct PyGeventTimerObject *p = (struct PyGeventTimerObject *)o;
  21848. #if PY_VERSION_HEX >= 0x030400a1
  21849. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  21850. if (PyObject_CallFinalizerFromDealloc(o)) return;
  21851. }
  21852. #endif
  21853. PyObject_GC_UnTrack(o);
  21854. Py_CLEAR(p->loop);
  21855. Py_CLEAR(p->_callback);
  21856. Py_CLEAR(p->args);
  21857. #if CYTHON_USE_TYPE_SLOTS
  21858. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  21859. #endif
  21860. PyObject_GC_Track(o);
  21861. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  21862. }
  21863. static int __pyx_tp_traverse_6gevent_5libev_8corecext_timer(PyObject *o, visitproc v, void *a) {
  21864. int e;
  21865. struct PyGeventTimerObject *p = (struct PyGeventTimerObject *)o;
  21866. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_timer)); if (e) return e;
  21867. if (p->loop) {
  21868. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  21869. }
  21870. if (p->_callback) {
  21871. e = (*v)(p->_callback, a); if (e) return e;
  21872. }
  21873. if (p->args) {
  21874. e = (*v)(p->args, a); if (e) return e;
  21875. }
  21876. return 0;
  21877. }
  21878. static int __pyx_tp_clear_6gevent_5libev_8corecext_timer(PyObject *o) {
  21879. PyObject* tmp;
  21880. struct PyGeventTimerObject *p = (struct PyGeventTimerObject *)o;
  21881. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_timer);
  21882. tmp = ((PyObject*)p->loop);
  21883. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  21884. Py_XDECREF(tmp);
  21885. tmp = ((PyObject*)p->_callback);
  21886. p->_callback = Py_None; Py_INCREF(Py_None);
  21887. Py_XDECREF(tmp);
  21888. tmp = ((PyObject*)p->args);
  21889. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  21890. Py_XDECREF(tmp);
  21891. return 0;
  21892. }
  21893. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_ref(PyObject *o, CYTHON_UNUSED void *x) {
  21894. return __pyx_pw_6gevent_5libev_8corecext_5timer_3ref_1__get__(o);
  21895. }
  21896. static int __pyx_setprop_6gevent_5libev_8corecext_5timer_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21897. if (v) {
  21898. return __pyx_pw_6gevent_5libev_8corecext_5timer_3ref_3__set__(o, v);
  21899. }
  21900. else {
  21901. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21902. return -1;
  21903. }
  21904. }
  21905. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_callback(PyObject *o, CYTHON_UNUSED void *x) {
  21906. return __pyx_pw_6gevent_5libev_8corecext_5timer_8callback_1__get__(o);
  21907. }
  21908. static int __pyx_setprop_6gevent_5libev_8corecext_5timer_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21909. if (v) {
  21910. return __pyx_pw_6gevent_5libev_8corecext_5timer_8callback_3__set__(o, v);
  21911. }
  21912. else {
  21913. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21914. return -1;
  21915. }
  21916. }
  21917. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_priority(PyObject *o, CYTHON_UNUSED void *x) {
  21918. return __pyx_pw_6gevent_5libev_8corecext_5timer_8priority_1__get__(o);
  21919. }
  21920. static int __pyx_setprop_6gevent_5libev_8corecext_5timer_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21921. if (v) {
  21922. return __pyx_pw_6gevent_5libev_8corecext_5timer_8priority_3__set__(o, v);
  21923. }
  21924. else {
  21925. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  21926. return -1;
  21927. }
  21928. }
  21929. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_active(PyObject *o, CYTHON_UNUSED void *x) {
  21930. return __pyx_pw_6gevent_5libev_8corecext_5timer_6active_1__get__(o);
  21931. }
  21932. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_pending(PyObject *o, CYTHON_UNUSED void *x) {
  21933. return __pyx_pw_6gevent_5libev_8corecext_5timer_7pending_1__get__(o);
  21934. }
  21935. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_at(PyObject *o, CYTHON_UNUSED void *x) {
  21936. return __pyx_pw_6gevent_5libev_8corecext_5timer_2at_1__get__(o);
  21937. }
  21938. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_loop(PyObject *o, CYTHON_UNUSED void *x) {
  21939. return __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_1__get__(o);
  21940. }
  21941. static int __pyx_setprop_6gevent_5libev_8corecext_5timer_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21942. if (v) {
  21943. return __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_3__set__(o, v);
  21944. }
  21945. else {
  21946. return __pyx_pw_6gevent_5libev_8corecext_5timer_4loop_5__del__(o);
  21947. }
  21948. }
  21949. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer_args(PyObject *o, CYTHON_UNUSED void *x) {
  21950. return __pyx_pw_6gevent_5libev_8corecext_5timer_4args_1__get__(o);
  21951. }
  21952. static int __pyx_setprop_6gevent_5libev_8corecext_5timer_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  21953. if (v) {
  21954. return __pyx_pw_6gevent_5libev_8corecext_5timer_4args_3__set__(o, v);
  21955. }
  21956. else {
  21957. return __pyx_pw_6gevent_5libev_8corecext_5timer_4args_5__del__(o);
  21958. }
  21959. }
  21960. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5timer__flags(PyObject *o, CYTHON_UNUSED void *x) {
  21961. return __pyx_pw_6gevent_5libev_8corecext_5timer_6_flags_1__get__(o);
  21962. }
  21963. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_timer[] = {
  21964. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5timer_1stop, METH_NOARGS, 0},
  21965. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5timer_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  21966. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5timer_5start, METH_VARARGS|METH_KEYWORDS, 0},
  21967. {"again", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5timer_9again, METH_VARARGS|METH_KEYWORDS, 0},
  21968. {0, 0, 0, 0}
  21969. };
  21970. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_timer[] = {
  21971. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_5timer_ref, __pyx_setprop_6gevent_5libev_8corecext_5timer_ref, (char *)0, 0},
  21972. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_5timer_callback, __pyx_setprop_6gevent_5libev_8corecext_5timer_callback, (char *)0, 0},
  21973. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_5timer_priority, __pyx_setprop_6gevent_5libev_8corecext_5timer_priority, (char *)0, 0},
  21974. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_5timer_active, 0, (char *)0, 0},
  21975. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_5timer_pending, 0, (char *)0, 0},
  21976. {(char *)"at", __pyx_getprop_6gevent_5libev_8corecext_5timer_at, 0, (char *)0, 0},
  21977. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_5timer_loop, __pyx_setprop_6gevent_5libev_8corecext_5timer_loop, (char *)0, 0},
  21978. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_5timer_args, __pyx_setprop_6gevent_5libev_8corecext_5timer_args, (char *)0, 0},
  21979. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_5timer__flags, 0, (char *)0, 0},
  21980. {0, 0, 0, 0, 0}
  21981. };
  21982. DL_EXPORT(PyTypeObject) PyGeventTimer_Type = {
  21983. PyVarObject_HEAD_INIT(0, 0)
  21984. "gevent.libev.corecext.timer", /*tp_name*/
  21985. sizeof(struct PyGeventTimerObject), /*tp_basicsize*/
  21986. 0, /*tp_itemsize*/
  21987. __pyx_tp_dealloc_6gevent_5libev_8corecext_timer, /*tp_dealloc*/
  21988. 0, /*tp_print*/
  21989. 0, /*tp_getattr*/
  21990. 0, /*tp_setattr*/
  21991. #if PY_MAJOR_VERSION < 3
  21992. 0, /*tp_compare*/
  21993. #endif
  21994. #if PY_MAJOR_VERSION >= 3
  21995. 0, /*tp_as_async*/
  21996. #endif
  21997. #if CYTHON_COMPILING_IN_PYPY
  21998. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  21999. #else
  22000. 0, /*tp_repr*/
  22001. #endif
  22002. 0, /*tp_as_number*/
  22003. 0, /*tp_as_sequence*/
  22004. 0, /*tp_as_mapping*/
  22005. 0, /*tp_hash*/
  22006. 0, /*tp_call*/
  22007. 0, /*tp_str*/
  22008. 0, /*tp_getattro*/
  22009. 0, /*tp_setattro*/
  22010. 0, /*tp_as_buffer*/
  22011. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  22012. 0, /*tp_doc*/
  22013. __pyx_tp_traverse_6gevent_5libev_8corecext_timer, /*tp_traverse*/
  22014. __pyx_tp_clear_6gevent_5libev_8corecext_timer, /*tp_clear*/
  22015. 0, /*tp_richcompare*/
  22016. 0, /*tp_weaklistoffset*/
  22017. 0, /*tp_iter*/
  22018. 0, /*tp_iternext*/
  22019. __pyx_methods_6gevent_5libev_8corecext_timer, /*tp_methods*/
  22020. 0, /*tp_members*/
  22021. __pyx_getsets_6gevent_5libev_8corecext_timer, /*tp_getset*/
  22022. 0, /*tp_base*/
  22023. 0, /*tp_dict*/
  22024. 0, /*tp_descr_get*/
  22025. 0, /*tp_descr_set*/
  22026. 0, /*tp_dictoffset*/
  22027. __pyx_pw_6gevent_5libev_8corecext_5timer_7__init__, /*tp_init*/
  22028. 0, /*tp_alloc*/
  22029. __pyx_tp_new_6gevent_5libev_8corecext_timer, /*tp_new*/
  22030. 0, /*tp_free*/
  22031. 0, /*tp_is_gc*/
  22032. 0, /*tp_bases*/
  22033. 0, /*tp_mro*/
  22034. 0, /*tp_cache*/
  22035. 0, /*tp_subclasses*/
  22036. 0, /*tp_weaklist*/
  22037. 0, /*tp_del*/
  22038. 0, /*tp_version_tag*/
  22039. #if PY_VERSION_HEX >= 0x030400a1
  22040. 0, /*tp_finalize*/
  22041. #endif
  22042. };
  22043. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_signal(PyTypeObject *t, PyObject *a, PyObject *k) {
  22044. struct PyGeventSignalObject *p;
  22045. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  22046. if (unlikely(!o)) return 0;
  22047. p = ((struct PyGeventSignalObject *)o);
  22048. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22049. p->_callback = Py_None; Py_INCREF(Py_None);
  22050. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22051. return o;
  22052. }
  22053. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_signal(PyObject *o) {
  22054. struct PyGeventSignalObject *p = (struct PyGeventSignalObject *)o;
  22055. #if PY_VERSION_HEX >= 0x030400a1
  22056. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  22057. if (PyObject_CallFinalizerFromDealloc(o)) return;
  22058. }
  22059. #endif
  22060. PyObject_GC_UnTrack(o);
  22061. Py_CLEAR(p->loop);
  22062. Py_CLEAR(p->_callback);
  22063. Py_CLEAR(p->args);
  22064. #if CYTHON_USE_TYPE_SLOTS
  22065. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  22066. #endif
  22067. PyObject_GC_Track(o);
  22068. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  22069. }
  22070. static int __pyx_tp_traverse_6gevent_5libev_8corecext_signal(PyObject *o, visitproc v, void *a) {
  22071. int e;
  22072. struct PyGeventSignalObject *p = (struct PyGeventSignalObject *)o;
  22073. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_signal)); if (e) return e;
  22074. if (p->loop) {
  22075. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  22076. }
  22077. if (p->_callback) {
  22078. e = (*v)(p->_callback, a); if (e) return e;
  22079. }
  22080. if (p->args) {
  22081. e = (*v)(p->args, a); if (e) return e;
  22082. }
  22083. return 0;
  22084. }
  22085. static int __pyx_tp_clear_6gevent_5libev_8corecext_signal(PyObject *o) {
  22086. PyObject* tmp;
  22087. struct PyGeventSignalObject *p = (struct PyGeventSignalObject *)o;
  22088. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_signal);
  22089. tmp = ((PyObject*)p->loop);
  22090. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22091. Py_XDECREF(tmp);
  22092. tmp = ((PyObject*)p->_callback);
  22093. p->_callback = Py_None; Py_INCREF(Py_None);
  22094. Py_XDECREF(tmp);
  22095. tmp = ((PyObject*)p->args);
  22096. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22097. Py_XDECREF(tmp);
  22098. return 0;
  22099. }
  22100. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_ref(PyObject *o, CYTHON_UNUSED void *x) {
  22101. return __pyx_pw_6gevent_5libev_8corecext_6signal_3ref_1__get__(o);
  22102. }
  22103. static int __pyx_setprop_6gevent_5libev_8corecext_6signal_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22104. if (v) {
  22105. return __pyx_pw_6gevent_5libev_8corecext_6signal_3ref_3__set__(o, v);
  22106. }
  22107. else {
  22108. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22109. return -1;
  22110. }
  22111. }
  22112. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_callback(PyObject *o, CYTHON_UNUSED void *x) {
  22113. return __pyx_pw_6gevent_5libev_8corecext_6signal_8callback_1__get__(o);
  22114. }
  22115. static int __pyx_setprop_6gevent_5libev_8corecext_6signal_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22116. if (v) {
  22117. return __pyx_pw_6gevent_5libev_8corecext_6signal_8callback_3__set__(o, v);
  22118. }
  22119. else {
  22120. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22121. return -1;
  22122. }
  22123. }
  22124. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_priority(PyObject *o, CYTHON_UNUSED void *x) {
  22125. return __pyx_pw_6gevent_5libev_8corecext_6signal_8priority_1__get__(o);
  22126. }
  22127. static int __pyx_setprop_6gevent_5libev_8corecext_6signal_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22128. if (v) {
  22129. return __pyx_pw_6gevent_5libev_8corecext_6signal_8priority_3__set__(o, v);
  22130. }
  22131. else {
  22132. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22133. return -1;
  22134. }
  22135. }
  22136. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_active(PyObject *o, CYTHON_UNUSED void *x) {
  22137. return __pyx_pw_6gevent_5libev_8corecext_6signal_6active_1__get__(o);
  22138. }
  22139. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_pending(PyObject *o, CYTHON_UNUSED void *x) {
  22140. return __pyx_pw_6gevent_5libev_8corecext_6signal_7pending_1__get__(o);
  22141. }
  22142. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_loop(PyObject *o, CYTHON_UNUSED void *x) {
  22143. return __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_1__get__(o);
  22144. }
  22145. static int __pyx_setprop_6gevent_5libev_8corecext_6signal_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22146. if (v) {
  22147. return __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_3__set__(o, v);
  22148. }
  22149. else {
  22150. return __pyx_pw_6gevent_5libev_8corecext_6signal_4loop_5__del__(o);
  22151. }
  22152. }
  22153. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal_args(PyObject *o, CYTHON_UNUSED void *x) {
  22154. return __pyx_pw_6gevent_5libev_8corecext_6signal_4args_1__get__(o);
  22155. }
  22156. static int __pyx_setprop_6gevent_5libev_8corecext_6signal_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22157. if (v) {
  22158. return __pyx_pw_6gevent_5libev_8corecext_6signal_4args_3__set__(o, v);
  22159. }
  22160. else {
  22161. return __pyx_pw_6gevent_5libev_8corecext_6signal_4args_5__del__(o);
  22162. }
  22163. }
  22164. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_6signal__flags(PyObject *o, CYTHON_UNUSED void *x) {
  22165. return __pyx_pw_6gevent_5libev_8corecext_6signal_6_flags_1__get__(o);
  22166. }
  22167. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_signal[] = {
  22168. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6signal_1stop, METH_NOARGS, 0},
  22169. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6signal_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  22170. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_6signal_5start, METH_VARARGS|METH_KEYWORDS, 0},
  22171. {0, 0, 0, 0}
  22172. };
  22173. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_signal[] = {
  22174. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_6signal_ref, __pyx_setprop_6gevent_5libev_8corecext_6signal_ref, (char *)0, 0},
  22175. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_6signal_callback, __pyx_setprop_6gevent_5libev_8corecext_6signal_callback, (char *)0, 0},
  22176. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_6signal_priority, __pyx_setprop_6gevent_5libev_8corecext_6signal_priority, (char *)0, 0},
  22177. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_6signal_active, 0, (char *)0, 0},
  22178. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_6signal_pending, 0, (char *)0, 0},
  22179. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_6signal_loop, __pyx_setprop_6gevent_5libev_8corecext_6signal_loop, (char *)0, 0},
  22180. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_6signal_args, __pyx_setprop_6gevent_5libev_8corecext_6signal_args, (char *)0, 0},
  22181. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_6signal__flags, 0, (char *)0, 0},
  22182. {0, 0, 0, 0, 0}
  22183. };
  22184. DL_EXPORT(PyTypeObject) PyGeventSignal_Type = {
  22185. PyVarObject_HEAD_INIT(0, 0)
  22186. "gevent.libev.corecext.signal", /*tp_name*/
  22187. sizeof(struct PyGeventSignalObject), /*tp_basicsize*/
  22188. 0, /*tp_itemsize*/
  22189. __pyx_tp_dealloc_6gevent_5libev_8corecext_signal, /*tp_dealloc*/
  22190. 0, /*tp_print*/
  22191. 0, /*tp_getattr*/
  22192. 0, /*tp_setattr*/
  22193. #if PY_MAJOR_VERSION < 3
  22194. 0, /*tp_compare*/
  22195. #endif
  22196. #if PY_MAJOR_VERSION >= 3
  22197. 0, /*tp_as_async*/
  22198. #endif
  22199. #if CYTHON_COMPILING_IN_PYPY
  22200. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  22201. #else
  22202. 0, /*tp_repr*/
  22203. #endif
  22204. 0, /*tp_as_number*/
  22205. 0, /*tp_as_sequence*/
  22206. 0, /*tp_as_mapping*/
  22207. 0, /*tp_hash*/
  22208. 0, /*tp_call*/
  22209. 0, /*tp_str*/
  22210. 0, /*tp_getattro*/
  22211. 0, /*tp_setattro*/
  22212. 0, /*tp_as_buffer*/
  22213. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  22214. 0, /*tp_doc*/
  22215. __pyx_tp_traverse_6gevent_5libev_8corecext_signal, /*tp_traverse*/
  22216. __pyx_tp_clear_6gevent_5libev_8corecext_signal, /*tp_clear*/
  22217. 0, /*tp_richcompare*/
  22218. 0, /*tp_weaklistoffset*/
  22219. 0, /*tp_iter*/
  22220. 0, /*tp_iternext*/
  22221. __pyx_methods_6gevent_5libev_8corecext_signal, /*tp_methods*/
  22222. 0, /*tp_members*/
  22223. __pyx_getsets_6gevent_5libev_8corecext_signal, /*tp_getset*/
  22224. 0, /*tp_base*/
  22225. 0, /*tp_dict*/
  22226. 0, /*tp_descr_get*/
  22227. 0, /*tp_descr_set*/
  22228. 0, /*tp_dictoffset*/
  22229. __pyx_pw_6gevent_5libev_8corecext_6signal_7__init__, /*tp_init*/
  22230. 0, /*tp_alloc*/
  22231. __pyx_tp_new_6gevent_5libev_8corecext_signal, /*tp_new*/
  22232. 0, /*tp_free*/
  22233. 0, /*tp_is_gc*/
  22234. 0, /*tp_bases*/
  22235. 0, /*tp_mro*/
  22236. 0, /*tp_cache*/
  22237. 0, /*tp_subclasses*/
  22238. 0, /*tp_weaklist*/
  22239. 0, /*tp_del*/
  22240. 0, /*tp_version_tag*/
  22241. #if PY_VERSION_HEX >= 0x030400a1
  22242. 0, /*tp_finalize*/
  22243. #endif
  22244. };
  22245. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_idle(PyTypeObject *t, PyObject *a, PyObject *k) {
  22246. struct PyGeventIdleObject *p;
  22247. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  22248. if (unlikely(!o)) return 0;
  22249. p = ((struct PyGeventIdleObject *)o);
  22250. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22251. p->_callback = Py_None; Py_INCREF(Py_None);
  22252. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22253. return o;
  22254. }
  22255. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_idle(PyObject *o) {
  22256. struct PyGeventIdleObject *p = (struct PyGeventIdleObject *)o;
  22257. #if PY_VERSION_HEX >= 0x030400a1
  22258. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  22259. if (PyObject_CallFinalizerFromDealloc(o)) return;
  22260. }
  22261. #endif
  22262. PyObject_GC_UnTrack(o);
  22263. Py_CLEAR(p->loop);
  22264. Py_CLEAR(p->_callback);
  22265. Py_CLEAR(p->args);
  22266. #if CYTHON_USE_TYPE_SLOTS
  22267. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  22268. #endif
  22269. PyObject_GC_Track(o);
  22270. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  22271. }
  22272. static int __pyx_tp_traverse_6gevent_5libev_8corecext_idle(PyObject *o, visitproc v, void *a) {
  22273. int e;
  22274. struct PyGeventIdleObject *p = (struct PyGeventIdleObject *)o;
  22275. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_idle)); if (e) return e;
  22276. if (p->loop) {
  22277. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  22278. }
  22279. if (p->_callback) {
  22280. e = (*v)(p->_callback, a); if (e) return e;
  22281. }
  22282. if (p->args) {
  22283. e = (*v)(p->args, a); if (e) return e;
  22284. }
  22285. return 0;
  22286. }
  22287. static int __pyx_tp_clear_6gevent_5libev_8corecext_idle(PyObject *o) {
  22288. PyObject* tmp;
  22289. struct PyGeventIdleObject *p = (struct PyGeventIdleObject *)o;
  22290. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_idle);
  22291. tmp = ((PyObject*)p->loop);
  22292. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22293. Py_XDECREF(tmp);
  22294. tmp = ((PyObject*)p->_callback);
  22295. p->_callback = Py_None; Py_INCREF(Py_None);
  22296. Py_XDECREF(tmp);
  22297. tmp = ((PyObject*)p->args);
  22298. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22299. Py_XDECREF(tmp);
  22300. return 0;
  22301. }
  22302. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_ref(PyObject *o, CYTHON_UNUSED void *x) {
  22303. return __pyx_pw_6gevent_5libev_8corecext_4idle_3ref_1__get__(o);
  22304. }
  22305. static int __pyx_setprop_6gevent_5libev_8corecext_4idle_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22306. if (v) {
  22307. return __pyx_pw_6gevent_5libev_8corecext_4idle_3ref_3__set__(o, v);
  22308. }
  22309. else {
  22310. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22311. return -1;
  22312. }
  22313. }
  22314. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_callback(PyObject *o, CYTHON_UNUSED void *x) {
  22315. return __pyx_pw_6gevent_5libev_8corecext_4idle_8callback_1__get__(o);
  22316. }
  22317. static int __pyx_setprop_6gevent_5libev_8corecext_4idle_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22318. if (v) {
  22319. return __pyx_pw_6gevent_5libev_8corecext_4idle_8callback_3__set__(o, v);
  22320. }
  22321. else {
  22322. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22323. return -1;
  22324. }
  22325. }
  22326. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_priority(PyObject *o, CYTHON_UNUSED void *x) {
  22327. return __pyx_pw_6gevent_5libev_8corecext_4idle_8priority_1__get__(o);
  22328. }
  22329. static int __pyx_setprop_6gevent_5libev_8corecext_4idle_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22330. if (v) {
  22331. return __pyx_pw_6gevent_5libev_8corecext_4idle_8priority_3__set__(o, v);
  22332. }
  22333. else {
  22334. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22335. return -1;
  22336. }
  22337. }
  22338. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_active(PyObject *o, CYTHON_UNUSED void *x) {
  22339. return __pyx_pw_6gevent_5libev_8corecext_4idle_6active_1__get__(o);
  22340. }
  22341. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_pending(PyObject *o, CYTHON_UNUSED void *x) {
  22342. return __pyx_pw_6gevent_5libev_8corecext_4idle_7pending_1__get__(o);
  22343. }
  22344. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_loop(PyObject *o, CYTHON_UNUSED void *x) {
  22345. return __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_1__get__(o);
  22346. }
  22347. static int __pyx_setprop_6gevent_5libev_8corecext_4idle_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22348. if (v) {
  22349. return __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_3__set__(o, v);
  22350. }
  22351. else {
  22352. return __pyx_pw_6gevent_5libev_8corecext_4idle_4loop_5__del__(o);
  22353. }
  22354. }
  22355. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle_args(PyObject *o, CYTHON_UNUSED void *x) {
  22356. return __pyx_pw_6gevent_5libev_8corecext_4idle_4args_1__get__(o);
  22357. }
  22358. static int __pyx_setprop_6gevent_5libev_8corecext_4idle_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22359. if (v) {
  22360. return __pyx_pw_6gevent_5libev_8corecext_4idle_4args_3__set__(o, v);
  22361. }
  22362. else {
  22363. return __pyx_pw_6gevent_5libev_8corecext_4idle_4args_5__del__(o);
  22364. }
  22365. }
  22366. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4idle__flags(PyObject *o, CYTHON_UNUSED void *x) {
  22367. return __pyx_pw_6gevent_5libev_8corecext_4idle_6_flags_1__get__(o);
  22368. }
  22369. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_idle[] = {
  22370. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4idle_1stop, METH_NOARGS, 0},
  22371. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4idle_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  22372. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4idle_5start, METH_VARARGS|METH_KEYWORDS, 0},
  22373. {0, 0, 0, 0}
  22374. };
  22375. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_idle[] = {
  22376. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_4idle_ref, __pyx_setprop_6gevent_5libev_8corecext_4idle_ref, (char *)0, 0},
  22377. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_4idle_callback, __pyx_setprop_6gevent_5libev_8corecext_4idle_callback, (char *)0, 0},
  22378. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_4idle_priority, __pyx_setprop_6gevent_5libev_8corecext_4idle_priority, (char *)0, 0},
  22379. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_4idle_active, 0, (char *)0, 0},
  22380. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_4idle_pending, 0, (char *)0, 0},
  22381. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_4idle_loop, __pyx_setprop_6gevent_5libev_8corecext_4idle_loop, (char *)0, 0},
  22382. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_4idle_args, __pyx_setprop_6gevent_5libev_8corecext_4idle_args, (char *)0, 0},
  22383. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_4idle__flags, 0, (char *)0, 0},
  22384. {0, 0, 0, 0, 0}
  22385. };
  22386. DL_EXPORT(PyTypeObject) PyGeventIdle_Type = {
  22387. PyVarObject_HEAD_INIT(0, 0)
  22388. "gevent.libev.corecext.idle", /*tp_name*/
  22389. sizeof(struct PyGeventIdleObject), /*tp_basicsize*/
  22390. 0, /*tp_itemsize*/
  22391. __pyx_tp_dealloc_6gevent_5libev_8corecext_idle, /*tp_dealloc*/
  22392. 0, /*tp_print*/
  22393. 0, /*tp_getattr*/
  22394. 0, /*tp_setattr*/
  22395. #if PY_MAJOR_VERSION < 3
  22396. 0, /*tp_compare*/
  22397. #endif
  22398. #if PY_MAJOR_VERSION >= 3
  22399. 0, /*tp_as_async*/
  22400. #endif
  22401. #if CYTHON_COMPILING_IN_PYPY
  22402. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  22403. #else
  22404. 0, /*tp_repr*/
  22405. #endif
  22406. 0, /*tp_as_number*/
  22407. 0, /*tp_as_sequence*/
  22408. 0, /*tp_as_mapping*/
  22409. 0, /*tp_hash*/
  22410. 0, /*tp_call*/
  22411. 0, /*tp_str*/
  22412. 0, /*tp_getattro*/
  22413. 0, /*tp_setattro*/
  22414. 0, /*tp_as_buffer*/
  22415. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  22416. 0, /*tp_doc*/
  22417. __pyx_tp_traverse_6gevent_5libev_8corecext_idle, /*tp_traverse*/
  22418. __pyx_tp_clear_6gevent_5libev_8corecext_idle, /*tp_clear*/
  22419. 0, /*tp_richcompare*/
  22420. 0, /*tp_weaklistoffset*/
  22421. 0, /*tp_iter*/
  22422. 0, /*tp_iternext*/
  22423. __pyx_methods_6gevent_5libev_8corecext_idle, /*tp_methods*/
  22424. 0, /*tp_members*/
  22425. __pyx_getsets_6gevent_5libev_8corecext_idle, /*tp_getset*/
  22426. 0, /*tp_base*/
  22427. 0, /*tp_dict*/
  22428. 0, /*tp_descr_get*/
  22429. 0, /*tp_descr_set*/
  22430. 0, /*tp_dictoffset*/
  22431. __pyx_pw_6gevent_5libev_8corecext_4idle_7__init__, /*tp_init*/
  22432. 0, /*tp_alloc*/
  22433. __pyx_tp_new_6gevent_5libev_8corecext_idle, /*tp_new*/
  22434. 0, /*tp_free*/
  22435. 0, /*tp_is_gc*/
  22436. 0, /*tp_bases*/
  22437. 0, /*tp_mro*/
  22438. 0, /*tp_cache*/
  22439. 0, /*tp_subclasses*/
  22440. 0, /*tp_weaklist*/
  22441. 0, /*tp_del*/
  22442. 0, /*tp_version_tag*/
  22443. #if PY_VERSION_HEX >= 0x030400a1
  22444. 0, /*tp_finalize*/
  22445. #endif
  22446. };
  22447. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_prepare(PyTypeObject *t, PyObject *a, PyObject *k) {
  22448. struct PyGeventPrepareObject *p;
  22449. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  22450. if (unlikely(!o)) return 0;
  22451. p = ((struct PyGeventPrepareObject *)o);
  22452. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22453. p->_callback = Py_None; Py_INCREF(Py_None);
  22454. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22455. return o;
  22456. }
  22457. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_prepare(PyObject *o) {
  22458. struct PyGeventPrepareObject *p = (struct PyGeventPrepareObject *)o;
  22459. #if PY_VERSION_HEX >= 0x030400a1
  22460. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  22461. if (PyObject_CallFinalizerFromDealloc(o)) return;
  22462. }
  22463. #endif
  22464. PyObject_GC_UnTrack(o);
  22465. Py_CLEAR(p->loop);
  22466. Py_CLEAR(p->_callback);
  22467. Py_CLEAR(p->args);
  22468. #if CYTHON_USE_TYPE_SLOTS
  22469. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  22470. #endif
  22471. PyObject_GC_Track(o);
  22472. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  22473. }
  22474. static int __pyx_tp_traverse_6gevent_5libev_8corecext_prepare(PyObject *o, visitproc v, void *a) {
  22475. int e;
  22476. struct PyGeventPrepareObject *p = (struct PyGeventPrepareObject *)o;
  22477. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_prepare)); if (e) return e;
  22478. if (p->loop) {
  22479. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  22480. }
  22481. if (p->_callback) {
  22482. e = (*v)(p->_callback, a); if (e) return e;
  22483. }
  22484. if (p->args) {
  22485. e = (*v)(p->args, a); if (e) return e;
  22486. }
  22487. return 0;
  22488. }
  22489. static int __pyx_tp_clear_6gevent_5libev_8corecext_prepare(PyObject *o) {
  22490. PyObject* tmp;
  22491. struct PyGeventPrepareObject *p = (struct PyGeventPrepareObject *)o;
  22492. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_prepare);
  22493. tmp = ((PyObject*)p->loop);
  22494. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22495. Py_XDECREF(tmp);
  22496. tmp = ((PyObject*)p->_callback);
  22497. p->_callback = Py_None; Py_INCREF(Py_None);
  22498. Py_XDECREF(tmp);
  22499. tmp = ((PyObject*)p->args);
  22500. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22501. Py_XDECREF(tmp);
  22502. return 0;
  22503. }
  22504. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_ref(PyObject *o, CYTHON_UNUSED void *x) {
  22505. return __pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_1__get__(o);
  22506. }
  22507. static int __pyx_setprop_6gevent_5libev_8corecext_7prepare_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22508. if (v) {
  22509. return __pyx_pw_6gevent_5libev_8corecext_7prepare_3ref_3__set__(o, v);
  22510. }
  22511. else {
  22512. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22513. return -1;
  22514. }
  22515. }
  22516. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_callback(PyObject *o, CYTHON_UNUSED void *x) {
  22517. return __pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_1__get__(o);
  22518. }
  22519. static int __pyx_setprop_6gevent_5libev_8corecext_7prepare_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22520. if (v) {
  22521. return __pyx_pw_6gevent_5libev_8corecext_7prepare_8callback_3__set__(o, v);
  22522. }
  22523. else {
  22524. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22525. return -1;
  22526. }
  22527. }
  22528. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_priority(PyObject *o, CYTHON_UNUSED void *x) {
  22529. return __pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_1__get__(o);
  22530. }
  22531. static int __pyx_setprop_6gevent_5libev_8corecext_7prepare_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22532. if (v) {
  22533. return __pyx_pw_6gevent_5libev_8corecext_7prepare_8priority_3__set__(o, v);
  22534. }
  22535. else {
  22536. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22537. return -1;
  22538. }
  22539. }
  22540. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_active(PyObject *o, CYTHON_UNUSED void *x) {
  22541. return __pyx_pw_6gevent_5libev_8corecext_7prepare_6active_1__get__(o);
  22542. }
  22543. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_pending(PyObject *o, CYTHON_UNUSED void *x) {
  22544. return __pyx_pw_6gevent_5libev_8corecext_7prepare_7pending_1__get__(o);
  22545. }
  22546. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_loop(PyObject *o, CYTHON_UNUSED void *x) {
  22547. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_1__get__(o);
  22548. }
  22549. static int __pyx_setprop_6gevent_5libev_8corecext_7prepare_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22550. if (v) {
  22551. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_3__set__(o, v);
  22552. }
  22553. else {
  22554. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4loop_5__del__(o);
  22555. }
  22556. }
  22557. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare_args(PyObject *o, CYTHON_UNUSED void *x) {
  22558. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_1__get__(o);
  22559. }
  22560. static int __pyx_setprop_6gevent_5libev_8corecext_7prepare_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22561. if (v) {
  22562. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_3__set__(o, v);
  22563. }
  22564. else {
  22565. return __pyx_pw_6gevent_5libev_8corecext_7prepare_4args_5__del__(o);
  22566. }
  22567. }
  22568. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_7prepare__flags(PyObject *o, CYTHON_UNUSED void *x) {
  22569. return __pyx_pw_6gevent_5libev_8corecext_7prepare_6_flags_1__get__(o);
  22570. }
  22571. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_prepare[] = {
  22572. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7prepare_1stop, METH_NOARGS, 0},
  22573. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7prepare_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  22574. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7prepare_5start, METH_VARARGS|METH_KEYWORDS, 0},
  22575. {0, 0, 0, 0}
  22576. };
  22577. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_prepare[] = {
  22578. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_7prepare_ref, __pyx_setprop_6gevent_5libev_8corecext_7prepare_ref, (char *)0, 0},
  22579. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_7prepare_callback, __pyx_setprop_6gevent_5libev_8corecext_7prepare_callback, (char *)0, 0},
  22580. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_7prepare_priority, __pyx_setprop_6gevent_5libev_8corecext_7prepare_priority, (char *)0, 0},
  22581. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_7prepare_active, 0, (char *)0, 0},
  22582. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_7prepare_pending, 0, (char *)0, 0},
  22583. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_7prepare_loop, __pyx_setprop_6gevent_5libev_8corecext_7prepare_loop, (char *)0, 0},
  22584. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_7prepare_args, __pyx_setprop_6gevent_5libev_8corecext_7prepare_args, (char *)0, 0},
  22585. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_7prepare__flags, 0, (char *)0, 0},
  22586. {0, 0, 0, 0, 0}
  22587. };
  22588. DL_EXPORT(PyTypeObject) PyGeventPrepare_Type = {
  22589. PyVarObject_HEAD_INIT(0, 0)
  22590. "gevent.libev.corecext.prepare", /*tp_name*/
  22591. sizeof(struct PyGeventPrepareObject), /*tp_basicsize*/
  22592. 0, /*tp_itemsize*/
  22593. __pyx_tp_dealloc_6gevent_5libev_8corecext_prepare, /*tp_dealloc*/
  22594. 0, /*tp_print*/
  22595. 0, /*tp_getattr*/
  22596. 0, /*tp_setattr*/
  22597. #if PY_MAJOR_VERSION < 3
  22598. 0, /*tp_compare*/
  22599. #endif
  22600. #if PY_MAJOR_VERSION >= 3
  22601. 0, /*tp_as_async*/
  22602. #endif
  22603. #if CYTHON_COMPILING_IN_PYPY
  22604. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  22605. #else
  22606. 0, /*tp_repr*/
  22607. #endif
  22608. 0, /*tp_as_number*/
  22609. 0, /*tp_as_sequence*/
  22610. 0, /*tp_as_mapping*/
  22611. 0, /*tp_hash*/
  22612. 0, /*tp_call*/
  22613. 0, /*tp_str*/
  22614. 0, /*tp_getattro*/
  22615. 0, /*tp_setattro*/
  22616. 0, /*tp_as_buffer*/
  22617. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  22618. 0, /*tp_doc*/
  22619. __pyx_tp_traverse_6gevent_5libev_8corecext_prepare, /*tp_traverse*/
  22620. __pyx_tp_clear_6gevent_5libev_8corecext_prepare, /*tp_clear*/
  22621. 0, /*tp_richcompare*/
  22622. 0, /*tp_weaklistoffset*/
  22623. 0, /*tp_iter*/
  22624. 0, /*tp_iternext*/
  22625. __pyx_methods_6gevent_5libev_8corecext_prepare, /*tp_methods*/
  22626. 0, /*tp_members*/
  22627. __pyx_getsets_6gevent_5libev_8corecext_prepare, /*tp_getset*/
  22628. 0, /*tp_base*/
  22629. 0, /*tp_dict*/
  22630. 0, /*tp_descr_get*/
  22631. 0, /*tp_descr_set*/
  22632. 0, /*tp_dictoffset*/
  22633. __pyx_pw_6gevent_5libev_8corecext_7prepare_7__init__, /*tp_init*/
  22634. 0, /*tp_alloc*/
  22635. __pyx_tp_new_6gevent_5libev_8corecext_prepare, /*tp_new*/
  22636. 0, /*tp_free*/
  22637. 0, /*tp_is_gc*/
  22638. 0, /*tp_bases*/
  22639. 0, /*tp_mro*/
  22640. 0, /*tp_cache*/
  22641. 0, /*tp_subclasses*/
  22642. 0, /*tp_weaklist*/
  22643. 0, /*tp_del*/
  22644. 0, /*tp_version_tag*/
  22645. #if PY_VERSION_HEX >= 0x030400a1
  22646. 0, /*tp_finalize*/
  22647. #endif
  22648. };
  22649. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_check(PyTypeObject *t, PyObject *a, PyObject *k) {
  22650. struct PyGeventCheckObject *p;
  22651. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  22652. if (unlikely(!o)) return 0;
  22653. p = ((struct PyGeventCheckObject *)o);
  22654. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22655. p->_callback = Py_None; Py_INCREF(Py_None);
  22656. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22657. return o;
  22658. }
  22659. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_check(PyObject *o) {
  22660. struct PyGeventCheckObject *p = (struct PyGeventCheckObject *)o;
  22661. #if PY_VERSION_HEX >= 0x030400a1
  22662. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  22663. if (PyObject_CallFinalizerFromDealloc(o)) return;
  22664. }
  22665. #endif
  22666. PyObject_GC_UnTrack(o);
  22667. Py_CLEAR(p->loop);
  22668. Py_CLEAR(p->_callback);
  22669. Py_CLEAR(p->args);
  22670. #if CYTHON_USE_TYPE_SLOTS
  22671. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  22672. #endif
  22673. PyObject_GC_Track(o);
  22674. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  22675. }
  22676. static int __pyx_tp_traverse_6gevent_5libev_8corecext_check(PyObject *o, visitproc v, void *a) {
  22677. int e;
  22678. struct PyGeventCheckObject *p = (struct PyGeventCheckObject *)o;
  22679. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_check)); if (e) return e;
  22680. if (p->loop) {
  22681. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  22682. }
  22683. if (p->_callback) {
  22684. e = (*v)(p->_callback, a); if (e) return e;
  22685. }
  22686. if (p->args) {
  22687. e = (*v)(p->args, a); if (e) return e;
  22688. }
  22689. return 0;
  22690. }
  22691. static int __pyx_tp_clear_6gevent_5libev_8corecext_check(PyObject *o) {
  22692. PyObject* tmp;
  22693. struct PyGeventCheckObject *p = (struct PyGeventCheckObject *)o;
  22694. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_check);
  22695. tmp = ((PyObject*)p->loop);
  22696. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22697. Py_XDECREF(tmp);
  22698. tmp = ((PyObject*)p->_callback);
  22699. p->_callback = Py_None; Py_INCREF(Py_None);
  22700. Py_XDECREF(tmp);
  22701. tmp = ((PyObject*)p->args);
  22702. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22703. Py_XDECREF(tmp);
  22704. return 0;
  22705. }
  22706. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_ref(PyObject *o, CYTHON_UNUSED void *x) {
  22707. return __pyx_pw_6gevent_5libev_8corecext_5check_3ref_1__get__(o);
  22708. }
  22709. static int __pyx_setprop_6gevent_5libev_8corecext_5check_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22710. if (v) {
  22711. return __pyx_pw_6gevent_5libev_8corecext_5check_3ref_3__set__(o, v);
  22712. }
  22713. else {
  22714. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22715. return -1;
  22716. }
  22717. }
  22718. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_callback(PyObject *o, CYTHON_UNUSED void *x) {
  22719. return __pyx_pw_6gevent_5libev_8corecext_5check_8callback_1__get__(o);
  22720. }
  22721. static int __pyx_setprop_6gevent_5libev_8corecext_5check_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22722. if (v) {
  22723. return __pyx_pw_6gevent_5libev_8corecext_5check_8callback_3__set__(o, v);
  22724. }
  22725. else {
  22726. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22727. return -1;
  22728. }
  22729. }
  22730. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_priority(PyObject *o, CYTHON_UNUSED void *x) {
  22731. return __pyx_pw_6gevent_5libev_8corecext_5check_8priority_1__get__(o);
  22732. }
  22733. static int __pyx_setprop_6gevent_5libev_8corecext_5check_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22734. if (v) {
  22735. return __pyx_pw_6gevent_5libev_8corecext_5check_8priority_3__set__(o, v);
  22736. }
  22737. else {
  22738. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22739. return -1;
  22740. }
  22741. }
  22742. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_active(PyObject *o, CYTHON_UNUSED void *x) {
  22743. return __pyx_pw_6gevent_5libev_8corecext_5check_6active_1__get__(o);
  22744. }
  22745. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_pending(PyObject *o, CYTHON_UNUSED void *x) {
  22746. return __pyx_pw_6gevent_5libev_8corecext_5check_7pending_1__get__(o);
  22747. }
  22748. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_loop(PyObject *o, CYTHON_UNUSED void *x) {
  22749. return __pyx_pw_6gevent_5libev_8corecext_5check_4loop_1__get__(o);
  22750. }
  22751. static int __pyx_setprop_6gevent_5libev_8corecext_5check_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22752. if (v) {
  22753. return __pyx_pw_6gevent_5libev_8corecext_5check_4loop_3__set__(o, v);
  22754. }
  22755. else {
  22756. return __pyx_pw_6gevent_5libev_8corecext_5check_4loop_5__del__(o);
  22757. }
  22758. }
  22759. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check_args(PyObject *o, CYTHON_UNUSED void *x) {
  22760. return __pyx_pw_6gevent_5libev_8corecext_5check_4args_1__get__(o);
  22761. }
  22762. static int __pyx_setprop_6gevent_5libev_8corecext_5check_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22763. if (v) {
  22764. return __pyx_pw_6gevent_5libev_8corecext_5check_4args_3__set__(o, v);
  22765. }
  22766. else {
  22767. return __pyx_pw_6gevent_5libev_8corecext_5check_4args_5__del__(o);
  22768. }
  22769. }
  22770. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5check__flags(PyObject *o, CYTHON_UNUSED void *x) {
  22771. return __pyx_pw_6gevent_5libev_8corecext_5check_6_flags_1__get__(o);
  22772. }
  22773. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_check[] = {
  22774. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5check_1stop, METH_NOARGS, 0},
  22775. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5check_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  22776. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5check_5start, METH_VARARGS|METH_KEYWORDS, 0},
  22777. {0, 0, 0, 0}
  22778. };
  22779. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_check[] = {
  22780. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_5check_ref, __pyx_setprop_6gevent_5libev_8corecext_5check_ref, (char *)0, 0},
  22781. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_5check_callback, __pyx_setprop_6gevent_5libev_8corecext_5check_callback, (char *)0, 0},
  22782. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_5check_priority, __pyx_setprop_6gevent_5libev_8corecext_5check_priority, (char *)0, 0},
  22783. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_5check_active, 0, (char *)0, 0},
  22784. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_5check_pending, 0, (char *)0, 0},
  22785. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_5check_loop, __pyx_setprop_6gevent_5libev_8corecext_5check_loop, (char *)0, 0},
  22786. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_5check_args, __pyx_setprop_6gevent_5libev_8corecext_5check_args, (char *)0, 0},
  22787. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_5check__flags, 0, (char *)0, 0},
  22788. {0, 0, 0, 0, 0}
  22789. };
  22790. DL_EXPORT(PyTypeObject) PyGeventCheck_Type = {
  22791. PyVarObject_HEAD_INIT(0, 0)
  22792. "gevent.libev.corecext.check", /*tp_name*/
  22793. sizeof(struct PyGeventCheckObject), /*tp_basicsize*/
  22794. 0, /*tp_itemsize*/
  22795. __pyx_tp_dealloc_6gevent_5libev_8corecext_check, /*tp_dealloc*/
  22796. 0, /*tp_print*/
  22797. 0, /*tp_getattr*/
  22798. 0, /*tp_setattr*/
  22799. #if PY_MAJOR_VERSION < 3
  22800. 0, /*tp_compare*/
  22801. #endif
  22802. #if PY_MAJOR_VERSION >= 3
  22803. 0, /*tp_as_async*/
  22804. #endif
  22805. #if CYTHON_COMPILING_IN_PYPY
  22806. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  22807. #else
  22808. 0, /*tp_repr*/
  22809. #endif
  22810. 0, /*tp_as_number*/
  22811. 0, /*tp_as_sequence*/
  22812. 0, /*tp_as_mapping*/
  22813. 0, /*tp_hash*/
  22814. 0, /*tp_call*/
  22815. 0, /*tp_str*/
  22816. 0, /*tp_getattro*/
  22817. 0, /*tp_setattro*/
  22818. 0, /*tp_as_buffer*/
  22819. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  22820. 0, /*tp_doc*/
  22821. __pyx_tp_traverse_6gevent_5libev_8corecext_check, /*tp_traverse*/
  22822. __pyx_tp_clear_6gevent_5libev_8corecext_check, /*tp_clear*/
  22823. 0, /*tp_richcompare*/
  22824. 0, /*tp_weaklistoffset*/
  22825. 0, /*tp_iter*/
  22826. 0, /*tp_iternext*/
  22827. __pyx_methods_6gevent_5libev_8corecext_check, /*tp_methods*/
  22828. 0, /*tp_members*/
  22829. __pyx_getsets_6gevent_5libev_8corecext_check, /*tp_getset*/
  22830. 0, /*tp_base*/
  22831. 0, /*tp_dict*/
  22832. 0, /*tp_descr_get*/
  22833. 0, /*tp_descr_set*/
  22834. 0, /*tp_dictoffset*/
  22835. __pyx_pw_6gevent_5libev_8corecext_5check_7__init__, /*tp_init*/
  22836. 0, /*tp_alloc*/
  22837. __pyx_tp_new_6gevent_5libev_8corecext_check, /*tp_new*/
  22838. 0, /*tp_free*/
  22839. 0, /*tp_is_gc*/
  22840. 0, /*tp_bases*/
  22841. 0, /*tp_mro*/
  22842. 0, /*tp_cache*/
  22843. 0, /*tp_subclasses*/
  22844. 0, /*tp_weaklist*/
  22845. 0, /*tp_del*/
  22846. 0, /*tp_version_tag*/
  22847. #if PY_VERSION_HEX >= 0x030400a1
  22848. 0, /*tp_finalize*/
  22849. #endif
  22850. };
  22851. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_fork(PyTypeObject *t, PyObject *a, PyObject *k) {
  22852. struct PyGeventForkObject *p;
  22853. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  22854. if (unlikely(!o)) return 0;
  22855. p = ((struct PyGeventForkObject *)o);
  22856. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22857. p->_callback = Py_None; Py_INCREF(Py_None);
  22858. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22859. return o;
  22860. }
  22861. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_fork(PyObject *o) {
  22862. struct PyGeventForkObject *p = (struct PyGeventForkObject *)o;
  22863. #if PY_VERSION_HEX >= 0x030400a1
  22864. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  22865. if (PyObject_CallFinalizerFromDealloc(o)) return;
  22866. }
  22867. #endif
  22868. PyObject_GC_UnTrack(o);
  22869. Py_CLEAR(p->loop);
  22870. Py_CLEAR(p->_callback);
  22871. Py_CLEAR(p->args);
  22872. #if CYTHON_USE_TYPE_SLOTS
  22873. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  22874. #endif
  22875. PyObject_GC_Track(o);
  22876. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  22877. }
  22878. static int __pyx_tp_traverse_6gevent_5libev_8corecext_fork(PyObject *o, visitproc v, void *a) {
  22879. int e;
  22880. struct PyGeventForkObject *p = (struct PyGeventForkObject *)o;
  22881. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_fork)); if (e) return e;
  22882. if (p->loop) {
  22883. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  22884. }
  22885. if (p->_callback) {
  22886. e = (*v)(p->_callback, a); if (e) return e;
  22887. }
  22888. if (p->args) {
  22889. e = (*v)(p->args, a); if (e) return e;
  22890. }
  22891. return 0;
  22892. }
  22893. static int __pyx_tp_clear_6gevent_5libev_8corecext_fork(PyObject *o) {
  22894. PyObject* tmp;
  22895. struct PyGeventForkObject *p = (struct PyGeventForkObject *)o;
  22896. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_fork);
  22897. tmp = ((PyObject*)p->loop);
  22898. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  22899. Py_XDECREF(tmp);
  22900. tmp = ((PyObject*)p->_callback);
  22901. p->_callback = Py_None; Py_INCREF(Py_None);
  22902. Py_XDECREF(tmp);
  22903. tmp = ((PyObject*)p->args);
  22904. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  22905. Py_XDECREF(tmp);
  22906. return 0;
  22907. }
  22908. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_ref(PyObject *o, CYTHON_UNUSED void *x) {
  22909. return __pyx_pw_6gevent_5libev_8corecext_4fork_3ref_1__get__(o);
  22910. }
  22911. static int __pyx_setprop_6gevent_5libev_8corecext_4fork_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22912. if (v) {
  22913. return __pyx_pw_6gevent_5libev_8corecext_4fork_3ref_3__set__(o, v);
  22914. }
  22915. else {
  22916. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22917. return -1;
  22918. }
  22919. }
  22920. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_callback(PyObject *o, CYTHON_UNUSED void *x) {
  22921. return __pyx_pw_6gevent_5libev_8corecext_4fork_8callback_1__get__(o);
  22922. }
  22923. static int __pyx_setprop_6gevent_5libev_8corecext_4fork_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22924. if (v) {
  22925. return __pyx_pw_6gevent_5libev_8corecext_4fork_8callback_3__set__(o, v);
  22926. }
  22927. else {
  22928. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22929. return -1;
  22930. }
  22931. }
  22932. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_priority(PyObject *o, CYTHON_UNUSED void *x) {
  22933. return __pyx_pw_6gevent_5libev_8corecext_4fork_8priority_1__get__(o);
  22934. }
  22935. static int __pyx_setprop_6gevent_5libev_8corecext_4fork_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22936. if (v) {
  22937. return __pyx_pw_6gevent_5libev_8corecext_4fork_8priority_3__set__(o, v);
  22938. }
  22939. else {
  22940. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  22941. return -1;
  22942. }
  22943. }
  22944. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_active(PyObject *o, CYTHON_UNUSED void *x) {
  22945. return __pyx_pw_6gevent_5libev_8corecext_4fork_6active_1__get__(o);
  22946. }
  22947. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_pending(PyObject *o, CYTHON_UNUSED void *x) {
  22948. return __pyx_pw_6gevent_5libev_8corecext_4fork_7pending_1__get__(o);
  22949. }
  22950. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_loop(PyObject *o, CYTHON_UNUSED void *x) {
  22951. return __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_1__get__(o);
  22952. }
  22953. static int __pyx_setprop_6gevent_5libev_8corecext_4fork_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22954. if (v) {
  22955. return __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_3__set__(o, v);
  22956. }
  22957. else {
  22958. return __pyx_pw_6gevent_5libev_8corecext_4fork_4loop_5__del__(o);
  22959. }
  22960. }
  22961. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork_args(PyObject *o, CYTHON_UNUSED void *x) {
  22962. return __pyx_pw_6gevent_5libev_8corecext_4fork_4args_1__get__(o);
  22963. }
  22964. static int __pyx_setprop_6gevent_5libev_8corecext_4fork_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  22965. if (v) {
  22966. return __pyx_pw_6gevent_5libev_8corecext_4fork_4args_3__set__(o, v);
  22967. }
  22968. else {
  22969. return __pyx_pw_6gevent_5libev_8corecext_4fork_4args_5__del__(o);
  22970. }
  22971. }
  22972. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4fork__flags(PyObject *o, CYTHON_UNUSED void *x) {
  22973. return __pyx_pw_6gevent_5libev_8corecext_4fork_6_flags_1__get__(o);
  22974. }
  22975. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_fork[] = {
  22976. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4fork_1stop, METH_NOARGS, 0},
  22977. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4fork_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  22978. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4fork_5start, METH_VARARGS|METH_KEYWORDS, 0},
  22979. {0, 0, 0, 0}
  22980. };
  22981. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_fork[] = {
  22982. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_4fork_ref, __pyx_setprop_6gevent_5libev_8corecext_4fork_ref, (char *)0, 0},
  22983. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_4fork_callback, __pyx_setprop_6gevent_5libev_8corecext_4fork_callback, (char *)0, 0},
  22984. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_4fork_priority, __pyx_setprop_6gevent_5libev_8corecext_4fork_priority, (char *)0, 0},
  22985. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_4fork_active, 0, (char *)0, 0},
  22986. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_4fork_pending, 0, (char *)0, 0},
  22987. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_4fork_loop, __pyx_setprop_6gevent_5libev_8corecext_4fork_loop, (char *)0, 0},
  22988. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_4fork_args, __pyx_setprop_6gevent_5libev_8corecext_4fork_args, (char *)0, 0},
  22989. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_4fork__flags, 0, (char *)0, 0},
  22990. {0, 0, 0, 0, 0}
  22991. };
  22992. DL_EXPORT(PyTypeObject) PyGeventFork_Type = {
  22993. PyVarObject_HEAD_INIT(0, 0)
  22994. "gevent.libev.corecext.fork", /*tp_name*/
  22995. sizeof(struct PyGeventForkObject), /*tp_basicsize*/
  22996. 0, /*tp_itemsize*/
  22997. __pyx_tp_dealloc_6gevent_5libev_8corecext_fork, /*tp_dealloc*/
  22998. 0, /*tp_print*/
  22999. 0, /*tp_getattr*/
  23000. 0, /*tp_setattr*/
  23001. #if PY_MAJOR_VERSION < 3
  23002. 0, /*tp_compare*/
  23003. #endif
  23004. #if PY_MAJOR_VERSION >= 3
  23005. 0, /*tp_as_async*/
  23006. #endif
  23007. #if CYTHON_COMPILING_IN_PYPY
  23008. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  23009. #else
  23010. 0, /*tp_repr*/
  23011. #endif
  23012. 0, /*tp_as_number*/
  23013. 0, /*tp_as_sequence*/
  23014. 0, /*tp_as_mapping*/
  23015. 0, /*tp_hash*/
  23016. 0, /*tp_call*/
  23017. 0, /*tp_str*/
  23018. 0, /*tp_getattro*/
  23019. 0, /*tp_setattro*/
  23020. 0, /*tp_as_buffer*/
  23021. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  23022. 0, /*tp_doc*/
  23023. __pyx_tp_traverse_6gevent_5libev_8corecext_fork, /*tp_traverse*/
  23024. __pyx_tp_clear_6gevent_5libev_8corecext_fork, /*tp_clear*/
  23025. 0, /*tp_richcompare*/
  23026. 0, /*tp_weaklistoffset*/
  23027. 0, /*tp_iter*/
  23028. 0, /*tp_iternext*/
  23029. __pyx_methods_6gevent_5libev_8corecext_fork, /*tp_methods*/
  23030. 0, /*tp_members*/
  23031. __pyx_getsets_6gevent_5libev_8corecext_fork, /*tp_getset*/
  23032. 0, /*tp_base*/
  23033. 0, /*tp_dict*/
  23034. 0, /*tp_descr_get*/
  23035. 0, /*tp_descr_set*/
  23036. 0, /*tp_dictoffset*/
  23037. __pyx_pw_6gevent_5libev_8corecext_4fork_7__init__, /*tp_init*/
  23038. 0, /*tp_alloc*/
  23039. __pyx_tp_new_6gevent_5libev_8corecext_fork, /*tp_new*/
  23040. 0, /*tp_free*/
  23041. 0, /*tp_is_gc*/
  23042. 0, /*tp_bases*/
  23043. 0, /*tp_mro*/
  23044. 0, /*tp_cache*/
  23045. 0, /*tp_subclasses*/
  23046. 0, /*tp_weaklist*/
  23047. 0, /*tp_del*/
  23048. 0, /*tp_version_tag*/
  23049. #if PY_VERSION_HEX >= 0x030400a1
  23050. 0, /*tp_finalize*/
  23051. #endif
  23052. };
  23053. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_async(PyTypeObject *t, PyObject *a, PyObject *k) {
  23054. struct PyGeventAsyncObject *p;
  23055. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  23056. if (unlikely(!o)) return 0;
  23057. p = ((struct PyGeventAsyncObject *)o);
  23058. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23059. p->_callback = Py_None; Py_INCREF(Py_None);
  23060. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23061. return o;
  23062. }
  23063. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_async(PyObject *o) {
  23064. struct PyGeventAsyncObject *p = (struct PyGeventAsyncObject *)o;
  23065. #if PY_VERSION_HEX >= 0x030400a1
  23066. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  23067. if (PyObject_CallFinalizerFromDealloc(o)) return;
  23068. }
  23069. #endif
  23070. PyObject_GC_UnTrack(o);
  23071. Py_CLEAR(p->loop);
  23072. Py_CLEAR(p->_callback);
  23073. Py_CLEAR(p->args);
  23074. #if CYTHON_USE_TYPE_SLOTS
  23075. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  23076. #endif
  23077. PyObject_GC_Track(o);
  23078. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  23079. }
  23080. static int __pyx_tp_traverse_6gevent_5libev_8corecext_async(PyObject *o, visitproc v, void *a) {
  23081. int e;
  23082. struct PyGeventAsyncObject *p = (struct PyGeventAsyncObject *)o;
  23083. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_async)); if (e) return e;
  23084. if (p->loop) {
  23085. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  23086. }
  23087. if (p->_callback) {
  23088. e = (*v)(p->_callback, a); if (e) return e;
  23089. }
  23090. if (p->args) {
  23091. e = (*v)(p->args, a); if (e) return e;
  23092. }
  23093. return 0;
  23094. }
  23095. static int __pyx_tp_clear_6gevent_5libev_8corecext_async(PyObject *o) {
  23096. PyObject* tmp;
  23097. struct PyGeventAsyncObject *p = (struct PyGeventAsyncObject *)o;
  23098. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_async);
  23099. tmp = ((PyObject*)p->loop);
  23100. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23101. Py_XDECREF(tmp);
  23102. tmp = ((PyObject*)p->_callback);
  23103. p->_callback = Py_None; Py_INCREF(Py_None);
  23104. Py_XDECREF(tmp);
  23105. tmp = ((PyObject*)p->args);
  23106. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23107. Py_XDECREF(tmp);
  23108. return 0;
  23109. }
  23110. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_ref(PyObject *o, CYTHON_UNUSED void *x) {
  23111. return __pyx_pw_6gevent_5libev_8corecext_5async_3ref_1__get__(o);
  23112. }
  23113. static int __pyx_setprop_6gevent_5libev_8corecext_5async_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23114. if (v) {
  23115. return __pyx_pw_6gevent_5libev_8corecext_5async_3ref_3__set__(o, v);
  23116. }
  23117. else {
  23118. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23119. return -1;
  23120. }
  23121. }
  23122. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_callback(PyObject *o, CYTHON_UNUSED void *x) {
  23123. return __pyx_pw_6gevent_5libev_8corecext_5async_8callback_1__get__(o);
  23124. }
  23125. static int __pyx_setprop_6gevent_5libev_8corecext_5async_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23126. if (v) {
  23127. return __pyx_pw_6gevent_5libev_8corecext_5async_8callback_3__set__(o, v);
  23128. }
  23129. else {
  23130. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23131. return -1;
  23132. }
  23133. }
  23134. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_priority(PyObject *o, CYTHON_UNUSED void *x) {
  23135. return __pyx_pw_6gevent_5libev_8corecext_5async_8priority_1__get__(o);
  23136. }
  23137. static int __pyx_setprop_6gevent_5libev_8corecext_5async_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23138. if (v) {
  23139. return __pyx_pw_6gevent_5libev_8corecext_5async_8priority_3__set__(o, v);
  23140. }
  23141. else {
  23142. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23143. return -1;
  23144. }
  23145. }
  23146. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_active(PyObject *o, CYTHON_UNUSED void *x) {
  23147. return __pyx_pw_6gevent_5libev_8corecext_5async_6active_1__get__(o);
  23148. }
  23149. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_pending(PyObject *o, CYTHON_UNUSED void *x) {
  23150. return __pyx_pw_6gevent_5libev_8corecext_5async_7pending_1__get__(o);
  23151. }
  23152. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_loop(PyObject *o, CYTHON_UNUSED void *x) {
  23153. return __pyx_pw_6gevent_5libev_8corecext_5async_4loop_1__get__(o);
  23154. }
  23155. static int __pyx_setprop_6gevent_5libev_8corecext_5async_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23156. if (v) {
  23157. return __pyx_pw_6gevent_5libev_8corecext_5async_4loop_3__set__(o, v);
  23158. }
  23159. else {
  23160. return __pyx_pw_6gevent_5libev_8corecext_5async_4loop_5__del__(o);
  23161. }
  23162. }
  23163. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async_args(PyObject *o, CYTHON_UNUSED void *x) {
  23164. return __pyx_pw_6gevent_5libev_8corecext_5async_4args_1__get__(o);
  23165. }
  23166. static int __pyx_setprop_6gevent_5libev_8corecext_5async_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23167. if (v) {
  23168. return __pyx_pw_6gevent_5libev_8corecext_5async_4args_3__set__(o, v);
  23169. }
  23170. else {
  23171. return __pyx_pw_6gevent_5libev_8corecext_5async_4args_5__del__(o);
  23172. }
  23173. }
  23174. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5async__flags(PyObject *o, CYTHON_UNUSED void *x) {
  23175. return __pyx_pw_6gevent_5libev_8corecext_5async_6_flags_1__get__(o);
  23176. }
  23177. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_async[] = {
  23178. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5async_1stop, METH_NOARGS, 0},
  23179. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5async_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  23180. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5async_5start, METH_VARARGS|METH_KEYWORDS, 0},
  23181. {"send", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5async_9send, METH_NOARGS, 0},
  23182. {0, 0, 0, 0}
  23183. };
  23184. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_async[] = {
  23185. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_5async_ref, __pyx_setprop_6gevent_5libev_8corecext_5async_ref, (char *)0, 0},
  23186. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_5async_callback, __pyx_setprop_6gevent_5libev_8corecext_5async_callback, (char *)0, 0},
  23187. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_5async_priority, __pyx_setprop_6gevent_5libev_8corecext_5async_priority, (char *)0, 0},
  23188. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_5async_active, 0, (char *)0, 0},
  23189. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_5async_pending, 0, (char *)0, 0},
  23190. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_5async_loop, __pyx_setprop_6gevent_5libev_8corecext_5async_loop, (char *)0, 0},
  23191. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_5async_args, __pyx_setprop_6gevent_5libev_8corecext_5async_args, (char *)0, 0},
  23192. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_5async__flags, 0, (char *)0, 0},
  23193. {0, 0, 0, 0, 0}
  23194. };
  23195. DL_EXPORT(PyTypeObject) PyGeventAsync_Type = {
  23196. PyVarObject_HEAD_INIT(0, 0)
  23197. "gevent.libev.corecext.async", /*tp_name*/
  23198. sizeof(struct PyGeventAsyncObject), /*tp_basicsize*/
  23199. 0, /*tp_itemsize*/
  23200. __pyx_tp_dealloc_6gevent_5libev_8corecext_async, /*tp_dealloc*/
  23201. 0, /*tp_print*/
  23202. 0, /*tp_getattr*/
  23203. 0, /*tp_setattr*/
  23204. #if PY_MAJOR_VERSION < 3
  23205. 0, /*tp_compare*/
  23206. #endif
  23207. #if PY_MAJOR_VERSION >= 3
  23208. 0, /*tp_as_async*/
  23209. #endif
  23210. #if CYTHON_COMPILING_IN_PYPY
  23211. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  23212. #else
  23213. 0, /*tp_repr*/
  23214. #endif
  23215. 0, /*tp_as_number*/
  23216. 0, /*tp_as_sequence*/
  23217. 0, /*tp_as_mapping*/
  23218. 0, /*tp_hash*/
  23219. 0, /*tp_call*/
  23220. 0, /*tp_str*/
  23221. 0, /*tp_getattro*/
  23222. 0, /*tp_setattro*/
  23223. 0, /*tp_as_buffer*/
  23224. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  23225. 0, /*tp_doc*/
  23226. __pyx_tp_traverse_6gevent_5libev_8corecext_async, /*tp_traverse*/
  23227. __pyx_tp_clear_6gevent_5libev_8corecext_async, /*tp_clear*/
  23228. 0, /*tp_richcompare*/
  23229. 0, /*tp_weaklistoffset*/
  23230. 0, /*tp_iter*/
  23231. 0, /*tp_iternext*/
  23232. __pyx_methods_6gevent_5libev_8corecext_async, /*tp_methods*/
  23233. 0, /*tp_members*/
  23234. __pyx_getsets_6gevent_5libev_8corecext_async, /*tp_getset*/
  23235. 0, /*tp_base*/
  23236. 0, /*tp_dict*/
  23237. 0, /*tp_descr_get*/
  23238. 0, /*tp_descr_set*/
  23239. 0, /*tp_dictoffset*/
  23240. __pyx_pw_6gevent_5libev_8corecext_5async_7__init__, /*tp_init*/
  23241. 0, /*tp_alloc*/
  23242. __pyx_tp_new_6gevent_5libev_8corecext_async, /*tp_new*/
  23243. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23244. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23245. 0, /*tp_free*/
  23246. 0, /*tp_is_gc*/
  23247. 0, /*tp_bases*/
  23248. 0, /*tp_mro*/
  23249. 0, /*tp_cache*/
  23250. 0, /*tp_subclasses*/
  23251. 0, /*tp_weaklist*/
  23252. 0, /*tp_del*/
  23253. 0, /*tp_version_tag*/
  23254. #if PY_VERSION_HEX >= 0x030400a1
  23255. 0, /*tp_finalize*/
  23256. #endif
  23257. };
  23258. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23259. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23260. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_child(PyTypeObject *t, PyObject *a, PyObject *k) {
  23261. struct PyGeventChildObject *p;
  23262. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  23263. if (unlikely(!o)) return 0;
  23264. p = ((struct PyGeventChildObject *)o);
  23265. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23266. p->_callback = Py_None; Py_INCREF(Py_None);
  23267. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23268. return o;
  23269. }
  23270. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_child(PyObject *o) {
  23271. struct PyGeventChildObject *p = (struct PyGeventChildObject *)o;
  23272. #if PY_VERSION_HEX >= 0x030400a1
  23273. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  23274. if (PyObject_CallFinalizerFromDealloc(o)) return;
  23275. }
  23276. #endif
  23277. PyObject_GC_UnTrack(o);
  23278. Py_CLEAR(p->loop);
  23279. Py_CLEAR(p->_callback);
  23280. Py_CLEAR(p->args);
  23281. #if CYTHON_USE_TYPE_SLOTS
  23282. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  23283. #endif
  23284. PyObject_GC_Track(o);
  23285. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  23286. }
  23287. static int __pyx_tp_traverse_6gevent_5libev_8corecext_child(PyObject *o, visitproc v, void *a) {
  23288. int e;
  23289. struct PyGeventChildObject *p = (struct PyGeventChildObject *)o;
  23290. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_child)); if (e) return e;
  23291. if (p->loop) {
  23292. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  23293. }
  23294. if (p->_callback) {
  23295. e = (*v)(p->_callback, a); if (e) return e;
  23296. }
  23297. if (p->args) {
  23298. e = (*v)(p->args, a); if (e) return e;
  23299. }
  23300. return 0;
  23301. }
  23302. static int __pyx_tp_clear_6gevent_5libev_8corecext_child(PyObject *o) {
  23303. PyObject* tmp;
  23304. struct PyGeventChildObject *p = (struct PyGeventChildObject *)o;
  23305. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_child);
  23306. tmp = ((PyObject*)p->loop);
  23307. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23308. Py_XDECREF(tmp);
  23309. tmp = ((PyObject*)p->_callback);
  23310. p->_callback = Py_None; Py_INCREF(Py_None);
  23311. Py_XDECREF(tmp);
  23312. tmp = ((PyObject*)p->args);
  23313. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23314. Py_XDECREF(tmp);
  23315. return 0;
  23316. }
  23317. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_ref(PyObject *o, CYTHON_UNUSED void *x) {
  23318. return __pyx_pw_6gevent_5libev_8corecext_5child_3ref_1__get__(o);
  23319. }
  23320. static int __pyx_setprop_6gevent_5libev_8corecext_5child_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23321. if (v) {
  23322. return __pyx_pw_6gevent_5libev_8corecext_5child_3ref_3__set__(o, v);
  23323. }
  23324. else {
  23325. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23326. return -1;
  23327. }
  23328. }
  23329. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_callback(PyObject *o, CYTHON_UNUSED void *x) {
  23330. return __pyx_pw_6gevent_5libev_8corecext_5child_8callback_1__get__(o);
  23331. }
  23332. static int __pyx_setprop_6gevent_5libev_8corecext_5child_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23333. if (v) {
  23334. return __pyx_pw_6gevent_5libev_8corecext_5child_8callback_3__set__(o, v);
  23335. }
  23336. else {
  23337. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23338. return -1;
  23339. }
  23340. }
  23341. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_priority(PyObject *o, CYTHON_UNUSED void *x) {
  23342. return __pyx_pw_6gevent_5libev_8corecext_5child_8priority_1__get__(o);
  23343. }
  23344. static int __pyx_setprop_6gevent_5libev_8corecext_5child_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23345. if (v) {
  23346. return __pyx_pw_6gevent_5libev_8corecext_5child_8priority_3__set__(o, v);
  23347. }
  23348. else {
  23349. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23350. return -1;
  23351. }
  23352. }
  23353. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_active(PyObject *o, CYTHON_UNUSED void *x) {
  23354. return __pyx_pw_6gevent_5libev_8corecext_5child_6active_1__get__(o);
  23355. }
  23356. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_pending(PyObject *o, CYTHON_UNUSED void *x) {
  23357. return __pyx_pw_6gevent_5libev_8corecext_5child_7pending_1__get__(o);
  23358. }
  23359. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_pid(PyObject *o, CYTHON_UNUSED void *x) {
  23360. return __pyx_pw_6gevent_5libev_8corecext_5child_3pid_1__get__(o);
  23361. }
  23362. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_rpid(PyObject *o, CYTHON_UNUSED void *x) {
  23363. return __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_1__get__(o);
  23364. }
  23365. static int __pyx_setprop_6gevent_5libev_8corecext_5child_rpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23366. if (v) {
  23367. return __pyx_pw_6gevent_5libev_8corecext_5child_4rpid_3__set__(o, v);
  23368. }
  23369. else {
  23370. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23371. return -1;
  23372. }
  23373. }
  23374. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_rstatus(PyObject *o, CYTHON_UNUSED void *x) {
  23375. return __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_1__get__(o);
  23376. }
  23377. static int __pyx_setprop_6gevent_5libev_8corecext_5child_rstatus(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23378. if (v) {
  23379. return __pyx_pw_6gevent_5libev_8corecext_5child_7rstatus_3__set__(o, v);
  23380. }
  23381. else {
  23382. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23383. return -1;
  23384. }
  23385. }
  23386. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_loop(PyObject *o, CYTHON_UNUSED void *x) {
  23387. return __pyx_pw_6gevent_5libev_8corecext_5child_4loop_1__get__(o);
  23388. }
  23389. static int __pyx_setprop_6gevent_5libev_8corecext_5child_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23390. if (v) {
  23391. return __pyx_pw_6gevent_5libev_8corecext_5child_4loop_3__set__(o, v);
  23392. }
  23393. else {
  23394. return __pyx_pw_6gevent_5libev_8corecext_5child_4loop_5__del__(o);
  23395. }
  23396. }
  23397. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child_args(PyObject *o, CYTHON_UNUSED void *x) {
  23398. return __pyx_pw_6gevent_5libev_8corecext_5child_4args_1__get__(o);
  23399. }
  23400. static int __pyx_setprop_6gevent_5libev_8corecext_5child_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23401. if (v) {
  23402. return __pyx_pw_6gevent_5libev_8corecext_5child_4args_3__set__(o, v);
  23403. }
  23404. else {
  23405. return __pyx_pw_6gevent_5libev_8corecext_5child_4args_5__del__(o);
  23406. }
  23407. }
  23408. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_5child__flags(PyObject *o, CYTHON_UNUSED void *x) {
  23409. return __pyx_pw_6gevent_5libev_8corecext_5child_6_flags_1__get__(o);
  23410. }
  23411. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_child[] = {
  23412. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_1stop, METH_NOARGS, 0},
  23413. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  23414. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_5start, METH_VARARGS|METH_KEYWORDS, 0},
  23415. {"_format", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5child_9_format, METH_NOARGS, 0},
  23416. {0, 0, 0, 0}
  23417. };
  23418. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_child[] = {
  23419. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_5child_ref, __pyx_setprop_6gevent_5libev_8corecext_5child_ref, (char *)0, 0},
  23420. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_5child_callback, __pyx_setprop_6gevent_5libev_8corecext_5child_callback, (char *)0, 0},
  23421. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_5child_priority, __pyx_setprop_6gevent_5libev_8corecext_5child_priority, (char *)0, 0},
  23422. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_5child_active, 0, (char *)0, 0},
  23423. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_5child_pending, 0, (char *)0, 0},
  23424. {(char *)"pid", __pyx_getprop_6gevent_5libev_8corecext_5child_pid, 0, (char *)0, 0},
  23425. {(char *)"rpid", __pyx_getprop_6gevent_5libev_8corecext_5child_rpid, __pyx_setprop_6gevent_5libev_8corecext_5child_rpid, (char *)0, 0},
  23426. {(char *)"rstatus", __pyx_getprop_6gevent_5libev_8corecext_5child_rstatus, __pyx_setprop_6gevent_5libev_8corecext_5child_rstatus, (char *)0, 0},
  23427. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_5child_loop, __pyx_setprop_6gevent_5libev_8corecext_5child_loop, (char *)0, 0},
  23428. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_5child_args, __pyx_setprop_6gevent_5libev_8corecext_5child_args, (char *)0, 0},
  23429. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_5child__flags, 0, (char *)0, 0},
  23430. {0, 0, 0, 0, 0}
  23431. };
  23432. DL_EXPORT(PyTypeObject) PyGeventChild_Type = {
  23433. PyVarObject_HEAD_INIT(0, 0)
  23434. "gevent.libev.corecext.child", /*tp_name*/
  23435. sizeof(struct PyGeventChildObject), /*tp_basicsize*/
  23436. 0, /*tp_itemsize*/
  23437. __pyx_tp_dealloc_6gevent_5libev_8corecext_child, /*tp_dealloc*/
  23438. 0, /*tp_print*/
  23439. 0, /*tp_getattr*/
  23440. 0, /*tp_setattr*/
  23441. #if PY_MAJOR_VERSION < 3
  23442. 0, /*tp_compare*/
  23443. #endif
  23444. #if PY_MAJOR_VERSION >= 3
  23445. 0, /*tp_as_async*/
  23446. #endif
  23447. #if CYTHON_COMPILING_IN_PYPY
  23448. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  23449. #else
  23450. 0, /*tp_repr*/
  23451. #endif
  23452. 0, /*tp_as_number*/
  23453. 0, /*tp_as_sequence*/
  23454. 0, /*tp_as_mapping*/
  23455. 0, /*tp_hash*/
  23456. 0, /*tp_call*/
  23457. 0, /*tp_str*/
  23458. 0, /*tp_getattro*/
  23459. 0, /*tp_setattro*/
  23460. 0, /*tp_as_buffer*/
  23461. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  23462. 0, /*tp_doc*/
  23463. __pyx_tp_traverse_6gevent_5libev_8corecext_child, /*tp_traverse*/
  23464. __pyx_tp_clear_6gevent_5libev_8corecext_child, /*tp_clear*/
  23465. 0, /*tp_richcompare*/
  23466. 0, /*tp_weaklistoffset*/
  23467. 0, /*tp_iter*/
  23468. 0, /*tp_iternext*/
  23469. __pyx_methods_6gevent_5libev_8corecext_child, /*tp_methods*/
  23470. 0, /*tp_members*/
  23471. __pyx_getsets_6gevent_5libev_8corecext_child, /*tp_getset*/
  23472. 0, /*tp_base*/
  23473. 0, /*tp_dict*/
  23474. 0, /*tp_descr_get*/
  23475. 0, /*tp_descr_set*/
  23476. 0, /*tp_dictoffset*/
  23477. __pyx_pw_6gevent_5libev_8corecext_5child_7__init__, /*tp_init*/
  23478. 0, /*tp_alloc*/
  23479. __pyx_tp_new_6gevent_5libev_8corecext_child, /*tp_new*/
  23480. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23481. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23482. 0, /*tp_free*/
  23483. 0, /*tp_is_gc*/
  23484. 0, /*tp_bases*/
  23485. 0, /*tp_mro*/
  23486. 0, /*tp_cache*/
  23487. 0, /*tp_subclasses*/
  23488. 0, /*tp_weaklist*/
  23489. 0, /*tp_del*/
  23490. 0, /*tp_version_tag*/
  23491. #if PY_VERSION_HEX >= 0x030400a1
  23492. 0, /*tp_finalize*/
  23493. #endif
  23494. };
  23495. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23496. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23497. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext_stat(PyTypeObject *t, PyObject *a, PyObject *k) {
  23498. struct PyGeventStatObject *p;
  23499. PyObject *o = __pyx_tp_new_6gevent_5libev_8corecext_watcher(t, a, k);
  23500. if (unlikely(!o)) return 0;
  23501. p = ((struct PyGeventStatObject *)o);
  23502. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23503. p->_callback = Py_None; Py_INCREF(Py_None);
  23504. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23505. p->path = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23506. p->_paths = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23507. return o;
  23508. }
  23509. static void __pyx_tp_dealloc_6gevent_5libev_8corecext_stat(PyObject *o) {
  23510. struct PyGeventStatObject *p = (struct PyGeventStatObject *)o;
  23511. #if PY_VERSION_HEX >= 0x030400a1
  23512. if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  23513. if (PyObject_CallFinalizerFromDealloc(o)) return;
  23514. }
  23515. #endif
  23516. PyObject_GC_UnTrack(o);
  23517. Py_CLEAR(p->loop);
  23518. Py_CLEAR(p->_callback);
  23519. Py_CLEAR(p->args);
  23520. Py_CLEAR(p->path);
  23521. Py_CLEAR(p->_paths);
  23522. #if CYTHON_USE_TYPE_SLOTS
  23523. if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  23524. #endif
  23525. PyObject_GC_Track(o);
  23526. __pyx_tp_dealloc_6gevent_5libev_8corecext_watcher(o);
  23527. }
  23528. static int __pyx_tp_traverse_6gevent_5libev_8corecext_stat(PyObject *o, visitproc v, void *a) {
  23529. int e;
  23530. struct PyGeventStatObject *p = (struct PyGeventStatObject *)o;
  23531. e = ((likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) ? ((__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse) ? __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_5libev_8corecext_stat)); if (e) return e;
  23532. if (p->loop) {
  23533. e = (*v)(((PyObject*)p->loop), a); if (e) return e;
  23534. }
  23535. if (p->_callback) {
  23536. e = (*v)(p->_callback, a); if (e) return e;
  23537. }
  23538. if (p->args) {
  23539. e = (*v)(p->args, a); if (e) return e;
  23540. }
  23541. return 0;
  23542. }
  23543. static int __pyx_tp_clear_6gevent_5libev_8corecext_stat(PyObject *o) {
  23544. PyObject* tmp;
  23545. struct PyGeventStatObject *p = (struct PyGeventStatObject *)o;
  23546. if (likely(__pyx_ptype_6gevent_5libev_8corecext_watcher)) { if (__pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear) __pyx_ptype_6gevent_5libev_8corecext_watcher->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_5libev_8corecext_stat);
  23547. tmp = ((PyObject*)p->loop);
  23548. p->loop = ((struct PyGeventLoopObject *)Py_None); Py_INCREF(Py_None);
  23549. Py_XDECREF(tmp);
  23550. tmp = ((PyObject*)p->_callback);
  23551. p->_callback = Py_None; Py_INCREF(Py_None);
  23552. Py_XDECREF(tmp);
  23553. tmp = ((PyObject*)p->args);
  23554. p->args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  23555. Py_XDECREF(tmp);
  23556. return 0;
  23557. }
  23558. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_ref(PyObject *o, CYTHON_UNUSED void *x) {
  23559. return __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_1__get__(o);
  23560. }
  23561. static int __pyx_setprop_6gevent_5libev_8corecext_4stat_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23562. if (v) {
  23563. return __pyx_pw_6gevent_5libev_8corecext_4stat_3ref_3__set__(o, v);
  23564. }
  23565. else {
  23566. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23567. return -1;
  23568. }
  23569. }
  23570. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_callback(PyObject *o, CYTHON_UNUSED void *x) {
  23571. return __pyx_pw_6gevent_5libev_8corecext_4stat_8callback_1__get__(o);
  23572. }
  23573. static int __pyx_setprop_6gevent_5libev_8corecext_4stat_callback(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23574. if (v) {
  23575. return __pyx_pw_6gevent_5libev_8corecext_4stat_8callback_3__set__(o, v);
  23576. }
  23577. else {
  23578. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23579. return -1;
  23580. }
  23581. }
  23582. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_priority(PyObject *o, CYTHON_UNUSED void *x) {
  23583. return __pyx_pw_6gevent_5libev_8corecext_4stat_8priority_1__get__(o);
  23584. }
  23585. static int __pyx_setprop_6gevent_5libev_8corecext_4stat_priority(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23586. if (v) {
  23587. return __pyx_pw_6gevent_5libev_8corecext_4stat_8priority_3__set__(o, v);
  23588. }
  23589. else {
  23590. PyErr_SetString(PyExc_NotImplementedError, "__del__");
  23591. return -1;
  23592. }
  23593. }
  23594. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_active(PyObject *o, CYTHON_UNUSED void *x) {
  23595. return __pyx_pw_6gevent_5libev_8corecext_4stat_6active_1__get__(o);
  23596. }
  23597. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_pending(PyObject *o, CYTHON_UNUSED void *x) {
  23598. return __pyx_pw_6gevent_5libev_8corecext_4stat_7pending_1__get__(o);
  23599. }
  23600. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_attr(PyObject *o, CYTHON_UNUSED void *x) {
  23601. return __pyx_pw_6gevent_5libev_8corecext_4stat_4attr_1__get__(o);
  23602. }
  23603. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_prev(PyObject *o, CYTHON_UNUSED void *x) {
  23604. return __pyx_pw_6gevent_5libev_8corecext_4stat_4prev_1__get__(o);
  23605. }
  23606. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_interval(PyObject *o, CYTHON_UNUSED void *x) {
  23607. return __pyx_pw_6gevent_5libev_8corecext_4stat_8interval_1__get__(o);
  23608. }
  23609. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_loop(PyObject *o, CYTHON_UNUSED void *x) {
  23610. return __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_1__get__(o);
  23611. }
  23612. static int __pyx_setprop_6gevent_5libev_8corecext_4stat_loop(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23613. if (v) {
  23614. return __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_3__set__(o, v);
  23615. }
  23616. else {
  23617. return __pyx_pw_6gevent_5libev_8corecext_4stat_4loop_5__del__(o);
  23618. }
  23619. }
  23620. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_args(PyObject *o, CYTHON_UNUSED void *x) {
  23621. return __pyx_pw_6gevent_5libev_8corecext_4stat_4args_1__get__(o);
  23622. }
  23623. static int __pyx_setprop_6gevent_5libev_8corecext_4stat_args(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  23624. if (v) {
  23625. return __pyx_pw_6gevent_5libev_8corecext_4stat_4args_3__set__(o, v);
  23626. }
  23627. else {
  23628. return __pyx_pw_6gevent_5libev_8corecext_4stat_4args_5__del__(o);
  23629. }
  23630. }
  23631. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat__flags(PyObject *o, CYTHON_UNUSED void *x) {
  23632. return __pyx_pw_6gevent_5libev_8corecext_4stat_6_flags_1__get__(o);
  23633. }
  23634. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat_path(PyObject *o, CYTHON_UNUSED void *x) {
  23635. return __pyx_pw_6gevent_5libev_8corecext_4stat_4path_1__get__(o);
  23636. }
  23637. static PyObject *__pyx_getprop_6gevent_5libev_8corecext_4stat__paths(PyObject *o, CYTHON_UNUSED void *x) {
  23638. return __pyx_pw_6gevent_5libev_8corecext_4stat_6_paths_1__get__(o);
  23639. }
  23640. static PyMethodDef __pyx_methods_6gevent_5libev_8corecext_stat[] = {
  23641. {"stop", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4stat_1stop, METH_NOARGS, 0},
  23642. {"feed", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4stat_3feed, METH_VARARGS|METH_KEYWORDS, 0},
  23643. {"start", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_4stat_5start, METH_VARARGS|METH_KEYWORDS, 0},
  23644. {0, 0, 0, 0}
  23645. };
  23646. static struct PyGetSetDef __pyx_getsets_6gevent_5libev_8corecext_stat[] = {
  23647. {(char *)"ref", __pyx_getprop_6gevent_5libev_8corecext_4stat_ref, __pyx_setprop_6gevent_5libev_8corecext_4stat_ref, (char *)0, 0},
  23648. {(char *)"callback", __pyx_getprop_6gevent_5libev_8corecext_4stat_callback, __pyx_setprop_6gevent_5libev_8corecext_4stat_callback, (char *)0, 0},
  23649. {(char *)"priority", __pyx_getprop_6gevent_5libev_8corecext_4stat_priority, __pyx_setprop_6gevent_5libev_8corecext_4stat_priority, (char *)0, 0},
  23650. {(char *)"active", __pyx_getprop_6gevent_5libev_8corecext_4stat_active, 0, (char *)0, 0},
  23651. {(char *)"pending", __pyx_getprop_6gevent_5libev_8corecext_4stat_pending, 0, (char *)0, 0},
  23652. {(char *)"attr", __pyx_getprop_6gevent_5libev_8corecext_4stat_attr, 0, (char *)0, 0},
  23653. {(char *)"prev", __pyx_getprop_6gevent_5libev_8corecext_4stat_prev, 0, (char *)0, 0},
  23654. {(char *)"interval", __pyx_getprop_6gevent_5libev_8corecext_4stat_interval, 0, (char *)0, 0},
  23655. {(char *)"loop", __pyx_getprop_6gevent_5libev_8corecext_4stat_loop, __pyx_setprop_6gevent_5libev_8corecext_4stat_loop, (char *)0, 0},
  23656. {(char *)"args", __pyx_getprop_6gevent_5libev_8corecext_4stat_args, __pyx_setprop_6gevent_5libev_8corecext_4stat_args, (char *)0, 0},
  23657. {(char *)"_flags", __pyx_getprop_6gevent_5libev_8corecext_4stat__flags, 0, (char *)0, 0},
  23658. {(char *)"path", __pyx_getprop_6gevent_5libev_8corecext_4stat_path, 0, (char *)0, 0},
  23659. {(char *)"_paths", __pyx_getprop_6gevent_5libev_8corecext_4stat__paths, 0, (char *)0, 0},
  23660. {0, 0, 0, 0, 0}
  23661. };
  23662. DL_EXPORT(PyTypeObject) PyGeventStat_Type = {
  23663. PyVarObject_HEAD_INIT(0, 0)
  23664. "gevent.libev.corecext.stat", /*tp_name*/
  23665. sizeof(struct PyGeventStatObject), /*tp_basicsize*/
  23666. 0, /*tp_itemsize*/
  23667. __pyx_tp_dealloc_6gevent_5libev_8corecext_stat, /*tp_dealloc*/
  23668. 0, /*tp_print*/
  23669. 0, /*tp_getattr*/
  23670. 0, /*tp_setattr*/
  23671. #if PY_MAJOR_VERSION < 3
  23672. 0, /*tp_compare*/
  23673. #endif
  23674. #if PY_MAJOR_VERSION >= 3
  23675. 0, /*tp_as_async*/
  23676. #endif
  23677. #if CYTHON_COMPILING_IN_PYPY
  23678. __pyx_pw_6gevent_5libev_8corecext_7watcher_1__repr__, /*tp_repr*/
  23679. #else
  23680. 0, /*tp_repr*/
  23681. #endif
  23682. 0, /*tp_as_number*/
  23683. 0, /*tp_as_sequence*/
  23684. 0, /*tp_as_mapping*/
  23685. 0, /*tp_hash*/
  23686. 0, /*tp_call*/
  23687. 0, /*tp_str*/
  23688. 0, /*tp_getattro*/
  23689. 0, /*tp_setattro*/
  23690. 0, /*tp_as_buffer*/
  23691. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  23692. 0, /*tp_doc*/
  23693. __pyx_tp_traverse_6gevent_5libev_8corecext_stat, /*tp_traverse*/
  23694. __pyx_tp_clear_6gevent_5libev_8corecext_stat, /*tp_clear*/
  23695. 0, /*tp_richcompare*/
  23696. 0, /*tp_weaklistoffset*/
  23697. 0, /*tp_iter*/
  23698. 0, /*tp_iternext*/
  23699. __pyx_methods_6gevent_5libev_8corecext_stat, /*tp_methods*/
  23700. 0, /*tp_members*/
  23701. __pyx_getsets_6gevent_5libev_8corecext_stat, /*tp_getset*/
  23702. 0, /*tp_base*/
  23703. 0, /*tp_dict*/
  23704. 0, /*tp_descr_get*/
  23705. 0, /*tp_descr_set*/
  23706. 0, /*tp_dictoffset*/
  23707. __pyx_pw_6gevent_5libev_8corecext_4stat_7__init__, /*tp_init*/
  23708. 0, /*tp_alloc*/
  23709. __pyx_tp_new_6gevent_5libev_8corecext_stat, /*tp_new*/
  23710. 0, /*tp_free*/
  23711. 0, /*tp_is_gc*/
  23712. 0, /*tp_bases*/
  23713. 0, /*tp_mro*/
  23714. 0, /*tp_cache*/
  23715. 0, /*tp_subclasses*/
  23716. 0, /*tp_weaklist*/
  23717. 0, /*tp_del*/
  23718. 0, /*tp_version_tag*/
  23719. #if PY_VERSION_HEX >= 0x030400a1
  23720. 0, /*tp_finalize*/
  23721. #endif
  23722. };
  23723. static struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *__pyx_freelist_6gevent_5libev_8corecext___pyx_scope_struct__genexpr[8];
  23724. static int __pyx_freecount_6gevent_5libev_8corecext___pyx_scope_struct__genexpr = 0;
  23725. static PyObject *__pyx_tp_new_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  23726. PyObject *o;
  23727. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6gevent_5libev_8corecext___pyx_scope_struct__genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr)))) {
  23728. o = (PyObject*)__pyx_freelist_6gevent_5libev_8corecext___pyx_scope_struct__genexpr[--__pyx_freecount_6gevent_5libev_8corecext___pyx_scope_struct__genexpr];
  23729. memset(o, 0, sizeof(struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr));
  23730. (void) PyObject_INIT(o, t);
  23731. PyObject_GC_Track(o);
  23732. } else {
  23733. o = (*t->tp_alloc)(t, 0);
  23734. if (unlikely(!o)) return 0;
  23735. }
  23736. return o;
  23737. }
  23738. static void __pyx_tp_dealloc_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(PyObject *o) {
  23739. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)o;
  23740. PyObject_GC_UnTrack(o);
  23741. Py_CLEAR(p->__pyx_v_flag);
  23742. Py_CLEAR(p->__pyx_v_string);
  23743. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6gevent_5libev_8corecext___pyx_scope_struct__genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr)))) {
  23744. __pyx_freelist_6gevent_5libev_8corecext___pyx_scope_struct__genexpr[__pyx_freecount_6gevent_5libev_8corecext___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)o);
  23745. } else {
  23746. (*Py_TYPE(o)->tp_free)(o);
  23747. }
  23748. }
  23749. static int __pyx_tp_traverse_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
  23750. int e;
  23751. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)o;
  23752. if (p->__pyx_v_flag) {
  23753. e = (*v)(p->__pyx_v_flag, a); if (e) return e;
  23754. }
  23755. if (p->__pyx_v_string) {
  23756. e = (*v)(p->__pyx_v_string, a); if (e) return e;
  23757. }
  23758. return 0;
  23759. }
  23760. static int __pyx_tp_clear_6gevent_5libev_8corecext___pyx_scope_struct__genexpr(PyObject *o) {
  23761. PyObject* tmp;
  23762. struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr *)o;
  23763. tmp = ((PyObject*)p->__pyx_v_flag);
  23764. p->__pyx_v_flag = Py_None; Py_INCREF(Py_None);
  23765. Py_XDECREF(tmp);
  23766. tmp = ((PyObject*)p->__pyx_v_string);
  23767. p->__pyx_v_string = Py_None; Py_INCREF(Py_None);
  23768. Py_XDECREF(tmp);
  23769. return 0;
  23770. }
  23771. static PyTypeObject __pyx_type_6gevent_5libev_8corecext___pyx_scope_struct__genexpr = {
  23772. PyVarObject_HEAD_INIT(0, 0)
  23773. "gevent.libev.corecext.__pyx_scope_struct__genexpr", /*tp_name*/
  23774. sizeof(struct __pyx_obj_6gevent_5libev_8corecext___pyx_scope_struct__genexpr), /*tp_basicsize*/
  23775. 0, /*tp_itemsize*/
  23776. __pyx_tp_dealloc_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, /*tp_dealloc*/
  23777. 0, /*tp_print*/
  23778. 0, /*tp_getattr*/
  23779. 0, /*tp_setattr*/
  23780. #if PY_MAJOR_VERSION < 3
  23781. 0, /*tp_compare*/
  23782. #endif
  23783. #if PY_MAJOR_VERSION >= 3
  23784. 0, /*tp_as_async*/
  23785. #endif
  23786. 0, /*tp_repr*/
  23787. 0, /*tp_as_number*/
  23788. 0, /*tp_as_sequence*/
  23789. 0, /*tp_as_mapping*/
  23790. 0, /*tp_hash*/
  23791. 0, /*tp_call*/
  23792. 0, /*tp_str*/
  23793. 0, /*tp_getattro*/
  23794. 0, /*tp_setattro*/
  23795. 0, /*tp_as_buffer*/
  23796. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  23797. 0, /*tp_doc*/
  23798. __pyx_tp_traverse_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, /*tp_traverse*/
  23799. __pyx_tp_clear_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, /*tp_clear*/
  23800. 0, /*tp_richcompare*/
  23801. 0, /*tp_weaklistoffset*/
  23802. 0, /*tp_iter*/
  23803. 0, /*tp_iternext*/
  23804. 0, /*tp_methods*/
  23805. 0, /*tp_members*/
  23806. 0, /*tp_getset*/
  23807. 0, /*tp_base*/
  23808. 0, /*tp_dict*/
  23809. 0, /*tp_descr_get*/
  23810. 0, /*tp_descr_set*/
  23811. 0, /*tp_dictoffset*/
  23812. 0, /*tp_init*/
  23813. 0, /*tp_alloc*/
  23814. __pyx_tp_new_6gevent_5libev_8corecext___pyx_scope_struct__genexpr, /*tp_new*/
  23815. 0, /*tp_free*/
  23816. 0, /*tp_is_gc*/
  23817. 0, /*tp_bases*/
  23818. 0, /*tp_mro*/
  23819. 0, /*tp_cache*/
  23820. 0, /*tp_subclasses*/
  23821. 0, /*tp_weaklist*/
  23822. 0, /*tp_del*/
  23823. 0, /*tp_version_tag*/
  23824. #if PY_VERSION_HEX >= 0x030400a1
  23825. 0, /*tp_finalize*/
  23826. #endif
  23827. };
  23828. static PyMethodDef __pyx_methods[] = {
  23829. {"_flags_to_list", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_5_flags_to_list, METH_O, 0},
  23830. {"_flags_to_int", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_7_flags_to_int, METH_O, 0},
  23831. {"_check_flags", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_9_check_flags, METH_O, 0},
  23832. {"_events_to_str", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_11_events_to_str, METH_O, 0},
  23833. {"set_syserr_cb", (PyCFunction)__pyx_pw_6gevent_5libev_8corecext_21set_syserr_cb, METH_O, 0},
  23834. {0, 0, 0, 0}
  23835. };
  23836. #if PY_MAJOR_VERSION >= 3
  23837. static struct PyModuleDef __pyx_moduledef = {
  23838. #if PY_VERSION_HEX < 0x03020000
  23839. { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  23840. #else
  23841. PyModuleDef_HEAD_INIT,
  23842. #endif
  23843. "corecext",
  23844. 0, /* m_doc */
  23845. -1, /* m_size */
  23846. __pyx_methods /* m_methods */,
  23847. NULL, /* m_reload */
  23848. NULL, /* m_traverse */
  23849. NULL, /* m_clear */
  23850. NULL /* m_free */
  23851. };
  23852. #endif
  23853. static __Pyx_StringTabEntry __pyx_string_tab[] = {
  23854. {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  23855. {&__pyx_n_s_ASYNC, __pyx_k_ASYNC, sizeof(__pyx_k_ASYNC), 0, 0, 1, 1},
  23856. {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  23857. {&__pyx_n_s_BACKEND_EPOLL, __pyx_k_BACKEND_EPOLL, sizeof(__pyx_k_BACKEND_EPOLL), 0, 0, 1, 1},
  23858. {&__pyx_n_s_BACKEND_KQUEUE, __pyx_k_BACKEND_KQUEUE, sizeof(__pyx_k_BACKEND_KQUEUE), 0, 0, 1, 1},
  23859. {&__pyx_n_s_BACKEND_POLL, __pyx_k_BACKEND_POLL, sizeof(__pyx_k_BACKEND_POLL), 0, 0, 1, 1},
  23860. {&__pyx_n_s_BACKEND_PORT, __pyx_k_BACKEND_PORT, sizeof(__pyx_k_BACKEND_PORT), 0, 0, 1, 1},
  23861. {&__pyx_n_s_BACKEND_SELECT, __pyx_k_BACKEND_SELECT, sizeof(__pyx_k_BACKEND_SELECT), 0, 0, 1, 1},
  23862. {&__pyx_n_s_CHECK, __pyx_k_CHECK, sizeof(__pyx_k_CHECK), 0, 0, 1, 1},
  23863. {&__pyx_n_s_CHILD, __pyx_k_CHILD, sizeof(__pyx_k_CHILD), 0, 0, 1, 1},
  23864. {&__pyx_n_s_CLEANUP, __pyx_k_CLEANUP, sizeof(__pyx_k_CLEANUP), 0, 0, 1, 1},
  23865. {&__pyx_n_s_CUSTOM, __pyx_k_CUSTOM, sizeof(__pyx_k_CUSTOM), 0, 0, 1, 1},
  23866. {&__pyx_kp_s_Cannot_set_priority_of_an_active, __pyx_k_Cannot_set_priority_of_an_active, sizeof(__pyx_k_Cannot_set_priority_of_an_active), 0, 0, 1, 0},
  23867. {&__pyx_n_s_EMBED, __pyx_k_EMBED, sizeof(__pyx_k_EMBED), 0, 0, 1, 1},
  23868. {&__pyx_n_s_ERROR, __pyx_k_ERROR, sizeof(__pyx_k_ERROR), 0, 0, 1, 1},
  23869. {&__pyx_n_s_EVENTS, __pyx_k_EVENTS, sizeof(__pyx_k_EVENTS), 0, 0, 1, 1},
  23870. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23871. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23872. {&__pyx_n_s_EV_USE_4HEAP, __pyx_k_EV_USE_4HEAP, sizeof(__pyx_k_EV_USE_4HEAP), 0, 0, 1, 1},
  23873. {&__pyx_n_s_EV_USE_CLOCK_SYSCALL, __pyx_k_EV_USE_CLOCK_SYSCALL, sizeof(__pyx_k_EV_USE_CLOCK_SYSCALL), 0, 0, 1, 1},
  23874. {&__pyx_n_s_EV_USE_EVENTFD, __pyx_k_EV_USE_EVENTFD, sizeof(__pyx_k_EV_USE_EVENTFD), 0, 0, 1, 1},
  23875. {&__pyx_n_s_EV_USE_FLOOR, __pyx_k_EV_USE_FLOOR, sizeof(__pyx_k_EV_USE_FLOOR), 0, 0, 1, 1},
  23876. {&__pyx_n_s_EV_USE_INOTIFY, __pyx_k_EV_USE_INOTIFY, sizeof(__pyx_k_EV_USE_INOTIFY), 0, 0, 1, 1},
  23877. {&__pyx_n_s_EV_USE_MONOTONIC, __pyx_k_EV_USE_MONOTONIC, sizeof(__pyx_k_EV_USE_MONOTONIC), 0, 0, 1, 1},
  23878. {&__pyx_n_s_EV_USE_NANOSLEEP, __pyx_k_EV_USE_NANOSLEEP, sizeof(__pyx_k_EV_USE_NANOSLEEP), 0, 0, 1, 1},
  23879. {&__pyx_n_s_EV_USE_REALTIME, __pyx_k_EV_USE_REALTIME, sizeof(__pyx_k_EV_USE_REALTIME), 0, 0, 1, 1},
  23880. {&__pyx_n_s_EV_USE_SIGNALFD, __pyx_k_EV_USE_SIGNALFD, sizeof(__pyx_k_EV_USE_SIGNALFD), 0, 0, 1, 1},
  23881. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23882. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23883. {&__pyx_kp_s_Expected_callable_not_r, __pyx_k_Expected_callable_not_r, sizeof(__pyx_k_Expected_callable_not_r), 0, 0, 1, 0},
  23884. {&__pyx_kp_s_Expected_callable_or_None_got_r, __pyx_k_Expected_callable_or_None_got_r, sizeof(__pyx_k_Expected_callable_or_None_got_r), 0, 0, 1, 0},
  23885. {&__pyx_n_s_FORK, __pyx_k_FORK, sizeof(__pyx_k_FORK), 0, 0, 1, 1},
  23886. {&__pyx_n_s_FORKCHECK, __pyx_k_FORKCHECK, sizeof(__pyx_k_FORKCHECK), 0, 0, 1, 1},
  23887. {&__pyx_n_s_IDLE, __pyx_k_IDLE, sizeof(__pyx_k_IDLE), 0, 0, 1, 1},
  23888. {&__pyx_n_s_IOFDSET, __pyx_k_IOFDSET, sizeof(__pyx_k_IOFDSET), 0, 0, 1, 1},
  23889. {&__pyx_kp_s_Invalid_backend_or_flag_s_Possib, __pyx_k_Invalid_backend_or_flag_s_Possib, sizeof(__pyx_k_Invalid_backend_or_flag_s_Possib), 0, 0, 1, 0},
  23890. {&__pyx_kp_s_Invalid_value_for_backend_0x_x, __pyx_k_Invalid_value_for_backend_0x_x, sizeof(__pyx_k_Invalid_value_for_backend_0x_x), 0, 0, 1, 0},
  23891. {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  23892. {&__pyx_n_s_LIBEV_EMBED, __pyx_k_LIBEV_EMBED, sizeof(__pyx_k_LIBEV_EMBED), 0, 0, 1, 1},
  23893. {&__pyx_n_s_MAXPRI, __pyx_k_MAXPRI, sizeof(__pyx_k_MAXPRI), 0, 0, 1, 1},
  23894. {&__pyx_n_s_MINPRI, __pyx_k_MINPRI, sizeof(__pyx_k_MINPRI), 0, 0, 1, 1},
  23895. {&__pyx_n_s_NOINOTIFY, __pyx_k_NOINOTIFY, sizeof(__pyx_k_NOINOTIFY), 0, 0, 1, 1},
  23896. {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
  23897. {&__pyx_n_s_NOSIGMASK, __pyx_k_NOSIGMASK, sizeof(__pyx_k_NOSIGMASK), 0, 0, 1, 1},
  23898. {&__pyx_n_s_NSIG, __pyx_k_NSIG, sizeof(__pyx_k_NSIG), 0, 0, 1, 1},
  23899. {&__pyx_n_s_PERIODIC, __pyx_k_PERIODIC, sizeof(__pyx_k_PERIODIC), 0, 0, 1, 1},
  23900. {&__pyx_n_s_PREPARE, __pyx_k_PREPARE, sizeof(__pyx_k_PREPARE), 0, 0, 1, 1},
  23901. {&__pyx_n_s_READ, __pyx_k_READ, sizeof(__pyx_k_READ), 0, 0, 1, 1},
  23902. {&__pyx_n_s_READWRITE, __pyx_k_READWRITE, sizeof(__pyx_k_READWRITE), 0, 0, 1, 1},
  23903. {&__pyx_n_s_SIGNAL, __pyx_k_SIGNAL, sizeof(__pyx_k_SIGNAL), 0, 0, 1, 1},
  23904. {&__pyx_n_s_SIGNALFD, __pyx_k_SIGNALFD, sizeof(__pyx_k_SIGNALFD), 0, 0, 1, 1},
  23905. {&__pyx_n_s_STAT, __pyx_k_STAT, sizeof(__pyx_k_STAT), 0, 0, 1, 1},
  23906. {&__pyx_n_s_SYSERR_CALLBACK, __pyx_k_SYSERR_CALLBACK, sizeof(__pyx_k_SYSERR_CALLBACK), 0, 0, 1, 1},
  23907. {&__pyx_n_s_SystemError, __pyx_k_SystemError, sizeof(__pyx_k_SystemError), 0, 0, 1, 1},
  23908. {&__pyx_n_s_TIMER, __pyx_k_TIMER, sizeof(__pyx_k_TIMER), 0, 0, 1, 1},
  23909. {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  23910. {&__pyx_n_s_UNDEF, __pyx_k_UNDEF, sizeof(__pyx_k_UNDEF), 0, 0, 1, 1},
  23911. {&__pyx_kp_s_Unsupported_backend_s, __pyx_k_Unsupported_backend_s, sizeof(__pyx_k_Unsupported_backend_s), 0, 0, 1, 0},
  23912. {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  23913. {&__pyx_n_s_WRITE, __pyx_k_WRITE, sizeof(__pyx_k_WRITE), 0, 0, 1, 1},
  23914. {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
  23915. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23916. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  23917. {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0},
  23918. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23919. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23920. {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0},
  23921. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23922. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23923. {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  23924. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23925. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23926. {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0},
  23927. {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
  23928. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23929. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  23930. {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0},
  23931. {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  23932. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23933. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23934. {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  23935. {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  23936. {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
  23937. {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1},
  23938. {&__pyx_kp_s_active_2, __pyx_k_active_2, sizeof(__pyx_k_active_2), 0, 0, 1, 0},
  23939. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23940. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23941. {&__pyx_n_s_activecnt, __pyx_k_activecnt, sizeof(__pyx_k_activecnt), 0, 0, 1, 1},
  23942. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23943. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23944. {&__pyx_n_s_after, __pyx_k_after, sizeof(__pyx_k_after), 0, 0, 1, 1},
  23945. {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  23946. {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  23947. {&__pyx_kp_s_args_r, __pyx_k_args_r, sizeof(__pyx_k_args_r), 0, 0, 1, 0},
  23948. {&__pyx_n_s_backend, __pyx_k_backend, sizeof(__pyx_k_backend), 0, 0, 1, 1},
  23949. {&__pyx_n_s_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 0, 0, 1, 1},
  23950. {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  23951. {&__pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_k_c_users_appveyor_appdata_local_t, sizeof(__pyx_k_c_users_appveyor_appdata_local_t), 0, 0, 1, 0},
  23952. {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
  23953. {&__pyx_kp_s_callback_must_be_callable_not_No, __pyx_k_callback_must_be_callable_not_No, sizeof(__pyx_k_callback_must_be_callable_not_No), 0, 0, 1, 0},
  23954. {&__pyx_kp_s_callback_r, __pyx_k_callback_r, sizeof(__pyx_k_callback_r), 0, 0, 1, 0},
  23955. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23956. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23957. {&__pyx_kp_s_child_watchers_are_only_availabl, __pyx_k_child_watchers_are_only_availabl, sizeof(__pyx_k_child_watchers_are_only_availabl), 0, 0, 1, 0},
  23958. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23959. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23960. {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  23961. {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  23962. {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  23963. {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  23964. {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  23965. {&__pyx_kp_s_default_2, __pyx_k_default_2, sizeof(__pyx_k_default_2), 0, 0, 1, 0},
  23966. {&__pyx_n_s_default_handle_error, __pyx_k_default_handle_error, sizeof(__pyx_k_default_handle_error), 0, 0, 1, 1},
  23967. {&__pyx_n_s_destroyed, __pyx_k_destroyed, sizeof(__pyx_k_destroyed), 0, 0, 1, 1},
  23968. {&__pyx_n_s_embeddable_backends, __pyx_k_embeddable_backends, sizeof(__pyx_k_embeddable_backends), 0, 0, 1, 1},
  23969. {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  23970. {&__pyx_n_s_epoll, __pyx_k_epoll, sizeof(__pyx_k_epoll), 0, 0, 1, 1},
  23971. {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
  23972. {&__pyx_kp_s_ev_default_loop_s_failed, __pyx_k_ev_default_loop_s_failed, sizeof(__pyx_k_ev_default_loop_s_failed), 0, 0, 1, 0},
  23973. {&__pyx_kp_s_ev_loop_new_s_failed, __pyx_k_ev_loop_new_s_failed, sizeof(__pyx_k_ev_loop_new_s_failed), 0, 0, 1, 0},
  23974. {&__pyx_n_s_events, __pyx_k_events, sizeof(__pyx_k_events), 0, 0, 1, 1},
  23975. {&__pyx_n_s_events_2, __pyx_k_events_2, sizeof(__pyx_k_events_2), 0, 0, 1, 1},
  23976. {&__pyx_n_s_events_str, __pyx_k_events_str, sizeof(__pyx_k_events_str), 0, 0, 1, 1},
  23977. {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
  23978. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23979. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23980. {&__pyx_kp_s_fd_must_be_non_negative_r, __pyx_k_fd_must_be_non_negative_r, sizeof(__pyx_k_fd_must_be_non_negative_r), 0, 0, 1, 0},
  23981. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23982. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23983. {&__pyx_kp_s_fd_s_events_s, __pyx_k_fd_s_events_s, sizeof(__pyx_k_fd_s_events_s), 0, 0, 1, 0},
  23984. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23985. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23986. {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1},
  23987. {&__pyx_kp_s_fileno_2, __pyx_k_fileno_2, sizeof(__pyx_k_fileno_2), 0, 0, 1, 0},
  23988. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23989. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  23990. {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  23991. {&__pyx_n_s_flags_2, __pyx_k_flags_2, sizeof(__pyx_k_flags_2), 0, 0, 1, 1},
  23992. {&__pyx_n_s_flags_str2int, __pyx_k_flags_str2int, sizeof(__pyx_k_flags_str2int), 0, 0, 1, 1},
  23993. {&__pyx_n_s_forkcheck, __pyx_k_forkcheck, sizeof(__pyx_k_forkcheck), 0, 0, 1, 1},
  23994. {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  23995. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  23996. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  23997. {&__pyx_n_s_format_details, __pyx_k_format_details, sizeof(__pyx_k_format_details), 0, 0, 1, 1},
  23998. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  23999. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24000. {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  24001. {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  24002. {&__pyx_n_s_get_header_version, __pyx_k_get_header_version, sizeof(__pyx_k_get_header_version), 0, 0, 1, 1},
  24003. {&__pyx_n_s_get_version, __pyx_k_get_version, sizeof(__pyx_k_get_version), 0, 0, 1, 1},
  24004. {&__pyx_n_s_getfilesystemencoding, __pyx_k_getfilesystemencoding, sizeof(__pyx_k_getfilesystemencoding), 0, 0, 1, 1},
  24005. {&__pyx_kp_s_gevent_core_EVENTS, __pyx_k_gevent_core_EVENTS, sizeof(__pyx_k_gevent_core_EVENTS), 0, 0, 1, 0},
  24006. {&__pyx_n_s_gevent_libev_corecext, __pyx_k_gevent_libev_corecext, sizeof(__pyx_k_gevent_libev_corecext), 0, 0, 1, 1},
  24007. {&__pyx_n_s_handle_error, __pyx_k_handle_error, sizeof(__pyx_k_handle_error), 0, 0, 1, 1},
  24008. {&__pyx_n_s_handle_syserr, __pyx_k_handle_syserr, sizeof(__pyx_k_handle_syserr), 0, 0, 1, 1},
  24009. {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
  24010. {&__pyx_n_s_how, __pyx_k_how, sizeof(__pyx_k_how), 0, 0, 1, 1},
  24011. {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  24012. {&__pyx_kp_s_illegal_event_mask_r, __pyx_k_illegal_event_mask_r, sizeof(__pyx_k_illegal_event_mask_r), 0, 0, 1, 0},
  24013. {&__pyx_kp_s_illegal_signal_number_r, __pyx_k_illegal_signal_number_r, sizeof(__pyx_k_illegal_signal_number_r), 0, 0, 1, 0},
  24014. {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  24015. {&__pyx_n_s_interval, __pyx_k_interval, sizeof(__pyx_k_interval), 0, 0, 1, 1},
  24016. {&__pyx_kp_s_io_watcher_attribute_events_is, __pyx_k_io_watcher_attribute_events_is, sizeof(__pyx_k_io_watcher_attribute_events_is), 0, 0, 1, 0},
  24017. {&__pyx_kp_s_io_watcher_attribute_fd_is_read, __pyx_k_io_watcher_attribute_fd_is_read, sizeof(__pyx_k_io_watcher_attribute_fd_is_read), 0, 0, 1, 0},
  24018. {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  24019. {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  24020. {&__pyx_n_s_kqueue, __pyx_k_kqueue, sizeof(__pyx_k_kqueue), 0, 0, 1, 1},
  24021. {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
  24022. {&__pyx_kp_s_libev_d_02d, __pyx_k_libev_d_02d, sizeof(__pyx_k_libev_d_02d), 0, 0, 1, 0},
  24023. {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  24024. {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  24025. {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  24026. {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  24027. {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  24028. {&__pyx_n_s_noenv, __pyx_k_noenv, sizeof(__pyx_k_noenv), 0, 0, 1, 1},
  24029. {&__pyx_n_s_noinotify, __pyx_k_noinotify, sizeof(__pyx_k_noinotify), 0, 0, 1, 1},
  24030. {&__pyx_n_s_nosigmask, __pyx_k_nosigmask, sizeof(__pyx_k_nosigmask), 0, 0, 1, 1},
  24031. {&__pyx_n_s_nowait, __pyx_k_nowait, sizeof(__pyx_k_nowait), 0, 0, 1, 1},
  24032. {&__pyx_n_s_once, __pyx_k_once, sizeof(__pyx_k_once), 0, 0, 1, 1},
  24033. {&__pyx_kp_s_operation_on_destroyed_loop, __pyx_k_operation_on_destroyed_loop, sizeof(__pyx_k_operation_on_destroyed_loop), 0, 0, 1, 0},
  24034. {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  24035. {&__pyx_n_s_pass_events, __pyx_k_pass_events, sizeof(__pyx_k_pass_events), 0, 0, 1, 1},
  24036. {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  24037. {&__pyx_n_s_pending, __pyx_k_pending, sizeof(__pyx_k_pending), 0, 0, 1, 1},
  24038. {&__pyx_kp_s_pending_2, __pyx_k_pending_2, sizeof(__pyx_k_pending_2), 0, 0, 1, 0},
  24039. {&__pyx_kp_s_pending_s, __pyx_k_pending_s, sizeof(__pyx_k_pending_s), 0, 0, 1, 0},
  24040. {&__pyx_n_s_pendingcnt, __pyx_k_pendingcnt, sizeof(__pyx_k_pendingcnt), 0, 0, 1, 1},
  24041. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24042. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24043. {&__pyx_n_s_pid, __pyx_k_pid, sizeof(__pyx_k_pid), 0, 0, 1, 1},
  24044. {&__pyx_kp_s_pid_r_rstatus_r, __pyx_k_pid_r_rstatus_r, sizeof(__pyx_k_pid_r_rstatus_r), 0, 0, 1, 0},
  24045. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24046. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24047. {&__pyx_n_s_poll, __pyx_k_poll, sizeof(__pyx_k_poll), 0, 0, 1, 1},
  24048. {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1},
  24049. {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1},
  24050. {&__pyx_n_s_print_exception, __pyx_k_print_exception, sizeof(__pyx_k_print_exception), 0, 0, 1, 1},
  24051. {&__pyx_n_s_priority, __pyx_k_priority, sizeof(__pyx_k_priority), 0, 0, 1, 1},
  24052. {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  24053. {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  24054. {&__pyx_n_s_recommended_backends, __pyx_k_recommended_backends, sizeof(__pyx_k_recommended_backends), 0, 0, 1, 1},
  24055. {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
  24056. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24057. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24058. {&__pyx_kp_s_ref_2, __pyx_k_ref_2, sizeof(__pyx_k_ref_2), 0, 0, 1, 0},
  24059. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24060. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24061. {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
  24062. {&__pyx_kp_s_repeat_must_be_positive_or_zero, __pyx_k_repeat_must_be_positive_or_zero, sizeof(__pyx_k_repeat_must_be_positive_or_zero), 0, 0, 1, 0},
  24063. {&__pyx_n_s_revents, __pyx_k_revents, sizeof(__pyx_k_revents), 0, 0, 1, 1},
  24064. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24065. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24066. {&__pyx_n_s_rstatus, __pyx_k_rstatus, sizeof(__pyx_k_rstatus), 0, 0, 1, 1},
  24067. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24068. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24069. {&__pyx_kp_s_s_at_0x_x_s, __pyx_k_s_at_0x_x_s, sizeof(__pyx_k_s_at_0x_x_s), 0, 0, 1, 0},
  24070. {&__pyx_kp_s_s_at_0x_x_s_2, __pyx_k_s_at_0x_x_s_2, sizeof(__pyx_k_s_at_0x_x_s_2), 0, 0, 1, 0},
  24071. {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1},
  24072. {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  24073. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24074. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24075. {&__pyx_n_s_sigfd, __pyx_k_sigfd, sizeof(__pyx_k_sigfd), 0, 0, 1, 1},
  24076. {&__pyx_kp_s_sigfd_2, __pyx_k_sigfd_2, sizeof(__pyx_k_sigfd_2), 0, 0, 1, 0},
  24077. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24078. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24079. {&__pyx_n_s_signal, __pyx_k_signal, sizeof(__pyx_k_signal), 0, 0, 1, 1},
  24080. {&__pyx_n_s_signalfd, __pyx_k_signalfd, sizeof(__pyx_k_signalfd), 0, 0, 1, 1},
  24081. {&__pyx_n_s_signalmodule, __pyx_k_signalmodule, sizeof(__pyx_k_signalmodule), 0, 0, 1, 1},
  24082. {&__pyx_n_s_signalnum, __pyx_k_signalnum, sizeof(__pyx_k_signalnum), 0, 0, 1, 1},
  24083. {&__pyx_n_s_signum, __pyx_k_signum, sizeof(__pyx_k_signum), 0, 0, 1, 1},
  24084. {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  24085. {&__pyx_n_s_stop_watchers, __pyx_k_stop_watchers, sizeof(__pyx_k_stop_watchers), 0, 0, 1, 1},
  24086. {&__pyx_kp_s_stopped, __pyx_k_stopped, sizeof(__pyx_k_stopped), 0, 0, 1, 0},
  24087. {&__pyx_n_s_strerror, __pyx_k_strerror, sizeof(__pyx_k_strerror), 0, 0, 1, 1},
  24088. {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  24089. {&__pyx_n_s_supported_backends, __pyx_k_supported_backends, sizeof(__pyx_k_supported_backends), 0, 0, 1, 1},
  24090. {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  24091. {&__pyx_n_s_tb, __pyx_k_tb, sizeof(__pyx_k_tb), 0, 0, 1, 1},
  24092. {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  24093. {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  24094. {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  24095. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24096. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24097. {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
  24098. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24099. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24100. {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  24101. {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  24102. {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  24103. {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  24104. {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  24105. {0, 0, 0, 0, 0, 0, 0}
  24106. };
  24107. static int __Pyx_InitCachedBuiltins(void) {
  24108. __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(0, 16, __pyx_L1_error)
  24109. __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 182, __pyx_L1_error)
  24110. __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 183, __pyx_L1_error)
  24111. __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 189, __pyx_L1_error)
  24112. __pyx_builtin_SystemError = __Pyx_GetBuiltinName(__pyx_n_s_SystemError); if (!__pyx_builtin_SystemError) __PYX_ERR(0, 278, __pyx_L1_error)
  24113. __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 431, __pyx_L1_error)
  24114. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24115. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24116. __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 561, __pyx_L1_error)
  24117. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24118. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24119. __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 759, __pyx_L1_error)
  24120. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24121. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24122. __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 783, __pyx_L1_error)
  24123. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24124. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24125. return 0;
  24126. __pyx_L1_error:;
  24127. return -1;
  24128. }
  24129. static int __Pyx_InitCachedConstants(void) {
  24130. __Pyx_RefNannyDeclarations
  24131. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  24132. __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 177, __pyx_L1_error)
  24133. __Pyx_GOTREF(__pyx_tuple__2);
  24134. __Pyx_GIVEREF(__pyx_tuple__2);
  24135. __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 381, __pyx_L1_error)
  24136. __Pyx_GOTREF(__pyx_tuple__6);
  24137. __Pyx_GIVEREF(__pyx_tuple__6);
  24138. __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 397, __pyx_L1_error)
  24139. __Pyx_GOTREF(__pyx_tuple__7);
  24140. __Pyx_GIVEREF(__pyx_tuple__7);
  24141. __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 403, __pyx_L1_error)
  24142. __Pyx_GOTREF(__pyx_tuple__8);
  24143. __Pyx_GIVEREF(__pyx_tuple__8);
  24144. __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 409, __pyx_L1_error)
  24145. __Pyx_GOTREF(__pyx_tuple__10);
  24146. __Pyx_GIVEREF(__pyx_tuple__10);
  24147. __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 415, __pyx_L1_error)
  24148. __Pyx_GOTREF(__pyx_tuple__11);
  24149. __Pyx_GIVEREF(__pyx_tuple__11);
  24150. __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 421, __pyx_L1_error)
  24151. __Pyx_GOTREF(__pyx_tuple__12);
  24152. __Pyx_GIVEREF(__pyx_tuple__12);
  24153. __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 427, __pyx_L1_error)
  24154. __Pyx_GOTREF(__pyx_tuple__13);
  24155. __Pyx_GIVEREF(__pyx_tuple__13);
  24156. __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 438, __pyx_L1_error)
  24157. __Pyx_GOTREF(__pyx_tuple__14);
  24158. __Pyx_GIVEREF(__pyx_tuple__14);
  24159. __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 446, __pyx_L1_error)
  24160. __Pyx_GOTREF(__pyx_tuple__15);
  24161. __Pyx_GIVEREF(__pyx_tuple__15);
  24162. __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 454, __pyx_L1_error)
  24163. __Pyx_GOTREF(__pyx_tuple__16);
  24164. __Pyx_GIVEREF(__pyx_tuple__16);
  24165. __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 462, __pyx_L1_error)
  24166. __Pyx_GOTREF(__pyx_tuple__17);
  24167. __Pyx_GIVEREF(__pyx_tuple__17);
  24168. __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 470, __pyx_L1_error)
  24169. __Pyx_GOTREF(__pyx_tuple__18);
  24170. __Pyx_GIVEREF(__pyx_tuple__18);
  24171. __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 482, __pyx_L1_error)
  24172. __Pyx_GOTREF(__pyx_tuple__19);
  24173. __Pyx_GIVEREF(__pyx_tuple__19);
  24174. __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 534, __pyx_L1_error)
  24175. __Pyx_GOTREF(__pyx_tuple__20);
  24176. __Pyx_GIVEREF(__pyx_tuple__20);
  24177. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24178. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  24179. __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 737, __pyx_L1_error)
  24180. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  24181. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24182. __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 587, __pyx_L1_error)
  24183. __Pyx_GOTREF(__pyx_tuple__22);
  24184. __Pyx_GIVEREF(__pyx_tuple__22);
  24185. __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 595, __pyx_L1_error)
  24186. __Pyx_GOTREF(__pyx_tuple__23);
  24187. __Pyx_GIVEREF(__pyx_tuple__23);
  24188. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24189. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24190. __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 613, __pyx_L1_error)
  24191. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24192. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24193. __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 604, __pyx_L1_error)
  24194. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24195. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24196. __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 737, __pyx_L1_error)
  24197. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24198. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24199. __Pyx_GOTREF(__pyx_tuple__24);
  24200. __Pyx_GIVEREF(__pyx_tuple__24);
  24201. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24202. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24203. __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 621, __pyx_L1_error)
  24204. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24205. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24206. __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 613, __pyx_L1_error)
  24207. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24208. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24209. __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 765, __pyx_L1_error)
  24210. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24211. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24212. __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 613, __pyx_L1_error)
  24213. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24214. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24215. __Pyx_GOTREF(__pyx_tuple__25);
  24216. __Pyx_GIVEREF(__pyx_tuple__25);
  24217. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24218. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24219. __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 737, __pyx_L1_error)
  24220. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24221. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24222. __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 621, __pyx_L1_error)
  24223. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24224. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24225. __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 783, __pyx_L1_error)
  24226. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24227. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24228. __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 621, __pyx_L1_error)
  24229. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24230. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24231. __Pyx_GOTREF(__pyx_tuple__26);
  24232. __Pyx_GIVEREF(__pyx_tuple__26);
  24233. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24234. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24235. __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 737, __pyx_L1_error)
  24236. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24237. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24238. __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 789, __pyx_L1_error)
  24239. __Pyx_GOTREF(__pyx_tuple__27);
  24240. __Pyx_GIVEREF(__pyx_tuple__27);
  24241. __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 803, __pyx_L1_error)
  24242. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24243. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24244. __Pyx_GOTREF(__pyx_tuple__28);
  24245. __Pyx_GIVEREF(__pyx_tuple__28);
  24246. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24247. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24248. __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 765, __pyx_L1_error)
  24249. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24250. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24251. __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 805, __pyx_L1_error)
  24252. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24253. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24254. __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 737, __pyx_L1_error)
  24255. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24256. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24257. __Pyx_GOTREF(__pyx_tuple__29);
  24258. __Pyx_GIVEREF(__pyx_tuple__29);
  24259. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24260. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24261. __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 783, __pyx_L1_error)
  24262. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24263. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24264. __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 765, __pyx_L1_error)
  24265. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24266. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24267. __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_fd_is_read); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 871, __pyx_L1_error)
  24268. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24269. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24270. __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 765, __pyx_L1_error)
  24271. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24272. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24273. __Pyx_GOTREF(__pyx_tuple__30);
  24274. __Pyx_GIVEREF(__pyx_tuple__30);
  24275. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24276. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24277. __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 789, __pyx_L1_error)
  24278. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24279. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24280. __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 783, __pyx_L1_error)
  24281. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24282. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24283. __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_events_is); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 883, __pyx_L1_error)
  24284. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24285. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24286. __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 783, __pyx_L1_error)
  24287. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24288. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24289. __Pyx_GOTREF(__pyx_tuple__31);
  24290. __Pyx_GIVEREF(__pyx_tuple__31);
  24291. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24292. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24293. __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 803, __pyx_L1_error)
  24294. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24295. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24296. __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 789, __pyx_L1_error)
  24297. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24298. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24299. __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 922, __pyx_L1_error)
  24300. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24301. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24302. __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 789, __pyx_L1_error)
  24303. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24304. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24305. __Pyx_GOTREF(__pyx_tuple__32);
  24306. __Pyx_GIVEREF(__pyx_tuple__32);
  24307. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24308. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24309. __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 805, __pyx_L1_error)
  24310. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24311. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24312. __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 803, __pyx_L1_error)
  24313. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24314. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24315. __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 950, __pyx_L1_error)
  24316. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24317. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24318. __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 803, __pyx_L1_error)
  24319. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24320. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24321. __Pyx_GOTREF(__pyx_tuple__33);
  24322. __Pyx_GIVEREF(__pyx_tuple__33);
  24323. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24324. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24325. __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_fd_is_read); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 871, __pyx_L1_error)
  24326. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24327. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24328. __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 805, __pyx_L1_error)
  24329. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24330. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24331. __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 968, __pyx_L1_error)
  24332. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24333. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24334. __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 805, __pyx_L1_error)
  24335. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24336. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24337. __Pyx_GOTREF(__pyx_tuple__34);
  24338. __Pyx_GIVEREF(__pyx_tuple__34);
  24339. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24340. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24341. __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_events_is); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 883, __pyx_L1_error)
  24342. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24343. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24344. __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_fd_is_read); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 871, __pyx_L1_error)
  24345. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24346. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24347. __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 974, __pyx_L1_error)
  24348. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24349. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24350. __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_fd_is_read); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 871, __pyx_L1_error)
  24351. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24352. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24353. __Pyx_GOTREF(__pyx_tuple__35);
  24354. __Pyx_GIVEREF(__pyx_tuple__35);
  24355. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24356. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24357. __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 922, __pyx_L1_error)
  24358. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24359. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24360. __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_events_is); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 883, __pyx_L1_error)
  24361. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24362. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24363. __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 988, __pyx_L1_error)
  24364. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24365. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24366. __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_io_watcher_attribute_events_is); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 883, __pyx_L1_error)
  24367. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24368. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24369. __Pyx_GOTREF(__pyx_tuple__36);
  24370. __Pyx_GIVEREF(__pyx_tuple__36);
  24371. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24372. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24373. __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 950, __pyx_L1_error)
  24374. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24375. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24376. __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 922, __pyx_L1_error)
  24377. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24378. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24379. __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 990, __pyx_L1_error)
  24380. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24381. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24382. __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 922, __pyx_L1_error)
  24383. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24384. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24385. __Pyx_GOTREF(__pyx_tuple__37);
  24386. __Pyx_GIVEREF(__pyx_tuple__37);
  24387. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24388. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24389. __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 968, __pyx_L1_error)
  24390. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24391. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24392. __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 950, __pyx_L1_error)
  24393. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24394. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24395. __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1036, __pyx_L1_error)
  24396. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24397. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24398. __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 950, __pyx_L1_error)
  24399. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24400. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24401. __Pyx_GOTREF(__pyx_tuple__38);
  24402. __Pyx_GIVEREF(__pyx_tuple__38);
  24403. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24404. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24405. __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 974, __pyx_L1_error)
  24406. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24407. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24408. __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 968, __pyx_L1_error)
  24409. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24410. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24411. __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1067, __pyx_L1_error)
  24412. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24413. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24414. __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 968, __pyx_L1_error)
  24415. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24416. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24417. __Pyx_GOTREF(__pyx_tuple__39);
  24418. __Pyx_GIVEREF(__pyx_tuple__39);
  24419. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24420. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24421. __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 988, __pyx_L1_error)
  24422. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24423. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24424. __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 974, __pyx_L1_error)
  24425. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24426. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24427. __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1095, __pyx_L1_error)
  24428. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24429. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24430. __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 974, __pyx_L1_error)
  24431. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24432. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24433. __Pyx_GOTREF(__pyx_tuple__40);
  24434. __Pyx_GIVEREF(__pyx_tuple__40);
  24435. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24436. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24437. __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 990, __pyx_L1_error)
  24438. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24439. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24440. __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 988, __pyx_L1_error)
  24441. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24442. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24443. __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1113, __pyx_L1_error)
  24444. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24445. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24446. __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 988, __pyx_L1_error)
  24447. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24448. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24449. __Pyx_GOTREF(__pyx_tuple__41);
  24450. __Pyx_GIVEREF(__pyx_tuple__41);
  24451. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24452. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24453. __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1036, __pyx_L1_error)
  24454. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24455. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24456. __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 990, __pyx_L1_error)
  24457. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24458. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24459. __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1119, __pyx_L1_error)
  24460. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24461. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24462. __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 990, __pyx_L1_error)
  24463. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24464. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24465. __Pyx_GOTREF(__pyx_tuple__42);
  24466. __Pyx_GIVEREF(__pyx_tuple__42);
  24467. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24468. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24469. __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1067, __pyx_L1_error)
  24470. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24471. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24472. __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1036, __pyx_L1_error)
  24473. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24474. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24475. __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1133, __pyx_L1_error)
  24476. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24477. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24478. __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1036, __pyx_L1_error)
  24479. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24480. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24481. __Pyx_GOTREF(__pyx_tuple__43);
  24482. __Pyx_GIVEREF(__pyx_tuple__43);
  24483. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24484. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24485. __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1095, __pyx_L1_error)
  24486. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24487. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24488. __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1067, __pyx_L1_error)
  24489. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24490. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24491. __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1135, __pyx_L1_error)
  24492. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24493. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24494. __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1067, __pyx_L1_error)
  24495. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24496. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24497. __Pyx_GOTREF(__pyx_tuple__44);
  24498. __Pyx_GIVEREF(__pyx_tuple__44);
  24499. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24500. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24501. __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1113, __pyx_L1_error)
  24502. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24503. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24504. __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1095, __pyx_L1_error)
  24505. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24506. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24507. __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1192, __pyx_L1_error)
  24508. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24509. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24510. __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1095, __pyx_L1_error)
  24511. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24512. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24513. __Pyx_GOTREF(__pyx_tuple__45);
  24514. __Pyx_GIVEREF(__pyx_tuple__45);
  24515. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24516. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24517. __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1119, __pyx_L1_error)
  24518. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24519. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24520. __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1113, __pyx_L1_error)
  24521. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24522. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24523. __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1220, __pyx_L1_error)
  24524. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24525. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24526. __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1113, __pyx_L1_error)
  24527. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24528. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24529. __Pyx_GOTREF(__pyx_tuple__46);
  24530. __Pyx_GIVEREF(__pyx_tuple__46);
  24531. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24532. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24533. __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1133, __pyx_L1_error)
  24534. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24535. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24536. __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1119, __pyx_L1_error)
  24537. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24538. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24539. __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1238, __pyx_L1_error)
  24540. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24541. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24542. __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1119, __pyx_L1_error)
  24543. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24544. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24545. __Pyx_GOTREF(__pyx_tuple__47);
  24546. __Pyx_GIVEREF(__pyx_tuple__47);
  24547. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24548. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24549. __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1135, __pyx_L1_error)
  24550. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24551. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24552. __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1133, __pyx_L1_error)
  24553. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24554. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24555. __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1244, __pyx_L1_error)
  24556. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24557. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24558. __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1133, __pyx_L1_error)
  24559. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24560. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24561. __Pyx_GOTREF(__pyx_tuple__48);
  24562. __Pyx_GIVEREF(__pyx_tuple__48);
  24563. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24564. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24565. __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1192, __pyx_L1_error)
  24566. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24567. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24568. __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1135, __pyx_L1_error)
  24569. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24570. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24571. __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1258, __pyx_L1_error)
  24572. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24573. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24574. __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1135, __pyx_L1_error)
  24575. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24576. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24577. __Pyx_GOTREF(__pyx_tuple__49);
  24578. __Pyx_GIVEREF(__pyx_tuple__49);
  24579. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24580. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24581. __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1220, __pyx_L1_error)
  24582. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24583. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24584. __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1192, __pyx_L1_error)
  24585. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24586. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24587. __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1260, __pyx_L1_error)
  24588. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24589. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24590. __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1192, __pyx_L1_error)
  24591. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24592. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24593. __Pyx_GOTREF(__pyx_tuple__50);
  24594. __Pyx_GIVEREF(__pyx_tuple__50);
  24595. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24596. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24597. __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1238, __pyx_L1_error)
  24598. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24599. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24600. __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1220, __pyx_L1_error)
  24601. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24602. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24603. __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1311, __pyx_L1_error)
  24604. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24605. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24606. __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1220, __pyx_L1_error)
  24607. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24608. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24609. __Pyx_GOTREF(__pyx_tuple__51);
  24610. __Pyx_GIVEREF(__pyx_tuple__51);
  24611. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24612. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24613. __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1244, __pyx_L1_error)
  24614. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24615. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24616. __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1238, __pyx_L1_error)
  24617. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24618. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24619. __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1339, __pyx_L1_error)
  24620. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24621. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24622. __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1238, __pyx_L1_error)
  24623. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24624. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24625. __Pyx_GOTREF(__pyx_tuple__52);
  24626. __Pyx_GIVEREF(__pyx_tuple__52);
  24627. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24628. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24629. __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1258, __pyx_L1_error)
  24630. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24631. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24632. __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1244, __pyx_L1_error)
  24633. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24634. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24635. __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1357, __pyx_L1_error)
  24636. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24637. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24638. __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1244, __pyx_L1_error)
  24639. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24640. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24641. __Pyx_GOTREF(__pyx_tuple__53);
  24642. __Pyx_GIVEREF(__pyx_tuple__53);
  24643. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24644. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24645. __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1260, __pyx_L1_error)
  24646. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24647. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24648. __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1258, __pyx_L1_error)
  24649. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24650. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24651. __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1363, __pyx_L1_error)
  24652. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24653. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24654. __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1258, __pyx_L1_error)
  24655. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24656. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24657. __Pyx_GOTREF(__pyx_tuple__54);
  24658. __Pyx_GIVEREF(__pyx_tuple__54);
  24659. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24660. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24661. __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1311, __pyx_L1_error)
  24662. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24663. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24664. __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1260, __pyx_L1_error)
  24665. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24666. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24667. __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1377, __pyx_L1_error)
  24668. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24669. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24670. __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1260, __pyx_L1_error)
  24671. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24672. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24673. __Pyx_GOTREF(__pyx_tuple__55);
  24674. __Pyx_GIVEREF(__pyx_tuple__55);
  24675. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24676. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24677. __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 1339, __pyx_L1_error)
  24678. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24679. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24680. __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 1311, __pyx_L1_error)
  24681. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24682. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24683. __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 1379, __pyx_L1_error)
  24684. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24685. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24686. __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 1311, __pyx_L1_error)
  24687. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24688. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24689. __Pyx_GOTREF(__pyx_tuple__56);
  24690. __Pyx_GIVEREF(__pyx_tuple__56);
  24691. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24692. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24693. __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1357, __pyx_L1_error)
  24694. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24695. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24696. __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1339, __pyx_L1_error)
  24697. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24698. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24699. __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1430, __pyx_L1_error)
  24700. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24701. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24702. __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1339, __pyx_L1_error)
  24703. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24704. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24705. __Pyx_GOTREF(__pyx_tuple__57);
  24706. __Pyx_GIVEREF(__pyx_tuple__57);
  24707. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24708. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24709. __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1363, __pyx_L1_error)
  24710. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24711. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24712. __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1357, __pyx_L1_error)
  24713. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24714. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24715. __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1458, __pyx_L1_error)
  24716. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24717. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24718. __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1357, __pyx_L1_error)
  24719. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24720. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24721. __Pyx_GOTREF(__pyx_tuple__58);
  24722. __Pyx_GIVEREF(__pyx_tuple__58);
  24723. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24724. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24725. __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1377, __pyx_L1_error)
  24726. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24727. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24728. __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1363, __pyx_L1_error)
  24729. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24730. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24731. __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1476, __pyx_L1_error)
  24732. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24733. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24734. __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1363, __pyx_L1_error)
  24735. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24736. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24737. __Pyx_GOTREF(__pyx_tuple__59);
  24738. __Pyx_GIVEREF(__pyx_tuple__59);
  24739. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24740. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24741. __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1379, __pyx_L1_error)
  24742. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24743. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24744. __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1377, __pyx_L1_error)
  24745. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24746. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24747. __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1482, __pyx_L1_error)
  24748. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24749. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24750. __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1377, __pyx_L1_error)
  24751. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24752. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24753. __Pyx_GOTREF(__pyx_tuple__60);
  24754. __Pyx_GIVEREF(__pyx_tuple__60);
  24755. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24756. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24757. __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1430, __pyx_L1_error)
  24758. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24759. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24760. __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1379, __pyx_L1_error)
  24761. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24762. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24763. __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1496, __pyx_L1_error)
  24764. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24765. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24766. __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1379, __pyx_L1_error)
  24767. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24768. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24769. __Pyx_GOTREF(__pyx_tuple__61);
  24770. __Pyx_GIVEREF(__pyx_tuple__61);
  24771. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24772. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24773. __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1458, __pyx_L1_error)
  24774. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24775. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24776. __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1430, __pyx_L1_error)
  24777. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24778. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24779. __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1498, __pyx_L1_error)
  24780. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24781. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24782. __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1430, __pyx_L1_error)
  24783. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24784. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24785. __Pyx_GOTREF(__pyx_tuple__62);
  24786. __Pyx_GIVEREF(__pyx_tuple__62);
  24787. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24788. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24789. __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1476, __pyx_L1_error)
  24790. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24791. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24792. __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1458, __pyx_L1_error)
  24793. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24794. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24795. __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1549, __pyx_L1_error)
  24796. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24797. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24798. __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1458, __pyx_L1_error)
  24799. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24800. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24801. __Pyx_GOTREF(__pyx_tuple__63);
  24802. __Pyx_GIVEREF(__pyx_tuple__63);
  24803. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24804. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24805. __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1482, __pyx_L1_error)
  24806. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24807. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24808. __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1476, __pyx_L1_error)
  24809. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24810. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24811. __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1577, __pyx_L1_error)
  24812. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24813. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24814. __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1476, __pyx_L1_error)
  24815. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24816. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24817. __Pyx_GOTREF(__pyx_tuple__64);
  24818. __Pyx_GIVEREF(__pyx_tuple__64);
  24819. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24820. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24821. __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1496, __pyx_L1_error)
  24822. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24823. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24824. __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1482, __pyx_L1_error)
  24825. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24826. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24827. __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1595, __pyx_L1_error)
  24828. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24829. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24830. __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1482, __pyx_L1_error)
  24831. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24832. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24833. __Pyx_GOTREF(__pyx_tuple__65);
  24834. __Pyx_GIVEREF(__pyx_tuple__65);
  24835. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24836. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24837. __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1498, __pyx_L1_error)
  24838. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24839. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24840. __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1496, __pyx_L1_error)
  24841. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24842. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24843. __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1601, __pyx_L1_error)
  24844. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24845. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24846. __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1496, __pyx_L1_error)
  24847. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24848. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24849. __Pyx_GOTREF(__pyx_tuple__66);
  24850. __Pyx_GIVEREF(__pyx_tuple__66);
  24851. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24852. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24853. __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1549, __pyx_L1_error)
  24854. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24855. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24856. __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1498, __pyx_L1_error)
  24857. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24858. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24859. __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1615, __pyx_L1_error)
  24860. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24861. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24862. __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1498, __pyx_L1_error)
  24863. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24864. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24865. __Pyx_GOTREF(__pyx_tuple__67);
  24866. __Pyx_GIVEREF(__pyx_tuple__67);
  24867. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24868. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24869. __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1577, __pyx_L1_error)
  24870. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24871. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24872. __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1549, __pyx_L1_error)
  24873. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24874. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24875. __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1617, __pyx_L1_error)
  24876. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24877. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24878. __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1549, __pyx_L1_error)
  24879. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24880. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24881. __Pyx_GOTREF(__pyx_tuple__68);
  24882. __Pyx_GIVEREF(__pyx_tuple__68);
  24883. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24884. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24885. __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1595, __pyx_L1_error)
  24886. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24887. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24888. __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1577, __pyx_L1_error)
  24889. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24890. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24891. __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1668, __pyx_L1_error)
  24892. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24893. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24894. __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1577, __pyx_L1_error)
  24895. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24896. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24897. __Pyx_GOTREF(__pyx_tuple__69);
  24898. __Pyx_GIVEREF(__pyx_tuple__69);
  24899. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24900. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24901. __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1601, __pyx_L1_error)
  24902. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24903. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24904. __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1595, __pyx_L1_error)
  24905. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24906. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24907. __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1696, __pyx_L1_error)
  24908. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24909. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24910. __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1595, __pyx_L1_error)
  24911. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24912. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24913. __Pyx_GOTREF(__pyx_tuple__70);
  24914. __Pyx_GIVEREF(__pyx_tuple__70);
  24915. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24916. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24917. __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1615, __pyx_L1_error)
  24918. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24919. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24920. __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1601, __pyx_L1_error)
  24921. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24922. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24923. __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1714, __pyx_L1_error)
  24924. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24925. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24926. __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1601, __pyx_L1_error)
  24927. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24928. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24929. __Pyx_GOTREF(__pyx_tuple__71);
  24930. __Pyx_GIVEREF(__pyx_tuple__71);
  24931. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24932. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24933. __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1617, __pyx_L1_error)
  24934. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24935. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24936. __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1615, __pyx_L1_error)
  24937. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24938. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24939. __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1720, __pyx_L1_error)
  24940. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24941. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24942. __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1615, __pyx_L1_error)
  24943. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24944. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24945. __Pyx_GOTREF(__pyx_tuple__72);
  24946. __Pyx_GIVEREF(__pyx_tuple__72);
  24947. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24948. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24949. __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1668, __pyx_L1_error)
  24950. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24951. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24952. __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1617, __pyx_L1_error)
  24953. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24954. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24955. __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1734, __pyx_L1_error)
  24956. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24957. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24958. __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1617, __pyx_L1_error)
  24959. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24960. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24961. __Pyx_GOTREF(__pyx_tuple__73);
  24962. __Pyx_GIVEREF(__pyx_tuple__73);
  24963. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24964. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24965. __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1696, __pyx_L1_error)
  24966. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24967. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24968. __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1668, __pyx_L1_error)
  24969. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24970. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24971. __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1736, __pyx_L1_error)
  24972. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24973. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24974. __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1668, __pyx_L1_error)
  24975. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24976. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24977. __Pyx_GOTREF(__pyx_tuple__74);
  24978. __Pyx_GIVEREF(__pyx_tuple__74);
  24979. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24980. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24981. __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1714, __pyx_L1_error)
  24982. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24983. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  24984. __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1696, __pyx_L1_error)
  24985. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  24986. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24987. __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1771, __pyx_L1_error)
  24988. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24989. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24990. __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1696, __pyx_L1_error)
  24991. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24992. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  24993. __Pyx_GOTREF(__pyx_tuple__75);
  24994. __Pyx_GIVEREF(__pyx_tuple__75);
  24995. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24996. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  24997. __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1720, __pyx_L1_error)
  24998. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  24999. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25000. __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25001. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25002. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25003. __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1714, __pyx_L1_error)
  25004. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25005. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25006. __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1794, __pyx_L1_error)
  25007. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25008. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25009. __Pyx_GOTREF(__pyx_tuple__76);
  25010. __Pyx_GIVEREF(__pyx_tuple__76);
  25011. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25012. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25013. __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1734, __pyx_L1_error)
  25014. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25015. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25016. __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25017. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25018. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25019. __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1720, __pyx_L1_error)
  25020. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25021. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25022. __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1822, __pyx_L1_error)
  25023. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25024. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25025. __Pyx_GOTREF(__pyx_tuple__77);
  25026. __Pyx_GIVEREF(__pyx_tuple__77);
  25027. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25028. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25029. __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1736, __pyx_L1_error)
  25030. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25031. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25032. __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25033. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25034. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25035. __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1734, __pyx_L1_error)
  25036. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25037. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25038. __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1840, __pyx_L1_error)
  25039. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25040. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25041. __Pyx_GOTREF(__pyx_tuple__78);
  25042. __Pyx_GIVEREF(__pyx_tuple__78);
  25043. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25044. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25045. __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1771, __pyx_L1_error)
  25046. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25047. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25048. __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25049. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25050. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25051. __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1736, __pyx_L1_error)
  25052. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25053. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25054. __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1846, __pyx_L1_error)
  25055. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25056. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25057. __Pyx_GOTREF(__pyx_tuple__79);
  25058. __Pyx_GIVEREF(__pyx_tuple__79);
  25059. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25060. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25061. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25062. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25063. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25064. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1794, __pyx_L1_error)
  25065. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25066. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25067. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25068. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25069. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25070. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1771, __pyx_L1_error)
  25071. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25072. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25073. __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1860, __pyx_L1_error)
  25074. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25075. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25076. __Pyx_GOTREF(__pyx_tuple__80);
  25077. __Pyx_GIVEREF(__pyx_tuple__80);
  25078. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25079. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25080. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25081. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25082. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25083. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1822, __pyx_L1_error)
  25084. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25085. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25086. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25087. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25088. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25089. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1794, __pyx_L1_error)
  25090. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25091. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25092. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25093. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25094. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25095. __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1862, __pyx_L1_error)
  25096. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25097. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25098. __Pyx_GOTREF(__pyx_tuple__81);
  25099. __Pyx_GIVEREF(__pyx_tuple__81);
  25100. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25101. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25102. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25103. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25104. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25105. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1840, __pyx_L1_error)
  25106. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25107. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25108. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 16, __pyx_L1_error)
  25109. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25110. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25111. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1822, __pyx_L1_error)
  25112. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25113. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25114. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25115. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25116. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25117. __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_child_watchers_are_only_availabl); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1886, __pyx_L1_error)
  25118. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25119. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25120. __Pyx_GOTREF(__pyx_tuple__82);
  25121. __Pyx_GIVEREF(__pyx_tuple__82);
  25122. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25123. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25124. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25125. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25126. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25127. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1846, __pyx_L1_error)
  25128. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25129. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25130. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 17, __pyx_L1_error)
  25131. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25132. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25133. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1840, __pyx_L1_error)
  25134. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25135. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25136. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25137. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25138. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25139. __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25140. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25141. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25142. __Pyx_GOTREF(__pyx_tuple__83);
  25143. __Pyx_GIVEREF(__pyx_tuple__83);
  25144. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25145. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25146. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25147. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25148. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25149. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1860, __pyx_L1_error)
  25150. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25151. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25152. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 18, __pyx_L1_error)
  25153. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25154. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25155. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1846, __pyx_L1_error)
  25156. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25157. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25158. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25159. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25160. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25161. __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25162. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25163. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25164. __Pyx_GOTREF(__pyx_tuple__84);
  25165. __Pyx_GIVEREF(__pyx_tuple__84);
  25166. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25167. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25168. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25169. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25170. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25171. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1862, __pyx_L1_error)
  25172. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25173. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25174. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 19, __pyx_L1_error)
  25175. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25176. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25177. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1860, __pyx_L1_error)
  25178. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25179. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25180. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25181. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25182. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25183. __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25184. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25185. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25186. __Pyx_GOTREF(__pyx_tuple__85);
  25187. __Pyx_GIVEREF(__pyx_tuple__85);
  25188. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25189. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25190. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 16, __pyx_L1_error)
  25191. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25192. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25193. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_child_watchers_are_only_availabl); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1886, __pyx_L1_error)
  25194. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25195. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25196. __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 107, __pyx_L1_error)
  25197. __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 111, __pyx_L1_error)
  25198. __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 220, __pyx_L1_error)
  25199. __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 224, __pyx_L1_error)
  25200. __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 228, __pyx_L1_error)
  25201. __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 232, __pyx_L1_error)
  25202. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25203. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25204. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1862, __pyx_L1_error)
  25205. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25206. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25207. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25208. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25209. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25210. __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25211. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25212. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25213. __Pyx_GOTREF(__pyx_tuple__86);
  25214. __Pyx_GIVEREF(__pyx_tuple__86);
  25215. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25216. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25217. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 17, __pyx_L1_error)
  25218. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25219. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25220. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25221. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25222. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25223. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_child_watchers_are_only_availabl); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1886, __pyx_L1_error)
  25224. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25225. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25226. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 16, __pyx_L1_error)
  25227. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25228. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25229. __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25230. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25231. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25232. __Pyx_GOTREF(__pyx_tuple__87);
  25233. __Pyx_GIVEREF(__pyx_tuple__87);
  25234. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25235. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25236. __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 18, __pyx_L1_error)
  25237. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25238. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25239. __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25240. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25241. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25242. __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1939, __pyx_L1_error)
  25243. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25244. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25245. __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 17, __pyx_L1_error)
  25246. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25247. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25248. __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25249. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25250. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25251. __Pyx_GOTREF(__pyx_tuple__88);
  25252. __Pyx_GIVEREF(__pyx_tuple__88);
  25253. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25254. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25255. __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 19, __pyx_L1_error)
  25256. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25257. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25258. __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25259. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25260. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25261. __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1967, __pyx_L1_error)
  25262. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25263. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25264. __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 18, __pyx_L1_error)
  25265. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25266. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25267. __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 16, __pyx_L1_error)
  25268. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25269. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25270. __Pyx_GOTREF(__pyx_tuple__89);
  25271. __Pyx_GIVEREF(__pyx_tuple__89);
  25272. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25273. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25274. __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 107, __pyx_L1_error)
  25275. __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 111, __pyx_L1_error)
  25276. __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 220, __pyx_L1_error)
  25277. __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 224, __pyx_L1_error)
  25278. __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 228, __pyx_L1_error)
  25279. __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 232, __pyx_L1_error)
  25280. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25281. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25282. __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25283. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25284. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25285. __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_Cannot_set_priority_of_an_active); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1985, __pyx_L1_error)
  25286. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25287. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25288. __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 19, __pyx_L1_error)
  25289. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25290. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25291. __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 17, __pyx_L1_error)
  25292. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25293. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25294. __Pyx_GOTREF(__pyx_tuple__90);
  25295. __Pyx_GIVEREF(__pyx_tuple__90);
  25296. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25297. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25298. __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25299. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25300. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25301. __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1991, __pyx_L1_error)
  25302. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25303. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25304. __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 107, __pyx_L1_error)
  25305. __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 111, __pyx_L1_error)
  25306. __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 220, __pyx_L1_error)
  25307. __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 224, __pyx_L1_error)
  25308. __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 228, __pyx_L1_error)
  25309. __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 232, __pyx_L1_error)
  25310. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25311. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25312. __pyx_tuple__91 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 18, __pyx_L1_error)
  25313. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25314. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25315. __Pyx_GOTREF(__pyx_tuple__91);
  25316. __Pyx_GIVEREF(__pyx_tuple__91);
  25317. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25318. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25319. __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25320. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25321. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25322. __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_operation_on_destroyed_loop); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 2005, __pyx_L1_error)
  25323. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25324. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25325. __pyx_tuple__92 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 19, __pyx_L1_error)
  25326. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25327. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25328. __Pyx_GOTREF(__pyx_tuple__92);
  25329. __Pyx_GIVEREF(__pyx_tuple__92);
  25330. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25331. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25332. __pyx_tuple__93 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 16, __pyx_L1_error)
  25333. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25334. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25335. __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_callback_must_be_callable_not_No); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 2007, __pyx_L1_error)
  25336. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25337. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25338. __Pyx_GOTREF(__pyx_tuple__93);
  25339. __Pyx_GIVEREF(__pyx_tuple__93);
  25340. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25341. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25342. __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 17, __pyx_L1_error)
  25343. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25344. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25345. __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 16, __pyx_L1_error)
  25346. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25347. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25348. __Pyx_GOTREF(__pyx_tuple__94);
  25349. __Pyx_GIVEREF(__pyx_tuple__94);
  25350. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25351. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25352. __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 18, __pyx_L1_error)
  25353. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25354. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25355. __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_os); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 17, __pyx_L1_error)
  25356. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25357. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25358. __Pyx_GOTREF(__pyx_tuple__95);
  25359. __Pyx_GIVEREF(__pyx_tuple__95);
  25360. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25361. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25362. __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 19, __pyx_L1_error)
  25363. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25364. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25365. __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 18, __pyx_L1_error)
  25366. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25367. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25368. __Pyx_GOTREF(__pyx_tuple__96);
  25369. __Pyx_GIVEREF(__pyx_tuple__96);
  25370. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25371. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25372. __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 107, __pyx_L1_error)
  25373. __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 111, __pyx_L1_error)
  25374. __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 220, __pyx_L1_error)
  25375. __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 224, __pyx_L1_error)
  25376. __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 228, __pyx_L1_error)
  25377. __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 232, __pyx_L1_error)
  25378. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25379. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25380. __pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_s_signal); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 19, __pyx_L1_error)
  25381. __Pyx_GOTREF(__pyx_tuple__97);
  25382. __Pyx_GIVEREF(__pyx_tuple__97);
  25383. __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 107, __pyx_L1_error)
  25384. __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 111, __pyx_L1_error)
  25385. __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 220, __pyx_L1_error)
  25386. __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 224, __pyx_L1_error)
  25387. __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 228, __pyx_L1_error)
  25388. __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 232, __pyx_L1_error)
  25389. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25390. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25391. __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_version, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 107, __pyx_L1_error)
  25392. __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_get_header_version, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 111, __pyx_L1_error)
  25393. __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_supported_backends, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 220, __pyx_L1_error)
  25394. __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_recommended_backends, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 224, __pyx_L1_error)
  25395. __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_embeddable_backends, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 228, __pyx_L1_error)
  25396. __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_c_users_appveyor_appdata_local_t, __pyx_n_s_time, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 232, __pyx_L1_error)
  25397. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25398. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25399. __Pyx_RefNannyFinishContext();
  25400. return 0;
  25401. __pyx_L1_error:;
  25402. __Pyx_RefNannyFinishContext();
  25403. return -1;
  25404. }
  25405. static int __Pyx_InitGlobals(void) {
  25406. if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  25407. __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  25408. __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  25409. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25410. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25411. __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  25412. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25413. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25414. return 0;
  25415. __pyx_L1_error:;
  25416. return -1;
  25417. }
  25418. #if PY_MAJOR_VERSION < 3
  25419. PyMODINIT_FUNC initcorecext(void); /*proto*/
  25420. PyMODINIT_FUNC initcorecext(void)
  25421. #else
  25422. PyMODINIT_FUNC PyInit_corecext(void); /*proto*/
  25423. PyMODINIT_FUNC PyInit_corecext(void)
  25424. #endif
  25425. {
  25426. PyObject *__pyx_t_1 = NULL;
  25427. PyObject *__pyx_t_2 = NULL;
  25428. int __pyx_t_3;
  25429. PyObject *__pyx_t_4 = NULL;
  25430. PyObject *__pyx_t_5 = NULL;
  25431. PyObject *__pyx_t_6 = NULL;
  25432. PyObject *__pyx_t_7 = NULL;
  25433. PyObject *__pyx_t_8 = NULL;
  25434. PyObject *__pyx_t_9 = NULL;
  25435. PyObject *__pyx_t_10 = NULL;
  25436. PyObject *__pyx_t_11 = NULL;
  25437. PyObject *__pyx_t_12 = NULL;
  25438. PyObject *__pyx_t_13 = NULL;
  25439. PyObject *__pyx_t_14 = NULL;
  25440. PyObject *__pyx_t_15 = NULL;
  25441. PyObject *__pyx_t_16 = NULL;
  25442. PyObject *__pyx_t_17 = NULL;
  25443. PyObject *__pyx_t_18 = NULL;
  25444. __Pyx_RefNannyDeclarations
  25445. #if CYTHON_REFNANNY
  25446. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  25447. if (!__Pyx_RefNanny) {
  25448. PyErr_Clear();
  25449. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  25450. if (!__Pyx_RefNanny)
  25451. Py_FatalError("failed to import 'refnanny' module");
  25452. }
  25453. #endif
  25454. __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_corecext(void)", 0);
  25455. if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25456. __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  25457. __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  25458. __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  25459. #ifdef __Pyx_CyFunction_USED
  25460. if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25461. #endif
  25462. #ifdef __Pyx_FusedFunction_USED
  25463. if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25464. #endif
  25465. #ifdef __Pyx_Coroutine_USED
  25466. if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25467. #endif
  25468. #ifdef __Pyx_Generator_USED
  25469. if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25470. #endif
  25471. #ifdef __Pyx_StopAsyncIteration_USED
  25472. if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25473. #endif
  25474. /*--- Library function declarations ---*/
  25475. /*--- Threads initialization code ---*/
  25476. #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  25477. #ifdef WITH_THREAD /* Python build with threading support? */
  25478. PyEval_InitThreads();
  25479. #endif
  25480. #endif
  25481. /*--- Module creation code ---*/
  25482. #if PY_MAJOR_VERSION < 3
  25483. __pyx_m = Py_InitModule4("corecext", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  25484. #else
  25485. __pyx_m = PyModule_Create(&__pyx_moduledef);
  25486. #endif
  25487. if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  25488. __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  25489. Py_INCREF(__pyx_d);
  25490. __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  25491. #if CYTHON_COMPILING_IN_PYPY
  25492. Py_INCREF(__pyx_b);
  25493. #endif
  25494. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  25495. /*--- Initialize various global constants etc. ---*/
  25496. if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25497. #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  25498. if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25499. #endif
  25500. if (__pyx_module_is_main_gevent__libev__corecext) {
  25501. if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25502. }
  25503. #if PY_MAJOR_VERSION >= 3
  25504. {
  25505. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  25506. if (!PyDict_GetItemString(modules, "gevent.libev.corecext")) {
  25507. if (unlikely(PyDict_SetItemString(modules, "gevent.libev.corecext", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  25508. }
  25509. }
  25510. #endif
  25511. /*--- Builtin init code ---*/
  25512. if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25513. /*--- Constants init code ---*/
  25514. if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25515. /*--- Global init code ---*/
  25516. __pyx_v_6gevent_5libev_8corecext_integer_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  25517. GEVENT_CORE_EVENTS = Py_None; Py_INCREF(Py_None);
  25518. /*--- Variable export code ---*/
  25519. /*--- Function export code ---*/
  25520. /*--- Type init code ---*/
  25521. if (PyType_Ready(&__pyx_type_6gevent_5libev_8corecext__EVENTSType) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  25522. __pyx_type_6gevent_5libev_8corecext__EVENTSType.tp_print = 0;
  25523. __pyx_ptype_6gevent_5libev_8corecext__EVENTSType = &__pyx_type_6gevent_5libev_8corecext__EVENTSType;
  25524. __pyx_vtabptr_6gevent_5libev_8corecext_loop = &__pyx_vtable_6gevent_5libev_8corecext_loop;
  25525. __pyx_vtable_6gevent_5libev_8corecext_loop._run_callbacks = (PyObject *(*)(struct PyGeventLoopObject *))__pyx_f_6gevent_5libev_8corecext_4loop__run_callbacks;
  25526. __pyx_vtable_6gevent_5libev_8corecext_loop.handle_error = (PyObject *(*)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop_handle_error;
  25527. __pyx_vtable_6gevent_5libev_8corecext_loop._default_handle_error = (PyObject *(*)(struct PyGeventLoopObject *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_5libev_8corecext_4loop__default_handle_error;
  25528. if (PyType_Ready(&PyGeventLoop_Type) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
  25529. PyGeventLoop_Type.tp_print = 0;
  25530. if (__Pyx_SetVtable(PyGeventLoop_Type.tp_dict, __pyx_vtabptr_6gevent_5libev_8corecext_loop) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
  25531. if (PyObject_SetAttrString(__pyx_m, "loop", (PyObject *)&PyGeventLoop_Type) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
  25532. __pyx_ptype_6gevent_5libev_8corecext_loop = &PyGeventLoop_Type;
  25533. if (PyType_Ready(&PyGeventCallback_Type) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  25534. PyGeventCallback_Type.tp_print = 0;
  25535. if (PyObject_SetAttrString(__pyx_m, "callback", (PyObject *)&PyGeventCallback_Type) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  25536. __pyx_ptype_6gevent_5libev_8corecext_callback = &PyGeventCallback_Type;
  25537. if (PyType_Ready(&PyGeventWatcher_Type) < 0) __PYX_ERR(0, 695, __pyx_L1_error)
  25538. PyGeventWatcher_Type.tp_print = 0;
  25539. if (PyObject_SetAttrString(__pyx_m, "watcher", (PyObject *)&PyGeventWatcher_Type) < 0) __PYX_ERR(0, 695, __pyx_L1_error)
  25540. __pyx_ptype_6gevent_5libev_8corecext_watcher = &PyGeventWatcher_Type;
  25541. PyGeventIO_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25542. if (PyType_Ready(&PyGeventIO_Type) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
  25543. PyGeventIO_Type.tp_print = 0;
  25544. if (PyObject_SetAttrString(__pyx_m, "io", (PyObject *)&PyGeventIO_Type) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
  25545. __pyx_ptype_6gevent_5libev_8corecext_io = &PyGeventIO_Type;
  25546. PyGeventTimer_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25547. if (PyType_Ready(&PyGeventTimer_Type) < 0) __PYX_ERR(0, 905, __pyx_L1_error)
  25548. PyGeventTimer_Type.tp_print = 0;
  25549. if (PyObject_SetAttrString(__pyx_m, "timer", (PyObject *)&PyGeventTimer_Type) < 0) __PYX_ERR(0, 905, __pyx_L1_error)
  25550. __pyx_ptype_6gevent_5libev_8corecext_timer = &PyGeventTimer_Type;
  25551. PyGeventSignal_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25552. if (PyType_Ready(&PyGeventSignal_Type) < 0) __PYX_ERR(0, 1050, __pyx_L1_error)
  25553. PyGeventSignal_Type.tp_print = 0;
  25554. if (PyObject_SetAttrString(__pyx_m, "signal", (PyObject *)&PyGeventSignal_Type) < 0) __PYX_ERR(0, 1050, __pyx_L1_error)
  25555. __pyx_ptype_6gevent_5libev_8corecext_signal = &PyGeventSignal_Type;
  25556. PyGeventIdle_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25557. if (PyType_Ready(&PyGeventIdle_Type) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
  25558. PyGeventIdle_Type.tp_print = 0;
  25559. if (PyObject_SetAttrString(__pyx_m, "idle", (PyObject *)&PyGeventIdle_Type) < 0) __PYX_ERR(0, 1175, __pyx_L1_error)
  25560. __pyx_ptype_6gevent_5libev_8corecext_idle = &PyGeventIdle_Type;
  25561. PyGeventPrepare_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25562. if (PyType_Ready(&PyGeventPrepare_Type) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)
  25563. PyGeventPrepare_Type.tp_print = 0;
  25564. if (PyObject_SetAttrString(__pyx_m, "prepare", (PyObject *)&PyGeventPrepare_Type) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)
  25565. __pyx_ptype_6gevent_5libev_8corecext_prepare = &PyGeventPrepare_Type;
  25566. PyGeventCheck_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25567. if (PyType_Ready(&PyGeventCheck_Type) < 0) __PYX_ERR(0, 1413, __pyx_L1_error)
  25568. PyGeventCheck_Type.tp_print = 0;
  25569. if (PyObject_SetAttrString(__pyx_m, "check", (PyObject *)&PyGeventCheck_Type) < 0) __PYX_ERR(0, 1413, __pyx_L1_error)
  25570. __pyx_ptype_6gevent_5libev_8corecext_check = &PyGeventCheck_Type;
  25571. PyGeventFork_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25572. if (PyType_Ready(&PyGeventFork_Type) < 0) __PYX_ERR(0, 1532, __pyx_L1_error)
  25573. PyGeventFork_Type.tp_print = 0;
  25574. if (PyObject_SetAttrString(__pyx_m, "fork", (PyObject *)&PyGeventFork_Type) < 0) __PYX_ERR(0, 1532, __pyx_L1_error)
  25575. __pyx_ptype_6gevent_5libev_8corecext_fork = &PyGeventFork_Type;
  25576. PyGeventAsync_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25577. if (PyType_Ready(&PyGeventAsync_Type) < 0) __PYX_ERR(0, 1651, __pyx_L1_error)
  25578. PyGeventAsync_Type.tp_print = 0;
  25579. if (PyObject_SetAttrString(__pyx_m, "async", (PyObject *)&PyGeventAsync_Type) < 0) __PYX_ERR(0, 1651, __pyx_L1_error)
  25580. __pyx_ptype_6gevent_5libev_8corecext_async = &PyGeventAsync_Type;
  25581. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25582. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25583. PyGeventChild_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25584. if (PyType_Ready(&PyGeventChild_Type) < 0) __PYX_ERR(0, 1777, __pyx_L1_error)
  25585. PyGeventChild_Type.tp_print = 0;
  25586. if (PyObject_SetAttrString(__pyx_m, "child", (PyObject *)&PyGeventChild_Type) < 0) __PYX_ERR(0, 1777, __pyx_L1_error)
  25587. __pyx_ptype_6gevent_5libev_8corecext_child = &PyGeventChild_Type;
  25588. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25589. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25590. PyGeventStat_Type.tp_base = __pyx_ptype_6gevent_5libev_8corecext_watcher;
  25591. if (PyType_Ready(&PyGeventStat_Type) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
  25592. PyGeventStat_Type.tp_print = 0;
  25593. if (PyObject_SetAttrString(__pyx_m, "stat", (PyObject *)&PyGeventStat_Type) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
  25594. __pyx_ptype_6gevent_5libev_8corecext_stat = &PyGeventStat_Type;
  25595. if (PyType_Ready(&__pyx_type_6gevent_5libev_8corecext___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  25596. __pyx_type_6gevent_5libev_8corecext___pyx_scope_struct__genexpr.tp_print = 0;
  25597. __pyx_ptype_6gevent_5libev_8corecext___pyx_scope_struct__genexpr = &__pyx_type_6gevent_5libev_8corecext___pyx_scope_struct__genexpr;
  25598. /*--- Type import code ---*/
  25599. /*--- Variable import code ---*/
  25600. /*--- Function import code ---*/
  25601. /*--- Execution code ---*/
  25602. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  25603. if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  25604. #endif
  25605. __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  25606. __Pyx_GOTREF(__pyx_t_1);
  25607. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_level, __pyx_int_0) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  25608. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25609. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25610. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__86, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25611. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25612. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25613. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__93, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25614. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25615. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25616. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__82, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25617. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25618. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25619. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__94, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25620. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25621. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25622. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__87, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25623. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25624. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25625. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__89, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  25626. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25627. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25628. __Pyx_GOTREF(__pyx_t_2);
  25629. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25630. if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  25631. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25632. __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  25633. __Pyx_GOTREF(__pyx_t_2);
  25634. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_0) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  25635. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25636. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25637. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__87, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25638. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25639. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25640. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__94, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25641. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25642. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25643. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__83, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25644. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25645. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25646. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__95, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25647. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25648. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25649. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__88, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25650. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25651. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25652. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__90, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  25653. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25654. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25655. __Pyx_GOTREF(__pyx_t_1);
  25656. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25657. if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  25658. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25659. __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
  25660. __Pyx_GOTREF(__pyx_t_1);
  25661. if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_level, __pyx_int_0) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  25662. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25663. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25664. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__88, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25665. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25666. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25667. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__95, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25668. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25669. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25670. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__84, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25671. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25672. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25673. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__96, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25674. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25675. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25676. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__89, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25677. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25678. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25679. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__91, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  25680. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25681. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25682. __Pyx_GOTREF(__pyx_t_2);
  25683. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25684. if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  25685. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25686. __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  25687. __Pyx_GOTREF(__pyx_t_2);
  25688. if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_0) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  25689. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25690. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25691. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__89, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25692. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25693. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25694. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__96, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25695. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25696. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  25697. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__85, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25698. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  25699. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32))
  25700. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__97, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25701. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25702. #if (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  25703. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__90, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25704. #endif /* (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  25705. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25706. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__92, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  25707. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  25708. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  25709. __Pyx_GOTREF(__pyx_t_1);
  25710. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25711. if (PyDict_SetItem(__pyx_d, __pyx_n_s_signalmodule, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  25712. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25713. __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  25714. __Pyx_GOTREF(__pyx_t_1);
  25715. __Pyx_INCREF(__pyx_n_s_get_version);
  25716. __Pyx_GIVEREF(__pyx_n_s_get_version);
  25717. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_version);
  25718. __Pyx_INCREF(__pyx_n_s_get_header_version);
  25719. __Pyx_GIVEREF(__pyx_n_s_get_header_version);
  25720. PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_get_header_version);
  25721. __Pyx_INCREF(__pyx_n_s_supported_backends);
  25722. __Pyx_GIVEREF(__pyx_n_s_supported_backends);
  25723. PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_supported_backends);
  25724. __Pyx_INCREF(__pyx_n_s_recommended_backends);
  25725. __Pyx_GIVEREF(__pyx_n_s_recommended_backends);
  25726. PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_recommended_backends);
  25727. __Pyx_INCREF(__pyx_n_s_embeddable_backends);
  25728. __Pyx_GIVEREF(__pyx_n_s_embeddable_backends);
  25729. PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_embeddable_backends);
  25730. __Pyx_INCREF(__pyx_n_s_time);
  25731. __Pyx_GIVEREF(__pyx_n_s_time);
  25732. PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_time);
  25733. __Pyx_INCREF(__pyx_n_s_loop);
  25734. __Pyx_GIVEREF(__pyx_n_s_loop);
  25735. PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_loop);
  25736. if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  25737. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25738. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  25739. __Pyx_GOTREF(__pyx_t_1);
  25740. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  25741. __Pyx_GOTREF(__pyx_t_2);
  25742. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25743. __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  25744. __Pyx_GOTREF(__pyx_t_1);
  25745. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25746. __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  25747. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  25748. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 32, __pyx_L1_error)
  25749. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25750. if (__pyx_t_3) {
  25751. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  25752. __Pyx_GOTREF(__pyx_t_2);
  25753. __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  25754. __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  25755. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyInt_Type)));
  25756. __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_integer_types);
  25757. __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_integer_types, ((PyObject*)__pyx_t_2));
  25758. __Pyx_GIVEREF(__pyx_t_2);
  25759. __pyx_t_2 = 0;
  25760. goto __pyx_L2;
  25761. }
  25762. /*else*/ {
  25763. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  25764. __Pyx_GOTREF(__pyx_t_2);
  25765. __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
  25766. __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
  25767. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyInt_Type)));
  25768. __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
  25769. __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
  25770. PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)(&PyLong_Type)));
  25771. __Pyx_XGOTREF(__pyx_v_6gevent_5libev_8corecext_integer_types);
  25772. __Pyx_DECREF_SET(__pyx_v_6gevent_5libev_8corecext_integer_types, ((PyObject*)__pyx_t_2));
  25773. __Pyx_GIVEREF(__pyx_t_2);
  25774. __pyx_t_2 = 0;
  25775. }
  25776. __pyx_L2:;
  25777. __pyx_t_2 = __Pyx_PyInt_From_int(EV_UNDEF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  25778. __Pyx_GOTREF(__pyx_t_2);
  25779. if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNDEF, __pyx_t_2) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  25780. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25781. __pyx_t_2 = __Pyx_PyInt_From_int(EV_NONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  25782. __Pyx_GOTREF(__pyx_t_2);
  25783. if (PyDict_SetItem(__pyx_d, __pyx_n_s_NONE, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  25784. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25785. __pyx_t_2 = __Pyx_PyInt_From_int(EV_READ); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
  25786. __Pyx_GOTREF(__pyx_t_2);
  25787. if (PyDict_SetItem(__pyx_d, __pyx_n_s_READ, __pyx_t_2) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  25788. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25789. __pyx_t_2 = __Pyx_PyInt_From_int(EV_WRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  25790. __Pyx_GOTREF(__pyx_t_2);
  25791. if (PyDict_SetItem(__pyx_d, __pyx_n_s_WRITE, __pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  25792. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25793. __pyx_t_2 = __Pyx_PyInt_From_int(EV_TIMER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  25794. __Pyx_GOTREF(__pyx_t_2);
  25795. if (PyDict_SetItem(__pyx_d, __pyx_n_s_TIMER, __pyx_t_2) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  25796. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25797. __pyx_t_2 = __Pyx_PyInt_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  25798. __Pyx_GOTREF(__pyx_t_2);
  25799. if (PyDict_SetItem(__pyx_d, __pyx_n_s_PERIODIC, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  25800. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25801. __pyx_t_2 = __Pyx_PyInt_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
  25802. __Pyx_GOTREF(__pyx_t_2);
  25803. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNAL, __pyx_t_2) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  25804. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25805. __pyx_t_2 = __Pyx_PyInt_From_int(EV_CHILD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  25806. __Pyx_GOTREF(__pyx_t_2);
  25807. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHILD, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  25808. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25809. __pyx_t_2 = __Pyx_PyInt_From_int(EV_STAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  25810. __Pyx_GOTREF(__pyx_t_2);
  25811. if (PyDict_SetItem(__pyx_d, __pyx_n_s_STAT, __pyx_t_2) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  25812. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25813. __pyx_t_2 = __Pyx_PyInt_From_int(EV_IDLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  25814. __Pyx_GOTREF(__pyx_t_2);
  25815. if (PyDict_SetItem(__pyx_d, __pyx_n_s_IDLE, __pyx_t_2) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  25816. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25817. __pyx_t_2 = __Pyx_PyInt_From_int(EV_PREPARE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  25818. __Pyx_GOTREF(__pyx_t_2);
  25819. if (PyDict_SetItem(__pyx_d, __pyx_n_s_PREPARE, __pyx_t_2) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
  25820. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25821. __pyx_t_2 = __Pyx_PyInt_From_int(EV_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  25822. __Pyx_GOTREF(__pyx_t_2);
  25823. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHECK, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  25824. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25825. __pyx_t_2 = __Pyx_PyInt_From_int(EV_EMBED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
  25826. __Pyx_GOTREF(__pyx_t_2);
  25827. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EMBED, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  25828. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25829. __pyx_t_2 = __Pyx_PyInt_From_int(EV_FORK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  25830. __Pyx_GOTREF(__pyx_t_2);
  25831. if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORK, __pyx_t_2) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  25832. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25833. __pyx_t_2 = __Pyx_PyInt_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
  25834. __Pyx_GOTREF(__pyx_t_2);
  25835. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CLEANUP, __pyx_t_2) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
  25836. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25837. __pyx_t_2 = __Pyx_PyInt_From_int(EV_ASYNC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  25838. __Pyx_GOTREF(__pyx_t_2);
  25839. if (PyDict_SetItem(__pyx_d, __pyx_n_s_ASYNC, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  25840. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25841. __pyx_t_2 = __Pyx_PyInt_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  25842. __Pyx_GOTREF(__pyx_t_2);
  25843. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUSTOM, __pyx_t_2) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  25844. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25845. __pyx_t_2 = __Pyx_PyInt_From_int(EV_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  25846. __Pyx_GOTREF(__pyx_t_2);
  25847. if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  25848. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25849. __pyx_t_2 = __Pyx_PyInt_From_int((EV_READ | EV_WRITE)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  25850. __Pyx_GOTREF(__pyx_t_2);
  25851. if (PyDict_SetItem(__pyx_d, __pyx_n_s_READWRITE, __pyx_t_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  25852. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25853. __pyx_t_2 = __Pyx_PyInt_From_int(EV_MINPRI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  25854. __Pyx_GOTREF(__pyx_t_2);
  25855. if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINPRI, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  25856. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25857. __pyx_t_2 = __Pyx_PyInt_From_int(EV_MAXPRI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  25858. __Pyx_GOTREF(__pyx_t_2);
  25859. if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXPRI, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  25860. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25861. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
  25862. __Pyx_GOTREF(__pyx_t_2);
  25863. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_PORT, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  25864. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25865. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  25866. __Pyx_GOTREF(__pyx_t_2);
  25867. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_KQUEUE, __pyx_t_2) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
  25868. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25869. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  25870. __Pyx_GOTREF(__pyx_t_2);
  25871. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_EPOLL, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
  25872. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25873. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  25874. __Pyx_GOTREF(__pyx_t_2);
  25875. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_POLL, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  25876. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25877. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  25878. __Pyx_GOTREF(__pyx_t_2);
  25879. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BACKEND_SELECT, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  25880. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25881. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  25882. __Pyx_GOTREF(__pyx_t_2);
  25883. if (PyDict_SetItem(__pyx_d, __pyx_n_s_FORKCHECK, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  25884. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25885. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  25886. __Pyx_GOTREF(__pyx_t_2);
  25887. if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOINOTIFY, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  25888. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25889. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
  25890. __Pyx_GOTREF(__pyx_t_2);
  25891. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNALFD, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  25892. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25893. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  25894. __Pyx_GOTREF(__pyx_t_2);
  25895. if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOSIGMASK, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  25896. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25897. __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_5libev_8corecext__EVENTSType), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
  25898. __Pyx_GOTREF(__pyx_t_2);
  25899. __Pyx_XGOTREF(GEVENT_CORE_EVENTS);
  25900. __Pyx_DECREF_SET(GEVENT_CORE_EVENTS, __pyx_t_2);
  25901. __Pyx_GIVEREF(__pyx_t_2);
  25902. __pyx_t_2 = 0;
  25903. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EVENTS, GEVENT_CORE_EVENTS) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  25904. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_1get_version, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  25905. __Pyx_GOTREF(__pyx_t_2);
  25906. if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_version, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  25907. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25908. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_3get_header_version, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
  25909. __Pyx_GOTREF(__pyx_t_2);
  25910. if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_header_version, __pyx_t_2) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
  25911. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  25912. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_PORT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  25913. __Pyx_GOTREF(__pyx_t_2);
  25914. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  25915. __Pyx_GOTREF(__pyx_t_1);
  25916. __Pyx_GIVEREF(__pyx_t_2);
  25917. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  25918. __Pyx_INCREF(__pyx_n_s_port);
  25919. __Pyx_GIVEREF(__pyx_n_s_port);
  25920. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_port);
  25921. __pyx_t_2 = 0;
  25922. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_KQUEUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  25923. __Pyx_GOTREF(__pyx_t_2);
  25924. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
  25925. __Pyx_GOTREF(__pyx_t_4);
  25926. __Pyx_GIVEREF(__pyx_t_2);
  25927. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  25928. __Pyx_INCREF(__pyx_n_s_kqueue);
  25929. __Pyx_GIVEREF(__pyx_n_s_kqueue);
  25930. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_kqueue);
  25931. __pyx_t_2 = 0;
  25932. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_EPOLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  25933. __Pyx_GOTREF(__pyx_t_2);
  25934. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
  25935. __Pyx_GOTREF(__pyx_t_5);
  25936. __Pyx_GIVEREF(__pyx_t_2);
  25937. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  25938. __Pyx_INCREF(__pyx_n_s_epoll);
  25939. __Pyx_GIVEREF(__pyx_n_s_epoll);
  25940. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_epoll);
  25941. __pyx_t_2 = 0;
  25942. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_POLL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  25943. __Pyx_GOTREF(__pyx_t_2);
  25944. __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
  25945. __Pyx_GOTREF(__pyx_t_6);
  25946. __Pyx_GIVEREF(__pyx_t_2);
  25947. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  25948. __Pyx_INCREF(__pyx_n_s_poll);
  25949. __Pyx_GIVEREF(__pyx_n_s_poll);
  25950. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_poll);
  25951. __pyx_t_2 = 0;
  25952. __pyx_t_2 = __Pyx_PyInt_From_int(EVBACKEND_SELECT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
  25953. __Pyx_GOTREF(__pyx_t_2);
  25954. __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 120, __pyx_L1_error)
  25955. __Pyx_GOTREF(__pyx_t_7);
  25956. __Pyx_GIVEREF(__pyx_t_2);
  25957. PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  25958. __Pyx_INCREF(__pyx_n_s_select);
  25959. __Pyx_GIVEREF(__pyx_n_s_select);
  25960. PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_select);
  25961. __pyx_t_2 = 0;
  25962. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_NOENV); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
  25963. __Pyx_GOTREF(__pyx_t_2);
  25964. __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
  25965. __Pyx_GOTREF(__pyx_t_8);
  25966. __Pyx_GIVEREF(__pyx_t_2);
  25967. PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
  25968. __Pyx_INCREF(__pyx_n_s_noenv);
  25969. __Pyx_GIVEREF(__pyx_n_s_noenv);
  25970. PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_noenv);
  25971. __pyx_t_2 = 0;
  25972. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_FORKCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  25973. __Pyx_GOTREF(__pyx_t_2);
  25974. __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 122, __pyx_L1_error)
  25975. __Pyx_GOTREF(__pyx_t_9);
  25976. __Pyx_GIVEREF(__pyx_t_2);
  25977. PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
  25978. __Pyx_INCREF(__pyx_n_s_forkcheck);
  25979. __Pyx_GIVEREF(__pyx_n_s_forkcheck);
  25980. PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_forkcheck);
  25981. __pyx_t_2 = 0;
  25982. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_NOINOTIFY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  25983. __Pyx_GOTREF(__pyx_t_2);
  25984. __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 123, __pyx_L1_error)
  25985. __Pyx_GOTREF(__pyx_t_10);
  25986. __Pyx_GIVEREF(__pyx_t_2);
  25987. PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
  25988. __Pyx_INCREF(__pyx_n_s_noinotify);
  25989. __Pyx_GIVEREF(__pyx_n_s_noinotify);
  25990. PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_noinotify);
  25991. __pyx_t_2 = 0;
  25992. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_SIGNALFD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  25993. __Pyx_GOTREF(__pyx_t_2);
  25994. __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 124, __pyx_L1_error)
  25995. __Pyx_GOTREF(__pyx_t_11);
  25996. __Pyx_GIVEREF(__pyx_t_2);
  25997. PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
  25998. __Pyx_INCREF(__pyx_n_s_signalfd);
  25999. __Pyx_GIVEREF(__pyx_n_s_signalfd);
  26000. PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_signalfd);
  26001. __pyx_t_2 = 0;
  26002. __pyx_t_2 = __Pyx_PyInt_From_int(EVFLAG_NOSIGMASK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
  26003. __Pyx_GOTREF(__pyx_t_2);
  26004. __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 125, __pyx_L1_error)
  26005. __Pyx_GOTREF(__pyx_t_12);
  26006. __Pyx_GIVEREF(__pyx_t_2);
  26007. PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
  26008. __Pyx_INCREF(__pyx_n_s_nosigmask);
  26009. __Pyx_GIVEREF(__pyx_n_s_nosigmask);
  26010. PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_n_s_nosigmask);
  26011. __pyx_t_2 = 0;
  26012. __pyx_t_2 = PyList_New(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
  26013. __Pyx_GOTREF(__pyx_t_2);
  26014. __Pyx_GIVEREF(__pyx_t_1);
  26015. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  26016. __Pyx_GIVEREF(__pyx_t_4);
  26017. PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  26018. __Pyx_GIVEREF(__pyx_t_5);
  26019. PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  26020. __Pyx_GIVEREF(__pyx_t_6);
  26021. PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_6);
  26022. __Pyx_GIVEREF(__pyx_t_7);
  26023. PyList_SET_ITEM(__pyx_t_2, 4, __pyx_t_7);
  26024. __Pyx_GIVEREF(__pyx_t_8);
  26025. PyList_SET_ITEM(__pyx_t_2, 5, __pyx_t_8);
  26026. __Pyx_GIVEREF(__pyx_t_9);
  26027. PyList_SET_ITEM(__pyx_t_2, 6, __pyx_t_9);
  26028. __Pyx_GIVEREF(__pyx_t_10);
  26029. PyList_SET_ITEM(__pyx_t_2, 7, __pyx_t_10);
  26030. __Pyx_GIVEREF(__pyx_t_11);
  26031. PyList_SET_ITEM(__pyx_t_2, 8, __pyx_t_11);
  26032. __Pyx_GIVEREF(__pyx_t_12);
  26033. PyList_SET_ITEM(__pyx_t_2, 9, __pyx_t_12);
  26034. __pyx_t_1 = 0;
  26035. __pyx_t_4 = 0;
  26036. __pyx_t_5 = 0;
  26037. __pyx_t_6 = 0;
  26038. __pyx_t_7 = 0;
  26039. __pyx_t_8 = 0;
  26040. __pyx_t_9 = 0;
  26041. __pyx_t_10 = 0;
  26042. __pyx_t_11 = 0;
  26043. __pyx_t_12 = 0;
  26044. if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags, __pyx_t_2) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
  26045. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  26046. __pyx_t_2 = __pyx_pf_6gevent_5libev_8corecext_22genexpr(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
  26047. __Pyx_GOTREF(__pyx_t_2);
  26048. __pyx_t_12 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 128, __pyx_L1_error)
  26049. __Pyx_GOTREF(__pyx_t_12);
  26050. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  26051. if (PyDict_SetItem(__pyx_d, __pyx_n_s_flags_str2int, __pyx_t_12) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  26052. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26053. __pyx_t_12 = __Pyx_PyInt_From_int(EV_READ); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 131, __pyx_L1_error)
  26054. __Pyx_GOTREF(__pyx_t_12);
  26055. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  26056. __Pyx_GOTREF(__pyx_t_2);
  26057. __Pyx_GIVEREF(__pyx_t_12);
  26058. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12);
  26059. __Pyx_INCREF(__pyx_n_s_READ);
  26060. __Pyx_GIVEREF(__pyx_n_s_READ);
  26061. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_READ);
  26062. __pyx_t_12 = 0;
  26063. __pyx_t_12 = __Pyx_PyInt_From_int(EV_WRITE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 132, __pyx_L1_error)
  26064. __Pyx_GOTREF(__pyx_t_12);
  26065. __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error)
  26066. __Pyx_GOTREF(__pyx_t_11);
  26067. __Pyx_GIVEREF(__pyx_t_12);
  26068. PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
  26069. __Pyx_INCREF(__pyx_n_s_WRITE);
  26070. __Pyx_GIVEREF(__pyx_n_s_WRITE);
  26071. PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_WRITE);
  26072. __pyx_t_12 = 0;
  26073. __pyx_t_12 = __Pyx_PyInt_From_int(EV__IOFDSET); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 133, __pyx_L1_error)
  26074. __Pyx_GOTREF(__pyx_t_12);
  26075. __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error)
  26076. __Pyx_GOTREF(__pyx_t_10);
  26077. __Pyx_GIVEREF(__pyx_t_12);
  26078. PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12);
  26079. __Pyx_INCREF(__pyx_n_s_IOFDSET);
  26080. __Pyx_GIVEREF(__pyx_n_s_IOFDSET);
  26081. PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_IOFDSET);
  26082. __pyx_t_12 = 0;
  26083. __pyx_t_12 = __Pyx_PyInt_From_int(EV_PERIODIC); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 134, __pyx_L1_error)
  26084. __Pyx_GOTREF(__pyx_t_12);
  26085. __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 134, __pyx_L1_error)
  26086. __Pyx_GOTREF(__pyx_t_9);
  26087. __Pyx_GIVEREF(__pyx_t_12);
  26088. PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
  26089. __Pyx_INCREF(__pyx_n_s_PERIODIC);
  26090. __Pyx_GIVEREF(__pyx_n_s_PERIODIC);
  26091. PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_PERIODIC);
  26092. __pyx_t_12 = 0;
  26093. __pyx_t_12 = __Pyx_PyInt_From_int(EV_SIGNAL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 135, __pyx_L1_error)
  26094. __Pyx_GOTREF(__pyx_t_12);
  26095. __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error)
  26096. __Pyx_GOTREF(__pyx_t_8);
  26097. __Pyx_GIVEREF(__pyx_t_12);
  26098. PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12);
  26099. __Pyx_INCREF(__pyx_n_s_SIGNAL);
  26100. __Pyx_GIVEREF(__pyx_n_s_SIGNAL);
  26101. PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_SIGNAL);
  26102. __pyx_t_12 = 0;
  26103. __pyx_t_12 = __Pyx_PyInt_From_int(EV_CHILD); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 136, __pyx_L1_error)
  26104. __Pyx_GOTREF(__pyx_t_12);
  26105. __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
  26106. __Pyx_GOTREF(__pyx_t_7);
  26107. __Pyx_GIVEREF(__pyx_t_12);
  26108. PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12);
  26109. __Pyx_INCREF(__pyx_n_s_CHILD);
  26110. __Pyx_GIVEREF(__pyx_n_s_CHILD);
  26111. PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_CHILD);
  26112. __pyx_t_12 = 0;
  26113. __pyx_t_12 = __Pyx_PyInt_From_int(EV_STAT); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 137, __pyx_L1_error)
  26114. __Pyx_GOTREF(__pyx_t_12);
  26115. __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
  26116. __Pyx_GOTREF(__pyx_t_6);
  26117. __Pyx_GIVEREF(__pyx_t_12);
  26118. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12);
  26119. __Pyx_INCREF(__pyx_n_s_STAT);
  26120. __Pyx_GIVEREF(__pyx_n_s_STAT);
  26121. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_STAT);
  26122. __pyx_t_12 = 0;
  26123. __pyx_t_12 = __Pyx_PyInt_From_int(EV_IDLE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 138, __pyx_L1_error)
  26124. __Pyx_GOTREF(__pyx_t_12);
  26125. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error)
  26126. __Pyx_GOTREF(__pyx_t_5);
  26127. __Pyx_GIVEREF(__pyx_t_12);
  26128. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_12);
  26129. __Pyx_INCREF(__pyx_n_s_IDLE);
  26130. __Pyx_GIVEREF(__pyx_n_s_IDLE);
  26131. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_IDLE);
  26132. __pyx_t_12 = 0;
  26133. __pyx_t_12 = __Pyx_PyInt_From_int(EV_PREPARE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L1_error)
  26134. __Pyx_GOTREF(__pyx_t_12);
  26135. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)
  26136. __Pyx_GOTREF(__pyx_t_4);
  26137. __Pyx_GIVEREF(__pyx_t_12);
  26138. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12);
  26139. __Pyx_INCREF(__pyx_n_s_PREPARE);
  26140. __Pyx_GIVEREF(__pyx_n_s_PREPARE);
  26141. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_PREPARE);
  26142. __pyx_t_12 = 0;
  26143. __pyx_t_12 = __Pyx_PyInt_From_int(EV_CHECK); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L1_error)
  26144. __Pyx_GOTREF(__pyx_t_12);
  26145. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  26146. __Pyx_GOTREF(__pyx_t_1);
  26147. __Pyx_GIVEREF(__pyx_t_12);
  26148. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12);
  26149. __Pyx_INCREF(__pyx_n_s_CHECK);
  26150. __Pyx_GIVEREF(__pyx_n_s_CHECK);
  26151. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_CHECK);
  26152. __pyx_t_12 = 0;
  26153. __pyx_t_12 = __Pyx_PyInt_From_int(EV_EMBED); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 141, __pyx_L1_error)
  26154. __Pyx_GOTREF(__pyx_t_12);
  26155. __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 141, __pyx_L1_error)
  26156. __Pyx_GOTREF(__pyx_t_13);
  26157. __Pyx_GIVEREF(__pyx_t_12);
  26158. PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
  26159. __Pyx_INCREF(__pyx_n_s_EMBED);
  26160. __Pyx_GIVEREF(__pyx_n_s_EMBED);
  26161. PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_EMBED);
  26162. __pyx_t_12 = 0;
  26163. __pyx_t_12 = __Pyx_PyInt_From_int(EV_FORK); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 142, __pyx_L1_error)
  26164. __Pyx_GOTREF(__pyx_t_12);
  26165. __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 142, __pyx_L1_error)
  26166. __Pyx_GOTREF(__pyx_t_14);
  26167. __Pyx_GIVEREF(__pyx_t_12);
  26168. PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12);
  26169. __Pyx_INCREF(__pyx_n_s_FORK);
  26170. __Pyx_GIVEREF(__pyx_n_s_FORK);
  26171. PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_n_s_FORK);
  26172. __pyx_t_12 = 0;
  26173. __pyx_t_12 = __Pyx_PyInt_From_int(EV_CLEANUP); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 143, __pyx_L1_error)
  26174. __Pyx_GOTREF(__pyx_t_12);
  26175. __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 143, __pyx_L1_error)
  26176. __Pyx_GOTREF(__pyx_t_15);
  26177. __Pyx_GIVEREF(__pyx_t_12);
  26178. PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_12);
  26179. __Pyx_INCREF(__pyx_n_s_CLEANUP);
  26180. __Pyx_GIVEREF(__pyx_n_s_CLEANUP);
  26181. PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_n_s_CLEANUP);
  26182. __pyx_t_12 = 0;
  26183. __pyx_t_12 = __Pyx_PyInt_From_int(EV_ASYNC); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L1_error)
  26184. __Pyx_GOTREF(__pyx_t_12);
  26185. __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 144, __pyx_L1_error)
  26186. __Pyx_GOTREF(__pyx_t_16);
  26187. __Pyx_GIVEREF(__pyx_t_12);
  26188. PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_12);
  26189. __Pyx_INCREF(__pyx_n_s_ASYNC);
  26190. __Pyx_GIVEREF(__pyx_n_s_ASYNC);
  26191. PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_n_s_ASYNC);
  26192. __pyx_t_12 = 0;
  26193. __pyx_t_12 = __Pyx_PyInt_From_int(EV_CUSTOM); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 145, __pyx_L1_error)
  26194. __Pyx_GOTREF(__pyx_t_12);
  26195. __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 145, __pyx_L1_error)
  26196. __Pyx_GOTREF(__pyx_t_17);
  26197. __Pyx_GIVEREF(__pyx_t_12);
  26198. PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_12);
  26199. __Pyx_INCREF(__pyx_n_s_CUSTOM);
  26200. __Pyx_GIVEREF(__pyx_n_s_CUSTOM);
  26201. PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_CUSTOM);
  26202. __pyx_t_12 = 0;
  26203. __pyx_t_12 = __Pyx_PyInt_From_int(EV_ERROR); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
  26204. __Pyx_GOTREF(__pyx_t_12);
  26205. __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 146, __pyx_L1_error)
  26206. __Pyx_GOTREF(__pyx_t_18);
  26207. __Pyx_GIVEREF(__pyx_t_12);
  26208. PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_12);
  26209. __Pyx_INCREF(__pyx_n_s_ERROR);
  26210. __Pyx_GIVEREF(__pyx_n_s_ERROR);
  26211. PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_n_s_ERROR);
  26212. __pyx_t_12 = 0;
  26213. __pyx_t_12 = PyList_New(16); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 131, __pyx_L1_error)
  26214. __Pyx_GOTREF(__pyx_t_12);
  26215. __Pyx_GIVEREF(__pyx_t_2);
  26216. PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
  26217. __Pyx_GIVEREF(__pyx_t_11);
  26218. PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
  26219. __Pyx_GIVEREF(__pyx_t_10);
  26220. PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_10);
  26221. __Pyx_GIVEREF(__pyx_t_9);
  26222. PyList_SET_ITEM(__pyx_t_12, 3, __pyx_t_9);
  26223. __Pyx_GIVEREF(__pyx_t_8);
  26224. PyList_SET_ITEM(__pyx_t_12, 4, __pyx_t_8);
  26225. __Pyx_GIVEREF(__pyx_t_7);
  26226. PyList_SET_ITEM(__pyx_t_12, 5, __pyx_t_7);
  26227. __Pyx_GIVEREF(__pyx_t_6);
  26228. PyList_SET_ITEM(__pyx_t_12, 6, __pyx_t_6);
  26229. __Pyx_GIVEREF(__pyx_t_5);
  26230. PyList_SET_ITEM(__pyx_t_12, 7, __pyx_t_5);
  26231. __Pyx_GIVEREF(__pyx_t_4);
  26232. PyList_SET_ITEM(__pyx_t_12, 8, __pyx_t_4);
  26233. __Pyx_GIVEREF(__pyx_t_1);
  26234. PyList_SET_ITEM(__pyx_t_12, 9, __pyx_t_1);
  26235. __Pyx_GIVEREF(__pyx_t_13);
  26236. PyList_SET_ITEM(__pyx_t_12, 10, __pyx_t_13);
  26237. __Pyx_GIVEREF(__pyx_t_14);
  26238. PyList_SET_ITEM(__pyx_t_12, 11, __pyx_t_14);
  26239. __Pyx_GIVEREF(__pyx_t_15);
  26240. PyList_SET_ITEM(__pyx_t_12, 12, __pyx_t_15);
  26241. __Pyx_GIVEREF(__pyx_t_16);
  26242. PyList_SET_ITEM(__pyx_t_12, 13, __pyx_t_16);
  26243. __Pyx_GIVEREF(__pyx_t_17);
  26244. PyList_SET_ITEM(__pyx_t_12, 14, __pyx_t_17);
  26245. __Pyx_GIVEREF(__pyx_t_18);
  26246. PyList_SET_ITEM(__pyx_t_12, 15, __pyx_t_18);
  26247. __pyx_t_2 = 0;
  26248. __pyx_t_11 = 0;
  26249. __pyx_t_10 = 0;
  26250. __pyx_t_9 = 0;
  26251. __pyx_t_8 = 0;
  26252. __pyx_t_7 = 0;
  26253. __pyx_t_6 = 0;
  26254. __pyx_t_5 = 0;
  26255. __pyx_t_4 = 0;
  26256. __pyx_t_1 = 0;
  26257. __pyx_t_13 = 0;
  26258. __pyx_t_14 = 0;
  26259. __pyx_t_15 = 0;
  26260. __pyx_t_16 = 0;
  26261. __pyx_t_17 = 0;
  26262. __pyx_t_18 = 0;
  26263. if (PyDict_SetItem(__pyx_d, __pyx_n_s_events, __pyx_t_12) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
  26264. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26265. __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 162, __pyx_L1_error)
  26266. __Pyx_GOTREF(__pyx_t_12);
  26267. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_version_info); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 162, __pyx_L1_error)
  26268. __Pyx_GOTREF(__pyx_t_18);
  26269. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26270. __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_18, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 162, __pyx_L1_error)
  26271. __Pyx_GOTREF(__pyx_t_12);
  26272. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  26273. __pyx_t_18 = PyObject_RichCompare(__pyx_t_12, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 162, __pyx_L1_error)
  26274. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26275. __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 162, __pyx_L1_error)
  26276. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  26277. if (__pyx_t_3) {
  26278. __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 163, __pyx_L1_error)
  26279. __Pyx_GOTREF(__pyx_t_18);
  26280. __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
  26281. __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
  26282. PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)(&PyBytes_Type)));
  26283. __Pyx_INCREF(((PyObject *)(&PyString_Type)));
  26284. __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
  26285. PyTuple_SET_ITEM(__pyx_t_18, 1, ((PyObject *)(&PyString_Type)));
  26286. if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, __pyx_t_18) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  26287. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  26288. goto __pyx_L3;
  26289. }
  26290. /*else*/ {
  26291. __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_builtins); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 165, __pyx_L1_error)
  26292. __Pyx_GOTREF(__pyx_t_18);
  26293. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_basestring); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 165, __pyx_L1_error)
  26294. __Pyx_GOTREF(__pyx_t_12);
  26295. __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  26296. if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, __pyx_t_12) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  26297. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26298. }
  26299. __pyx_L3:;
  26300. __pyx_t_12 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_13supported_backends, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 220, __pyx_L1_error)
  26301. __Pyx_GOTREF(__pyx_t_12);
  26302. if (PyDict_SetItem(__pyx_d, __pyx_n_s_supported_backends, __pyx_t_12) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  26303. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26304. __pyx_t_12 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_15recommended_backends, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 224, __pyx_L1_error)
  26305. __Pyx_GOTREF(__pyx_t_12);
  26306. if (PyDict_SetItem(__pyx_d, __pyx_n_s_recommended_backends, __pyx_t_12) < 0) __PYX_ERR(0, 224, __pyx_L1_error)
  26307. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26308. __pyx_t_12 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_17embeddable_backends, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 228, __pyx_L1_error)
  26309. __Pyx_GOTREF(__pyx_t_12);
  26310. if (PyDict_SetItem(__pyx_d, __pyx_n_s_embeddable_backends, __pyx_t_12) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
  26311. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26312. __pyx_t_12 = PyCFunction_NewEx(&__pyx_mdef_6gevent_5libev_8corecext_19time, NULL, __pyx_n_s_gevent_libev_corecext); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 232, __pyx_L1_error)
  26313. __Pyx_GOTREF(__pyx_t_12);
  26314. if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_12) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
  26315. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26316. __pyx_v_6gevent_5libev_8corecext__default_loop_destroyed = 0;
  26317. __pyx_k__9 = EVBREAK_ONE;
  26318. if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYSERR_CALLBACK, Py_None) < 0) __PYX_ERR(0, 2072, __pyx_L1_error)
  26319. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  26320. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32))
  26321. if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBEV_EMBED, Py_False) < 0) __PYX_ERR(0, 2109, __pyx_L1_error)
  26322. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) */
  26323. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  26324. if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBEV_EMBED, Py_True) < 0) __PYX_ERR(0, 2098, __pyx_L1_error)
  26325. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_FLOOR); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2099, __pyx_L1_error)
  26326. __Pyx_GOTREF(__pyx_t_12);
  26327. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_FLOOR, __pyx_t_12) < 0) __PYX_ERR(0, 2099, __pyx_L1_error)
  26328. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26329. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_CLOCK_SYSCALL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2100, __pyx_L1_error)
  26330. __Pyx_GOTREF(__pyx_t_12);
  26331. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_CLOCK_SYSCALL, __pyx_t_12) < 0) __PYX_ERR(0, 2100, __pyx_L1_error)
  26332. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26333. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_REALTIME); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2101, __pyx_L1_error)
  26334. __Pyx_GOTREF(__pyx_t_12);
  26335. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_REALTIME, __pyx_t_12) < 0) __PYX_ERR(0, 2101, __pyx_L1_error)
  26336. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26337. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_MONOTONIC); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2102, __pyx_L1_error)
  26338. __Pyx_GOTREF(__pyx_t_12);
  26339. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_MONOTONIC, __pyx_t_12) < 0) __PYX_ERR(0, 2102, __pyx_L1_error)
  26340. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26341. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_NANOSLEEP); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2103, __pyx_L1_error)
  26342. __Pyx_GOTREF(__pyx_t_12);
  26343. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_NANOSLEEP, __pyx_t_12) < 0) __PYX_ERR(0, 2103, __pyx_L1_error)
  26344. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26345. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_INOTIFY); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2104, __pyx_L1_error)
  26346. __Pyx_GOTREF(__pyx_t_12);
  26347. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_INOTIFY, __pyx_t_12) < 0) __PYX_ERR(0, 2104, __pyx_L1_error)
  26348. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26349. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_SIGNALFD); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2105, __pyx_L1_error)
  26350. __Pyx_GOTREF(__pyx_t_12);
  26351. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_SIGNALFD, __pyx_t_12) < 0) __PYX_ERR(0, 2105, __pyx_L1_error)
  26352. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26353. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_EVENTFD); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2106, __pyx_L1_error)
  26354. __Pyx_GOTREF(__pyx_t_12);
  26355. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_EVENTFD, __pyx_t_12) < 0) __PYX_ERR(0, 2106, __pyx_L1_error)
  26356. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26357. __pyx_t_12 = __Pyx_PyInt_From_int(EV_USE_4HEAP); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2107, __pyx_L1_error)
  26358. __Pyx_GOTREF(__pyx_t_12);
  26359. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EV_USE_4HEAP, __pyx_t_12) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
  26360. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26361. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  26362. #if (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  26363. if (PyDict_SetItem(__pyx_d, __pyx_n_s_LIBEV_EMBED, Py_False) < 0) __PYX_ERR(0, 2109, __pyx_L1_error)
  26364. #endif /* (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  26365. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  26366. __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  26367. __Pyx_GOTREF(__pyx_t_12);
  26368. if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_12) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  26369. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  26370. /*--- Wrapped vars code ---*/
  26371. goto __pyx_L0;
  26372. __pyx_L1_error:;
  26373. __Pyx_XDECREF(__pyx_t_1);
  26374. __Pyx_XDECREF(__pyx_t_2);
  26375. __Pyx_XDECREF(__pyx_t_4);
  26376. __Pyx_XDECREF(__pyx_t_5);
  26377. __Pyx_XDECREF(__pyx_t_6);
  26378. __Pyx_XDECREF(__pyx_t_7);
  26379. __Pyx_XDECREF(__pyx_t_8);
  26380. __Pyx_XDECREF(__pyx_t_9);
  26381. __Pyx_XDECREF(__pyx_t_10);
  26382. __Pyx_XDECREF(__pyx_t_11);
  26383. __Pyx_XDECREF(__pyx_t_12);
  26384. __Pyx_XDECREF(__pyx_t_13);
  26385. __Pyx_XDECREF(__pyx_t_14);
  26386. __Pyx_XDECREF(__pyx_t_15);
  26387. __Pyx_XDECREF(__pyx_t_16);
  26388. __Pyx_XDECREF(__pyx_t_17);
  26389. __Pyx_XDECREF(__pyx_t_18);
  26390. if (__pyx_m) {
  26391. if (__pyx_d) {
  26392. __Pyx_AddTraceback("init gevent.libev.corecext", __pyx_clineno, __pyx_lineno, __pyx_filename);
  26393. }
  26394. Py_DECREF(__pyx_m); __pyx_m = 0;
  26395. } else if (!PyErr_Occurred()) {
  26396. PyErr_SetString(PyExc_ImportError, "init gevent.libev.corecext");
  26397. }
  26398. __pyx_L0:;
  26399. __Pyx_RefNannyFinishContext();
  26400. #if PY_MAJOR_VERSION < 3
  26401. return;
  26402. #else
  26403. return __pyx_m;
  26404. #endif
  26405. }
  26406. /* --- Runtime support code --- */
  26407. /* Refnanny */
  26408. #if CYTHON_REFNANNY
  26409. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  26410. PyObject *m = NULL, *p = NULL;
  26411. void *r = NULL;
  26412. m = PyImport_ImportModule((char *)modname);
  26413. if (!m) goto end;
  26414. p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
  26415. if (!p) goto end;
  26416. r = PyLong_AsVoidPtr(p);
  26417. end:
  26418. Py_XDECREF(p);
  26419. Py_XDECREF(m);
  26420. return (__Pyx_RefNannyAPIStruct *)r;
  26421. }
  26422. #endif
  26423. /* GetBuiltinName */
  26424. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  26425. PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
  26426. if (unlikely(!result)) {
  26427. PyErr_Format(PyExc_NameError,
  26428. #if PY_MAJOR_VERSION >= 3
  26429. "name '%U' is not defined", name);
  26430. #else
  26431. "name '%.200s' is not defined", PyString_AS_STRING(name));
  26432. #endif
  26433. }
  26434. return result;
  26435. }
  26436. /* GetModuleGlobalName */
  26437. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
  26438. PyObject *result;
  26439. #if !CYTHON_AVOID_BORROWED_REFS
  26440. result = PyDict_GetItem(__pyx_d, name);
  26441. if (likely(result)) {
  26442. Py_INCREF(result);
  26443. } else {
  26444. #else
  26445. result = PyObject_GetItem(__pyx_d, name);
  26446. if (!result) {
  26447. PyErr_Clear();
  26448. #endif
  26449. result = __Pyx_GetBuiltinName(name);
  26450. }
  26451. return result;
  26452. }
  26453. /* RaiseTooManyValuesToUnpack */
  26454. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
  26455. PyErr_Format(PyExc_ValueError,
  26456. "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
  26457. }
  26458. /* RaiseNeedMoreValuesToUnpack */
  26459. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
  26460. PyErr_Format(PyExc_ValueError,
  26461. "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
  26462. index, (index == 1) ? "" : "s");
  26463. }
  26464. /* IterFinish */
  26465. static CYTHON_INLINE int __Pyx_IterFinish(void) {
  26466. #if CYTHON_FAST_THREAD_STATE
  26467. PyThreadState *tstate = PyThreadState_GET();
  26468. PyObject* exc_type = tstate->curexc_type;
  26469. if (unlikely(exc_type)) {
  26470. if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
  26471. PyObject *exc_value, *exc_tb;
  26472. exc_value = tstate->curexc_value;
  26473. exc_tb = tstate->curexc_traceback;
  26474. tstate->curexc_type = 0;
  26475. tstate->curexc_value = 0;
  26476. tstate->curexc_traceback = 0;
  26477. Py_DECREF(exc_type);
  26478. Py_XDECREF(exc_value);
  26479. Py_XDECREF(exc_tb);
  26480. return 0;
  26481. } else {
  26482. return -1;
  26483. }
  26484. }
  26485. return 0;
  26486. #else
  26487. if (unlikely(PyErr_Occurred())) {
  26488. if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
  26489. PyErr_Clear();
  26490. return 0;
  26491. } else {
  26492. return -1;
  26493. }
  26494. }
  26495. return 0;
  26496. #endif
  26497. }
  26498. /* UnpackItemEndCheck */
  26499. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
  26500. if (unlikely(retval)) {
  26501. Py_DECREF(retval);
  26502. __Pyx_RaiseTooManyValuesError(expected);
  26503. return -1;
  26504. } else {
  26505. return __Pyx_IterFinish();
  26506. }
  26507. return 0;
  26508. }
  26509. /* PyObjectCall */
  26510. #if CYTHON_COMPILING_IN_CPYTHON
  26511. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  26512. PyObject *result;
  26513. ternaryfunc call = func->ob_type->tp_call;
  26514. if (unlikely(!call))
  26515. return PyObject_Call(func, arg, kw);
  26516. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  26517. return NULL;
  26518. result = (*call)(func, arg, kw);
  26519. Py_LeaveRecursiveCall();
  26520. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  26521. PyErr_SetString(
  26522. PyExc_SystemError,
  26523. "NULL result without error in PyObject_Call");
  26524. }
  26525. return result;
  26526. }
  26527. #endif
  26528. /* PyCFunctionFastCall */
  26529. #if CYTHON_FAST_PYCCALL
  26530. static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
  26531. PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
  26532. PyCFunction meth = PyCFunction_GET_FUNCTION(func);
  26533. PyObject *self = PyCFunction_GET_SELF(func);
  26534. assert(PyCFunction_Check(func));
  26535. assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
  26536. assert(nargs >= 0);
  26537. assert(nargs == 0 || args != NULL);
  26538. /* _PyCFunction_FastCallDict() must not be called with an exception set,
  26539. because it may clear it (directly or indirectly) and so the
  26540. caller loses its exception */
  26541. assert(!PyErr_Occurred());
  26542. return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
  26543. }
  26544. #endif // CYTHON_FAST_PYCCALL
  26545. /* PyFunctionFastCall */
  26546. #if CYTHON_FAST_PYCALL
  26547. #include "frameobject.h"
  26548. static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
  26549. PyObject *globals) {
  26550. PyFrameObject *f;
  26551. PyThreadState *tstate = PyThreadState_GET();
  26552. PyObject **fastlocals;
  26553. Py_ssize_t i;
  26554. PyObject *result;
  26555. assert(globals != NULL);
  26556. /* XXX Perhaps we should create a specialized
  26557. PyFrame_New() that doesn't take locals, but does
  26558. take builtins without sanity checking them.
  26559. */
  26560. assert(tstate != NULL);
  26561. f = PyFrame_New(tstate, co, globals, NULL);
  26562. if (f == NULL) {
  26563. return NULL;
  26564. }
  26565. fastlocals = f->f_localsplus;
  26566. for (i = 0; i < na; i++) {
  26567. Py_INCREF(*args);
  26568. fastlocals[i] = *args++;
  26569. }
  26570. result = PyEval_EvalFrameEx(f,0);
  26571. ++tstate->recursion_depth;
  26572. Py_DECREF(f);
  26573. --tstate->recursion_depth;
  26574. return result;
  26575. }
  26576. #if 1 || PY_VERSION_HEX < 0x030600B1
  26577. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
  26578. PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
  26579. PyObject *globals = PyFunction_GET_GLOBALS(func);
  26580. PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
  26581. PyObject *closure;
  26582. #if PY_MAJOR_VERSION >= 3
  26583. PyObject *kwdefs;
  26584. #endif
  26585. PyObject *kwtuple, **k;
  26586. PyObject **d;
  26587. Py_ssize_t nd;
  26588. Py_ssize_t nk;
  26589. PyObject *result;
  26590. assert(kwargs == NULL || PyDict_Check(kwargs));
  26591. nk = kwargs ? PyDict_Size(kwargs) : 0;
  26592. if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
  26593. return NULL;
  26594. }
  26595. if (
  26596. #if PY_MAJOR_VERSION >= 3
  26597. co->co_kwonlyargcount == 0 &&
  26598. #endif
  26599. likely(kwargs == NULL || nk == 0) &&
  26600. co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
  26601. if (argdefs == NULL && co->co_argcount == nargs) {
  26602. result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
  26603. goto done;
  26604. }
  26605. else if (nargs == 0 && argdefs != NULL
  26606. && co->co_argcount == Py_SIZE(argdefs)) {
  26607. /* function called with no arguments, but all parameters have
  26608. a default value: use default values as arguments .*/
  26609. args = &PyTuple_GET_ITEM(argdefs, 0);
  26610. result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
  26611. goto done;
  26612. }
  26613. }
  26614. if (kwargs != NULL) {
  26615. Py_ssize_t pos, i;
  26616. kwtuple = PyTuple_New(2 * nk);
  26617. if (kwtuple == NULL) {
  26618. result = NULL;
  26619. goto done;
  26620. }
  26621. k = &PyTuple_GET_ITEM(kwtuple, 0);
  26622. pos = i = 0;
  26623. while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
  26624. Py_INCREF(k[i]);
  26625. Py_INCREF(k[i+1]);
  26626. i += 2;
  26627. }
  26628. nk = i / 2;
  26629. }
  26630. else {
  26631. kwtuple = NULL;
  26632. k = NULL;
  26633. }
  26634. closure = PyFunction_GET_CLOSURE(func);
  26635. #if PY_MAJOR_VERSION >= 3
  26636. kwdefs = PyFunction_GET_KW_DEFAULTS(func);
  26637. #endif
  26638. if (argdefs != NULL) {
  26639. d = &PyTuple_GET_ITEM(argdefs, 0);
  26640. nd = Py_SIZE(argdefs);
  26641. }
  26642. else {
  26643. d = NULL;
  26644. nd = 0;
  26645. }
  26646. #if PY_MAJOR_VERSION >= 3
  26647. result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
  26648. args, nargs,
  26649. k, (int)nk,
  26650. d, (int)nd, kwdefs, closure);
  26651. #else
  26652. result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
  26653. args, nargs,
  26654. k, (int)nk,
  26655. d, (int)nd, closure);
  26656. #endif
  26657. Py_XDECREF(kwtuple);
  26658. done:
  26659. Py_LeaveRecursiveCall();
  26660. return result;
  26661. }
  26662. #endif // CPython < 3.6
  26663. #endif // CYTHON_FAST_PYCALL
  26664. /* PyObjectCallMethO */
  26665. #if CYTHON_COMPILING_IN_CPYTHON
  26666. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  26667. PyObject *self, *result;
  26668. PyCFunction cfunc;
  26669. cfunc = PyCFunction_GET_FUNCTION(func);
  26670. self = PyCFunction_GET_SELF(func);
  26671. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  26672. return NULL;
  26673. result = cfunc(self, arg);
  26674. Py_LeaveRecursiveCall();
  26675. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  26676. PyErr_SetString(
  26677. PyExc_SystemError,
  26678. "NULL result without error in PyObject_Call");
  26679. }
  26680. return result;
  26681. }
  26682. #endif
  26683. /* PyObjectCallOneArg */
  26684. #if CYTHON_COMPILING_IN_CPYTHON
  26685. static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  26686. PyObject *result;
  26687. PyObject *args = PyTuple_New(1);
  26688. if (unlikely(!args)) return NULL;
  26689. Py_INCREF(arg);
  26690. PyTuple_SET_ITEM(args, 0, arg);
  26691. result = __Pyx_PyObject_Call(func, args, NULL);
  26692. Py_DECREF(args);
  26693. return result;
  26694. }
  26695. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  26696. #if CYTHON_FAST_PYCALL
  26697. if (PyFunction_Check(func)) {
  26698. return __Pyx_PyFunction_FastCall(func, &arg, 1);
  26699. }
  26700. #endif
  26701. #ifdef __Pyx_CyFunction_USED
  26702. if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
  26703. #else
  26704. if (likely(PyCFunction_Check(func))) {
  26705. #endif
  26706. if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
  26707. return __Pyx_PyObject_CallMethO(func, arg);
  26708. #if CYTHON_FAST_PYCCALL
  26709. } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
  26710. return __Pyx_PyCFunction_FastCall(func, &arg, 1);
  26711. #endif
  26712. }
  26713. }
  26714. return __Pyx__PyObject_CallOneArg(func, arg);
  26715. }
  26716. #else
  26717. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  26718. PyObject *result;
  26719. PyObject *args = PyTuple_Pack(1, arg);
  26720. if (unlikely(!args)) return NULL;
  26721. result = __Pyx_PyObject_Call(func, args, NULL);
  26722. Py_DECREF(args);
  26723. return result;
  26724. }
  26725. #endif
  26726. /* PyObjectCallNoArg */
  26727. #if CYTHON_COMPILING_IN_CPYTHON
  26728. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  26729. #if CYTHON_FAST_PYCALL
  26730. if (PyFunction_Check(func)) {
  26731. return __Pyx_PyFunction_FastCall(func, NULL, 0);
  26732. }
  26733. #endif
  26734. #ifdef __Pyx_CyFunction_USED
  26735. if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
  26736. #else
  26737. if (likely(PyCFunction_Check(func))) {
  26738. #endif
  26739. if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
  26740. return __Pyx_PyObject_CallMethO(func, NULL);
  26741. }
  26742. }
  26743. return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
  26744. }
  26745. #endif
  26746. /* SaveResetException */
  26747. #if CYTHON_FAST_THREAD_STATE
  26748. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  26749. *type = tstate->exc_type;
  26750. *value = tstate->exc_value;
  26751. *tb = tstate->exc_traceback;
  26752. Py_XINCREF(*type);
  26753. Py_XINCREF(*value);
  26754. Py_XINCREF(*tb);
  26755. }
  26756. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  26757. PyObject *tmp_type, *tmp_value, *tmp_tb;
  26758. tmp_type = tstate->exc_type;
  26759. tmp_value = tstate->exc_value;
  26760. tmp_tb = tstate->exc_traceback;
  26761. tstate->exc_type = type;
  26762. tstate->exc_value = value;
  26763. tstate->exc_traceback = tb;
  26764. Py_XDECREF(tmp_type);
  26765. Py_XDECREF(tmp_value);
  26766. Py_XDECREF(tmp_tb);
  26767. }
  26768. #endif
  26769. /* PyErrExceptionMatches */
  26770. #if CYTHON_FAST_THREAD_STATE
  26771. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  26772. PyObject *exc_type = tstate->curexc_type;
  26773. if (exc_type == err) return 1;
  26774. if (unlikely(!exc_type)) return 0;
  26775. return PyErr_GivenExceptionMatches(exc_type, err);
  26776. }
  26777. #endif
  26778. /* GetException */
  26779. #if CYTHON_FAST_THREAD_STATE
  26780. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  26781. #else
  26782. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
  26783. #endif
  26784. PyObject *local_type, *local_value, *local_tb;
  26785. #if CYTHON_FAST_THREAD_STATE
  26786. PyObject *tmp_type, *tmp_value, *tmp_tb;
  26787. local_type = tstate->curexc_type;
  26788. local_value = tstate->curexc_value;
  26789. local_tb = tstate->curexc_traceback;
  26790. tstate->curexc_type = 0;
  26791. tstate->curexc_value = 0;
  26792. tstate->curexc_traceback = 0;
  26793. #else
  26794. PyErr_Fetch(&local_type, &local_value, &local_tb);
  26795. #endif
  26796. PyErr_NormalizeException(&local_type, &local_value, &local_tb);
  26797. #if CYTHON_FAST_THREAD_STATE
  26798. if (unlikely(tstate->curexc_type))
  26799. #else
  26800. if (unlikely(PyErr_Occurred()))
  26801. #endif
  26802. goto bad;
  26803. #if PY_MAJOR_VERSION >= 3
  26804. if (local_tb) {
  26805. if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
  26806. goto bad;
  26807. }
  26808. #endif
  26809. Py_XINCREF(local_tb);
  26810. Py_XINCREF(local_type);
  26811. Py_XINCREF(local_value);
  26812. *type = local_type;
  26813. *value = local_value;
  26814. *tb = local_tb;
  26815. #if CYTHON_FAST_THREAD_STATE
  26816. tmp_type = tstate->exc_type;
  26817. tmp_value = tstate->exc_value;
  26818. tmp_tb = tstate->exc_traceback;
  26819. tstate->exc_type = local_type;
  26820. tstate->exc_value = local_value;
  26821. tstate->exc_traceback = local_tb;
  26822. Py_XDECREF(tmp_type);
  26823. Py_XDECREF(tmp_value);
  26824. Py_XDECREF(tmp_tb);
  26825. #else
  26826. PyErr_SetExcInfo(local_type, local_value, local_tb);
  26827. #endif
  26828. return 0;
  26829. bad:
  26830. *type = 0;
  26831. *value = 0;
  26832. *tb = 0;
  26833. Py_XDECREF(local_type);
  26834. Py_XDECREF(local_value);
  26835. Py_XDECREF(local_tb);
  26836. return -1;
  26837. }
  26838. /* StringJoin */
  26839. #if !CYTHON_COMPILING_IN_CPYTHON
  26840. static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
  26841. return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
  26842. }
  26843. #endif
  26844. /* PyErrFetchRestore */
  26845. #if CYTHON_FAST_THREAD_STATE
  26846. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  26847. PyObject *tmp_type, *tmp_value, *tmp_tb;
  26848. tmp_type = tstate->curexc_type;
  26849. tmp_value = tstate->curexc_value;
  26850. tmp_tb = tstate->curexc_traceback;
  26851. tstate->curexc_type = type;
  26852. tstate->curexc_value = value;
  26853. tstate->curexc_traceback = tb;
  26854. Py_XDECREF(tmp_type);
  26855. Py_XDECREF(tmp_value);
  26856. Py_XDECREF(tmp_tb);
  26857. }
  26858. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  26859. *type = tstate->curexc_type;
  26860. *value = tstate->curexc_value;
  26861. *tb = tstate->curexc_traceback;
  26862. tstate->curexc_type = 0;
  26863. tstate->curexc_value = 0;
  26864. tstate->curexc_traceback = 0;
  26865. }
  26866. #endif
  26867. /* RaiseException */
  26868. #if PY_MAJOR_VERSION < 3
  26869. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
  26870. CYTHON_UNUSED PyObject *cause) {
  26871. __Pyx_PyThreadState_declare
  26872. Py_XINCREF(type);
  26873. if (!value || value == Py_None)
  26874. value = NULL;
  26875. else
  26876. Py_INCREF(value);
  26877. if (!tb || tb == Py_None)
  26878. tb = NULL;
  26879. else {
  26880. Py_INCREF(tb);
  26881. if (!PyTraceBack_Check(tb)) {
  26882. PyErr_SetString(PyExc_TypeError,
  26883. "raise: arg 3 must be a traceback or None");
  26884. goto raise_error;
  26885. }
  26886. }
  26887. if (PyType_Check(type)) {
  26888. #if CYTHON_COMPILING_IN_PYPY
  26889. if (!value) {
  26890. Py_INCREF(Py_None);
  26891. value = Py_None;
  26892. }
  26893. #endif
  26894. PyErr_NormalizeException(&type, &value, &tb);
  26895. } else {
  26896. if (value) {
  26897. PyErr_SetString(PyExc_TypeError,
  26898. "instance exception may not have a separate value");
  26899. goto raise_error;
  26900. }
  26901. value = type;
  26902. type = (PyObject*) Py_TYPE(type);
  26903. Py_INCREF(type);
  26904. if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
  26905. PyErr_SetString(PyExc_TypeError,
  26906. "raise: exception class must be a subclass of BaseException");
  26907. goto raise_error;
  26908. }
  26909. }
  26910. __Pyx_PyThreadState_assign
  26911. __Pyx_ErrRestore(type, value, tb);
  26912. return;
  26913. raise_error:
  26914. Py_XDECREF(value);
  26915. Py_XDECREF(type);
  26916. Py_XDECREF(tb);
  26917. return;
  26918. }
  26919. #else
  26920. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  26921. PyObject* owned_instance = NULL;
  26922. if (tb == Py_None) {
  26923. tb = 0;
  26924. } else if (tb && !PyTraceBack_Check(tb)) {
  26925. PyErr_SetString(PyExc_TypeError,
  26926. "raise: arg 3 must be a traceback or None");
  26927. goto bad;
  26928. }
  26929. if (value == Py_None)
  26930. value = 0;
  26931. if (PyExceptionInstance_Check(type)) {
  26932. if (value) {
  26933. PyErr_SetString(PyExc_TypeError,
  26934. "instance exception may not have a separate value");
  26935. goto bad;
  26936. }
  26937. value = type;
  26938. type = (PyObject*) Py_TYPE(value);
  26939. } else if (PyExceptionClass_Check(type)) {
  26940. PyObject *instance_class = NULL;
  26941. if (value && PyExceptionInstance_Check(value)) {
  26942. instance_class = (PyObject*) Py_TYPE(value);
  26943. if (instance_class != type) {
  26944. int is_subclass = PyObject_IsSubclass(instance_class, type);
  26945. if (!is_subclass) {
  26946. instance_class = NULL;
  26947. } else if (unlikely(is_subclass == -1)) {
  26948. goto bad;
  26949. } else {
  26950. type = instance_class;
  26951. }
  26952. }
  26953. }
  26954. if (!instance_class) {
  26955. PyObject *args;
  26956. if (!value)
  26957. args = PyTuple_New(0);
  26958. else if (PyTuple_Check(value)) {
  26959. Py_INCREF(value);
  26960. args = value;
  26961. } else
  26962. args = PyTuple_Pack(1, value);
  26963. if (!args)
  26964. goto bad;
  26965. owned_instance = PyObject_Call(type, args, NULL);
  26966. Py_DECREF(args);
  26967. if (!owned_instance)
  26968. goto bad;
  26969. value = owned_instance;
  26970. if (!PyExceptionInstance_Check(value)) {
  26971. PyErr_Format(PyExc_TypeError,
  26972. "calling %R should have returned an instance of "
  26973. "BaseException, not %R",
  26974. type, Py_TYPE(value));
  26975. goto bad;
  26976. }
  26977. }
  26978. } else {
  26979. PyErr_SetString(PyExc_TypeError,
  26980. "raise: exception class must be a subclass of BaseException");
  26981. goto bad;
  26982. }
  26983. #if PY_VERSION_HEX >= 0x03030000
  26984. if (cause) {
  26985. #else
  26986. if (cause && cause != Py_None) {
  26987. #endif
  26988. PyObject *fixed_cause;
  26989. if (cause == Py_None) {
  26990. fixed_cause = NULL;
  26991. } else if (PyExceptionClass_Check(cause)) {
  26992. fixed_cause = PyObject_CallObject(cause, NULL);
  26993. if (fixed_cause == NULL)
  26994. goto bad;
  26995. } else if (PyExceptionInstance_Check(cause)) {
  26996. fixed_cause = cause;
  26997. Py_INCREF(fixed_cause);
  26998. } else {
  26999. PyErr_SetString(PyExc_TypeError,
  27000. "exception causes must derive from "
  27001. "BaseException");
  27002. goto bad;
  27003. }
  27004. PyException_SetCause(value, fixed_cause);
  27005. }
  27006. PyErr_SetObject(type, value);
  27007. if (tb) {
  27008. #if CYTHON_COMPILING_IN_PYPY
  27009. PyObject *tmp_type, *tmp_value, *tmp_tb;
  27010. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  27011. Py_INCREF(tb);
  27012. PyErr_Restore(tmp_type, tmp_value, tb);
  27013. Py_XDECREF(tmp_tb);
  27014. #else
  27015. PyThreadState *tstate = PyThreadState_GET();
  27016. PyObject* tmp_tb = tstate->curexc_traceback;
  27017. if (tb != tmp_tb) {
  27018. Py_INCREF(tb);
  27019. tstate->curexc_traceback = tb;
  27020. Py_XDECREF(tmp_tb);
  27021. }
  27022. #endif
  27023. }
  27024. bad:
  27025. Py_XDECREF(owned_instance);
  27026. return;
  27027. }
  27028. #endif
  27029. /* RaiseDoubleKeywords */
  27030. static void __Pyx_RaiseDoubleKeywordsError(
  27031. const char* func_name,
  27032. PyObject* kw_name)
  27033. {
  27034. PyErr_Format(PyExc_TypeError,
  27035. #if PY_MAJOR_VERSION >= 3
  27036. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  27037. #else
  27038. "%s() got multiple values for keyword argument '%s'", func_name,
  27039. PyString_AsString(kw_name));
  27040. #endif
  27041. }
  27042. /* ParseKeywords */
  27043. static int __Pyx_ParseOptionalKeywords(
  27044. PyObject *kwds,
  27045. PyObject **argnames[],
  27046. PyObject *kwds2,
  27047. PyObject *values[],
  27048. Py_ssize_t num_pos_args,
  27049. const char* function_name)
  27050. {
  27051. PyObject *key = 0, *value = 0;
  27052. Py_ssize_t pos = 0;
  27053. PyObject*** name;
  27054. PyObject*** first_kw_arg = argnames + num_pos_args;
  27055. while (PyDict_Next(kwds, &pos, &key, &value)) {
  27056. name = first_kw_arg;
  27057. while (*name && (**name != key)) name++;
  27058. if (*name) {
  27059. values[name-argnames] = value;
  27060. continue;
  27061. }
  27062. name = first_kw_arg;
  27063. #if PY_MAJOR_VERSION < 3
  27064. if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
  27065. while (*name) {
  27066. if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
  27067. && _PyString_Eq(**name, key)) {
  27068. values[name-argnames] = value;
  27069. break;
  27070. }
  27071. name++;
  27072. }
  27073. if (*name) continue;
  27074. else {
  27075. PyObject*** argname = argnames;
  27076. while (argname != first_kw_arg) {
  27077. if ((**argname == key) || (
  27078. (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
  27079. && _PyString_Eq(**argname, key))) {
  27080. goto arg_passed_twice;
  27081. }
  27082. argname++;
  27083. }
  27084. }
  27085. } else
  27086. #endif
  27087. if (likely(PyUnicode_Check(key))) {
  27088. while (*name) {
  27089. int cmp = (**name == key) ? 0 :
  27090. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  27091. (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
  27092. #endif
  27093. PyUnicode_Compare(**name, key);
  27094. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  27095. if (cmp == 0) {
  27096. values[name-argnames] = value;
  27097. break;
  27098. }
  27099. name++;
  27100. }
  27101. if (*name) continue;
  27102. else {
  27103. PyObject*** argname = argnames;
  27104. while (argname != first_kw_arg) {
  27105. int cmp = (**argname == key) ? 0 :
  27106. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  27107. (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
  27108. #endif
  27109. PyUnicode_Compare(**argname, key);
  27110. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  27111. if (cmp == 0) goto arg_passed_twice;
  27112. argname++;
  27113. }
  27114. }
  27115. } else
  27116. goto invalid_keyword_type;
  27117. if (kwds2) {
  27118. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  27119. } else {
  27120. goto invalid_keyword;
  27121. }
  27122. }
  27123. return 0;
  27124. arg_passed_twice:
  27125. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  27126. goto bad;
  27127. invalid_keyword_type:
  27128. PyErr_Format(PyExc_TypeError,
  27129. "%.200s() keywords must be strings", function_name);
  27130. goto bad;
  27131. invalid_keyword:
  27132. PyErr_Format(PyExc_TypeError,
  27133. #if PY_MAJOR_VERSION < 3
  27134. "%.200s() got an unexpected keyword argument '%.200s'",
  27135. function_name, PyString_AsString(key));
  27136. #else
  27137. "%s() got an unexpected keyword argument '%U'",
  27138. function_name, key);
  27139. #endif
  27140. bad:
  27141. return -1;
  27142. }
  27143. /* RaiseArgTupleInvalid */
  27144. static void __Pyx_RaiseArgtupleInvalid(
  27145. const char* func_name,
  27146. int exact,
  27147. Py_ssize_t num_min,
  27148. Py_ssize_t num_max,
  27149. Py_ssize_t num_found)
  27150. {
  27151. Py_ssize_t num_expected;
  27152. const char *more_or_less;
  27153. if (num_found < num_min) {
  27154. num_expected = num_min;
  27155. more_or_less = "at least";
  27156. } else {
  27157. num_expected = num_max;
  27158. more_or_less = "at most";
  27159. }
  27160. if (exact) {
  27161. more_or_less = "exactly";
  27162. }
  27163. PyErr_Format(PyExc_TypeError,
  27164. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  27165. func_name, more_or_less, num_expected,
  27166. (num_expected == 1) ? "" : "s", num_found);
  27167. }
  27168. /* ExtTypeTest */
  27169. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
  27170. if (unlikely(!type)) {
  27171. PyErr_SetString(PyExc_SystemError, "Missing type object");
  27172. return 0;
  27173. }
  27174. if (likely(PyObject_TypeCheck(obj, type)))
  27175. return 1;
  27176. PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
  27177. Py_TYPE(obj)->tp_name, type->tp_name);
  27178. return 0;
  27179. }
  27180. /* WriteUnraisableException */
  27181. static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
  27182. CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
  27183. int full_traceback, CYTHON_UNUSED int nogil) {
  27184. PyObject *old_exc, *old_val, *old_tb;
  27185. PyObject *ctx;
  27186. __Pyx_PyThreadState_declare
  27187. #ifdef WITH_THREAD
  27188. PyGILState_STATE state;
  27189. if (nogil)
  27190. state = PyGILState_Ensure();
  27191. #ifdef _MSC_VER
  27192. else state = (PyGILState_STATE)-1;
  27193. #endif
  27194. #endif
  27195. __Pyx_PyThreadState_assign
  27196. __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
  27197. if (full_traceback) {
  27198. Py_XINCREF(old_exc);
  27199. Py_XINCREF(old_val);
  27200. Py_XINCREF(old_tb);
  27201. __Pyx_ErrRestore(old_exc, old_val, old_tb);
  27202. PyErr_PrintEx(1);
  27203. }
  27204. #if PY_MAJOR_VERSION < 3
  27205. ctx = PyString_FromString(name);
  27206. #else
  27207. ctx = PyUnicode_FromString(name);
  27208. #endif
  27209. __Pyx_ErrRestore(old_exc, old_val, old_tb);
  27210. if (!ctx) {
  27211. PyErr_WriteUnraisable(Py_None);
  27212. } else {
  27213. PyErr_WriteUnraisable(ctx);
  27214. Py_DECREF(ctx);
  27215. }
  27216. #ifdef WITH_THREAD
  27217. if (nogil)
  27218. PyGILState_Release(state);
  27219. #endif
  27220. }
  27221. /* GetItemInt */
  27222. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  27223. PyObject *r;
  27224. if (!j) return NULL;
  27225. r = PyObject_GetItem(o, j);
  27226. Py_DECREF(j);
  27227. return r;
  27228. }
  27229. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  27230. CYTHON_NCP_UNUSED int wraparound,
  27231. CYTHON_NCP_UNUSED int boundscheck) {
  27232. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  27233. if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
  27234. if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
  27235. PyObject *r = PyList_GET_ITEM(o, i);
  27236. Py_INCREF(r);
  27237. return r;
  27238. }
  27239. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  27240. #else
  27241. return PySequence_GetItem(o, i);
  27242. #endif
  27243. }
  27244. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  27245. CYTHON_NCP_UNUSED int wraparound,
  27246. CYTHON_NCP_UNUSED int boundscheck) {
  27247. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  27248. if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
  27249. if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
  27250. PyObject *r = PyTuple_GET_ITEM(o, i);
  27251. Py_INCREF(r);
  27252. return r;
  27253. }
  27254. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  27255. #else
  27256. return PySequence_GetItem(o, i);
  27257. #endif
  27258. }
  27259. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  27260. CYTHON_NCP_UNUSED int wraparound,
  27261. CYTHON_NCP_UNUSED int boundscheck) {
  27262. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
  27263. if (is_list || PyList_CheckExact(o)) {
  27264. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  27265. if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
  27266. PyObject *r = PyList_GET_ITEM(o, n);
  27267. Py_INCREF(r);
  27268. return r;
  27269. }
  27270. }
  27271. else if (PyTuple_CheckExact(o)) {
  27272. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  27273. if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
  27274. PyObject *r = PyTuple_GET_ITEM(o, n);
  27275. Py_INCREF(r);
  27276. return r;
  27277. }
  27278. } else {
  27279. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  27280. if (likely(m && m->sq_item)) {
  27281. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  27282. Py_ssize_t l = m->sq_length(o);
  27283. if (likely(l >= 0)) {
  27284. i += l;
  27285. } else {
  27286. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  27287. return NULL;
  27288. PyErr_Clear();
  27289. }
  27290. }
  27291. return m->sq_item(o, i);
  27292. }
  27293. }
  27294. #else
  27295. if (is_list || PySequence_Check(o)) {
  27296. return PySequence_GetItem(o, i);
  27297. }
  27298. #endif
  27299. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  27300. }
  27301. /* GetAttr */
  27302. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
  27303. #if CYTHON_COMPILING_IN_CPYTHON
  27304. #if PY_MAJOR_VERSION >= 3
  27305. if (likely(PyUnicode_Check(n)))
  27306. #else
  27307. if (likely(PyString_Check(n)))
  27308. #endif
  27309. return __Pyx_PyObject_GetAttrStr(o, n);
  27310. #endif
  27311. return PyObject_GetAttr(o, n);
  27312. }
  27313. /* GetAttr3 */
  27314. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  27315. PyObject *r = __Pyx_GetAttr(o, n);
  27316. if (unlikely(!r)) {
  27317. if (!PyErr_ExceptionMatches(PyExc_AttributeError))
  27318. goto bad;
  27319. PyErr_Clear();
  27320. r = d;
  27321. Py_INCREF(d);
  27322. }
  27323. return r;
  27324. bad:
  27325. return NULL;
  27326. }
  27327. /* ArgTypeTest */
  27328. static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
  27329. PyErr_Format(PyExc_TypeError,
  27330. "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
  27331. name, type->tp_name, Py_TYPE(obj)->tp_name);
  27332. }
  27333. static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
  27334. const char *name, int exact)
  27335. {
  27336. if (unlikely(!type)) {
  27337. PyErr_SetString(PyExc_SystemError, "Missing type object");
  27338. return 0;
  27339. }
  27340. if (none_allowed && obj == Py_None) return 1;
  27341. else if (exact) {
  27342. if (likely(Py_TYPE(obj) == type)) return 1;
  27343. #if PY_MAJOR_VERSION == 2
  27344. else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
  27345. #endif
  27346. }
  27347. else {
  27348. if (likely(PyObject_TypeCheck(obj, type))) return 1;
  27349. }
  27350. __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
  27351. return 0;
  27352. }
  27353. /* SwapException */
  27354. #if CYTHON_FAST_THREAD_STATE
  27355. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  27356. PyObject *tmp_type, *tmp_value, *tmp_tb;
  27357. tmp_type = tstate->exc_type;
  27358. tmp_value = tstate->exc_value;
  27359. tmp_tb = tstate->exc_traceback;
  27360. tstate->exc_type = *type;
  27361. tstate->exc_value = *value;
  27362. tstate->exc_traceback = *tb;
  27363. *type = tmp_type;
  27364. *value = tmp_value;
  27365. *tb = tmp_tb;
  27366. }
  27367. #else
  27368. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
  27369. PyObject *tmp_type, *tmp_value, *tmp_tb;
  27370. PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
  27371. PyErr_SetExcInfo(*type, *value, *tb);
  27372. *type = tmp_type;
  27373. *value = tmp_value;
  27374. *tb = tmp_tb;
  27375. }
  27376. #endif
  27377. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  27378. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  27379. /* KeywordStringCheck */
  27380. static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
  27381. PyObject *kwdict,
  27382. const char* function_name,
  27383. int kw_allowed)
  27384. {
  27385. PyObject* key = 0;
  27386. Py_ssize_t pos = 0;
  27387. #if CYTHON_COMPILING_IN_PYPY
  27388. if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
  27389. goto invalid_keyword;
  27390. return 1;
  27391. #else
  27392. while (PyDict_Next(kwdict, &pos, &key, 0)) {
  27393. #if PY_MAJOR_VERSION < 3
  27394. if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
  27395. #endif
  27396. if (unlikely(!PyUnicode_Check(key)))
  27397. goto invalid_keyword_type;
  27398. }
  27399. if ((!kw_allowed) && unlikely(key))
  27400. goto invalid_keyword;
  27401. return 1;
  27402. invalid_keyword_type:
  27403. PyErr_Format(PyExc_TypeError,
  27404. "%.200s() keywords must be strings", function_name);
  27405. return 0;
  27406. #endif
  27407. invalid_keyword:
  27408. PyErr_Format(PyExc_TypeError,
  27409. #if PY_MAJOR_VERSION < 3
  27410. "%.200s() got an unexpected keyword argument '%.200s'",
  27411. function_name, PyString_AsString(key));
  27412. #else
  27413. "%s() got an unexpected keyword argument '%U'",
  27414. function_name, key);
  27415. #endif
  27416. return 0;
  27417. }
  27418. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  27419. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  27420. /* CallNextTpTraverse */
  27421. static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
  27422. PyTypeObject* type = Py_TYPE(obj);
  27423. while (type && type->tp_traverse != current_tp_traverse)
  27424. type = type->tp_base;
  27425. while (type && type->tp_traverse == current_tp_traverse)
  27426. type = type->tp_base;
  27427. if (type && type->tp_traverse)
  27428. return type->tp_traverse(obj, v, a);
  27429. return 0;
  27430. }
  27431. /* CallNextTpClear */
  27432. static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
  27433. PyTypeObject* type = Py_TYPE(obj);
  27434. while (type && type->tp_clear != current_tp_clear)
  27435. type = type->tp_base;
  27436. while (type && type->tp_clear == current_tp_clear)
  27437. type = type->tp_base;
  27438. if (type && type->tp_clear)
  27439. type->tp_clear(obj);
  27440. }
  27441. /* SetVTable */
  27442. static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
  27443. #if PY_VERSION_HEX >= 0x02070000
  27444. PyObject *ob = PyCapsule_New(vtable, 0, 0);
  27445. #else
  27446. PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
  27447. #endif
  27448. if (!ob)
  27449. goto bad;
  27450. if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
  27451. goto bad;
  27452. Py_DECREF(ob);
  27453. return 0;
  27454. bad:
  27455. Py_XDECREF(ob);
  27456. return -1;
  27457. }
  27458. /* CodeObjectCache */
  27459. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  27460. int start = 0, mid = 0, end = count - 1;
  27461. if (end >= 0 && code_line > entries[end].code_line) {
  27462. return count;
  27463. }
  27464. while (start < end) {
  27465. mid = start + (end - start) / 2;
  27466. if (code_line < entries[mid].code_line) {
  27467. end = mid;
  27468. } else if (code_line > entries[mid].code_line) {
  27469. start = mid + 1;
  27470. } else {
  27471. return mid;
  27472. }
  27473. }
  27474. if (code_line <= entries[mid].code_line) {
  27475. return mid;
  27476. } else {
  27477. return mid + 1;
  27478. }
  27479. }
  27480. static PyCodeObject *__pyx_find_code_object(int code_line) {
  27481. PyCodeObject* code_object;
  27482. int pos;
  27483. if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
  27484. return NULL;
  27485. }
  27486. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  27487. if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
  27488. return NULL;
  27489. }
  27490. code_object = __pyx_code_cache.entries[pos].code_object;
  27491. Py_INCREF(code_object);
  27492. return code_object;
  27493. }
  27494. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
  27495. int pos, i;
  27496. __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
  27497. if (unlikely(!code_line)) {
  27498. return;
  27499. }
  27500. if (unlikely(!entries)) {
  27501. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  27502. if (likely(entries)) {
  27503. __pyx_code_cache.entries = entries;
  27504. __pyx_code_cache.max_count = 64;
  27505. __pyx_code_cache.count = 1;
  27506. entries[0].code_line = code_line;
  27507. entries[0].code_object = code_object;
  27508. Py_INCREF(code_object);
  27509. }
  27510. return;
  27511. }
  27512. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  27513. if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
  27514. PyCodeObject* tmp = entries[pos].code_object;
  27515. entries[pos].code_object = code_object;
  27516. Py_DECREF(tmp);
  27517. return;
  27518. }
  27519. if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
  27520. int new_max = __pyx_code_cache.max_count + 64;
  27521. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  27522. __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
  27523. if (unlikely(!entries)) {
  27524. return;
  27525. }
  27526. __pyx_code_cache.entries = entries;
  27527. __pyx_code_cache.max_count = new_max;
  27528. }
  27529. for (i=__pyx_code_cache.count; i>pos; i--) {
  27530. entries[i] = entries[i-1];
  27531. }
  27532. entries[pos].code_line = code_line;
  27533. entries[pos].code_object = code_object;
  27534. __pyx_code_cache.count++;
  27535. Py_INCREF(code_object);
  27536. }
  27537. /* AddTraceback */
  27538. #include "compile.h"
  27539. #include "frameobject.h"
  27540. #include "traceback.h"
  27541. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  27542. const char *funcname, int c_line,
  27543. int py_line, const char *filename) {
  27544. PyCodeObject *py_code = 0;
  27545. PyObject *py_srcfile = 0;
  27546. PyObject *py_funcname = 0;
  27547. #if PY_MAJOR_VERSION < 3
  27548. py_srcfile = PyString_FromString(filename);
  27549. #else
  27550. py_srcfile = PyUnicode_FromString(filename);
  27551. #endif
  27552. if (!py_srcfile) goto bad;
  27553. if (c_line) {
  27554. #if PY_MAJOR_VERSION < 3
  27555. py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  27556. #else
  27557. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  27558. #endif
  27559. }
  27560. else {
  27561. #if PY_MAJOR_VERSION < 3
  27562. py_funcname = PyString_FromString(funcname);
  27563. #else
  27564. py_funcname = PyUnicode_FromString(funcname);
  27565. #endif
  27566. }
  27567. if (!py_funcname) goto bad;
  27568. py_code = __Pyx_PyCode_New(
  27569. 0,
  27570. 0,
  27571. 0,
  27572. 0,
  27573. 0,
  27574. __pyx_empty_bytes, /*PyObject *code,*/
  27575. __pyx_empty_tuple, /*PyObject *consts,*/
  27576. __pyx_empty_tuple, /*PyObject *names,*/
  27577. __pyx_empty_tuple, /*PyObject *varnames,*/
  27578. __pyx_empty_tuple, /*PyObject *freevars,*/
  27579. __pyx_empty_tuple, /*PyObject *cellvars,*/
  27580. py_srcfile, /*PyObject *filename,*/
  27581. py_funcname, /*PyObject *name,*/
  27582. py_line,
  27583. __pyx_empty_bytes /*PyObject *lnotab*/
  27584. );
  27585. Py_DECREF(py_srcfile);
  27586. Py_DECREF(py_funcname);
  27587. return py_code;
  27588. bad:
  27589. Py_XDECREF(py_srcfile);
  27590. Py_XDECREF(py_funcname);
  27591. return NULL;
  27592. }
  27593. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  27594. int py_line, const char *filename) {
  27595. PyCodeObject *py_code = 0;
  27596. PyFrameObject *py_frame = 0;
  27597. py_code = __pyx_find_code_object(c_line ? c_line : py_line);
  27598. if (!py_code) {
  27599. py_code = __Pyx_CreateCodeObjectForTraceback(
  27600. funcname, c_line, py_line, filename);
  27601. if (!py_code) goto bad;
  27602. __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
  27603. }
  27604. py_frame = PyFrame_New(
  27605. PyThreadState_GET(), /*PyThreadState *tstate,*/
  27606. py_code, /*PyCodeObject *code,*/
  27607. __pyx_d, /*PyObject *globals,*/
  27608. 0 /*PyObject *locals*/
  27609. );
  27610. if (!py_frame) goto bad;
  27611. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  27612. PyTraceBack_Here(py_frame);
  27613. bad:
  27614. Py_XDECREF(py_code);
  27615. Py_XDECREF(py_frame);
  27616. }
  27617. /* CIntToPy */
  27618. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  27619. const long neg_one = (long) -1, const_zero = (long) 0;
  27620. const int is_unsigned = neg_one > const_zero;
  27621. if (is_unsigned) {
  27622. if (sizeof(long) < sizeof(long)) {
  27623. return PyInt_FromLong((long) value);
  27624. } else if (sizeof(long) <= sizeof(unsigned long)) {
  27625. return PyLong_FromUnsignedLong((unsigned long) value);
  27626. #ifdef HAVE_LONG_LONG
  27627. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  27628. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  27629. #endif
  27630. }
  27631. } else {
  27632. if (sizeof(long) <= sizeof(long)) {
  27633. return PyInt_FromLong((long) value);
  27634. #ifdef HAVE_LONG_LONG
  27635. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  27636. return PyLong_FromLongLong((PY_LONG_LONG) value);
  27637. #endif
  27638. }
  27639. }
  27640. {
  27641. int one = 1; int little = (int)*(unsigned char *)&one;
  27642. unsigned char *bytes = (unsigned char *)&value;
  27643. return _PyLong_FromByteArray(bytes, sizeof(long),
  27644. little, !is_unsigned);
  27645. }
  27646. }
  27647. /* CIntToPy */
  27648. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
  27649. const int neg_one = (int) -1, const_zero = (int) 0;
  27650. const int is_unsigned = neg_one > const_zero;
  27651. if (is_unsigned) {
  27652. if (sizeof(int) < sizeof(long)) {
  27653. return PyInt_FromLong((long) value);
  27654. } else if (sizeof(int) <= sizeof(unsigned long)) {
  27655. return PyLong_FromUnsignedLong((unsigned long) value);
  27656. #ifdef HAVE_LONG_LONG
  27657. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  27658. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  27659. #endif
  27660. }
  27661. } else {
  27662. if (sizeof(int) <= sizeof(long)) {
  27663. return PyInt_FromLong((long) value);
  27664. #ifdef HAVE_LONG_LONG
  27665. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  27666. return PyLong_FromLongLong((PY_LONG_LONG) value);
  27667. #endif
  27668. }
  27669. }
  27670. {
  27671. int one = 1; int little = (int)*(unsigned char *)&one;
  27672. unsigned char *bytes = (unsigned char *)&value;
  27673. return _PyLong_FromByteArray(bytes, sizeof(int),
  27674. little, !is_unsigned);
  27675. }
  27676. }
  27677. /* CIntFromPyVerify */
  27678. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  27679. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  27680. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  27681. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  27682. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  27683. {\
  27684. func_type value = func_value;\
  27685. if (sizeof(target_type) < sizeof(func_type)) {\
  27686. if (unlikely(value != (func_type) (target_type) value)) {\
  27687. func_type zero = 0;\
  27688. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  27689. return (target_type) -1;\
  27690. if (is_unsigned && unlikely(value < zero))\
  27691. goto raise_neg_overflow;\
  27692. else\
  27693. goto raise_overflow;\
  27694. }\
  27695. }\
  27696. return (target_type) value;\
  27697. }
  27698. /* CIntToPy */
  27699. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
  27700. const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
  27701. const int is_unsigned = neg_one > const_zero;
  27702. if (is_unsigned) {
  27703. if (sizeof(unsigned int) < sizeof(long)) {
  27704. return PyInt_FromLong((long) value);
  27705. } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
  27706. return PyLong_FromUnsignedLong((unsigned long) value);
  27707. #ifdef HAVE_LONG_LONG
  27708. } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
  27709. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  27710. #endif
  27711. }
  27712. } else {
  27713. if (sizeof(unsigned int) <= sizeof(long)) {
  27714. return PyInt_FromLong((long) value);
  27715. #ifdef HAVE_LONG_LONG
  27716. } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
  27717. return PyLong_FromLongLong((PY_LONG_LONG) value);
  27718. #endif
  27719. }
  27720. }
  27721. {
  27722. int one = 1; int little = (int)*(unsigned char *)&one;
  27723. unsigned char *bytes = (unsigned char *)&value;
  27724. return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
  27725. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  27726. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  27727. little, !is_unsigned);
  27728. }
  27729. }
  27730. /* CIntToPy */
  27731. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_vfd_socket_t(vfd_socket_t value) {
  27732. const vfd_socket_t neg_one = (vfd_socket_t) -1, const_zero = (vfd_socket_t) 0;
  27733. const int is_unsigned = neg_one > const_zero;
  27734. if (is_unsigned) {
  27735. if (sizeof(vfd_socket_t) < sizeof(long)) {
  27736. return PyInt_FromLong((long) value);
  27737. } else if (sizeof(vfd_socket_t) <= sizeof(unsigned long)) {
  27738. return PyLong_FromUnsignedLong((unsigned long) value);
  27739. #ifdef HAVE_LONG_LONG
  27740. } else if (sizeof(vfd_socket_t) <= sizeof(unsigned PY_LONG_LONG)) {
  27741. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  27742. #endif
  27743. }
  27744. } else {
  27745. if (sizeof(vfd_socket_t) <= sizeof(long)) {
  27746. return PyInt_FromLong((long) value);
  27747. #ifdef HAVE_LONG_LONG
  27748. } else if (sizeof(vfd_socket_t) <= sizeof(PY_LONG_LONG)) {
  27749. return PyLong_FromLongLong((PY_LONG_LONG) value);
  27750. #endif
  27751. }
  27752. }
  27753. {
  27754. int one = 1; int little = (int)*(unsigned char *)&one;
  27755. unsigned char *bytes = (unsigned char *)&value;
  27756. return _PyLong_FromByteArray(bytes, sizeof(vfd_socket_t),
  27757. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  27758. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  27759. little, !is_unsigned);
  27760. }
  27761. }
  27762. /* CIntFromPy */
  27763. static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
  27764. const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
  27765. const int is_unsigned = neg_one > const_zero;
  27766. #if PY_MAJOR_VERSION < 3
  27767. if (likely(PyInt_Check(x))) {
  27768. if (sizeof(unsigned int) < sizeof(long)) {
  27769. __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
  27770. } else {
  27771. long val = PyInt_AS_LONG(x);
  27772. if (is_unsigned && unlikely(val < 0)) {
  27773. goto raise_neg_overflow;
  27774. }
  27775. return (unsigned int) val;
  27776. }
  27777. } else
  27778. #endif
  27779. if (likely(PyLong_Check(x))) {
  27780. if (is_unsigned) {
  27781. #if CYTHON_USE_PYLONG_INTERNALS
  27782. const digit* digits = ((PyLongObject*)x)->ob_digit;
  27783. switch (Py_SIZE(x)) {
  27784. case 0: return (unsigned int) 0;
  27785. case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
  27786. case 2:
  27787. if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
  27788. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  27789. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27790. } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
  27791. return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  27792. }
  27793. }
  27794. break;
  27795. case 3:
  27796. if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
  27797. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  27798. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27799. } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
  27800. return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  27801. }
  27802. }
  27803. break;
  27804. case 4:
  27805. if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
  27806. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  27807. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27808. } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) {
  27809. return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
  27810. }
  27811. }
  27812. break;
  27813. }
  27814. #endif
  27815. #if CYTHON_COMPILING_IN_CPYTHON
  27816. if (unlikely(Py_SIZE(x) < 0)) {
  27817. goto raise_neg_overflow;
  27818. }
  27819. #else
  27820. {
  27821. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  27822. if (unlikely(result < 0))
  27823. return (unsigned int) -1;
  27824. if (unlikely(result == 1))
  27825. goto raise_neg_overflow;
  27826. }
  27827. #endif
  27828. if (sizeof(unsigned int) <= sizeof(unsigned long)) {
  27829. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
  27830. #ifdef HAVE_LONG_LONG
  27831. } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
  27832. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  27833. #endif
  27834. }
  27835. } else {
  27836. #if CYTHON_USE_PYLONG_INTERNALS
  27837. const digit* digits = ((PyLongObject*)x)->ob_digit;
  27838. switch (Py_SIZE(x)) {
  27839. case 0: return (unsigned int) 0;
  27840. case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
  27841. case 1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, +digits[0])
  27842. case -2:
  27843. if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
  27844. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  27845. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27846. } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  27847. return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27848. }
  27849. }
  27850. break;
  27851. case 2:
  27852. if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
  27853. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  27854. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27855. } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  27856. return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27857. }
  27858. }
  27859. break;
  27860. case -3:
  27861. if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
  27862. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  27863. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27864. } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  27865. return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27866. }
  27867. }
  27868. break;
  27869. case 3:
  27870. if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
  27871. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  27872. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27873. } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  27874. return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27875. }
  27876. }
  27877. break;
  27878. case -4:
  27879. if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
  27880. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  27881. __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27882. } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
  27883. return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27884. }
  27885. }
  27886. break;
  27887. case 4:
  27888. if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
  27889. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  27890. __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27891. } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
  27892. return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
  27893. }
  27894. }
  27895. break;
  27896. }
  27897. #endif
  27898. if (sizeof(unsigned int) <= sizeof(long)) {
  27899. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
  27900. #ifdef HAVE_LONG_LONG
  27901. } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
  27902. __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
  27903. #endif
  27904. }
  27905. }
  27906. {
  27907. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  27908. PyErr_SetString(PyExc_RuntimeError,
  27909. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  27910. #else
  27911. unsigned int val;
  27912. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  27913. #if PY_MAJOR_VERSION < 3
  27914. if (likely(v) && !PyLong_Check(v)) {
  27915. PyObject *tmp = v;
  27916. v = PyNumber_Long(tmp);
  27917. Py_DECREF(tmp);
  27918. }
  27919. #endif
  27920. if (likely(v)) {
  27921. int one = 1; int is_little = (int)*(unsigned char *)&one;
  27922. unsigned char *bytes = (unsigned char *)&val;
  27923. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  27924. bytes, sizeof(val),
  27925. is_little, !is_unsigned);
  27926. Py_DECREF(v);
  27927. if (likely(!ret))
  27928. return val;
  27929. }
  27930. #endif
  27931. return (unsigned int) -1;
  27932. }
  27933. } else {
  27934. unsigned int val;
  27935. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  27936. if (!tmp) return (unsigned int) -1;
  27937. val = __Pyx_PyInt_As_unsigned_int(tmp);
  27938. Py_DECREF(tmp);
  27939. return val;
  27940. }
  27941. raise_overflow:
  27942. PyErr_SetString(PyExc_OverflowError,
  27943. "value too large to convert to unsigned int");
  27944. return (unsigned int) -1;
  27945. raise_neg_overflow:
  27946. PyErr_SetString(PyExc_OverflowError,
  27947. "can't convert negative value to unsigned int");
  27948. return (unsigned int) -1;
  27949. }
  27950. /* CIntFromPy */
  27951. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
  27952. const int neg_one = (int) -1, const_zero = (int) 0;
  27953. const int is_unsigned = neg_one > const_zero;
  27954. #if PY_MAJOR_VERSION < 3
  27955. if (likely(PyInt_Check(x))) {
  27956. if (sizeof(int) < sizeof(long)) {
  27957. __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
  27958. } else {
  27959. long val = PyInt_AS_LONG(x);
  27960. if (is_unsigned && unlikely(val < 0)) {
  27961. goto raise_neg_overflow;
  27962. }
  27963. return (int) val;
  27964. }
  27965. } else
  27966. #endif
  27967. if (likely(PyLong_Check(x))) {
  27968. if (is_unsigned) {
  27969. #if CYTHON_USE_PYLONG_INTERNALS
  27970. const digit* digits = ((PyLongObject*)x)->ob_digit;
  27971. switch (Py_SIZE(x)) {
  27972. case 0: return (int) 0;
  27973. case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
  27974. case 2:
  27975. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  27976. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  27977. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27978. } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
  27979. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  27980. }
  27981. }
  27982. break;
  27983. case 3:
  27984. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  27985. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  27986. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27987. } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
  27988. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  27989. }
  27990. }
  27991. break;
  27992. case 4:
  27993. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  27994. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  27995. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  27996. } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
  27997. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  27998. }
  27999. }
  28000. break;
  28001. }
  28002. #endif
  28003. #if CYTHON_COMPILING_IN_CPYTHON
  28004. if (unlikely(Py_SIZE(x) < 0)) {
  28005. goto raise_neg_overflow;
  28006. }
  28007. #else
  28008. {
  28009. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  28010. if (unlikely(result < 0))
  28011. return (int) -1;
  28012. if (unlikely(result == 1))
  28013. goto raise_neg_overflow;
  28014. }
  28015. #endif
  28016. if (sizeof(int) <= sizeof(unsigned long)) {
  28017. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  28018. #ifdef HAVE_LONG_LONG
  28019. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  28020. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  28021. #endif
  28022. }
  28023. } else {
  28024. #if CYTHON_USE_PYLONG_INTERNALS
  28025. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28026. switch (Py_SIZE(x)) {
  28027. case 0: return (int) 0;
  28028. case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
  28029. case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
  28030. case -2:
  28031. if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
  28032. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28033. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28034. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  28035. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28036. }
  28037. }
  28038. break;
  28039. case 2:
  28040. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  28041. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28042. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28043. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  28044. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28045. }
  28046. }
  28047. break;
  28048. case -3:
  28049. if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  28050. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28051. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28052. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  28053. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28054. }
  28055. }
  28056. break;
  28057. case 3:
  28058. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  28059. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28060. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28061. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  28062. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28063. }
  28064. }
  28065. break;
  28066. case -4:
  28067. if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  28068. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28069. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28070. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  28071. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28072. }
  28073. }
  28074. break;
  28075. case 4:
  28076. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  28077. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28078. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28079. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  28080. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  28081. }
  28082. }
  28083. break;
  28084. }
  28085. #endif
  28086. if (sizeof(int) <= sizeof(long)) {
  28087. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  28088. #ifdef HAVE_LONG_LONG
  28089. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  28090. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  28091. #endif
  28092. }
  28093. }
  28094. {
  28095. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  28096. PyErr_SetString(PyExc_RuntimeError,
  28097. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  28098. #else
  28099. int val;
  28100. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  28101. #if PY_MAJOR_VERSION < 3
  28102. if (likely(v) && !PyLong_Check(v)) {
  28103. PyObject *tmp = v;
  28104. v = PyNumber_Long(tmp);
  28105. Py_DECREF(tmp);
  28106. }
  28107. #endif
  28108. if (likely(v)) {
  28109. int one = 1; int is_little = (int)*(unsigned char *)&one;
  28110. unsigned char *bytes = (unsigned char *)&val;
  28111. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  28112. bytes, sizeof(val),
  28113. is_little, !is_unsigned);
  28114. Py_DECREF(v);
  28115. if (likely(!ret))
  28116. return val;
  28117. }
  28118. #endif
  28119. return (int) -1;
  28120. }
  28121. } else {
  28122. int val;
  28123. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  28124. if (!tmp) return (int) -1;
  28125. val = __Pyx_PyInt_As_int(tmp);
  28126. Py_DECREF(tmp);
  28127. return val;
  28128. }
  28129. raise_overflow:
  28130. PyErr_SetString(PyExc_OverflowError,
  28131. "value too large to convert to int");
  28132. return (int) -1;
  28133. raise_neg_overflow:
  28134. PyErr_SetString(PyExc_OverflowError,
  28135. "can't convert negative value to int");
  28136. return (int) -1;
  28137. }
  28138. /* CIntFromPy */
  28139. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
  28140. const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
  28141. const int is_unsigned = neg_one > const_zero;
  28142. #if PY_MAJOR_VERSION < 3
  28143. if (likely(PyInt_Check(x))) {
  28144. if (sizeof(size_t) < sizeof(long)) {
  28145. __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
  28146. } else {
  28147. long val = PyInt_AS_LONG(x);
  28148. if (is_unsigned && unlikely(val < 0)) {
  28149. goto raise_neg_overflow;
  28150. }
  28151. return (size_t) val;
  28152. }
  28153. } else
  28154. #endif
  28155. if (likely(PyLong_Check(x))) {
  28156. if (is_unsigned) {
  28157. #if CYTHON_USE_PYLONG_INTERNALS
  28158. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28159. switch (Py_SIZE(x)) {
  28160. case 0: return (size_t) 0;
  28161. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
  28162. case 2:
  28163. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  28164. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28165. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28166. } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
  28167. return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  28168. }
  28169. }
  28170. break;
  28171. case 3:
  28172. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  28173. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28174. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28175. } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
  28176. return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  28177. }
  28178. }
  28179. break;
  28180. case 4:
  28181. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  28182. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28183. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28184. } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
  28185. return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  28186. }
  28187. }
  28188. break;
  28189. }
  28190. #endif
  28191. #if CYTHON_COMPILING_IN_CPYTHON
  28192. if (unlikely(Py_SIZE(x) < 0)) {
  28193. goto raise_neg_overflow;
  28194. }
  28195. #else
  28196. {
  28197. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  28198. if (unlikely(result < 0))
  28199. return (size_t) -1;
  28200. if (unlikely(result == 1))
  28201. goto raise_neg_overflow;
  28202. }
  28203. #endif
  28204. if (sizeof(size_t) <= sizeof(unsigned long)) {
  28205. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
  28206. #ifdef HAVE_LONG_LONG
  28207. } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
  28208. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  28209. #endif
  28210. }
  28211. } else {
  28212. #if CYTHON_USE_PYLONG_INTERNALS
  28213. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28214. switch (Py_SIZE(x)) {
  28215. case 0: return (size_t) 0;
  28216. case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  28217. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
  28218. case -2:
  28219. if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
  28220. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28221. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28222. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  28223. return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28224. }
  28225. }
  28226. break;
  28227. case 2:
  28228. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  28229. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28230. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28231. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  28232. return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28233. }
  28234. }
  28235. break;
  28236. case -3:
  28237. if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  28238. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28239. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28240. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  28241. return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28242. }
  28243. }
  28244. break;
  28245. case 3:
  28246. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  28247. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28248. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28249. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  28250. return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28251. }
  28252. }
  28253. break;
  28254. case -4:
  28255. if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  28256. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28257. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28258. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  28259. return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28260. }
  28261. }
  28262. break;
  28263. case 4:
  28264. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  28265. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28266. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28267. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  28268. return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  28269. }
  28270. }
  28271. break;
  28272. }
  28273. #endif
  28274. if (sizeof(size_t) <= sizeof(long)) {
  28275. __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
  28276. #ifdef HAVE_LONG_LONG
  28277. } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
  28278. __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  28279. #endif
  28280. }
  28281. }
  28282. {
  28283. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  28284. PyErr_SetString(PyExc_RuntimeError,
  28285. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  28286. #else
  28287. size_t val;
  28288. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  28289. #if PY_MAJOR_VERSION < 3
  28290. if (likely(v) && !PyLong_Check(v)) {
  28291. PyObject *tmp = v;
  28292. v = PyNumber_Long(tmp);
  28293. Py_DECREF(tmp);
  28294. }
  28295. #endif
  28296. if (likely(v)) {
  28297. int one = 1; int is_little = (int)*(unsigned char *)&one;
  28298. unsigned char *bytes = (unsigned char *)&val;
  28299. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  28300. bytes, sizeof(val),
  28301. is_little, !is_unsigned);
  28302. Py_DECREF(v);
  28303. if (likely(!ret))
  28304. return val;
  28305. }
  28306. #endif
  28307. return (size_t) -1;
  28308. }
  28309. } else {
  28310. size_t val;
  28311. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  28312. if (!tmp) return (size_t) -1;
  28313. val = __Pyx_PyInt_As_size_t(tmp);
  28314. Py_DECREF(tmp);
  28315. return val;
  28316. }
  28317. raise_overflow:
  28318. PyErr_SetString(PyExc_OverflowError,
  28319. "value too large to convert to size_t");
  28320. return (size_t) -1;
  28321. raise_neg_overflow:
  28322. PyErr_SetString(PyExc_OverflowError,
  28323. "can't convert negative value to size_t");
  28324. return (size_t) -1;
  28325. }
  28326. /* CIntFromPy */
  28327. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  28328. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32))
  28329. static CYTHON_INLINE vfd_socket_t __Pyx_PyInt_As_vfd_socket_t(PyObject *x) {
  28330. const vfd_socket_t neg_one = (vfd_socket_t) -1, const_zero = (vfd_socket_t) 0;
  28331. const int is_unsigned = neg_one > const_zero;
  28332. #if PY_MAJOR_VERSION < 3
  28333. if (likely(PyInt_Check(x))) {
  28334. if (sizeof(vfd_socket_t) < sizeof(long)) {
  28335. __PYX_VERIFY_RETURN_INT(vfd_socket_t, long, PyInt_AS_LONG(x))
  28336. } else {
  28337. long val = PyInt_AS_LONG(x);
  28338. if (is_unsigned && unlikely(val < 0)) {
  28339. goto raise_neg_overflow;
  28340. }
  28341. return (vfd_socket_t) val;
  28342. }
  28343. } else
  28344. #endif
  28345. if (likely(PyLong_Check(x))) {
  28346. if (is_unsigned) {
  28347. #if CYTHON_USE_PYLONG_INTERNALS
  28348. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28349. switch (Py_SIZE(x)) {
  28350. case 0: return (vfd_socket_t) 0;
  28351. case 1: __PYX_VERIFY_RETURN_INT(vfd_socket_t, digit, digits[0])
  28352. case 2:
  28353. if (8 * sizeof(vfd_socket_t) > 1 * PyLong_SHIFT) {
  28354. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28355. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28356. } else if (8 * sizeof(vfd_socket_t) >= 2 * PyLong_SHIFT) {
  28357. return (vfd_socket_t) (((((vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0]));
  28358. }
  28359. }
  28360. break;
  28361. case 3:
  28362. if (8 * sizeof(vfd_socket_t) > 2 * PyLong_SHIFT) {
  28363. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28364. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28365. } else if (8 * sizeof(vfd_socket_t) >= 3 * PyLong_SHIFT) {
  28366. return (vfd_socket_t) (((((((vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0]));
  28367. }
  28368. }
  28369. break;
  28370. case 4:
  28371. if (8 * sizeof(vfd_socket_t) > 3 * PyLong_SHIFT) {
  28372. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28373. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28374. } else if (8 * sizeof(vfd_socket_t) >= 4 * PyLong_SHIFT) {
  28375. return (vfd_socket_t) (((((((((vfd_socket_t)digits[3]) << PyLong_SHIFT) | (vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0]));
  28376. }
  28377. }
  28378. break;
  28379. }
  28380. #endif
  28381. #if CYTHON_COMPILING_IN_CPYTHON
  28382. if (unlikely(Py_SIZE(x) < 0)) {
  28383. goto raise_neg_overflow;
  28384. }
  28385. #else
  28386. {
  28387. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  28388. if (unlikely(result < 0))
  28389. return (vfd_socket_t) -1;
  28390. if (unlikely(result == 1))
  28391. goto raise_neg_overflow;
  28392. }
  28393. #endif
  28394. if (sizeof(vfd_socket_t) <= sizeof(unsigned long)) {
  28395. __PYX_VERIFY_RETURN_INT_EXC(vfd_socket_t, unsigned long, PyLong_AsUnsignedLong(x))
  28396. #ifdef HAVE_LONG_LONG
  28397. } else if (sizeof(vfd_socket_t) <= sizeof(unsigned PY_LONG_LONG)) {
  28398. __PYX_VERIFY_RETURN_INT_EXC(vfd_socket_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  28399. #endif
  28400. }
  28401. } else {
  28402. #if CYTHON_USE_PYLONG_INTERNALS
  28403. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28404. switch (Py_SIZE(x)) {
  28405. case 0: return (vfd_socket_t) 0;
  28406. case -1: __PYX_VERIFY_RETURN_INT(vfd_socket_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  28407. case 1: __PYX_VERIFY_RETURN_INT(vfd_socket_t, digit, +digits[0])
  28408. case -2:
  28409. if (8 * sizeof(vfd_socket_t) - 1 > 1 * PyLong_SHIFT) {
  28410. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28411. __PYX_VERIFY_RETURN_INT(vfd_socket_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28412. } else if (8 * sizeof(vfd_socket_t) - 1 > 2 * PyLong_SHIFT) {
  28413. return (vfd_socket_t) (((vfd_socket_t)-1)*(((((vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28414. }
  28415. }
  28416. break;
  28417. case 2:
  28418. if (8 * sizeof(vfd_socket_t) > 1 * PyLong_SHIFT) {
  28419. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28420. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28421. } else if (8 * sizeof(vfd_socket_t) - 1 > 2 * PyLong_SHIFT) {
  28422. return (vfd_socket_t) ((((((vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28423. }
  28424. }
  28425. break;
  28426. case -3:
  28427. if (8 * sizeof(vfd_socket_t) - 1 > 2 * PyLong_SHIFT) {
  28428. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28429. __PYX_VERIFY_RETURN_INT(vfd_socket_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28430. } else if (8 * sizeof(vfd_socket_t) - 1 > 3 * PyLong_SHIFT) {
  28431. return (vfd_socket_t) (((vfd_socket_t)-1)*(((((((vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28432. }
  28433. }
  28434. break;
  28435. case 3:
  28436. if (8 * sizeof(vfd_socket_t) > 2 * PyLong_SHIFT) {
  28437. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28438. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28439. } else if (8 * sizeof(vfd_socket_t) - 1 > 3 * PyLong_SHIFT) {
  28440. return (vfd_socket_t) ((((((((vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28441. }
  28442. }
  28443. break;
  28444. case -4:
  28445. if (8 * sizeof(vfd_socket_t) - 1 > 3 * PyLong_SHIFT) {
  28446. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28447. __PYX_VERIFY_RETURN_INT(vfd_socket_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28448. } else if (8 * sizeof(vfd_socket_t) - 1 > 4 * PyLong_SHIFT) {
  28449. return (vfd_socket_t) (((vfd_socket_t)-1)*(((((((((vfd_socket_t)digits[3]) << PyLong_SHIFT) | (vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28450. }
  28451. }
  28452. break;
  28453. case 4:
  28454. if (8 * sizeof(vfd_socket_t) > 3 * PyLong_SHIFT) {
  28455. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28456. __PYX_VERIFY_RETURN_INT(vfd_socket_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28457. } else if (8 * sizeof(vfd_socket_t) - 1 > 4 * PyLong_SHIFT) {
  28458. return (vfd_socket_t) ((((((((((vfd_socket_t)digits[3]) << PyLong_SHIFT) | (vfd_socket_t)digits[2]) << PyLong_SHIFT) | (vfd_socket_t)digits[1]) << PyLong_SHIFT) | (vfd_socket_t)digits[0])));
  28459. }
  28460. }
  28461. break;
  28462. }
  28463. #endif
  28464. if (sizeof(vfd_socket_t) <= sizeof(long)) {
  28465. __PYX_VERIFY_RETURN_INT_EXC(vfd_socket_t, long, PyLong_AsLong(x))
  28466. #ifdef HAVE_LONG_LONG
  28467. } else if (sizeof(vfd_socket_t) <= sizeof(PY_LONG_LONG)) {
  28468. __PYX_VERIFY_RETURN_INT_EXC(vfd_socket_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  28469. #endif
  28470. }
  28471. }
  28472. {
  28473. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  28474. PyErr_SetString(PyExc_RuntimeError,
  28475. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  28476. #else
  28477. vfd_socket_t val;
  28478. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  28479. #if PY_MAJOR_VERSION < 3
  28480. if (likely(v) && !PyLong_Check(v)) {
  28481. PyObject *tmp = v;
  28482. v = PyNumber_Long(tmp);
  28483. Py_DECREF(tmp);
  28484. }
  28485. #endif
  28486. if (likely(v)) {
  28487. int one = 1; int is_little = (int)*(unsigned char *)&one;
  28488. unsigned char *bytes = (unsigned char *)&val;
  28489. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  28490. bytes, sizeof(val),
  28491. is_little, !is_unsigned);
  28492. Py_DECREF(v);
  28493. if (likely(!ret))
  28494. return val;
  28495. }
  28496. #endif
  28497. return (vfd_socket_t) -1;
  28498. }
  28499. } else {
  28500. vfd_socket_t val;
  28501. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  28502. if (!tmp) return (vfd_socket_t) -1;
  28503. val = __Pyx_PyInt_As_vfd_socket_t(tmp);
  28504. Py_DECREF(tmp);
  28505. return val;
  28506. }
  28507. raise_overflow:
  28508. PyErr_SetString(PyExc_OverflowError,
  28509. "value too large to convert to vfd_socket_t");
  28510. return (vfd_socket_t) -1;
  28511. raise_neg_overflow:
  28512. PyErr_SetString(PyExc_OverflowError,
  28513. "can't convert negative value to vfd_socket_t");
  28514. return (vfd_socket_t) -1;
  28515. }
  28516. /* CIntFromPy */
  28517. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) */
  28518. #if (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32))
  28519. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
  28520. const long neg_one = (long) -1, const_zero = (long) 0;
  28521. const int is_unsigned = neg_one > const_zero;
  28522. #if PY_MAJOR_VERSION < 3
  28523. if (likely(PyInt_Check(x))) {
  28524. if (sizeof(long) < sizeof(long)) {
  28525. __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
  28526. } else {
  28527. long val = PyInt_AS_LONG(x);
  28528. if (is_unsigned && unlikely(val < 0)) {
  28529. goto raise_neg_overflow;
  28530. }
  28531. return (long) val;
  28532. }
  28533. } else
  28534. #endif
  28535. if (likely(PyLong_Check(x))) {
  28536. if (is_unsigned) {
  28537. #if CYTHON_USE_PYLONG_INTERNALS
  28538. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28539. switch (Py_SIZE(x)) {
  28540. case 0: return (long) 0;
  28541. case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
  28542. case 2:
  28543. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  28544. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28545. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28546. } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
  28547. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  28548. }
  28549. }
  28550. break;
  28551. case 3:
  28552. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  28553. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28554. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28555. } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
  28556. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  28557. }
  28558. }
  28559. break;
  28560. case 4:
  28561. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  28562. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28563. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28564. } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
  28565. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  28566. }
  28567. }
  28568. break;
  28569. }
  28570. #endif
  28571. #if CYTHON_COMPILING_IN_CPYTHON
  28572. if (unlikely(Py_SIZE(x) < 0)) {
  28573. goto raise_neg_overflow;
  28574. }
  28575. #else
  28576. {
  28577. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  28578. if (unlikely(result < 0))
  28579. return (long) -1;
  28580. if (unlikely(result == 1))
  28581. goto raise_neg_overflow;
  28582. }
  28583. #endif
  28584. if (sizeof(long) <= sizeof(unsigned long)) {
  28585. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  28586. #ifdef HAVE_LONG_LONG
  28587. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  28588. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  28589. #endif
  28590. }
  28591. } else {
  28592. #if CYTHON_USE_PYLONG_INTERNALS
  28593. const digit* digits = ((PyLongObject*)x)->ob_digit;
  28594. switch (Py_SIZE(x)) {
  28595. case 0: return (long) 0;
  28596. case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
  28597. case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
  28598. case -2:
  28599. if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
  28600. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28601. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28602. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  28603. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28604. }
  28605. }
  28606. break;
  28607. case 2:
  28608. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  28609. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  28610. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28611. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  28612. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28613. }
  28614. }
  28615. break;
  28616. case -3:
  28617. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  28618. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28619. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28620. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  28621. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28622. }
  28623. }
  28624. break;
  28625. case 3:
  28626. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  28627. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  28628. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28629. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  28630. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28631. }
  28632. }
  28633. break;
  28634. case -4:
  28635. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  28636. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28637. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28638. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  28639. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28640. }
  28641. }
  28642. break;
  28643. case 4:
  28644. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  28645. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  28646. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  28647. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  28648. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  28649. }
  28650. }
  28651. break;
  28652. }
  28653. #endif
  28654. if (sizeof(long) <= sizeof(long)) {
  28655. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  28656. #ifdef HAVE_LONG_LONG
  28657. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  28658. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  28659. #endif
  28660. }
  28661. }
  28662. {
  28663. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  28664. PyErr_SetString(PyExc_RuntimeError,
  28665. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  28666. #else
  28667. long val;
  28668. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  28669. #if PY_MAJOR_VERSION < 3
  28670. if (likely(v) && !PyLong_Check(v)) {
  28671. PyObject *tmp = v;
  28672. v = PyNumber_Long(tmp);
  28673. Py_DECREF(tmp);
  28674. }
  28675. #endif
  28676. if (likely(v)) {
  28677. int one = 1; int is_little = (int)*(unsigned char *)&one;
  28678. unsigned char *bytes = (unsigned char *)&val;
  28679. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  28680. bytes, sizeof(val),
  28681. is_little, !is_unsigned);
  28682. Py_DECREF(v);
  28683. if (likely(!ret))
  28684. return val;
  28685. }
  28686. #endif
  28687. return (long) -1;
  28688. }
  28689. } else {
  28690. long val;
  28691. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  28692. if (!tmp) return (long) -1;
  28693. val = __Pyx_PyInt_As_long(tmp);
  28694. Py_DECREF(tmp);
  28695. return val;
  28696. }
  28697. raise_overflow:
  28698. PyErr_SetString(PyExc_OverflowError,
  28699. "value too large to convert to long");
  28700. return (long) -1;
  28701. raise_neg_overflow:
  28702. PyErr_SetString(PyExc_OverflowError,
  28703. "can't convert negative value to long");
  28704. return (long) -1;
  28705. }
  28706. /* FetchCommonType */
  28707. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
  28708. PyObject* fake_module;
  28709. PyTypeObject* cached_type = NULL;
  28710. fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
  28711. if (!fake_module) return NULL;
  28712. Py_INCREF(fake_module);
  28713. cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
  28714. if (cached_type) {
  28715. if (!PyType_Check((PyObject*)cached_type)) {
  28716. PyErr_Format(PyExc_TypeError,
  28717. "Shared Cython type %.200s is not a type object",
  28718. type->tp_name);
  28719. goto bad;
  28720. }
  28721. if (cached_type->tp_basicsize != type->tp_basicsize) {
  28722. PyErr_Format(PyExc_TypeError,
  28723. "Shared Cython type %.200s has the wrong size, try recompiling",
  28724. type->tp_name);
  28725. goto bad;
  28726. }
  28727. } else {
  28728. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
  28729. PyErr_Clear();
  28730. if (PyType_Ready(type) < 0) goto bad;
  28731. if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
  28732. goto bad;
  28733. Py_INCREF(type);
  28734. cached_type = type;
  28735. }
  28736. done:
  28737. Py_DECREF(fake_module);
  28738. return cached_type;
  28739. bad:
  28740. Py_XDECREF(cached_type);
  28741. cached_type = NULL;
  28742. goto done;
  28743. }
  28744. /* PyObjectCallMethod1 */
  28745. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  28746. PyObject *method, *result = NULL;
  28747. method = __Pyx_PyObject_GetAttrStr(obj, method_name);
  28748. if (unlikely(!method)) goto done;
  28749. #if CYTHON_UNPACK_METHODS
  28750. if (likely(PyMethod_Check(method))) {
  28751. PyObject *self = PyMethod_GET_SELF(method);
  28752. if (likely(self)) {
  28753. PyObject *args;
  28754. PyObject *function = PyMethod_GET_FUNCTION(method);
  28755. #if CYTHON_FAST_PYCALL
  28756. if (PyFunction_Check(function)) {
  28757. PyObject *args[2] = {self, arg};
  28758. result = __Pyx_PyFunction_FastCall(function, args, 2);
  28759. goto done;
  28760. }
  28761. #endif
  28762. #if CYTHON_FAST_PYCCALL
  28763. if (__Pyx_PyFastCFunction_Check(function)) {
  28764. PyObject *args[2] = {self, arg};
  28765. result = __Pyx_PyCFunction_FastCall(function, args, 2);
  28766. goto done;
  28767. }
  28768. #endif
  28769. args = PyTuple_New(2);
  28770. if (unlikely(!args)) goto done;
  28771. Py_INCREF(self);
  28772. PyTuple_SET_ITEM(args, 0, self);
  28773. Py_INCREF(arg);
  28774. PyTuple_SET_ITEM(args, 1, arg);
  28775. Py_INCREF(function);
  28776. Py_DECREF(method); method = NULL;
  28777. result = __Pyx_PyObject_Call(function, args, NULL);
  28778. Py_DECREF(args);
  28779. Py_DECREF(function);
  28780. return result;
  28781. }
  28782. }
  28783. #endif
  28784. result = __Pyx_PyObject_CallOneArg(method, arg);
  28785. done:
  28786. Py_XDECREF(method);
  28787. return result;
  28788. }
  28789. /* CoroutineBase */
  28790. #include <structmember.h>
  28791. #include <frameobject.h>
  28792. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
  28793. static PyObject *__Pyx_Coroutine_Close(PyObject *self);
  28794. static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
  28795. #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
  28796. #if 1 || PY_VERSION_HEX < 0x030300B0
  28797. static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
  28798. PyObject *et, *ev, *tb;
  28799. PyObject *value = NULL;
  28800. __Pyx_PyThreadState_declare
  28801. __Pyx_PyThreadState_assign
  28802. __Pyx_ErrFetch(&et, &ev, &tb);
  28803. if (!et) {
  28804. Py_XDECREF(tb);
  28805. Py_XDECREF(ev);
  28806. Py_INCREF(Py_None);
  28807. *pvalue = Py_None;
  28808. return 0;
  28809. }
  28810. if (likely(et == PyExc_StopIteration)) {
  28811. if (!ev) {
  28812. Py_INCREF(Py_None);
  28813. value = Py_None;
  28814. }
  28815. #if PY_VERSION_HEX >= 0x030300A0
  28816. else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
  28817. value = ((PyStopIterationObject *)ev)->value;
  28818. Py_INCREF(value);
  28819. Py_DECREF(ev);
  28820. }
  28821. #endif
  28822. else if (unlikely(PyTuple_Check(ev))) {
  28823. if (PyTuple_GET_SIZE(ev) >= 1) {
  28824. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  28825. value = PyTuple_GET_ITEM(ev, 0);
  28826. Py_INCREF(value);
  28827. #else
  28828. value = PySequence_ITEM(ev, 0);
  28829. #endif
  28830. } else {
  28831. Py_INCREF(Py_None);
  28832. value = Py_None;
  28833. }
  28834. Py_DECREF(ev);
  28835. }
  28836. else if (!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
  28837. value = ev;
  28838. }
  28839. if (likely(value)) {
  28840. Py_XDECREF(tb);
  28841. Py_DECREF(et);
  28842. *pvalue = value;
  28843. return 0;
  28844. }
  28845. } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
  28846. __Pyx_ErrRestore(et, ev, tb);
  28847. return -1;
  28848. }
  28849. PyErr_NormalizeException(&et, &ev, &tb);
  28850. if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
  28851. __Pyx_ErrRestore(et, ev, tb);
  28852. return -1;
  28853. }
  28854. Py_XDECREF(tb);
  28855. Py_DECREF(et);
  28856. #if PY_VERSION_HEX >= 0x030300A0
  28857. value = ((PyStopIterationObject *)ev)->value;
  28858. Py_INCREF(value);
  28859. Py_DECREF(ev);
  28860. #else
  28861. {
  28862. PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
  28863. Py_DECREF(ev);
  28864. if (likely(args)) {
  28865. value = PySequence_GetItem(args, 0);
  28866. Py_DECREF(args);
  28867. }
  28868. if (unlikely(!value)) {
  28869. __Pyx_ErrRestore(NULL, NULL, NULL);
  28870. Py_INCREF(Py_None);
  28871. value = Py_None;
  28872. }
  28873. }
  28874. #endif
  28875. *pvalue = value;
  28876. return 0;
  28877. }
  28878. #endif
  28879. static CYTHON_INLINE
  28880. void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
  28881. PyObject *exc_type = self->exc_type;
  28882. PyObject *exc_value = self->exc_value;
  28883. PyObject *exc_traceback = self->exc_traceback;
  28884. self->exc_type = NULL;
  28885. self->exc_value = NULL;
  28886. self->exc_traceback = NULL;
  28887. Py_XDECREF(exc_type);
  28888. Py_XDECREF(exc_value);
  28889. Py_XDECREF(exc_traceback);
  28890. }
  28891. static CYTHON_INLINE
  28892. int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
  28893. if (unlikely(gen->is_running)) {
  28894. PyErr_SetString(PyExc_ValueError,
  28895. "generator already executing");
  28896. return 1;
  28897. }
  28898. return 0;
  28899. }
  28900. static CYTHON_INLINE
  28901. PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
  28902. PyObject *retval;
  28903. __Pyx_PyThreadState_declare
  28904. assert(!self->is_running);
  28905. if (unlikely(self->resume_label == 0)) {
  28906. if (unlikely(value && value != Py_None)) {
  28907. PyErr_SetString(PyExc_TypeError,
  28908. "can't send non-None value to a "
  28909. "just-started generator");
  28910. return NULL;
  28911. }
  28912. }
  28913. if (unlikely(self->resume_label == -1)) {
  28914. PyErr_SetNone(PyExc_StopIteration);
  28915. return NULL;
  28916. }
  28917. __Pyx_PyThreadState_assign
  28918. if (value) {
  28919. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  28920. #else
  28921. if (self->exc_traceback) {
  28922. PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
  28923. PyFrameObject *f = tb->tb_frame;
  28924. Py_XINCREF(__pyx_tstate->frame);
  28925. assert(f->f_back == NULL);
  28926. f->f_back = __pyx_tstate->frame;
  28927. }
  28928. #endif
  28929. __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
  28930. &self->exc_traceback);
  28931. } else {
  28932. __Pyx_Coroutine_ExceptionClear(self);
  28933. }
  28934. self->is_running = 1;
  28935. retval = self->body((PyObject *) self, value);
  28936. self->is_running = 0;
  28937. if (retval) {
  28938. __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
  28939. &self->exc_traceback);
  28940. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  28941. #else
  28942. if (self->exc_traceback) {
  28943. PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
  28944. PyFrameObject *f = tb->tb_frame;
  28945. Py_CLEAR(f->f_back);
  28946. }
  28947. #endif
  28948. } else {
  28949. __Pyx_Coroutine_ExceptionClear(self);
  28950. }
  28951. return retval;
  28952. }
  28953. static CYTHON_INLINE
  28954. PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
  28955. if (unlikely(!retval && !PyErr_Occurred())) {
  28956. PyErr_SetNone(PyExc_StopIteration);
  28957. }
  28958. return retval;
  28959. }
  28960. static CYTHON_INLINE
  28961. PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
  28962. PyObject *ret;
  28963. PyObject *val = NULL;
  28964. __Pyx_Coroutine_Undelegate(gen);
  28965. __Pyx_PyGen_FetchStopIterationValue(&val);
  28966. ret = __Pyx_Coroutine_SendEx(gen, val);
  28967. Py_XDECREF(val);
  28968. return ret;
  28969. }
  28970. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
  28971. PyObject *retval;
  28972. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  28973. PyObject *yf = gen->yieldfrom;
  28974. if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
  28975. return NULL;
  28976. if (yf) {
  28977. PyObject *ret;
  28978. gen->is_running = 1;
  28979. #ifdef __Pyx_Generator_USED
  28980. if (__Pyx_Generator_CheckExact(yf)) {
  28981. ret = __Pyx_Coroutine_Send(yf, value);
  28982. } else
  28983. #endif
  28984. #ifdef __Pyx_Coroutine_USED
  28985. if (__Pyx_Coroutine_CheckExact(yf)) {
  28986. ret = __Pyx_Coroutine_Send(yf, value);
  28987. } else
  28988. #endif
  28989. {
  28990. if (value == Py_None)
  28991. ret = Py_TYPE(yf)->tp_iternext(yf);
  28992. else
  28993. ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
  28994. }
  28995. gen->is_running = 0;
  28996. if (likely(ret)) {
  28997. return ret;
  28998. }
  28999. retval = __Pyx_Coroutine_FinishDelegation(gen);
  29000. } else {
  29001. retval = __Pyx_Coroutine_SendEx(gen, value);
  29002. }
  29003. return __Pyx_Coroutine_MethodReturn(retval);
  29004. }
  29005. static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
  29006. PyObject *retval = NULL;
  29007. int err = 0;
  29008. #ifdef __Pyx_Generator_USED
  29009. if (__Pyx_Generator_CheckExact(yf)) {
  29010. retval = __Pyx_Coroutine_Close(yf);
  29011. if (!retval)
  29012. return -1;
  29013. } else
  29014. #endif
  29015. #ifdef __Pyx_Coroutine_USED
  29016. if (__Pyx_Coroutine_CheckExact(yf)) {
  29017. retval = __Pyx_Coroutine_Close(yf);
  29018. if (!retval)
  29019. return -1;
  29020. } else
  29021. #endif
  29022. {
  29023. PyObject *meth;
  29024. gen->is_running = 1;
  29025. meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
  29026. if (unlikely(!meth)) {
  29027. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  29028. PyErr_WriteUnraisable(yf);
  29029. }
  29030. PyErr_Clear();
  29031. } else {
  29032. retval = PyObject_CallFunction(meth, NULL);
  29033. Py_DECREF(meth);
  29034. if (!retval)
  29035. err = -1;
  29036. }
  29037. gen->is_running = 0;
  29038. }
  29039. Py_XDECREF(retval);
  29040. return err;
  29041. }
  29042. static PyObject *__Pyx_Generator_Next(PyObject *self) {
  29043. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  29044. PyObject *yf = gen->yieldfrom;
  29045. if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
  29046. return NULL;
  29047. if (yf) {
  29048. PyObject *ret;
  29049. gen->is_running = 1;
  29050. #ifdef __Pyx_Generator_USED
  29051. if (__Pyx_Generator_CheckExact(yf)) {
  29052. ret = __Pyx_Generator_Next(yf);
  29053. } else
  29054. #endif
  29055. ret = Py_TYPE(yf)->tp_iternext(yf);
  29056. gen->is_running = 0;
  29057. if (likely(ret)) {
  29058. return ret;
  29059. }
  29060. return __Pyx_Coroutine_FinishDelegation(gen);
  29061. }
  29062. return __Pyx_Coroutine_SendEx(gen, Py_None);
  29063. }
  29064. static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
  29065. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29066. PyObject *retval, *raised_exception;
  29067. PyObject *yf = gen->yieldfrom;
  29068. int err = 0;
  29069. if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
  29070. return NULL;
  29071. if (yf) {
  29072. Py_INCREF(yf);
  29073. err = __Pyx_Coroutine_CloseIter(gen, yf);
  29074. __Pyx_Coroutine_Undelegate(gen);
  29075. Py_DECREF(yf);
  29076. }
  29077. if (err == 0)
  29078. PyErr_SetNone(PyExc_GeneratorExit);
  29079. retval = __Pyx_Coroutine_SendEx(gen, NULL);
  29080. if (retval) {
  29081. Py_DECREF(retval);
  29082. PyErr_SetString(PyExc_RuntimeError,
  29083. "generator ignored GeneratorExit");
  29084. return NULL;
  29085. }
  29086. raised_exception = PyErr_Occurred();
  29087. if (!raised_exception
  29088. || raised_exception == PyExc_StopIteration
  29089. || raised_exception == PyExc_GeneratorExit
  29090. || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
  29091. || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
  29092. {
  29093. if (raised_exception) PyErr_Clear();
  29094. Py_INCREF(Py_None);
  29095. return Py_None;
  29096. }
  29097. return NULL;
  29098. }
  29099. static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
  29100. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29101. PyObject *typ;
  29102. PyObject *tb = NULL;
  29103. PyObject *val = NULL;
  29104. PyObject *yf = gen->yieldfrom;
  29105. if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
  29106. return NULL;
  29107. if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
  29108. return NULL;
  29109. if (yf) {
  29110. PyObject *ret;
  29111. Py_INCREF(yf);
  29112. if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
  29113. int err = __Pyx_Coroutine_CloseIter(gen, yf);
  29114. Py_DECREF(yf);
  29115. __Pyx_Coroutine_Undelegate(gen);
  29116. if (err < 0)
  29117. return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
  29118. goto throw_here;
  29119. }
  29120. gen->is_running = 1;
  29121. #ifdef __Pyx_Generator_USED
  29122. if (__Pyx_Generator_CheckExact(yf)) {
  29123. ret = __Pyx_Coroutine_Throw(yf, args);
  29124. } else
  29125. #endif
  29126. #ifdef __Pyx_Coroutine_USED
  29127. if (__Pyx_Coroutine_CheckExact(yf)) {
  29128. ret = __Pyx_Coroutine_Throw(yf, args);
  29129. } else
  29130. #endif
  29131. {
  29132. PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
  29133. if (unlikely(!meth)) {
  29134. Py_DECREF(yf);
  29135. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  29136. gen->is_running = 0;
  29137. return NULL;
  29138. }
  29139. PyErr_Clear();
  29140. __Pyx_Coroutine_Undelegate(gen);
  29141. gen->is_running = 0;
  29142. goto throw_here;
  29143. }
  29144. ret = PyObject_CallObject(meth, args);
  29145. Py_DECREF(meth);
  29146. }
  29147. gen->is_running = 0;
  29148. Py_DECREF(yf);
  29149. if (!ret) {
  29150. ret = __Pyx_Coroutine_FinishDelegation(gen);
  29151. }
  29152. return __Pyx_Coroutine_MethodReturn(ret);
  29153. }
  29154. throw_here:
  29155. __Pyx_Raise(typ, val, tb, NULL);
  29156. return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
  29157. }
  29158. static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
  29159. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29160. Py_VISIT(gen->closure);
  29161. Py_VISIT(gen->classobj);
  29162. Py_VISIT(gen->yieldfrom);
  29163. Py_VISIT(gen->exc_type);
  29164. Py_VISIT(gen->exc_value);
  29165. Py_VISIT(gen->exc_traceback);
  29166. return 0;
  29167. }
  29168. static int __Pyx_Coroutine_clear(PyObject *self) {
  29169. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29170. Py_CLEAR(gen->closure);
  29171. Py_CLEAR(gen->classobj);
  29172. Py_CLEAR(gen->yieldfrom);
  29173. Py_CLEAR(gen->exc_type);
  29174. Py_CLEAR(gen->exc_value);
  29175. Py_CLEAR(gen->exc_traceback);
  29176. Py_CLEAR(gen->gi_name);
  29177. Py_CLEAR(gen->gi_qualname);
  29178. return 0;
  29179. }
  29180. static void __Pyx_Coroutine_dealloc(PyObject *self) {
  29181. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29182. PyObject_GC_UnTrack(gen);
  29183. if (gen->gi_weakreflist != NULL)
  29184. PyObject_ClearWeakRefs(self);
  29185. if (gen->resume_label > 0) {
  29186. PyObject_GC_Track(self);
  29187. #if PY_VERSION_HEX >= 0x030400a1
  29188. if (PyObject_CallFinalizerFromDealloc(self))
  29189. #else
  29190. Py_TYPE(gen)->tp_del(self);
  29191. if (self->ob_refcnt > 0)
  29192. #endif
  29193. {
  29194. return;
  29195. }
  29196. PyObject_GC_UnTrack(self);
  29197. }
  29198. __Pyx_Coroutine_clear(self);
  29199. PyObject_GC_Del(gen);
  29200. }
  29201. static void __Pyx_Coroutine_del(PyObject *self) {
  29202. PyObject *res;
  29203. PyObject *error_type, *error_value, *error_traceback;
  29204. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  29205. __Pyx_PyThreadState_declare
  29206. if (gen->resume_label <= 0)
  29207. return ;
  29208. #if PY_VERSION_HEX < 0x030400a1
  29209. assert(self->ob_refcnt == 0);
  29210. self->ob_refcnt = 1;
  29211. #endif
  29212. __Pyx_PyThreadState_assign
  29213. __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
  29214. res = __Pyx_Coroutine_Close(self);
  29215. if (res == NULL)
  29216. PyErr_WriteUnraisable(self);
  29217. else
  29218. Py_DECREF(res);
  29219. __Pyx_ErrRestore(error_type, error_value, error_traceback);
  29220. #if PY_VERSION_HEX < 0x030400a1
  29221. assert(self->ob_refcnt > 0);
  29222. if (--self->ob_refcnt == 0) {
  29223. return;
  29224. }
  29225. {
  29226. Py_ssize_t refcnt = self->ob_refcnt;
  29227. _Py_NewReference(self);
  29228. self->ob_refcnt = refcnt;
  29229. }
  29230. #if CYTHON_COMPILING_IN_CPYTHON
  29231. assert(PyType_IS_GC(self->ob_type) &&
  29232. _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
  29233. _Py_DEC_REFTOTAL;
  29234. #endif
  29235. #ifdef COUNT_ALLOCS
  29236. --Py_TYPE(self)->tp_frees;
  29237. --Py_TYPE(self)->tp_allocs;
  29238. #endif
  29239. #endif
  29240. }
  29241. static PyObject *
  29242. __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
  29243. {
  29244. PyObject *name = self->gi_name;
  29245. if (unlikely(!name)) name = Py_None;
  29246. Py_INCREF(name);
  29247. return name;
  29248. }
  29249. static int
  29250. __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
  29251. {
  29252. PyObject *tmp;
  29253. #if PY_MAJOR_VERSION >= 3
  29254. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  29255. #else
  29256. if (unlikely(value == NULL || !PyString_Check(value))) {
  29257. #endif
  29258. PyErr_SetString(PyExc_TypeError,
  29259. "__name__ must be set to a string object");
  29260. return -1;
  29261. }
  29262. tmp = self->gi_name;
  29263. Py_INCREF(value);
  29264. self->gi_name = value;
  29265. Py_XDECREF(tmp);
  29266. return 0;
  29267. }
  29268. static PyObject *
  29269. __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
  29270. {
  29271. PyObject *name = self->gi_qualname;
  29272. if (unlikely(!name)) name = Py_None;
  29273. Py_INCREF(name);
  29274. return name;
  29275. }
  29276. static int
  29277. __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
  29278. {
  29279. PyObject *tmp;
  29280. #if PY_MAJOR_VERSION >= 3
  29281. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  29282. #else
  29283. if (unlikely(value == NULL || !PyString_Check(value))) {
  29284. #endif
  29285. PyErr_SetString(PyExc_TypeError,
  29286. "__qualname__ must be set to a string object");
  29287. return -1;
  29288. }
  29289. tmp = self->gi_qualname;
  29290. Py_INCREF(value);
  29291. self->gi_qualname = value;
  29292. Py_XDECREF(tmp);
  29293. return 0;
  29294. }
  29295. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  29296. PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
  29297. PyObject *name, PyObject *qualname, PyObject *module_name) {
  29298. __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
  29299. if (gen == NULL)
  29300. return NULL;
  29301. gen->body = body;
  29302. gen->closure = closure;
  29303. Py_XINCREF(closure);
  29304. gen->is_running = 0;
  29305. gen->resume_label = 0;
  29306. gen->classobj = NULL;
  29307. gen->yieldfrom = NULL;
  29308. gen->exc_type = NULL;
  29309. gen->exc_value = NULL;
  29310. gen->exc_traceback = NULL;
  29311. gen->gi_weakreflist = NULL;
  29312. Py_XINCREF(qualname);
  29313. gen->gi_qualname = qualname;
  29314. Py_XINCREF(name);
  29315. gen->gi_name = name;
  29316. Py_XINCREF(module_name);
  29317. gen->gi_modulename = module_name;
  29318. PyObject_GC_Track(gen);
  29319. return gen;
  29320. }
  29321. /* PatchModuleWithCoroutine */
  29322. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
  29323. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  29324. int result;
  29325. PyObject *globals, *result_obj;
  29326. globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
  29327. result = PyDict_SetItemString(globals, "_cython_coroutine_type",
  29328. #ifdef __Pyx_Coroutine_USED
  29329. (PyObject*)__pyx_CoroutineType);
  29330. #else
  29331. Py_None);
  29332. #endif
  29333. if (unlikely(result < 0)) goto ignore;
  29334. result = PyDict_SetItemString(globals, "_cython_generator_type",
  29335. #ifdef __Pyx_Generator_USED
  29336. (PyObject*)__pyx_GeneratorType);
  29337. #else
  29338. Py_None);
  29339. #endif
  29340. if (unlikely(result < 0)) goto ignore;
  29341. if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
  29342. if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
  29343. result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
  29344. if (unlikely(!result_obj)) goto ignore;
  29345. Py_DECREF(result_obj);
  29346. Py_DECREF(globals);
  29347. return module;
  29348. ignore:
  29349. Py_XDECREF(globals);
  29350. PyErr_WriteUnraisable(module);
  29351. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
  29352. Py_DECREF(module);
  29353. module = NULL;
  29354. }
  29355. #else
  29356. py_code++;
  29357. #endif
  29358. return module;
  29359. }
  29360. /* PatchGeneratorABC */
  29361. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  29362. static PyObject* __Pyx_patch_abc_module(PyObject *module);
  29363. static PyObject* __Pyx_patch_abc_module(PyObject *module) {
  29364. module = __Pyx_Coroutine_patch_module(
  29365. module, ""
  29366. "if _cython_generator_type is not None:\n"
  29367. " try: Generator = _module.Generator\n"
  29368. " except AttributeError: pass\n"
  29369. " else: Generator.register(_cython_generator_type)\n"
  29370. "if _cython_coroutine_type is not None:\n"
  29371. " try: Coroutine = _module.Coroutine\n"
  29372. " except AttributeError: pass\n"
  29373. " else: Coroutine.register(_cython_coroutine_type)\n"
  29374. );
  29375. return module;
  29376. }
  29377. #endif
  29378. static int __Pyx_patch_abc(void) {
  29379. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  29380. static int abc_patched = 0;
  29381. if (!abc_patched) {
  29382. PyObject *module;
  29383. module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
  29384. if (!module) {
  29385. PyErr_WriteUnraisable(NULL);
  29386. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
  29387. ((PY_VERSION_HEX >= 0x03030000) ?
  29388. "Cython module failed to register with collections.abc module" :
  29389. "Cython module failed to register with collections module"), 1) < 0)) {
  29390. return -1;
  29391. }
  29392. } else {
  29393. module = __Pyx_patch_abc_module(module);
  29394. abc_patched = 1;
  29395. if (unlikely(!module))
  29396. return -1;
  29397. Py_DECREF(module);
  29398. }
  29399. module = PyImport_ImportModule("backports_abc");
  29400. if (module) {
  29401. module = __Pyx_patch_abc_module(module);
  29402. Py_XDECREF(module);
  29403. }
  29404. if (!module) {
  29405. PyErr_Clear();
  29406. }
  29407. }
  29408. #else
  29409. if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
  29410. #endif
  29411. return 0;
  29412. }
  29413. /* Generator */
  29414. static PyMethodDef __pyx_Generator_methods[] = {
  29415. {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
  29416. (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
  29417. {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
  29418. (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
  29419. {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
  29420. (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
  29421. {0, 0, 0, 0}
  29422. };
  29423. static PyMemberDef __pyx_Generator_memberlist[] = {
  29424. {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
  29425. {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
  29426. (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
  29427. {0, 0, 0, 0, 0}
  29428. };
  29429. static PyGetSetDef __pyx_Generator_getsets[] = {
  29430. {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
  29431. (char*) PyDoc_STR("name of the generator"), 0},
  29432. {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
  29433. (char*) PyDoc_STR("qualified name of the generator"), 0},
  29434. {0, 0, 0, 0, 0}
  29435. };
  29436. static PyTypeObject __pyx_GeneratorType_type = {
  29437. PyVarObject_HEAD_INIT(0, 0)
  29438. "generator",
  29439. sizeof(__pyx_CoroutineObject),
  29440. 0,
  29441. (destructor) __Pyx_Coroutine_dealloc,
  29442. 0,
  29443. 0,
  29444. 0,
  29445. 0,
  29446. 0,
  29447. 0,
  29448. 0,
  29449. 0,
  29450. 0,
  29451. 0,
  29452. 0,
  29453. 0,
  29454. 0,
  29455. 0,
  29456. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
  29457. 0,
  29458. (traverseproc) __Pyx_Coroutine_traverse,
  29459. 0,
  29460. 0,
  29461. offsetof(__pyx_CoroutineObject, gi_weakreflist),
  29462. 0,
  29463. (iternextfunc) __Pyx_Generator_Next,
  29464. __pyx_Generator_methods,
  29465. __pyx_Generator_memberlist,
  29466. __pyx_Generator_getsets,
  29467. 0,
  29468. 0,
  29469. 0,
  29470. 0,
  29471. 0,
  29472. 0,
  29473. 0,
  29474. 0,
  29475. 0,
  29476. 0,
  29477. 0,
  29478. 0,
  29479. 0,
  29480. 0,
  29481. 0,
  29482. #if PY_VERSION_HEX >= 0x030400a1
  29483. 0,
  29484. #else
  29485. __Pyx_Coroutine_del,
  29486. #endif
  29487. 0,
  29488. #if PY_VERSION_HEX >= 0x030400a1
  29489. __Pyx_Coroutine_del,
  29490. #endif
  29491. };
  29492. static int __pyx_Generator_init(void) {
  29493. __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
  29494. __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
  29495. __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
  29496. if (unlikely(!__pyx_GeneratorType)) {
  29497. return -1;
  29498. }
  29499. return 0;
  29500. }
  29501. /* CheckBinaryVersion */
  29502. static int __Pyx_check_binary_version(void) {
  29503. char ctversion[4], rtversion[4];
  29504. PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
  29505. PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
  29506. if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
  29507. char message[200];
  29508. PyOS_snprintf(message, sizeof(message),
  29509. "compiletime version %s of module '%.100s' "
  29510. "does not match runtime version %s",
  29511. ctversion, __Pyx_MODULE_NAME, rtversion);
  29512. return PyErr_WarnEx(NULL, message, 1);
  29513. }
  29514. return 0;
  29515. }
  29516. /* InitStrings */
  29517. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  29518. while (t->p) {
  29519. #if PY_MAJOR_VERSION < 3
  29520. if (t->is_unicode) {
  29521. *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
  29522. } else if (t->intern) {
  29523. *t->p = PyString_InternFromString(t->s);
  29524. } else {
  29525. *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
  29526. }
  29527. #else
  29528. if (t->is_unicode | t->is_str) {
  29529. if (t->intern) {
  29530. *t->p = PyUnicode_InternFromString(t->s);
  29531. } else if (t->encoding) {
  29532. *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
  29533. } else {
  29534. *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
  29535. }
  29536. } else {
  29537. *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
  29538. }
  29539. #endif
  29540. if (!*t->p)
  29541. return -1;
  29542. ++t;
  29543. }
  29544. return 0;
  29545. }
  29546. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  29547. return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
  29548. }
  29549. static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
  29550. Py_ssize_t ignore;
  29551. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  29552. }
  29553. static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  29554. #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  29555. if (
  29556. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  29557. __Pyx_sys_getdefaultencoding_not_ascii &&
  29558. #endif
  29559. PyUnicode_Check(o)) {
  29560. #if PY_VERSION_HEX < 0x03030000
  29561. char* defenc_c;
  29562. PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
  29563. if (!defenc) return NULL;
  29564. defenc_c = PyBytes_AS_STRING(defenc);
  29565. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  29566. {
  29567. char* end = defenc_c + PyBytes_GET_SIZE(defenc);
  29568. char* c;
  29569. for (c = defenc_c; c < end; c++) {
  29570. if ((unsigned char) (*c) >= 128) {
  29571. PyUnicode_AsASCIIString(o);
  29572. return NULL;
  29573. }
  29574. }
  29575. }
  29576. #endif
  29577. *length = PyBytes_GET_SIZE(defenc);
  29578. return defenc_c;
  29579. #else
  29580. if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
  29581. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  29582. if (PyUnicode_IS_ASCII(o)) {
  29583. *length = PyUnicode_GET_LENGTH(o);
  29584. return PyUnicode_AsUTF8(o);
  29585. } else {
  29586. PyUnicode_AsASCIIString(o);
  29587. return NULL;
  29588. }
  29589. #else
  29590. return PyUnicode_AsUTF8AndSize(o, length);
  29591. #endif
  29592. #endif
  29593. } else
  29594. #endif
  29595. #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
  29596. if (PyByteArray_Check(o)) {
  29597. *length = PyByteArray_GET_SIZE(o);
  29598. return PyByteArray_AS_STRING(o);
  29599. } else
  29600. #endif
  29601. {
  29602. char* result;
  29603. int r = PyBytes_AsStringAndSize(o, &result, length);
  29604. if (unlikely(r < 0)) {
  29605. return NULL;
  29606. } else {
  29607. return result;
  29608. }
  29609. }
  29610. }
  29611. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  29612. int is_true = x == Py_True;
  29613. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  29614. else return PyObject_IsTrue(x);
  29615. }
  29616. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  29617. #if CYTHON_USE_TYPE_SLOTS
  29618. PyNumberMethods *m;
  29619. #endif
  29620. const char *name = NULL;
  29621. PyObject *res = NULL;
  29622. #if PY_MAJOR_VERSION < 3
  29623. if (PyInt_Check(x) || PyLong_Check(x))
  29624. #else
  29625. if (PyLong_Check(x))
  29626. #endif
  29627. return __Pyx_NewRef(x);
  29628. #if CYTHON_USE_TYPE_SLOTS
  29629. m = Py_TYPE(x)->tp_as_number;
  29630. #if PY_MAJOR_VERSION < 3
  29631. if (m && m->nb_int) {
  29632. name = "int";
  29633. res = PyNumber_Int(x);
  29634. }
  29635. else if (m && m->nb_long) {
  29636. name = "long";
  29637. res = PyNumber_Long(x);
  29638. }
  29639. #else
  29640. if (m && m->nb_int) {
  29641. name = "int";
  29642. res = PyNumber_Long(x);
  29643. }
  29644. #endif
  29645. #else
  29646. res = PyNumber_Int(x);
  29647. #endif
  29648. if (res) {
  29649. #if PY_MAJOR_VERSION < 3
  29650. if (!PyInt_Check(res) && !PyLong_Check(res)) {
  29651. #else
  29652. if (!PyLong_Check(res)) {
  29653. #endif
  29654. PyErr_Format(PyExc_TypeError,
  29655. "__%.4s__ returned non-%.4s (type %.200s)",
  29656. name, name, Py_TYPE(res)->tp_name);
  29657. Py_DECREF(res);
  29658. return NULL;
  29659. }
  29660. }
  29661. else if (!PyErr_Occurred()) {
  29662. PyErr_SetString(PyExc_TypeError,
  29663. "an integer is required");
  29664. }
  29665. return res;
  29666. }
  29667. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  29668. Py_ssize_t ival;
  29669. PyObject *x;
  29670. #if PY_MAJOR_VERSION < 3
  29671. if (likely(PyInt_CheckExact(b))) {
  29672. if (sizeof(Py_ssize_t) >= sizeof(long))
  29673. return PyInt_AS_LONG(b);
  29674. else
  29675. return PyInt_AsSsize_t(x);
  29676. }
  29677. #endif
  29678. if (likely(PyLong_CheckExact(b))) {
  29679. #if CYTHON_USE_PYLONG_INTERNALS
  29680. const digit* digits = ((PyLongObject*)b)->ob_digit;
  29681. const Py_ssize_t size = Py_SIZE(b);
  29682. if (likely(__Pyx_sst_abs(size) <= 1)) {
  29683. ival = likely(size) ? digits[0] : 0;
  29684. if (size == -1) ival = -ival;
  29685. return ival;
  29686. } else {
  29687. switch (size) {
  29688. case 2:
  29689. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  29690. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29691. }
  29692. break;
  29693. case -2:
  29694. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  29695. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29696. }
  29697. break;
  29698. case 3:
  29699. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  29700. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29701. }
  29702. break;
  29703. case -3:
  29704. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  29705. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29706. }
  29707. break;
  29708. case 4:
  29709. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  29710. return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29711. }
  29712. break;
  29713. case -4:
  29714. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  29715. return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  29716. }
  29717. break;
  29718. }
  29719. }
  29720. #endif
  29721. return PyLong_AsSsize_t(b);
  29722. }
  29723. x = PyNumber_Index(b);
  29724. if (!x) return -1;
  29725. ival = PyInt_AsSsize_t(x);
  29726. Py_DECREF(x);
  29727. return ival;
  29728. }
  29729. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
  29730. return PyInt_FromSize_t(ival);
  29731. }
  29732. #endif /* Py_PYTHON_H */
  29733. #endif /* (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32)) || (EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32)) || (!EV_USE_SIGNALFD && !defined(LIBEV_EMBED) && !defined(_WIN32)) */
  29734. /* Copyright (c) 2011-2012 Denis Bilenko. See LICENSE for details. */
  29735. #ifdef Py_PYTHON_H
  29736. /* the name changes depending on our file layout and --module-name option */
  29737. #define _GEVENTLOOP struct __pyx_vtabstruct_6gevent_5libev_8corecext_loop
  29738. static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context) {
  29739. PyThreadState *tstate;
  29740. PyObject *type, *value, *traceback, *result;
  29741. tstate = PyThreadState_GET();
  29742. type = tstate->curexc_type;
  29743. if (!type)
  29744. return;
  29745. value = tstate->curexc_value;
  29746. traceback = tstate->curexc_traceback;
  29747. if (!value) value = Py_None;
  29748. if (!traceback) traceback = Py_None;
  29749. Py_INCREF(type);
  29750. Py_INCREF(value);
  29751. Py_INCREF(traceback);
  29752. PyErr_Clear();
  29753. result = ((_GEVENTLOOP *)loop->__pyx_vtab)->handle_error(loop, context, type, value, traceback, 0);
  29754. if (result) {
  29755. Py_DECREF(result);
  29756. }
  29757. else {
  29758. PyErr_Print();
  29759. PyErr_Clear();
  29760. }
  29761. Py_DECREF(type);
  29762. Py_DECREF(value);
  29763. Py_DECREF(traceback);
  29764. }
  29765. static CYTHON_INLINE void gevent_check_signals(struct PyGeventLoopObject* loop) {
  29766. if (!ev_is_default_loop(loop->_ptr)) {
  29767. /* only reporting signals on the default loop */
  29768. return;
  29769. }
  29770. PyErr_CheckSignals();
  29771. if (PyErr_Occurred()) gevent_handle_error(loop, Py_None);
  29772. }
  29773. #define GET_OBJECT(PY_TYPE, EV_PTR, MEMBER) \
  29774. ((struct PY_TYPE *)(((char *)EV_PTR) - offsetof(struct PY_TYPE, MEMBER)))
  29775. #ifdef WITH_THREAD
  29776. #define GIL_DECLARE PyGILState_STATE ___save
  29777. #define GIL_ENSURE ___save = PyGILState_Ensure();
  29778. #define GIL_RELEASE PyGILState_Release(___save);
  29779. #else
  29780. #define GIL_DECLARE
  29781. #define GIL_ENSURE
  29782. #define GIL_RELEASE
  29783. #endif
  29784. static void gevent_stop(PyObject* watcher, struct PyGeventLoopObject* loop) {
  29785. PyObject *result, *method;
  29786. int error;
  29787. error = 1;
  29788. method = PyObject_GetAttrString(watcher, "stop");
  29789. if (method) {
  29790. result = PyObject_Call(method, __pyx_empty_tuple, NULL);
  29791. if (result) {
  29792. Py_DECREF(result);
  29793. error = 0;
  29794. }
  29795. Py_DECREF(method);
  29796. }
  29797. if (error) {
  29798. gevent_handle_error(loop, watcher);
  29799. }
  29800. }
  29801. static void gevent_callback(struct PyGeventLoopObject* loop, PyObject* callback, PyObject* args, PyObject* watcher, void *c_watcher, int revents) {
  29802. GIL_DECLARE;
  29803. PyObject *result, *py_events;
  29804. long length;
  29805. py_events = 0;
  29806. GIL_ENSURE;
  29807. Py_INCREF(loop);
  29808. Py_INCREF(callback);
  29809. Py_INCREF(args);
  29810. Py_INCREF(watcher);
  29811. gevent_check_signals(loop);
  29812. if (args == Py_None) {
  29813. args = __pyx_empty_tuple;
  29814. }
  29815. length = PyTuple_Size(args);
  29816. if (length < 0) {
  29817. gevent_handle_error(loop, watcher);
  29818. goto end;
  29819. }
  29820. if (length > 0 && PyTuple_GET_ITEM(args, 0) == GEVENT_CORE_EVENTS) {
  29821. py_events = PyInt_FromLong(revents);
  29822. if (!py_events) {
  29823. gevent_handle_error(loop, watcher);
  29824. goto end;
  29825. }
  29826. PyTuple_SET_ITEM(args, 0, py_events);
  29827. }
  29828. else {
  29829. py_events = NULL;
  29830. }
  29831. result = PyObject_Call(callback, args, NULL);
  29832. if (result) {
  29833. Py_DECREF(result);
  29834. }
  29835. else {
  29836. gevent_handle_error(loop, watcher);
  29837. if (revents & (EV_READ|EV_WRITE)) {
  29838. /* io watcher: not stopping it may cause the failing callback to be called repeatedly */
  29839. gevent_stop(watcher, loop);
  29840. goto end;
  29841. }
  29842. }
  29843. if (!ev_is_active(c_watcher)) {
  29844. /* Watcher was stopped, maybe by libev. Let's call stop() to clean up
  29845. * 'callback' and 'args' properties, do Py_DECREF() and ev_ref() if necessary.
  29846. * BTW, we don't need to check for EV_ERROR, because libev stops the watcher in that case. */
  29847. gevent_stop(watcher, loop);
  29848. }
  29849. end:
  29850. if (py_events) {
  29851. Py_DECREF(py_events);
  29852. PyTuple_SET_ITEM(args, 0, GEVENT_CORE_EVENTS);
  29853. }
  29854. Py_DECREF(watcher);
  29855. Py_DECREF(args);
  29856. Py_DECREF(callback);
  29857. Py_DECREF(loop);
  29858. GIL_RELEASE;
  29859. }
  29860. static void gevent_call(struct PyGeventLoopObject* loop, struct PyGeventCallbackObject* cb) {
  29861. /* no need for GIL here because it is only called from run_callbacks which already has GIL */
  29862. PyObject *result, *callback, *args;
  29863. if (!loop || !cb)
  29864. return;
  29865. callback = cb->callback;
  29866. args = cb->args;
  29867. if (!callback || !args)
  29868. return;
  29869. if (callback == Py_None || args == Py_None)
  29870. return;
  29871. Py_INCREF(loop);
  29872. Py_INCREF(callback);
  29873. Py_INCREF(args);
  29874. Py_INCREF(Py_None);
  29875. Py_DECREF(cb->callback);
  29876. cb->callback = Py_None;
  29877. result = PyObject_Call(callback, args, NULL);
  29878. if (result) {
  29879. Py_DECREF(result);
  29880. }
  29881. else {
  29882. gevent_handle_error(loop, (PyObject*)cb);
  29883. }
  29884. Py_INCREF(Py_None);
  29885. Py_DECREF(cb->args);
  29886. cb->args = Py_None;
  29887. Py_DECREF(callback);
  29888. Py_DECREF(args);
  29889. Py_DECREF(loop);
  29890. }
  29891. #undef DEFINE_CALLBACK
  29892. #define DEFINE_CALLBACK(WATCHER_LC, WATCHER_TYPE) \
  29893. static void gevent_callback_##WATCHER_LC(struct ev_loop *_loop, void *c_watcher, int revents) { \
  29894. struct PyGevent##WATCHER_TYPE##Object* watcher = GET_OBJECT(PyGevent##WATCHER_TYPE##Object, c_watcher, _watcher); \
  29895. gevent_callback(watcher->loop, watcher->_callback, watcher->args, (PyObject*)watcher, c_watcher, revents); \
  29896. }
  29897. DEFINE_CALLBACKS
  29898. static void gevent_run_callbacks(struct ev_loop *_loop, void *watcher, int revents) {
  29899. struct PyGeventLoopObject* loop;
  29900. PyObject *result;
  29901. GIL_DECLARE;
  29902. GIL_ENSURE;
  29903. loop = GET_OBJECT(PyGeventLoopObject, watcher, _prepare);
  29904. Py_INCREF(loop);
  29905. gevent_check_signals(loop);
  29906. result = ((_GEVENTLOOP *)loop->__pyx_vtab)->_run_callbacks(loop);
  29907. if (result) {
  29908. Py_DECREF(result);
  29909. }
  29910. else {
  29911. PyErr_Print();
  29912. PyErr_Clear();
  29913. }
  29914. Py_DECREF(loop);
  29915. GIL_RELEASE;
  29916. }
  29917. #if defined(_WIN32)
  29918. static void gevent_periodic_signal_check(struct ev_loop *_loop, void *watcher, int revents) {
  29919. GIL_DECLARE;
  29920. GIL_ENSURE;
  29921. gevent_check_signals(GET_OBJECT(PyGeventLoopObject, watcher, _periodic_signal_checker));
  29922. GIL_RELEASE;
  29923. }
  29924. #endif /* _WIN32 */
  29925. #endif /* Py_PYTHON_H */