| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408 |
- /* Generated by Cython 3.2.4 */
- /* BEGIN: Cython Metadata
- {
- "distutils": {
- "name": "fontTools.pens.momentsPen",
- "sources": [
- "Lib/fontTools/pens/momentsPen.py"
- ]
- },
- "module_name": "fontTools.pens.momentsPen"
- }
- END: Cython Metadata */
- #ifndef PY_SSIZE_T_CLEAN
- #define PY_SSIZE_T_CLEAN
- #endif /* PY_SSIZE_T_CLEAN */
- /* InitLimitedAPI */
- #if defined(Py_LIMITED_API)
- #if !defined(CYTHON_LIMITED_API)
- #define CYTHON_LIMITED_API 1
- #endif
- #elif defined(CYTHON_LIMITED_API)
- #ifdef _MSC_VER
- #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
- #else
- #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
- #endif
- #endif
- #include "Python.h"
- #ifndef Py_PYTHON_H
- #error Python headers needed to compile C extensions, please install development version of Python.
- #elif PY_VERSION_HEX < 0x03080000
- #error Cython requires Python 3.8+.
- #else
- #define __PYX_ABI_VERSION "3_2_4"
- #define CYTHON_HEX_VERSION 0x030204F0
- #define CYTHON_FUTURE_DIVISION 1
- /* CModulePreamble */
- #include <stddef.h>
- #ifndef offsetof
- #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
- #endif
- #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
- #ifndef __stdcall
- #define __stdcall
- #endif
- #ifndef __cdecl
- #define __cdecl
- #endif
- #ifndef __fastcall
- #define __fastcall
- #endif
- #endif
- #ifndef DL_IMPORT
- #define DL_IMPORT(t) t
- #endif
- #ifndef DL_EXPORT
- #define DL_EXPORT(t) t
- #endif
- #define __PYX_COMMA ,
- #ifndef PY_LONG_LONG
- #define PY_LONG_LONG LONG_LONG
- #endif
- #ifndef Py_HUGE_VAL
- #define Py_HUGE_VAL HUGE_VAL
- #endif
- #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
- #if defined(GRAALVM_PYTHON)
- /* For very preliminary testing purposes. Most variables are set the same as PyPy.
- The existence of this section does not imply that anything works or is even tested */
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_LIMITED_API 0
- #define CYTHON_COMPILING_IN_GRAAL 1
- #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 0
- #undef CYTHON_USE_TYPE_SPECS
- #define CYTHON_USE_TYPE_SPECS 0
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #undef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 1
- #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #undef CYTHON_ASSUME_SAFE_SIZE
- #define CYTHON_ASSUME_SAFE_SIZE 0
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_GIL
- #define CYTHON_FAST_GIL 0
- #undef CYTHON_METH_FASTCALL
- #define CYTHON_METH_FASTCALL 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #ifndef CYTHON_PEP487_INIT_SUBCLASS
- #define CYTHON_PEP487_INIT_SUBCLASS 1
- #endif
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 1
- #undef CYTHON_USE_MODULE_STATE
- #define CYTHON_USE_MODULE_STATE 0
- #undef CYTHON_USE_SYS_MONITORING
- #define CYTHON_USE_SYS_MONITORING 0
- #undef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #undef CYTHON_USE_AM_SEND
- #define CYTHON_USE_AM_SEND 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 1
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
- #endif
- #undef CYTHON_USE_FREELISTS
- #define CYTHON_USE_FREELISTS 0
- #undef CYTHON_IMMORTAL_CONSTANTS
- #define CYTHON_IMMORTAL_CONSTANTS 0
- #elif defined(PYPY_VERSION)
- #define CYTHON_COMPILING_IN_PYPY 1
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_LIMITED_API 0
- #define CYTHON_COMPILING_IN_GRAAL 0
- #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #ifndef CYTHON_USE_TYPE_SPECS
- #define CYTHON_USE_TYPE_SPECS 0
- #endif
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #undef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 1
- #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #ifndef CYTHON_ASSUME_SAFE_SIZE
- #define CYTHON_ASSUME_SAFE_SIZE 1
- #endif
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_GIL
- #define CYTHON_FAST_GIL 0
- #undef CYTHON_METH_FASTCALL
- #define CYTHON_METH_FASTCALL 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #ifndef CYTHON_PEP487_INIT_SUBCLASS
- #define CYTHON_PEP487_INIT_SUBCLASS 1
- #endif
- #if PY_VERSION_HEX < 0x03090000
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 0
- #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
- #define CYTHON_PEP489_MULTI_PHASE_INIT 1
- #endif
- #undef CYTHON_USE_MODULE_STATE
- #define CYTHON_USE_MODULE_STATE 0
- #undef CYTHON_USE_SYS_MONITORING
- #define CYTHON_USE_SYS_MONITORING 0
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
- #endif
- #undef CYTHON_USE_AM_SEND
- #define CYTHON_USE_AM_SEND 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
- #endif
- #undef CYTHON_USE_FREELISTS
- #define CYTHON_USE_FREELISTS 0
- #undef CYTHON_IMMORTAL_CONSTANTS
- #define CYTHON_IMMORTAL_CONSTANTS 0
- #elif defined(CYTHON_LIMITED_API)
- #ifdef Py_LIMITED_API
- #undef __PYX_LIMITED_VERSION_HEX
- #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
- #endif
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_LIMITED_API 1
- #define CYTHON_COMPILING_IN_GRAAL 0
- #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 0
- #undef CYTHON_USE_TYPE_SPECS
- #define CYTHON_USE_TYPE_SPECS 1
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #ifndef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #endif
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
- #endif
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #undef CYTHON_ASSUME_SAFE_SIZE
- #define CYTHON_ASSUME_SAFE_SIZE 0
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_GIL
- #define CYTHON_FAST_GIL 0
- #undef CYTHON_METH_FASTCALL
- #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #ifndef CYTHON_PEP487_INIT_SUBCLASS
- #define CYTHON_PEP487_INIT_SUBCLASS 1
- #endif
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 1
- #endif
- #ifndef CYTHON_USE_MODULE_STATE
- #define CYTHON_USE_MODULE_STATE 0
- #endif
- #undef CYTHON_USE_SYS_MONITORING
- #define CYTHON_USE_SYS_MONITORING 0
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #endif
- #ifndef CYTHON_USE_AM_SEND
- #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
- #endif
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
- #endif
- #ifndef CYTHON_USE_FREELISTS
- #define CYTHON_USE_FREELISTS 1
- #endif
- #undef CYTHON_IMMORTAL_CONSTANTS
- #define CYTHON_IMMORTAL_CONSTANTS 0
- #else
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_CPYTHON 1
- #define CYTHON_COMPILING_IN_LIMITED_API 0
- #define CYTHON_COMPILING_IN_GRAAL 0
- #ifdef Py_GIL_DISABLED
- #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
- #else
- #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
- #endif
- #if PY_VERSION_HEX < 0x030A0000
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #elif !defined(CYTHON_USE_TYPE_SLOTS)
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #ifndef CYTHON_USE_TYPE_SPECS
- #define CYTHON_USE_TYPE_SPECS 0
- #endif
- #ifndef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 1
- #endif
- #ifndef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 1
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
- #define CYTHON_USE_PYLIST_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #elif !defined(CYTHON_USE_UNICODE_WRITER)
- #define CYTHON_USE_UNICODE_WRITER 1
- #endif
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
- #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
- #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_ASSUME_SAFE_SIZE
- #define CYTHON_ASSUME_SAFE_SIZE 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #ifndef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 1
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #undef CYTHON_FAST_GIL
- #define CYTHON_FAST_GIL 0
- #elif !defined(CYTHON_FAST_GIL)
- #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
- #endif
- #ifndef CYTHON_METH_FASTCALL
- #define CYTHON_METH_FASTCALL 1
- #endif
- #ifndef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 1
- #endif
- #ifndef CYTHON_PEP487_INIT_SUBCLASS
- #define CYTHON_PEP487_INIT_SUBCLASS 1
- #endif
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 1
- #endif
- #ifndef CYTHON_USE_MODULE_STATE
- #define CYTHON_USE_MODULE_STATE 0
- #endif
- #ifndef CYTHON_USE_SYS_MONITORING
- #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
- #endif
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 1
- #endif
- #ifndef CYTHON_USE_AM_SEND
- #define CYTHON_USE_AM_SEND 1
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #elif !defined(CYTHON_USE_DICT_VERSIONS)
- #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
- #endif
- #ifndef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 1
- #endif
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
- #endif
- #ifndef CYTHON_USE_FREELISTS
- #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
- #endif
- #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
- #undef CYTHON_IMMORTAL_CONSTANTS
- #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
- #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
- #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
- #endif
- #endif
- #ifndef CYTHON_COMPRESS_STRINGS
- #define CYTHON_COMPRESS_STRINGS 1
- #endif
- #ifndef CYTHON_FAST_PYCCALL
- #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL
- #endif
- #ifndef CYTHON_VECTORCALL
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
- #else
- #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL)
- #endif
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS
- #undef SHIFT
- #undef BASE
- #undef MASK
- #ifdef SIZEOF_VOID_P
- enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
- #endif
- #endif
- #ifndef __has_attribute
- #define __has_attribute(x) 0
- #endif
- #ifndef __has_cpp_attribute
- #define __has_cpp_attribute(x) 0
- #endif
- #ifndef CYTHON_RESTRICT
- #if defined(__GNUC__)
- #define CYTHON_RESTRICT __restrict__
- #elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define CYTHON_RESTRICT __restrict
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_RESTRICT restrict
- #else
- #define CYTHON_RESTRICT
- #endif
- #endif
- #ifndef CYTHON_UNUSED
- #if defined(__cplusplus)
- /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
- * but leads to warnings with -pedantic, since it is a C++17 feature */
- #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
- #if __has_cpp_attribute(maybe_unused)
- #define CYTHON_UNUSED [[maybe_unused]]
- #endif
- #endif
- #endif
- #endif
- #ifndef CYTHON_UNUSED
- # if defined(__GNUC__)
- # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
- # define CYTHON_UNUSED __attribute__ ((__unused__))
- # else
- # define CYTHON_UNUSED
- # endif
- # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
- # define CYTHON_UNUSED __attribute__ ((__unused__))
- # else
- # define CYTHON_UNUSED
- # endif
- #endif
- #ifndef CYTHON_UNUSED_VAR
- # if defined(__cplusplus)
- template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
- # else
- # define CYTHON_UNUSED_VAR(x) (void)(x)
- # endif
- #endif
- #ifndef CYTHON_MAYBE_UNUSED_VAR
- #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
- #endif
- #ifndef CYTHON_NCP_UNUSED
- # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- # define CYTHON_NCP_UNUSED
- # else
- # define CYTHON_NCP_UNUSED CYTHON_UNUSED
- # endif
- #endif
- #ifndef CYTHON_USE_CPP_STD_MOVE
- #if defined(__cplusplus) && (\
- __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
- #define CYTHON_USE_CPP_STD_MOVE 1
- #else
- #define CYTHON_USE_CPP_STD_MOVE 0
- #endif
- #endif
- #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
- #include <stdint.h>
- typedef uintptr_t __pyx_uintptr_t;
- #ifndef CYTHON_FALLTHROUGH
- #if defined(__cplusplus)
- /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
- * but leads to warnings with -pedantic, since it is a C++17 feature */
- #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
- #if __has_cpp_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH [[fallthrough]]
- #endif
- #endif
- #ifndef CYTHON_FALLTHROUGH
- #if __has_cpp_attribute(clang::fallthrough)
- #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
- #elif __has_cpp_attribute(gnu::fallthrough)
- #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
- #endif
- #endif
- #endif
- #ifndef CYTHON_FALLTHROUGH
- #if __has_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
- #else
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
- #if defined(__clang__) && defined(__apple_build_version__)
- #if __apple_build_version__ < 7000000
- #undef CYTHON_FALLTHROUGH
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
- #endif
- #ifndef Py_UNREACHABLE
- #define Py_UNREACHABLE() assert(0); abort()
- #endif
- #ifdef __cplusplus
- template <typename T>
- struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
- #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
- #else
- #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
- #endif
- #if CYTHON_COMPILING_IN_PYPY == 1
- #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
- #else
- #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000)
- #endif
- #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
- /* CInitCode */
- #ifndef CYTHON_INLINE
- #if defined(__clang__)
- #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
- #elif defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
- #endif
- /* PythonCompatibility */
- #define __PYX_BUILD_PY_SSIZE_T "n"
- #define CYTHON_FORMAT_SSIZE_T "z"
- #define __Pyx_BUILTIN_MODULE_NAME "builtins"
- #define __Pyx_DefaultClassType PyType_Type
- #if CYTHON_COMPILING_IN_LIMITED_API
- #ifndef CO_OPTIMIZED
- static int CO_OPTIMIZED;
- #endif
- #ifndef CO_NEWLOCALS
- static int CO_NEWLOCALS;
- #endif
- #ifndef CO_VARARGS
- static int CO_VARARGS;
- #endif
- #ifndef CO_VARKEYWORDS
- static int CO_VARKEYWORDS;
- #endif
- #ifndef CO_ASYNC_GENERATOR
- static int CO_ASYNC_GENERATOR;
- #endif
- #ifndef CO_GENERATOR
- static int CO_GENERATOR;
- #endif
- #ifndef CO_COROUTINE
- static int CO_COROUTINE;
- #endif
- #else
- #ifndef CO_COROUTINE
- #define CO_COROUTINE 0x80
- #endif
- #ifndef CO_ASYNC_GENERATOR
- #define CO_ASYNC_GENERATOR 0x200
- #endif
- #endif
- static int __Pyx_init_co_variables(void);
- #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
- #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
- #else
- #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
- #endif
- #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
- #define __Pyx_Py_Is(x, y) Py_Is(x, y)
- #else
- #define __Pyx_Py_Is(x, y) ((x) == (y))
- #endif
- #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
- #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
- #else
- #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
- #endif
- #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
- #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
- #else
- #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
- #endif
- #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
- #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
- #else
- #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
- #endif
- #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
- #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
- #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
- #else
- #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
- #endif
- #ifndef Py_TPFLAGS_CHECKTYPES
- #define Py_TPFLAGS_CHECKTYPES 0
- #endif
- #ifndef Py_TPFLAGS_HAVE_INDEX
- #define Py_TPFLAGS_HAVE_INDEX 0
- #endif
- #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
- #define Py_TPFLAGS_HAVE_NEWBUFFER 0
- #endif
- #ifndef Py_TPFLAGS_HAVE_FINALIZE
- #define Py_TPFLAGS_HAVE_FINALIZE 0
- #endif
- #ifndef Py_TPFLAGS_SEQUENCE
- #define Py_TPFLAGS_SEQUENCE 0
- #endif
- #ifndef Py_TPFLAGS_MAPPING
- #define Py_TPFLAGS_MAPPING 0
- #endif
- #ifndef Py_TPFLAGS_IMMUTABLETYPE
- #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
- #endif
- #ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
- #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
- #endif
- #ifndef METH_STACKLESS
- #define METH_STACKLESS 0
- #endif
- #ifndef METH_FASTCALL
- #ifndef METH_FASTCALL
- #define METH_FASTCALL 0x80
- #endif
- typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
- typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
- Py_ssize_t nargs, PyObject *kwnames);
- #else
- #if PY_VERSION_HEX >= 0x030d00A4
- # define __Pyx_PyCFunctionFast PyCFunctionFast
- # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
- #else
- # define __Pyx_PyCFunctionFast _PyCFunctionFast
- # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
- #endif
- #endif
- #if CYTHON_METH_FASTCALL
- #define __Pyx_METH_FASTCALL METH_FASTCALL
- #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
- #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
- #else
- #define __Pyx_METH_FASTCALL METH_VARARGS
- #define __Pyx_PyCFunction_FastCall PyCFunction
- #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
- #endif
- #if CYTHON_VECTORCALL
- #define __pyx_vectorcallfunc vectorcallfunc
- #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
- #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
- #else
- #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
- #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
- #endif
- #if PY_VERSION_HEX >= 0x030900B1
- #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
- #else
- #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
- #endif
- #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
- #if CYTHON_COMPILING_IN_CPYTHON
- #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
- #elif !CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON
- #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
- static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
- return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
- }
- #endif
- static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
- #else
- return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
- #endif
- }
- #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
- #if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
- #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
- typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
- #else
- #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
- #define __Pyx_PyCMethod PyCMethod
- #endif
- #ifndef METH_METHOD
- #define METH_METHOD 0x200
- #endif
- #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
- #define PyObject_Malloc(s) PyMem_Malloc(s)
- #define PyObject_Free(p) PyMem_Free(p)
- #define PyObject_Realloc(p) PyMem_Realloc(p)
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
- #elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
- #elif CYTHON_COMPILING_IN_GRAAL
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
- #else
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_PyThreadState_Current PyThreadState_Get()
- #elif !CYTHON_FAST_THREAD_STATE
- #define __Pyx_PyThreadState_Current PyThreadState_GET()
- #elif PY_VERSION_HEX >= 0x030d00A1
- #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
- #else
- #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
- #endif
- #if CYTHON_USE_MODULE_STATE
- static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
- {
- void *result;
- result = PyModule_GetState(op);
- if (!result)
- Py_FatalError("Couldn't find the module state");
- return result;
- }
- #define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
- #else
- #define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
- #endif
- #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
- #define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
- #define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
- #define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
- #if CYTHON_USE_TYPE_SLOTS
- #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
- #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
- #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
- #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
- #else
- #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
- #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
- ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
- (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
- __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
- #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
- #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
- #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
- #else
- #define __Pyx_PyDict_NewPresized(n) PyDict_New()
- #endif
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
- #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
- #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
- static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
- PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
- if (res == NULL) PyErr_Clear();
- return res;
- }
- #elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
- #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
- #define __Pyx_PyDict_GetItemStr PyDict_GetItem
- #else
- static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
- #if CYTHON_COMPILING_IN_PYPY
- return PyDict_GetItem(dict, name);
- #else
- PyDictEntry *ep;
- PyDictObject *mp = (PyDictObject*) dict;
- long hash = ((PyStringObject *) name)->ob_shash;
- assert(hash != -1);
- ep = (mp->ma_lookup)(mp, name, hash);
- if (ep == NULL) {
- return NULL;
- }
- return ep->me_value;
- #endif
- }
- #define __Pyx_PyDict_GetItemStr PyDict_GetItem
- #endif
- #if CYTHON_USE_TYPE_SLOTS
- #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
- #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
- #else
- #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
- #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
- #endif
- #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
- #if CYTHON_USE_TYPE_SPECS
- #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
- PyTypeObject *type = Py_TYPE((PyObject*)obj);\
- assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
- PyObject_GC_Del(obj);\
- Py_DECREF(type);\
- }
- #else
- #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_PyUnicode_READY(op) (0)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
- #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
- #define __Pyx_PyUnicode_DATA(u) ((void*)u)
- #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
- #else
- #if PY_VERSION_HEX >= 0x030C0000
- #define __Pyx_PyUnicode_READY(op) (0)
- #else
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
- 0 : _PyUnicode_Ready((PyObject *)(op)))
- #endif
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
- #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
- #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
- #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
- #if PY_VERSION_HEX >= 0x030C0000
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
- #else
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
- #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
- #endif
- #endif
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
- #else
- #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
- PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- #if !defined(PyUnicode_DecodeUnicodeEscape)
- #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
- #endif
- #if !defined(PyUnicode_Contains)
- #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
- #endif
- #if !defined(PyByteArray_Check)
- #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
- #endif
- #if !defined(PyObject_Format)
- #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
- #endif
- #endif
- #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- #define __Pyx_PySequence_ListKeepNew(obj)\
- (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
- #elif CYTHON_COMPILING_IN_CPYTHON
- #define __Pyx_PySequence_ListKeepNew(obj)\
- (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
- #else
- #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
- #endif
- #ifndef PySet_CheckExact
- #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
- #endif
- #if PY_VERSION_HEX >= 0x030900A4
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
- #else
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
- #endif
- enum __Pyx_ReferenceSharing {
- __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
- __Pyx_ReferenceSharing_OwnStrongReference,
- __Pyx_ReferenceSharing_FunctionArgument,
- __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
- };
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
- #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
- (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
- (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
- (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
- #elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
- #else
- #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
- #endif
- #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
- #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
- #else
- #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
- #endif
- #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
- #else
- #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
- #endif
- #else
- #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
- #endif
- #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
- __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
- #else
- #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
- #endif
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
- #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
- *result = PyObject_GetItem(dict, key);
- if (*result == NULL) {
- if (PyErr_ExceptionMatches(PyExc_KeyError)) {
- PyErr_Clear();
- return 0;
- }
- return -1;
- }
- return 1;
- }
- #else
- static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
- *result = PyDict_GetItemWithError(dict, key);
- if (*result == NULL) {
- return PyErr_Occurred() ? -1 : 0;
- }
- Py_INCREF(*result);
- return 1;
- }
- #endif
- #if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
- #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
- #else
- #define __Pyx_VISIT_CONST(obj)
- #endif
- #if CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
- #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
- #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
- #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
- #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
- #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
- #else
- #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
- #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
- #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
- #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
- #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
- #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
- #endif
- #if CYTHON_ASSUME_SAFE_SIZE
- #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
- #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
- #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
- #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
- #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
- #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
- #else
- #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
- #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
- #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
- #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
- #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
- #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
- #endif
- #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
- #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
- #endif
- #define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
- #define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
- #if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
- #define __Pyx_PySendResult PySendResult
- #else
- typedef enum {
- PYGEN_RETURN = 0,
- PYGEN_ERROR = -1,
- PYGEN_NEXT = 1,
- } __Pyx_PySendResult;
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
- typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
- #else
- #define __Pyx_pyiter_sendfunc sendfunc
- #endif
- #if !CYTHON_USE_AM_SEND
- #define __PYX_HAS_PY_AM_SEND 0
- #elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
- #define __PYX_HAS_PY_AM_SEND 1
- #else
- #define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
- #endif
- #if __PYX_HAS_PY_AM_SEND < 2
- #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
- #else
- typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
- __Pyx_pyiter_sendfunc am_send;
- } __Pyx_PyAsyncMethodsStruct;
- #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
- #endif
- #if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
- #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
- #else
- #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
- #endif
- #if PY_VERSION_HEX >= 0x03090000
- #define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
- #else
- #define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
- #ifdef __cplusplus
- extern "C"
- #endif
- PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
- int value;
- PyObject *py_value = PyObject_GetAttrString(inspect, name);
- if (!py_value) return 0;
- value = (int) PyLong_AsLong(py_value);
- Py_DECREF(py_value);
- *write_to = value;
- return value != -1 || !PyErr_Occurred();
- }
- static int __Pyx_init_co_variables(void) {
- PyObject *inspect;
- int result;
- inspect = PyImport_ImportModule("inspect");
- result =
- #if !defined(CO_OPTIMIZED)
- __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
- #endif
- #if !defined(CO_NEWLOCALS)
- __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
- #endif
- #if !defined(CO_VARARGS)
- __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
- #endif
- #if !defined(CO_VARKEYWORDS)
- __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
- #endif
- #if !defined(CO_ASYNC_GENERATOR)
- __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
- #endif
- #if !defined(CO_GENERATOR)
- __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
- #endif
- #if !defined(CO_COROUTINE)
- __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
- #endif
- 1;
- Py_DECREF(inspect);
- return result ? 0 : -1;
- }
- #else
- static int __Pyx_init_co_variables(void) {
- return 0; // It's a limited API-only feature
- }
- #endif
- /* MathInitCode */
- #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
- #ifndef _USE_MATH_DEFINES
- #define _USE_MATH_DEFINES
- #endif
- #endif
- #include <math.h>
- #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
- #define __Pyx_truncl trunc
- #else
- #define __Pyx_truncl truncl
- #endif
- #ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
- #define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
- #endif
- #ifndef CYTHON_CLINE_IN_TRACEBACK
- #define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
- #endif
- #if CYTHON_CLINE_IN_TRACEBACK
- #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
- #else
- #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
- #endif
- #define __PYX_ERR(f_index, lineno, Ln_error) \
- { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
- #ifdef CYTHON_EXTERN_C
- #undef __PYX_EXTERN_C
- #define __PYX_EXTERN_C CYTHON_EXTERN_C
- #elif defined(__PYX_EXTERN_C)
- #ifdef _MSC_VER
- #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
- #else
- #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
- #endif
- #else
- #ifdef __cplusplus
- #define __PYX_EXTERN_C extern "C"
- #else
- #define __PYX_EXTERN_C extern
- #endif
- #endif
- #define __PYX_HAVE__fontTools__pens__momentsPen
- #define __PYX_HAVE_API__fontTools__pens__momentsPen
- /* Early includes */
- #ifdef _OPENMP
- #include <omp.h>
- #endif /* _OPENMP */
- #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
- #define CYTHON_WITHOUT_ASSERTIONS
- #endif
- #ifdef CYTHON_FREETHREADING_COMPATIBLE
- #if CYTHON_FREETHREADING_COMPATIBLE
- #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
- #else
- #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
- #endif
- #else
- #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
- #endif
- #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
- #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
- #define __PYX_DEFAULT_STRING_ENCODING ""
- #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
- #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
- #define __Pyx_uchar_cast(c) ((unsigned char)c)
- #define __Pyx_long_cast(x) ((long)x)
- #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
- (sizeof(type) < sizeof(Py_ssize_t)) ||\
- (sizeof(type) > sizeof(Py_ssize_t) &&\
- likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX) &&\
- (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
- v == (type)PY_SSIZE_T_MIN))) ||\
- (sizeof(type) == sizeof(Py_ssize_t) &&\
- (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX))) )
- static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
- return (size_t) i < (size_t) limit;
- }
- #if defined (__cplusplus) && __cplusplus >= 201103L
- #include <cstdlib>
- #define __Pyx_sst_abs(value) std::abs(value)
- #elif SIZEOF_INT >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) abs(value)
- #elif SIZEOF_LONG >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) labs(value)
- #elif defined (_MSC_VER)
- #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define __Pyx_sst_abs(value) llabs(value)
- #elif defined (__GNUC__)
- #define __Pyx_sst_abs(value) __builtin_llabs(value)
- #else
- #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
- #endif
- static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
- static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
- static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
- static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
- #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
- #define __Pyx_PyBytes_FromString PyBytes_FromString
- #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
- static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
- #if CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
- #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
- #else
- #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
- #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
- #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
- #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
- #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
- #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
- #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
- #endif
- #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
- #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
- #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
- #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
- #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
- #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
- #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
- #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
- #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
- #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
- #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
- static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
- return Py_NewRef(obj);
- #else
- Py_INCREF(obj);
- return obj;
- #endif
- }
- static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
- return Py_XNewRef(obj);
- #else
- Py_XINCREF(obj);
- return obj;
- #endif
- }
- static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
- static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
- static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
- static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
- static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
- #define __Pyx_PySequence_Tuple(obj)\
- (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
- static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
- static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
- static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
- #if CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
- #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
- #else
- #define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
- #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
- #endif
- #define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
- #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
- #if CYTHON_USE_PYLONG_INTERNALS
- #if PY_VERSION_HEX >= 0x030C00A7
- #ifndef _PyLong_SIGN_MASK
- #define _PyLong_SIGN_MASK 3
- #endif
- #ifndef _PyLong_NON_SIZE_BITS
- #define _PyLong_NON_SIZE_BITS 3
- #endif
- #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
- #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
- #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
- #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
- #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
- #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
- #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
- #define __Pyx_PyLong_SignedDigitCount(x)\
- ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
- #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
- #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
- #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
- #else
- #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
- #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
- #endif
- typedef Py_ssize_t __Pyx_compact_pylong;
- typedef size_t __Pyx_compact_upylong;
- #else
- #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
- #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
- #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
- #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
- #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
- #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
- #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
- #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
- #define __Pyx_PyLong_CompactValue(x)\
- ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
- typedef sdigit __Pyx_compact_pylong;
- typedef digit __Pyx_compact_upylong;
- #endif
- #if PY_VERSION_HEX >= 0x030C00A5
- #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
- #else
- #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
- #endif
- #endif
- #if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
- #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
- #elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
- #else
- #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
- #endif
- /* Test for GCC > 2.95 */
- #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #else /* !__GNUC__ or GCC < 2.95 */
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif /* __GNUC__ */
- /* PretendToInitialize */
- #ifdef __cplusplus
- #if __cplusplus > 201103L
- #include <type_traits>
- #endif
- template <typename T>
- static void __Pyx_pretend_to_initialize(T* ptr) {
- #if __cplusplus > 201103L
- if ((std::is_trivially_default_constructible<T>::value))
- #endif
- *ptr = T();
- (void)ptr;
- }
- #else
- static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
- #endif
- #if !CYTHON_USE_MODULE_STATE
- static PyObject *__pyx_m = NULL;
- #endif
- static int __pyx_lineno;
- static int __pyx_clineno = 0;
- static const char * const __pyx_cfilenm = __FILE__;
- static const char *__pyx_filename;
- /* #### Code section: filename_table ### */
- static const char* const __pyx_f[] = {
- "Lib/fontTools/pens/momentsPen.py",
- };
- /* #### Code section: utility_code_proto_before_types ### */
- /* Atomics.proto (used by UnpackUnboundCMethod) */
- #include <pythread.h>
- #ifndef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 1
- #endif
- #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
- #define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #define __pyx_atomic_int_type int
- #define __pyx_nonatomic_int_type int
- #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
- (__STDC_VERSION__ >= 201112L) &&\
- !defined(__STDC_NO_ATOMICS__))
- #include <stdatomic.h>
- #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
- (__cplusplus >= 201103L) ||\
- (defined(_MSC_VER) && _MSC_VER >= 1700)))
- #include <atomic>
- #endif
- #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
- (__STDC_VERSION__ >= 201112L) &&\
- !defined(__STDC_NO_ATOMICS__) &&\
- ATOMIC_INT_LOCK_FREE == 2)
- #undef __pyx_atomic_int_type
- #define __pyx_atomic_int_type atomic_int
- #define __pyx_atomic_ptr_type atomic_uintptr_t
- #define __pyx_nonatomic_ptr_type uintptr_t
- #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
- #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
- #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
- #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
- #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
- #define __pyx_atomic_load(value) atomic_load(value)
- #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
- #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
- #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
- #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
- #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
- #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
- #pragma message ("Using standard C atomics")
- #elif defined(__PYX_DEBUG_ATOMICS)
- #warning "Using standard C atomics"
- #endif
- #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
- (__cplusplus >= 201103L) ||\
- \
- (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
- ATOMIC_INT_LOCK_FREE == 2)
- #undef __pyx_atomic_int_type
- #define __pyx_atomic_int_type std::atomic_int
- #define __pyx_atomic_ptr_type std::atomic_uintptr_t
- #define __pyx_nonatomic_ptr_type uintptr_t
- #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
- #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
- #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
- #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
- #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
- #define __pyx_atomic_load(value) std::atomic_load(value)
- #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
- #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
- #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
- #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
- #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
- #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
- #pragma message ("Using standard C++ atomics")
- #elif defined(__PYX_DEBUG_ATOMICS)
- #warning "Using standard C++ atomics"
- #endif
- #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
- (__GNUC_MINOR__ > 1 ||\
- (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
- #define __pyx_atomic_ptr_type void*
- #define __pyx_nonatomic_ptr_type void*
- #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
- #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
- #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
- #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
- static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
- __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
- int result = old == *expected;
- *expected = old;
- return result;
- }
- #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
- #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
- #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
- #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
- #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
- static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
- __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
- int result = old == *expected;
- *expected = old;
- return result;
- }
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Using GNU atomics"
- #endif
- #elif CYTHON_ATOMICS && defined(_MSC_VER)
- #include <intrin.h>
- #undef __pyx_atomic_int_type
- #define __pyx_atomic_int_type long
- #define __pyx_atomic_ptr_type void*
- #undef __pyx_nonatomic_int_type
- #define __pyx_nonatomic_int_type long
- #define __pyx_nonatomic_ptr_type void*
- #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
- #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
- #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
- #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
- #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
- static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
- __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
- int result = old == *expected;
- *expected = old;
- return result;
- }
- #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
- #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
- #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
- #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
- #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
- static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
- __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
- int result = old == *expected;
- *expected = old;
- return result;
- }
- #ifdef __PYX_DEBUG_ATOMICS
- #pragma message ("Using MSVC atomics")
- #endif
- #else
- #undef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 0
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Not using atomics"
- #endif
- #endif
- /* CriticalSectionsDefinition.proto (used by CriticalSections) */
- #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #define __Pyx_PyCriticalSection void*
- #define __Pyx_PyCriticalSection2 void*
- #define __Pyx_PyCriticalSection_End(cs)
- #define __Pyx_PyCriticalSection2_End(cs)
- #else
- #define __Pyx_PyCriticalSection PyCriticalSection
- #define __Pyx_PyCriticalSection2 PyCriticalSection2
- #define __Pyx_PyCriticalSection_End PyCriticalSection_End
- #define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
- #endif
- /* CriticalSections.proto (used by ParseKeywordsImpl) */
- #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
- #define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
- #else
- #define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
- #define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
- #endif
- #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_BEGIN_CRITICAL_SECTION(o) {
- #define __Pyx_END_CRITICAL_SECTION() }
- #else
- #define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
- #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
- #endif
- /* IncludeStructmemberH.proto (used by FixUpExtensionType) */
- #include <structmember.h>
- /* #### Code section: numeric_typedefs ### */
- /* #### Code section: complex_type_declarations ### */
- /* #### Code section: type_declarations ### */
- /*--- Type declarations ---*/
- /* #### Code section: utility_code_proto ### */
- /* --- Runtime support code (head) --- */
- /* Refnanny.proto */
- #ifndef CYTHON_REFNANNY
- #define CYTHON_REFNANNY 0
- #endif
- #if CYTHON_REFNANNY
- typedef struct {
- void (*INCREF)(void*, PyObject*, Py_ssize_t);
- void (*DECREF)(void*, PyObject*, Py_ssize_t);
- void (*GOTREF)(void*, PyObject*, Py_ssize_t);
- void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
- void* (*SetupContext)(const char*, Py_ssize_t, const char*);
- void (*FinishContext)(void**);
- } __Pyx_RefNannyAPIStruct;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
- #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- if (acquire_gil) {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
- PyGILState_Release(__pyx_gilstate_save);\
- } else {\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
- }
- #define __Pyx_RefNannyFinishContextNogil() {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __Pyx_RefNannyFinishContext();\
- PyGILState_Release(__pyx_gilstate_save);\
- }
- #define __Pyx_RefNannyFinishContextNogil() {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __Pyx_RefNannyFinishContext();\
- PyGILState_Release(__pyx_gilstate_save);\
- }
- #define __Pyx_RefNannyFinishContext()\
- __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
- #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
- #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
- #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
- #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
- #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
- #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
- #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
- #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
- #else
- #define __Pyx_RefNannyDeclarations
- #define __Pyx_RefNannySetupContext(name, acquire_gil)
- #define __Pyx_RefNannyFinishContextNogil()
- #define __Pyx_RefNannyFinishContext()
- #define __Pyx_INCREF(r) Py_INCREF(r)
- #define __Pyx_DECREF(r) Py_DECREF(r)
- #define __Pyx_GOTREF(r)
- #define __Pyx_GIVEREF(r)
- #define __Pyx_XINCREF(r) Py_XINCREF(r)
- #define __Pyx_XDECREF(r) Py_XDECREF(r)
- #define __Pyx_XGOTREF(r)
- #define __Pyx_XGIVEREF(r)
- #endif
- #define __Pyx_Py_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; Py_XDECREF(tmp);\
- } while (0)
- #define __Pyx_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_XDECREF(tmp);\
- } while (0)
- #define __Pyx_DECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_DECREF(tmp);\
- } while (0)
- #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
- #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
- /* TupleAndListFromArray.proto (used by fastcall) */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
- static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
- #endif
- /* IncludeStringH.proto (used by BytesEquals) */
- #include <string.h>
- /* BytesEquals.proto (used by UnicodeEquals) */
- static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
- /* UnicodeEquals.proto (used by fastcall) */
- static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
- /* fastcall.proto */
- #if CYTHON_AVOID_BORROWED_REFS
- #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
- #elif CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
- #else
- #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
- #endif
- #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
- #define __Pyx_KwValues_VARARGS(args, nargs) NULL
- #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
- #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
- #if CYTHON_METH_FASTCALL
- #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
- #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
- #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
- static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
- CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
- #else
- #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
- #endif
- #else
- #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
- #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
- #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
- #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
- #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
- #endif
- #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
- #if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
- #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
- #else
- #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
- #endif
- /* py_dict_items.proto (used by OwnedDictNext) */
- static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
- /* CallCFunction.proto (used by CallUnboundCMethod0) */
- #define __Pyx_CallCFunction(cfunc, self, args)\
- ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
- #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
- ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
- #define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
- ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
- #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
- ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
- /* PyObjectCall.proto (used by PyObjectFastCall) */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
- #else
- #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
- #endif
- /* PyObjectCallMethO.proto (used by PyObjectFastCall) */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
- #endif
- /* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
- #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
- static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
- /* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
- /* PyObjectGetAttrStr.proto (used by UnpackUnboundCMethod) */
- #if CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
- #else
- #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
- #endif
- /* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
- typedef struct {
- PyObject *type;
- PyObject **method_name;
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
- __pyx_atomic_int_type initialized;
- #endif
- PyCFunction func;
- PyObject *method;
- int flag;
- } __Pyx_CachedCFunction;
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
- #if !CYTHON_ATOMICS
- return 1;
- #else
- __pyx_nonatomic_int_type expected = 0;
- if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
- return 0;
- }
- return expected;
- #endif
- }
- static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
- #if CYTHON_ATOMICS
- __pyx_atomic_store(&cfunc->initialized, 2);
- #endif
- }
- #else
- #define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
- #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
- #endif
- /* CallUnboundCMethod0.proto */
- CYTHON_UNUSED
- static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
- #else
- #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
- #endif
- /* py_dict_values.proto (used by OwnedDictNext) */
- static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
- /* OwnedDictNext.proto (used by ParseKeywordsImpl) */
- #if CYTHON_AVOID_BORROWED_REFS
- static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
- #else
- CYTHON_INLINE
- static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
- #endif
- /* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
- static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
- /* ParseKeywordsImpl.export */
- static int __Pyx_ParseKeywordsTuple(
- PyObject *kwds,
- PyObject * const *kwvalues,
- PyObject ** const argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs
- );
- static int __Pyx_ParseKeywordDictToDict(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- const char* function_name
- );
- static int __Pyx_ParseKeywordDict(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject *values[],
- Py_ssize_t num_pos_args,
- Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs
- );
- /* CallUnboundCMethod2.proto */
- CYTHON_UNUSED
- static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
- #else
- #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
- #endif
- /* ParseKeywords.proto */
- static CYTHON_INLINE int __Pyx_ParseKeywords(
- PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
- PyObject *kwds2, PyObject *values[],
- Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs
- );
- /* RaiseArgTupleInvalid.proto */
- static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
- Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
- /* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
- static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
- #else
- #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
- #endif
- /* PyThreadStateGet.proto (used by PyErrFetchRestore) */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
- #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
- #if PY_VERSION_HEX >= 0x030C00A6
- #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
- #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
- #else
- #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
- #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
- #endif
- #else
- #define __Pyx_PyThreadState_declare
- #define __Pyx_PyThreadState_assign
- #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
- #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
- #endif
- /* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
- #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
- #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
- #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
- #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
- static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
- static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
- #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
- #else
- #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
- #endif
- #else
- #define __Pyx_PyErr_Clear() PyErr_Clear()
- #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
- #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
- #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
- #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
- #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
- #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
- #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
- #endif
- /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
- /* GetBuiltinName.proto (used by GetModuleGlobalName) */
- static PyObject *__Pyx_GetBuiltinName(PyObject *name);
- /* PyDictVersioning.proto (used by GetModuleGlobalName) */
- #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
- #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
- #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
- #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
- (version_var) = __PYX_GET_DICT_VERSION(dict);\
- (cache_var) = (value);
- #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
- (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
- } else {\
- (VAR) = __pyx_dict_cached_value = (LOOKUP);\
- __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
- }\
- }
- static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
- static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
- static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
- #else
- #define __PYX_GET_DICT_VERSION(dict) (0)
- #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
- #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
- #endif
- /* GetModuleGlobalName.proto */
- #if CYTHON_USE_DICT_VERSIONS
- #define __Pyx_GetModuleGlobalName(var, name) do {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
- (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
- __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
- } while(0)
- #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
- PY_UINT64_T __pyx_dict_version;\
- PyObject *__pyx_dict_cached_value;\
- (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
- } while(0)
- static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
- #else
- #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
- #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
- static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
- #endif
- /* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
- #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
- #else
- #define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
- #endif
- /* PyObjectSetAttrStr.proto */
- #if CYTHON_USE_TYPE_SLOTS
- #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
- static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
- #else
- #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n)
- #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
- #endif
- /* PyObjectFastCallMethod.proto */
- #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
- #define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
- #else
- static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
- #endif
- /* RaiseException.export */
- static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
- /* RaiseTooManyValuesToUnpack.proto */
- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
- /* RaiseNeedMoreValuesToUnpack.proto */
- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
- /* IterFinish.proto */
- static CYTHON_INLINE int __Pyx_IterFinish(void);
- /* UnpackItemEndCheck.proto */
- static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
- /* HasAttr.proto (used by ImportImpl) */
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
- #else
- static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
- #endif
- /* ImportImpl.export */
- static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
- /* Import.proto */
- static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
- /* ImportFrom.proto */
- static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
- /* ListPack.proto */
- static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);
- /* Py3UpdateBases.proto */
- static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
- /* CalculateMetaclass.proto */
- static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
- /* dict_setdefault.proto (used by FetchCommonType) */
- static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
- /* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
- #if CYTHON_COMPILING_IN_LIMITED_API
- static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
- #endif
- /* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
- static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
- #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
- /* FixUpExtensionType.proto (used by FetchCommonType) */
- static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
- /* AddModuleRef.proto (used by FetchSharedCythonModule) */
- #if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
- __PYX_LIMITED_VERSION_HEX < 0x030d0000)
- static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
- #else
- #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
- #endif
- /* FetchSharedCythonModule.proto (used by FetchCommonType) */
- static PyObject *__Pyx_FetchSharedCythonABIModule(void);
- /* FetchCommonType.proto (used by CommonTypesMetaclass) */
- static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
- /* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
- static int __pyx_CommonTypesMetaclass_init(PyObject *module);
- #define __Pyx_CommonTypesMetaclass_USED
- /* CallTypeTraverse.proto (used by CythonFunctionShared) */
- #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
- #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
- #else
- static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
- #endif
- /* PyMethodNew.proto (used by CythonFunctionShared) */
- static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
- /* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
- #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
- static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
- #endif
- /* CythonFunctionShared.proto (used by CythonFunction) */
- #define __Pyx_CyFunction_USED
- #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
- #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
- #define __Pyx_CYFUNCTION_CCLASS 0x04
- #define __Pyx_CYFUNCTION_COROUTINE 0x08
- #define __Pyx_CyFunction_GetClosure(f)\
- (((__pyx_CyFunctionObject *) (f))->func_closure)
- #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_CyFunction_GetClassObj(f)\
- (((__pyx_CyFunctionObject *) (f))->func_classobj)
- #else
- #define __Pyx_CyFunction_GetClassObj(f)\
- ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
- #endif
- #define __Pyx_CyFunction_SetClassObj(f, classobj)\
- __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
- #define __Pyx_CyFunction_Defaults(type, f)\
- ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
- #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
- ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
- typedef struct {
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject_HEAD
- PyObject *func;
- #elif PY_VERSION_HEX < 0x030900B1
- PyCFunctionObject func;
- #else
- PyCMethodObject func;
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
- __pyx_vectorcallfunc func_vectorcall;
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *func_weakreflist;
- #endif
- #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
- PyObject *func_dict;
- #endif
- PyObject *func_name;
- PyObject *func_qualname;
- PyObject *func_doc;
- PyObject *func_globals;
- PyObject *func_code;
- PyObject *func_closure;
- #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
- PyObject *func_classobj;
- #endif
- PyObject *defaults;
- int flags;
- PyObject *defaults_tuple;
- PyObject *defaults_kwdict;
- PyObject *(*defaults_getter)(PyObject *);
- PyObject *func_annotations;
- PyObject *func_is_coroutine;
- } __pyx_CyFunctionObject;
- #undef __Pyx_CyOrPyCFunction_Check
- #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
- #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
- #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
- static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
- #undef __Pyx_IsSameCFunction
- #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
- static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
- int flags, PyObject* qualname,
- PyObject *closure,
- PyObject *module, PyObject *globals,
- PyObject* code);
- static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
- static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
- PyTypeObject *defaults_type);
- static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
- PyObject *tuple);
- static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
- PyObject *dict);
- static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
- PyObject *dict);
- static int __pyx_CyFunction_init(PyObject *module);
- #if CYTHON_METH_FASTCALL
- static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
- static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
- static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
- static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
- #else
- #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
- #endif
- #endif
- /* CythonFunction.proto */
- static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
- int flags, PyObject* qualname,
- PyObject *closure,
- PyObject *module, PyObject *globals,
- PyObject* code);
- /* SetNameInClass.proto */
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
- #define __Pyx_SetNameInClass(ns, name, value)\
- (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
- #elif CYTHON_COMPILING_IN_CPYTHON
- #define __Pyx_SetNameInClass(ns, name, value)\
- (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
- #else
- #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
- #endif
- /* PyObjectCall2Args.proto (used by Py3ClassCreate) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
- /* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
- #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
- #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
- #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
- static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
- #else
- #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
- #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
- #endif
- /* Py3ClassCreate.proto */
- static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
- PyObject *mkw, PyObject *modname, PyObject *doc);
- static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
- PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
- /* CLineInTraceback.proto (used by AddTraceback) */
- #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
- static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
- #else
- #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
- #endif
- /* CodeObjectCache.proto (used by AddTraceback) */
- #if CYTHON_COMPILING_IN_LIMITED_API
- typedef PyObject __Pyx_CachedCodeObjectType;
- #else
- typedef PyCodeObject __Pyx_CachedCodeObjectType;
- #endif
- typedef struct {
- __Pyx_CachedCodeObjectType* code_object;
- int code_line;
- } __Pyx_CodeObjectCacheEntry;
- struct __Pyx_CodeObjectCache {
- int count;
- int max_count;
- __Pyx_CodeObjectCacheEntry* entries;
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- __pyx_atomic_int_type accessor_count;
- #endif
- };
- static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
- static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
- static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
- /* AddTraceback.proto */
- static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename);
- /* FormatTypeName.proto */
- #if CYTHON_COMPILING_IN_LIMITED_API
- typedef PyObject *__Pyx_TypeName;
- #define __Pyx_FMT_TYPENAME "%U"
- #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
- #else
- static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
- #endif
- #else // !LIMITED_API
- typedef const char *__Pyx_TypeName;
- #define __Pyx_FMT_TYPENAME "%.200s"
- #define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
- #define __Pyx_DECREF_TypeName(obj)
- #endif
- /* GCCDiagnostics.proto (used by CIntToPy) */
- #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
- #define __Pyx_HAS_GCC_DIAGNOSTIC
- #endif
- /* PyObjectVectorCallKwBuilder.proto (used by CIntToPy) */
- CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
- #if CYTHON_VECTORCALL
- #if PY_VERSION_HEX >= 0x03090000
- #define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
- #else
- #define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
- #endif
- #define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
- static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
- static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
- #else
- #define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
- #define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
- #define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
- #define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
- #endif
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
- /* CIntFromPy.proto */
- static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
- /* CIntFromPy.proto */
- static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
- /* FastTypeChecks.proto */
- #if CYTHON_COMPILING_IN_CPYTHON
- #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
- #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
- static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
- static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
- static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
- static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
- #else
- #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
- #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
- #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
- static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
- return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
- }
- #endif
- #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
- #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
- #ifdef PyExceptionInstance_Check
- #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
- #else
- #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
- #endif
- /* GetRuntimeVersion.proto */
- #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
- static unsigned long __Pyx_cached_runtime_version = 0;
- static void __Pyx_init_runtime_version(void);
- #else
- #define __Pyx_init_runtime_version()
- #endif
- static unsigned long __Pyx_get_runtime_version(void);
- /* CheckBinaryVersion.proto */
- static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
- /* DecompressString.proto */
- static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
- /* MultiPhaseInitModuleState.proto */
- #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
- static PyObject *__Pyx_State_FindModule(void*);
- static int __Pyx_State_AddModule(PyObject* module, void*);
- static int __Pyx_State_RemoveModule(void*);
- #elif CYTHON_USE_MODULE_STATE
- #define __Pyx_State_FindModule PyState_FindModule
- #define __Pyx_State_AddModule PyState_AddModule
- #define __Pyx_State_RemoveModule PyState_RemoveModule
- #endif
- /* #### Code section: module_declarations ### */
- /* CythonABIVersion.proto */
- #if CYTHON_COMPILING_IN_LIMITED_API
- #if CYTHON_METH_FASTCALL
- #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall"
- #else
- #define __PYX_FASTCALL_ABI_SUFFIX
- #endif
- #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
- #else
- #define __PYX_LIMITED_ABI_SUFFIX
- #endif
- #if __PYX_HAS_PY_AM_SEND == 1
- #define __PYX_AM_SEND_ABI_SUFFIX
- #elif __PYX_HAS_PY_AM_SEND == 2
- #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
- #else
- #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
- #endif
- #ifndef __PYX_MONITORING_ABI_SUFFIX
- #define __PYX_MONITORING_ABI_SUFFIX
- #endif
- #if CYTHON_USE_TP_FINALIZE
- #define __PYX_TP_FINALIZE_ABI_SUFFIX
- #else
- #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
- #endif
- #if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
- #define __PYX_FREELISTS_ABI_SUFFIX
- #else
- #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
- #endif
- #define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
- #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
- #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
- /* Module declarations from "cython" */
- /* Module declarations from "fontTools.pens.momentsPen" */
- /* #### Code section: typeinfo ### */
- /* #### Code section: before_global_var ### */
- #define __Pyx_MODULE_NAME "fontTools.pens.momentsPen"
- extern int __pyx_module_is_main_fontTools__pens__momentsPen;
- int __pyx_module_is_main_fontTools__pens__momentsPen = 0;
- /* Implementation of "fontTools.pens.momentsPen" */
- /* #### Code section: global_var ### */
- /* #### Code section: string_decls ### */
- /* #### Code section: decls ### */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_glyphset); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_2_moveTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p0); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_4_closePath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_6_endPath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_8_lineTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_10_qCurveToOne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2); /* proto */
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_12_curveToOne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2, PyObject *__pyx_v_p3); /* proto */
- /* #### Code section: late_includes ### */
- /* #### Code section: module_state ### */
- /* SmallCodeConfig */
- #ifndef CYTHON_SMALL_CODE
- #if defined(__clang__)
- #define CYTHON_SMALL_CODE
- #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
- #define CYTHON_SMALL_CODE __attribute__((cold))
- #else
- #define CYTHON_SMALL_CODE
- #endif
- #endif
- typedef struct {
- PyObject *__pyx_d;
- PyObject *__pyx_b;
- PyObject *__pyx_cython_runtime;
- PyObject *__pyx_empty_tuple;
- PyObject *__pyx_empty_bytes;
- PyObject *__pyx_empty_unicode;
- __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
- __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
- __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
- PyObject *__pyx_tuple[2];
- PyObject *__pyx_codeobj_tab[7];
- PyObject *__pyx_string_tab[210];
- PyObject *__pyx_number_tab[3];
- /* #### Code section: module_state_contents ### */
- /* CommonTypesMetaclass.module_state_decls */
- PyTypeObject *__pyx_CommonTypesMetaclassType;
- /* CachedMethodType.module_state_decls */
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *__Pyx_CachedMethodType;
- #endif
- /* CythonFunctionShared.module_state_decls */
- PyTypeObject *__pyx_CyFunctionType;
- /* CodeObjectCache.module_state_decls */
- struct __Pyx_CodeObjectCache __pyx_code_cache;
- /* #### Code section: module_state_end ### */
- } __pyx_mstatetype;
- #if CYTHON_USE_MODULE_STATE
- #ifdef __cplusplus
- namespace {
- extern struct PyModuleDef __pyx_moduledef;
- } /* anonymous namespace */
- #else
- static struct PyModuleDef __pyx_moduledef;
- #endif
- #define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
- #define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
- #else
- static __pyx_mstatetype __pyx_mstate_global_static =
- #ifdef __cplusplus
- {};
- #else
- {0};
- #endif
- static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
- #endif
- /* #### Code section: constant_name_defines ### */
- #define __pyx_kp_u_ __pyx_string_tab[0]
- #define __pyx_kp_u_Glyph_statistics_is_not_defined __pyx_string_tab[1]
- #define __pyx_kp_u_Lib_fontTools_pens_momentsPen_py __pyx_string_tab[2]
- #define __pyx_kp_u__2 __pyx_string_tab[3]
- #define __pyx_n_u_BasePen __pyx_string_tab[4]
- #define __pyx_n_u_COMPILED __pyx_string_tab[5]
- #define __pyx_n_u_MomentsPen __pyx_string_tab[6]
- #define __pyx_n_u_MomentsPen___init __pyx_string_tab[7]
- #define __pyx_n_u_MomentsPen__closePath __pyx_string_tab[8]
- #define __pyx_n_u_MomentsPen__curveToOne __pyx_string_tab[9]
- #define __pyx_n_u_MomentsPen__endPath __pyx_string_tab[10]
- #define __pyx_n_u_MomentsPen__lineTo __pyx_string_tab[11]
- #define __pyx_n_u_MomentsPen__moveTo __pyx_string_tab[12]
- #define __pyx_n_u_MomentsPen__qCurveToOne __pyx_string_tab[13]
- #define __pyx_n_u_OpenContourError __pyx_string_tab[14]
- #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[15]
- #define __pyx_n_u_all __pyx_string_tab[16]
- #define __pyx_n_u_area __pyx_string_tab[17]
- #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[18]
- #define __pyx_n_u_cline_in_traceback __pyx_string_tab[19]
- #define __pyx_n_u_closePath __pyx_string_tab[20]
- #define __pyx_n_u_curveToOne __pyx_string_tab[21]
- #define __pyx_n_u_doc __pyx_string_tab[22]
- #define __pyx_n_u_endPath __pyx_string_tab[23]
- #define __pyx_n_u_fontTools_misc_symfont __pyx_string_tab[24]
- #define __pyx_n_u_fontTools_pens_basePen __pyx_string_tab[25]
- #define __pyx_n_u_fontTools_pens_momentsPen __pyx_string_tab[26]
- #define __pyx_n_u_func __pyx_string_tab[27]
- #define __pyx_n_u_getCurrentPoint __pyx_string_tab[28]
- #define __pyx_n_u_glyphset __pyx_string_tab[29]
- #define __pyx_n_u_init __pyx_string_tab[30]
- #define __pyx_n_u_is_coroutine __pyx_string_tab[31]
- #define __pyx_n_u_items __pyx_string_tab[32]
- #define __pyx_n_u_lineTo __pyx_string_tab[33]
- #define __pyx_n_u_main __pyx_string_tab[34]
- #define __pyx_n_u_metaclass __pyx_string_tab[35]
- #define __pyx_n_u_module __pyx_string_tab[36]
- #define __pyx_n_u_momentX __pyx_string_tab[37]
- #define __pyx_n_u_momentXX __pyx_string_tab[38]
- #define __pyx_n_u_momentXY __pyx_string_tab[39]
- #define __pyx_n_u_momentY __pyx_string_tab[40]
- #define __pyx_n_u_momentYY __pyx_string_tab[41]
- #define __pyx_n_u_moveTo __pyx_string_tab[42]
- #define __pyx_n_u_mro_entries __pyx_string_tab[43]
- #define __pyx_n_u_name __pyx_string_tab[44]
- #define __pyx_n_u_p0 __pyx_string_tab[45]
- #define __pyx_n_u_p1 __pyx_string_tab[46]
- #define __pyx_n_u_p2 __pyx_string_tab[47]
- #define __pyx_n_u_p3 __pyx_string_tab[48]
- #define __pyx_n_u_pop __pyx_string_tab[49]
- #define __pyx_n_u_prepare __pyx_string_tab[50]
- #define __pyx_n_u_printGreenPen __pyx_string_tab[51]
- #define __pyx_n_u_qCurveToOne __pyx_string_tab[52]
- #define __pyx_n_u_qualname __pyx_string_tab[53]
- #define __pyx_n_u_r0 __pyx_string_tab[54]
- #define __pyx_n_u_r1 __pyx_string_tab[55]
- #define __pyx_n_u_r10 __pyx_string_tab[56]
- #define __pyx_n_u_r100 __pyx_string_tab[57]
- #define __pyx_n_u_r101 __pyx_string_tab[58]
- #define __pyx_n_u_r102 __pyx_string_tab[59]
- #define __pyx_n_u_r103 __pyx_string_tab[60]
- #define __pyx_n_u_r104 __pyx_string_tab[61]
- #define __pyx_n_u_r105 __pyx_string_tab[62]
- #define __pyx_n_u_r106 __pyx_string_tab[63]
- #define __pyx_n_u_r107 __pyx_string_tab[64]
- #define __pyx_n_u_r108 __pyx_string_tab[65]
- #define __pyx_n_u_r109 __pyx_string_tab[66]
- #define __pyx_n_u_r11 __pyx_string_tab[67]
- #define __pyx_n_u_r110 __pyx_string_tab[68]
- #define __pyx_n_u_r111 __pyx_string_tab[69]
- #define __pyx_n_u_r112 __pyx_string_tab[70]
- #define __pyx_n_u_r113 __pyx_string_tab[71]
- #define __pyx_n_u_r114 __pyx_string_tab[72]
- #define __pyx_n_u_r115 __pyx_string_tab[73]
- #define __pyx_n_u_r116 __pyx_string_tab[74]
- #define __pyx_n_u_r117 __pyx_string_tab[75]
- #define __pyx_n_u_r118 __pyx_string_tab[76]
- #define __pyx_n_u_r119 __pyx_string_tab[77]
- #define __pyx_n_u_r12 __pyx_string_tab[78]
- #define __pyx_n_u_r120 __pyx_string_tab[79]
- #define __pyx_n_u_r121 __pyx_string_tab[80]
- #define __pyx_n_u_r122 __pyx_string_tab[81]
- #define __pyx_n_u_r123 __pyx_string_tab[82]
- #define __pyx_n_u_r124 __pyx_string_tab[83]
- #define __pyx_n_u_r125 __pyx_string_tab[84]
- #define __pyx_n_u_r126 __pyx_string_tab[85]
- #define __pyx_n_u_r127 __pyx_string_tab[86]
- #define __pyx_n_u_r128 __pyx_string_tab[87]
- #define __pyx_n_u_r129 __pyx_string_tab[88]
- #define __pyx_n_u_r13 __pyx_string_tab[89]
- #define __pyx_n_u_r130 __pyx_string_tab[90]
- #define __pyx_n_u_r131 __pyx_string_tab[91]
- #define __pyx_n_u_r132 __pyx_string_tab[92]
- #define __pyx_n_u_r14 __pyx_string_tab[93]
- #define __pyx_n_u_r15 __pyx_string_tab[94]
- #define __pyx_n_u_r16 __pyx_string_tab[95]
- #define __pyx_n_u_r17 __pyx_string_tab[96]
- #define __pyx_n_u_r18 __pyx_string_tab[97]
- #define __pyx_n_u_r19 __pyx_string_tab[98]
- #define __pyx_n_u_r2 __pyx_string_tab[99]
- #define __pyx_n_u_r20 __pyx_string_tab[100]
- #define __pyx_n_u_r21 __pyx_string_tab[101]
- #define __pyx_n_u_r22 __pyx_string_tab[102]
- #define __pyx_n_u_r23 __pyx_string_tab[103]
- #define __pyx_n_u_r24 __pyx_string_tab[104]
- #define __pyx_n_u_r25 __pyx_string_tab[105]
- #define __pyx_n_u_r26 __pyx_string_tab[106]
- #define __pyx_n_u_r27 __pyx_string_tab[107]
- #define __pyx_n_u_r28 __pyx_string_tab[108]
- #define __pyx_n_u_r29 __pyx_string_tab[109]
- #define __pyx_n_u_r3 __pyx_string_tab[110]
- #define __pyx_n_u_r30 __pyx_string_tab[111]
- #define __pyx_n_u_r31 __pyx_string_tab[112]
- #define __pyx_n_u_r32 __pyx_string_tab[113]
- #define __pyx_n_u_r33 __pyx_string_tab[114]
- #define __pyx_n_u_r34 __pyx_string_tab[115]
- #define __pyx_n_u_r35 __pyx_string_tab[116]
- #define __pyx_n_u_r36 __pyx_string_tab[117]
- #define __pyx_n_u_r37 __pyx_string_tab[118]
- #define __pyx_n_u_r38 __pyx_string_tab[119]
- #define __pyx_n_u_r39 __pyx_string_tab[120]
- #define __pyx_n_u_r4 __pyx_string_tab[121]
- #define __pyx_n_u_r40 __pyx_string_tab[122]
- #define __pyx_n_u_r41 __pyx_string_tab[123]
- #define __pyx_n_u_r42 __pyx_string_tab[124]
- #define __pyx_n_u_r43 __pyx_string_tab[125]
- #define __pyx_n_u_r44 __pyx_string_tab[126]
- #define __pyx_n_u_r45 __pyx_string_tab[127]
- #define __pyx_n_u_r46 __pyx_string_tab[128]
- #define __pyx_n_u_r47 __pyx_string_tab[129]
- #define __pyx_n_u_r48 __pyx_string_tab[130]
- #define __pyx_n_u_r49 __pyx_string_tab[131]
- #define __pyx_n_u_r5 __pyx_string_tab[132]
- #define __pyx_n_u_r50 __pyx_string_tab[133]
- #define __pyx_n_u_r51 __pyx_string_tab[134]
- #define __pyx_n_u_r52 __pyx_string_tab[135]
- #define __pyx_n_u_r53 __pyx_string_tab[136]
- #define __pyx_n_u_r54 __pyx_string_tab[137]
- #define __pyx_n_u_r55 __pyx_string_tab[138]
- #define __pyx_n_u_r56 __pyx_string_tab[139]
- #define __pyx_n_u_r57 __pyx_string_tab[140]
- #define __pyx_n_u_r58 __pyx_string_tab[141]
- #define __pyx_n_u_r59 __pyx_string_tab[142]
- #define __pyx_n_u_r6 __pyx_string_tab[143]
- #define __pyx_n_u_r60 __pyx_string_tab[144]
- #define __pyx_n_u_r61 __pyx_string_tab[145]
- #define __pyx_n_u_r62 __pyx_string_tab[146]
- #define __pyx_n_u_r63 __pyx_string_tab[147]
- #define __pyx_n_u_r64 __pyx_string_tab[148]
- #define __pyx_n_u_r65 __pyx_string_tab[149]
- #define __pyx_n_u_r66 __pyx_string_tab[150]
- #define __pyx_n_u_r67 __pyx_string_tab[151]
- #define __pyx_n_u_r68 __pyx_string_tab[152]
- #define __pyx_n_u_r69 __pyx_string_tab[153]
- #define __pyx_n_u_r7 __pyx_string_tab[154]
- #define __pyx_n_u_r70 __pyx_string_tab[155]
- #define __pyx_n_u_r71 __pyx_string_tab[156]
- #define __pyx_n_u_r72 __pyx_string_tab[157]
- #define __pyx_n_u_r73 __pyx_string_tab[158]
- #define __pyx_n_u_r74 __pyx_string_tab[159]
- #define __pyx_n_u_r75 __pyx_string_tab[160]
- #define __pyx_n_u_r76 __pyx_string_tab[161]
- #define __pyx_n_u_r77 __pyx_string_tab[162]
- #define __pyx_n_u_r78 __pyx_string_tab[163]
- #define __pyx_n_u_r79 __pyx_string_tab[164]
- #define __pyx_n_u_r8 __pyx_string_tab[165]
- #define __pyx_n_u_r80 __pyx_string_tab[166]
- #define __pyx_n_u_r81 __pyx_string_tab[167]
- #define __pyx_n_u_r82 __pyx_string_tab[168]
- #define __pyx_n_u_r83 __pyx_string_tab[169]
- #define __pyx_n_u_r84 __pyx_string_tab[170]
- #define __pyx_n_u_r85 __pyx_string_tab[171]
- #define __pyx_n_u_r86 __pyx_string_tab[172]
- #define __pyx_n_u_r87 __pyx_string_tab[173]
- #define __pyx_n_u_r88 __pyx_string_tab[174]
- #define __pyx_n_u_r89 __pyx_string_tab[175]
- #define __pyx_n_u_r9 __pyx_string_tab[176]
- #define __pyx_n_u_r90 __pyx_string_tab[177]
- #define __pyx_n_u_r91 __pyx_string_tab[178]
- #define __pyx_n_u_r92 __pyx_string_tab[179]
- #define __pyx_n_u_r93 __pyx_string_tab[180]
- #define __pyx_n_u_r94 __pyx_string_tab[181]
- #define __pyx_n_u_r95 __pyx_string_tab[182]
- #define __pyx_n_u_r96 __pyx_string_tab[183]
- #define __pyx_n_u_r97 __pyx_string_tab[184]
- #define __pyx_n_u_r98 __pyx_string_tab[185]
- #define __pyx_n_u_r99 __pyx_string_tab[186]
- #define __pyx_n_u_self __pyx_string_tab[187]
- #define __pyx_n_u_set_name __pyx_string_tab[188]
- #define __pyx_n_u_setdefault __pyx_string_tab[189]
- #define __pyx_n_u_startPoint __pyx_string_tab[190]
- #define __pyx_n_u_test __pyx_string_tab[191]
- #define __pyx_n_u_values __pyx_string_tab[192]
- #define __pyx_n_u_x __pyx_string_tab[193]
- #define __pyx_n_u_x0 __pyx_string_tab[194]
- #define __pyx_n_u_x1 __pyx_string_tab[195]
- #define __pyx_n_u_x2 __pyx_string_tab[196]
- #define __pyx_n_u_x3 __pyx_string_tab[197]
- #define __pyx_n_u_y __pyx_string_tab[198]
- #define __pyx_n_u_y0 __pyx_string_tab[199]
- #define __pyx_n_u_y1 __pyx_string_tab[200]
- #define __pyx_n_u_y2 __pyx_string_tab[201]
- #define __pyx_n_u_y3 __pyx_string_tab[202]
- #define __pyx_kp_b_iso88591_AT_E_a_E_E_E_Rr_S_S_S_Rr_Rr_Rr_R __pyx_string_tab[203]
- #define __pyx_kp_b_iso88591_A_E_a_E_S_S_Rr_S_S_S_Rr_Rr_Rr_Rr __pyx_string_tab[204]
- #define __pyx_kp_b_iso88591_A_O1 __pyx_string_tab[205]
- #define __pyx_kp_b_iso88591_A_T_3c_Q_1 __pyx_string_tab[206]
- #define __pyx_kp_b_iso88591_A_T_3c_Q_Q __pyx_string_tab[207]
- #define __pyx_kp_b_iso88591_At_E_a_E_E_Rr_S_S_Rr_Rr_Rr_Rr_Rr __pyx_string_tab[208]
- #define __pyx_kp_b_iso88591_q_y_q_HA_Kq_Kq_L_L_L __pyx_string_tab[209]
- #define __pyx_int_0 __pyx_number_tab[0]
- #define __pyx_int_1 __pyx_number_tab[1]
- #define __pyx_int_2 __pyx_number_tab[2]
- /* #### Code section: module_state_clear ### */
- #if CYTHON_USE_MODULE_STATE
- static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
- __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
- if (!clear_module_state) return 0;
- Py_CLEAR(clear_module_state->__pyx_d);
- Py_CLEAR(clear_module_state->__pyx_b);
- Py_CLEAR(clear_module_state->__pyx_cython_runtime);
- Py_CLEAR(clear_module_state->__pyx_empty_tuple);
- Py_CLEAR(clear_module_state->__pyx_empty_bytes);
- Py_CLEAR(clear_module_state->__pyx_empty_unicode);
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- __Pyx_State_RemoveModule(NULL);
- #endif
- for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
- for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
- for (int i=0; i<210; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
- for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
- /* #### Code section: module_state_clear_contents ### */
- /* CommonTypesMetaclass.module_state_clear */
- Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
- /* CythonFunctionShared.module_state_clear */
- Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
- /* #### Code section: module_state_clear_end ### */
- return 0;
- }
- #endif
- /* #### Code section: module_state_traverse ### */
- #if CYTHON_USE_MODULE_STATE
- static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
- __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
- if (!traverse_module_state) return 0;
- Py_VISIT(traverse_module_state->__pyx_d);
- Py_VISIT(traverse_module_state->__pyx_b);
- Py_VISIT(traverse_module_state->__pyx_cython_runtime);
- __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
- __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
- __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
- for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
- for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
- for (int i=0; i<210; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
- for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
- /* #### Code section: module_state_traverse_contents ### */
- /* CommonTypesMetaclass.module_state_traverse */
- Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
- /* CythonFunctionShared.module_state_traverse */
- Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
- /* #### Code section: module_state_traverse_end ### */
- return 0;
- }
- #endif
- /* #### Code section: module_code ### */
- /* "fontTools/pens/momentsPen.py":16
- * class MomentsPen(BasePen):
- *
- * def __init__(self, glyphset=None): # <<<<<<<<<<<<<<
- * BasePen.__init__(self, glyphset)
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_1__init__(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen___init__, "MomentsPen.__init__(self, glyphset=None)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen___init__};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_1__init__(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_glyphset = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[2] = {0,0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_glyphset,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 16, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 16, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 16, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 16, __pyx_L3_error)
- if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, i); __PYX_ERR(0, 16, __pyx_L3_error) }
- }
- } else {
- switch (__pyx_nargs) {
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 16, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 16, __pyx_L3_error)
- break;
- default: goto __pyx_L5_argtuple_error;
- }
- if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
- }
- __pyx_v_self = values[0];
- __pyx_v_glyphset = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 16, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen___init__(__pyx_self, __pyx_v_self, __pyx_v_glyphset);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_glyphset) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- size_t __pyx_t_5;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
- /* "fontTools/pens/momentsPen.py":17
- *
- * def __init__(self, glyphset=None):
- * BasePen.__init__(self, glyphset) # <<<<<<<<<<<<<<
- *
- * self.area = 0
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_BasePen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
- assert(__pyx_t_2);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_glyphset};
- __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":19
- * BasePen.__init__(self, glyphset)
- *
- * self.area = 0 # <<<<<<<<<<<<<<
- * self.momentX = 0
- * self.momentY = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":20
- *
- * self.area = 0
- * self.momentX = 0 # <<<<<<<<<<<<<<
- * self.momentY = 0
- * self.momentXX = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":21
- * self.area = 0
- * self.momentX = 0
- * self.momentY = 0 # <<<<<<<<<<<<<<
- * self.momentXX = 0
- * self.momentXY = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":22
- * self.momentX = 0
- * self.momentY = 0
- * self.momentXX = 0 # <<<<<<<<<<<<<<
- * self.momentXY = 0
- * self.momentYY = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 22, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":23
- * self.momentY = 0
- * self.momentXX = 0
- * self.momentXY = 0 # <<<<<<<<<<<<<<
- * self.momentYY = 0
- *
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 23, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":24
- * self.momentXX = 0
- * self.momentXY = 0
- * self.momentYY = 0 # <<<<<<<<<<<<<<
- *
- * def _moveTo(self, p0):
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 24, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":16
- * class MomentsPen(BasePen):
- *
- * def __init__(self, glyphset=None): # <<<<<<<<<<<<<<
- * BasePen.__init__(self, glyphset)
- *
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":26
- * self.momentYY = 0
- *
- * def _moveTo(self, p0): # <<<<<<<<<<<<<<
- * self._startPoint = p0
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_3_moveTo(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_2_moveTo, "MomentsPen._moveTo(self, p0)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_3_moveTo = {"_moveTo", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_3_moveTo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_2_moveTo};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_3_moveTo(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_p0 = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[2] = {0,0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_moveTo (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_p0,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 26, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 26, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 26, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_moveTo", 0) < (0)) __PYX_ERR(0, 26, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_moveTo", 1, 2, 2, i); __PYX_ERR(0, 26, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 2)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 26, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 26, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_p0 = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_moveTo", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 26, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._moveTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_2_moveTo(__pyx_self, __pyx_v_self, __pyx_v_p0);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_2_moveTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p0) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_moveTo", 0);
- /* "fontTools/pens/momentsPen.py":27
- *
- * def _moveTo(self, p0):
- * self._startPoint = p0 # <<<<<<<<<<<<<<
- *
- * def _closePath(self):
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_startPoint, __pyx_v_p0) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":26
- * self.momentYY = 0
- *
- * def _moveTo(self, p0): # <<<<<<<<<<<<<<
- * self._startPoint = p0
- *
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._moveTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":29
- * self._startPoint = p0
- *
- * def _closePath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_5_closePath(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_4_closePath, "MomentsPen._closePath(self)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_5_closePath = {"_closePath", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_5_closePath, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_4_closePath};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_5_closePath(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[1] = {0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_closePath (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 29, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 29, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_closePath", 0) < (0)) __PYX_ERR(0, 29, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_closePath", 1, 1, 1, i); __PYX_ERR(0, 29, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 1)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 29, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_closePath", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 29, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._closePath", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_4_closePath(__pyx_self, __pyx_v_self);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_4_closePath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_p0 = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_closePath", 0);
- /* "fontTools/pens/momentsPen.py":30
- *
- * def _closePath(self):
- * p0 = self._getCurrentPoint() # <<<<<<<<<<<<<<
- * if p0 != self._startPoint:
- * self._lineTo(self._startPoint)
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getCurrentPoint, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_v_p0 = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":31
- * def _closePath(self):
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint: # <<<<<<<<<<<<<<
- * self._lineTo(self._startPoint)
- *
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_startPoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_p0, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 31, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_4) {
- /* "fontTools/pens/momentsPen.py":32
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- * self._lineTo(self._startPoint) # <<<<<<<<<<<<<<
- *
- * def _endPath(self):
- */
- __pyx_t_1 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_startPoint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_lineTo, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":31
- * def _closePath(self):
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint: # <<<<<<<<<<<<<<
- * self._lineTo(self._startPoint)
- *
- */
- }
- /* "fontTools/pens/momentsPen.py":29
- * self._startPoint = p0
- *
- * def _closePath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._closePath", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_p0);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":34
- * self._lineTo(self._startPoint)
- *
- * def _endPath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_7_endPath(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_6_endPath, "MomentsPen._endPath(self)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_7_endPath = {"_endPath", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_7_endPath, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_6_endPath};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_7_endPath(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[1] = {0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_endPath (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 34, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 34, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_endPath", 0) < (0)) __PYX_ERR(0, 34, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_endPath", 1, 1, 1, i); __PYX_ERR(0, 34, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 1)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 34, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_endPath", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 34, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._endPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_6_endPath(__pyx_self, __pyx_v_self);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_6_endPath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_p0 = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_endPath", 0);
- /* "fontTools/pens/momentsPen.py":35
- *
- * def _endPath(self):
- * p0 = self._getCurrentPoint() # <<<<<<<<<<<<<<
- * if p0 != self._startPoint:
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getCurrentPoint, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_v_p0 = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":36
- * def _endPath(self):
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint: # <<<<<<<<<<<<<<
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- *
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_startPoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_RichCompare(__pyx_v_p0, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(__pyx_t_4)) {
- /* "fontTools/pens/momentsPen.py":37
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- * raise OpenContourError("Glyph statistics is not defined on open contours.") # <<<<<<<<<<<<<<
- *
- * @cython.locals(r0=cython.double)
- */
- __pyx_t_1 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OpenContourError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
- assert(__pyx_t_1);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
- __pyx_t_3 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Glyph_statistics_is_not_defined};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 37, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":36
- * def _endPath(self):
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint: # <<<<<<<<<<<<<<
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- *
- */
- }
- /* "fontTools/pens/momentsPen.py":34
- * self._lineTo(self._startPoint)
- *
- * def _endPath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._endPath", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_p0);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":39
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_9_lineTo(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_8_lineTo, "MomentsPen._lineTo(self, p1)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_9_lineTo = {"_lineTo", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_9_lineTo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_8_lineTo};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_9_lineTo(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_p1 = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[2] = {0,0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_lineTo (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_p1,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 39, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 39, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 39, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_lineTo", 0) < (0)) __PYX_ERR(0, 39, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_lineTo", 1, 2, 2, i); __PYX_ERR(0, 39, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 2)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 39, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 39, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_p1 = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_lineTo", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 39, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._lineTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_8_lineTo(__pyx_self, __pyx_v_self, __pyx_v_p1);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_8_lineTo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1) {
- double __pyx_v_x1;
- double __pyx_v_y1;
- double __pyx_v_x0;
- double __pyx_v_y0;
- double __pyx_v_r12;
- double __pyx_v_r11;
- double __pyx_v_r10;
- double __pyx_v_r9;
- double __pyx_v_r8;
- double __pyx_v_r7;
- double __pyx_v_r6;
- double __pyx_v_r5;
- double __pyx_v_r4;
- double __pyx_v_r3;
- double __pyx_v_r2;
- double __pyx_v_r1;
- double __pyx_v_r0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *(*__pyx_t_6)(PyObject *);
- double __pyx_t_7;
- double __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_lineTo", 0);
- /* "fontTools/pens/momentsPen.py":55
- * @cython.locals(x1=cython.double, y1=cython.double)
- * def _lineTo(self, p1):
- * x0, y0 = self._getCurrentPoint() # <<<<<<<<<<<<<<
- * x1, y1 = p1
- *
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getCurrentPoint, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 55, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
- index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_2);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 55, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L4_unpacking_done;
- __pyx_L3_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 55, __pyx_L1_error)
- __pyx_L4_unpacking_done:;
- }
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x0 = __pyx_t_7;
- __pyx_v_y0 = __pyx_t_8;
- /* "fontTools/pens/momentsPen.py":56
- * def _lineTo(self, p1):
- * x0, y0 = self._getCurrentPoint()
- * x1, y1 = p1 # <<<<<<<<<<<<<<
- *
- * r0 = x1 * y0
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p1))) || (PyList_CheckExact(__pyx_v_p1))) {
- PyObject* sequence = __pyx_v_p1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 56, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 56, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L6_unpacking_done;
- __pyx_L5_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 56, __pyx_L1_error)
- __pyx_L6_unpacking_done:;
- }
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x1 = __pyx_t_8;
- __pyx_v_y1 = __pyx_t_7;
- /* "fontTools/pens/momentsPen.py":58
- * x1, y1 = p1
- *
- * r0 = x1 * y0 # <<<<<<<<<<<<<<
- * r1 = x1 * y1
- * r2 = x1**2
- */
- __pyx_v_r0 = (__pyx_v_x1 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":59
- *
- * r0 = x1 * y0
- * r1 = x1 * y1 # <<<<<<<<<<<<<<
- * r2 = x1**2
- * r3 = r2 * y1
- */
- __pyx_v_r1 = (__pyx_v_x1 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":60
- * r0 = x1 * y0
- * r1 = x1 * y1
- * r2 = x1**2 # <<<<<<<<<<<<<<
- * r3 = r2 * y1
- * r4 = y0 - y1
- */
- __pyx_v_r2 = pow(__pyx_v_x1, 2.0);
- /* "fontTools/pens/momentsPen.py":61
- * r1 = x1 * y1
- * r2 = x1**2
- * r3 = r2 * y1 # <<<<<<<<<<<<<<
- * r4 = y0 - y1
- * r5 = r4 * x0
- */
- __pyx_v_r3 = (__pyx_v_r2 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":62
- * r2 = x1**2
- * r3 = r2 * y1
- * r4 = y0 - y1 # <<<<<<<<<<<<<<
- * r5 = r4 * x0
- * r6 = x0**2
- */
- __pyx_v_r4 = (__pyx_v_y0 - __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":63
- * r3 = r2 * y1
- * r4 = y0 - y1
- * r5 = r4 * x0 # <<<<<<<<<<<<<<
- * r6 = x0**2
- * r7 = 2 * y0
- */
- __pyx_v_r5 = (__pyx_v_r4 * __pyx_v_x0);
- /* "fontTools/pens/momentsPen.py":64
- * r4 = y0 - y1
- * r5 = r4 * x0
- * r6 = x0**2 # <<<<<<<<<<<<<<
- * r7 = 2 * y0
- * r8 = y0**2
- */
- __pyx_v_r6 = pow(__pyx_v_x0, 2.0);
- /* "fontTools/pens/momentsPen.py":65
- * r5 = r4 * x0
- * r6 = x0**2
- * r7 = 2 * y0 # <<<<<<<<<<<<<<
- * r8 = y0**2
- * r9 = y1**2
- */
- __pyx_v_r7 = (2.0 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":66
- * r6 = x0**2
- * r7 = 2 * y0
- * r8 = y0**2 # <<<<<<<<<<<<<<
- * r9 = y1**2
- * r10 = x1**3
- */
- __pyx_v_r8 = pow(__pyx_v_y0, 2.0);
- /* "fontTools/pens/momentsPen.py":67
- * r7 = 2 * y0
- * r8 = y0**2
- * r9 = y1**2 # <<<<<<<<<<<<<<
- * r10 = x1**3
- * r11 = y0**3
- */
- __pyx_v_r9 = pow(__pyx_v_y1, 2.0);
- /* "fontTools/pens/momentsPen.py":68
- * r8 = y0**2
- * r9 = y1**2
- * r10 = x1**3 # <<<<<<<<<<<<<<
- * r11 = y0**3
- * r12 = y1**3
- */
- __pyx_v_r10 = pow(__pyx_v_x1, 3.0);
- /* "fontTools/pens/momentsPen.py":69
- * r9 = y1**2
- * r10 = x1**3
- * r11 = y0**3 # <<<<<<<<<<<<<<
- * r12 = y1**3
- *
- */
- __pyx_v_r11 = pow(__pyx_v_y0, 3.0);
- /* "fontTools/pens/momentsPen.py":70
- * r10 = x1**3
- * r11 = y0**3
- * r12 = y1**3 # <<<<<<<<<<<<<<
- *
- * self.area += -r0 / 2 - r1 / 2 + x0 * (y0 + y1) / 2
- */
- __pyx_v_r12 = pow(__pyx_v_y1, 3.0);
- /* "fontTools/pens/momentsPen.py":72
- * r12 = y1**3
- *
- * self.area += -r0 / 2 - r1 / 2 + x0 * (y0 + y1) / 2 # <<<<<<<<<<<<<<
- * self.momentX += -r2 * y0 / 6 - r3 / 3 - r5 * x1 / 6 + r6 * (r7 + y1) / 6
- * self.momentY += (
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyFloat_FromDouble(((((-__pyx_v_r0) / 2.0) - (__pyx_v_r1 / 2.0)) + ((__pyx_v_x0 * (__pyx_v_y0 + __pyx_v_y1)) / 2.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area, __pyx_t_2) < (0)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":73
- *
- * self.area += -r0 / 2 - r1 / 2 + x0 * (y0 + y1) / 2
- * self.momentX += -r2 * y0 / 6 - r3 / 3 - r5 * x1 / 6 + r6 * (r7 + y1) / 6 # <<<<<<<<<<<<<<
- * self.momentY += (
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyFloat_FromDouble(((((((-__pyx_v_r2) * __pyx_v_y0) / 6.0) - (__pyx_v_r3 / 3.0)) - ((__pyx_v_r5 * __pyx_v_x1) / 6.0)) + ((__pyx_v_r6 * (__pyx_v_r7 + __pyx_v_y1)) / 6.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX, __pyx_t_4) < (0)) __PYX_ERR(0, 73, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":74
- * self.area += -r0 / 2 - r1 / 2 + x0 * (y0 + y1) / 2
- * self.momentX += -r2 * y0 / 6 - r3 / 3 - r5 * x1 / 6 + r6 * (r7 + y1) / 6
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6
- * )
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":75
- * self.momentX += -r2 * y0 / 6 - r3 / 3 - r5 * x1 / 6 + r6 * (r7 + y1) / 6
- * self.momentY += (
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6 # <<<<<<<<<<<<<<
- * )
- * self.momentXX += (
- */
- __pyx_t_1 = PyFloat_FromDouble(((((((-__pyx_v_r0) * __pyx_v_y1) / 6.0) - ((__pyx_v_r8 * __pyx_v_x1) / 6.0)) - ((__pyx_v_r9 * __pyx_v_x1) / 6.0)) + ((__pyx_v_x0 * ((__pyx_v_r8 + __pyx_v_r9) + (__pyx_v_y0 * __pyx_v_y1))) / 6.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":74
- * self.area += -r0 / 2 - r1 / 2 + x0 * (y0 + y1) / 2
- * self.momentX += -r2 * y0 / 6 - r3 / 3 - r5 * x1 / 6 + r6 * (r7 + y1) / 6
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6
- * )
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY, __pyx_t_2) < (0)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":77
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * -r10 * y0 / 12
- * - r10 * y1 / 4
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":82
- * - r2 * r5 / 12
- * - r4 * r6 * x1 / 12
- * + x0**3 * (3 * y0 + y1) / 12 # <<<<<<<<<<<<<<
- * )
- * self.momentXY += (
- */
- __pyx_t_1 = PyFloat_FromDouble((((((((-__pyx_v_r10) * __pyx_v_y0) / 12.0) - ((__pyx_v_r10 * __pyx_v_y1) / 4.0)) - ((__pyx_v_r2 * __pyx_v_r5) / 12.0)) - (((__pyx_v_r4 * __pyx_v_r6) * __pyx_v_x1) / 12.0)) + ((pow(__pyx_v_x0, 3.0) * ((3.0 * __pyx_v_y0) + __pyx_v_y1)) / 12.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":77
- * -r0 * y1 / 6 - r8 * x1 / 6 - r9 * x1 / 6 + x0 * (r8 + r9 + y0 * y1) / 6
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * -r10 * y0 / 12
- * - r10 * y1 / 4
- */
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX, __pyx_t_4) < (0)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":84
- * + x0**3 * (3 * y0 + y1) / 12
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * -r2 * r8 / 24
- * - r2 * r9 / 8
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":89
- * - r3 * r7 / 24
- * + r6 * (r7 * y1 + 3 * r8 + r9) / 24
- * - x0 * x1 * (r8 - r9) / 12 # <<<<<<<<<<<<<<
- * )
- * self.momentYY += (
- */
- __pyx_t_1 = PyFloat_FromDouble((((((((-__pyx_v_r2) * __pyx_v_r8) / 24.0) - ((__pyx_v_r2 * __pyx_v_r9) / 8.0)) - ((__pyx_v_r3 * __pyx_v_r7) / 24.0)) + ((__pyx_v_r6 * (((__pyx_v_r7 * __pyx_v_y1) + (3.0 * __pyx_v_r8)) + __pyx_v_r9)) / 24.0)) - (((__pyx_v_x0 * __pyx_v_x1) * (__pyx_v_r8 - __pyx_v_r9)) / 12.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":84
- * + x0**3 * (3 * y0 + y1) / 12
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * -r2 * r8 / 24
- * - r2 * r9 / 8
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY, __pyx_t_2) < (0)) __PYX_ERR(0, 84, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":91
- * - x0 * x1 * (r8 - r9) / 12
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r0 * r9 / 12
- * - r1 * r8 / 12
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":96
- * - r11 * x1 / 12
- * - r12 * x1 / 12
- * + x0 * (r11 + r12 + r8 * y1 + r9 * y0) / 12 # <<<<<<<<<<<<<<
- * )
- *
- */
- __pyx_t_1 = PyFloat_FromDouble((((((((-__pyx_v_r0) * __pyx_v_r9) / 12.0) - ((__pyx_v_r1 * __pyx_v_r8) / 12.0)) - ((__pyx_v_r11 * __pyx_v_x1) / 12.0)) - ((__pyx_v_r12 * __pyx_v_x1) / 12.0)) + ((__pyx_v_x0 * (((__pyx_v_r11 + __pyx_v_r12) + (__pyx_v_r8 * __pyx_v_y1)) + (__pyx_v_r9 * __pyx_v_y0))) / 12.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":91
- * - x0 * x1 * (r8 - r9) / 12
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r0 * r9 / 12
- * - r1 * r8 / 12
- */
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY, __pyx_t_4) < (0)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":39
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._lineTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":99
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_11_qCurveToOne(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_10_qCurveToOne, "MomentsPen._qCurveToOne(self, p1, p2)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_11_qCurveToOne = {"_qCurveToOne", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_11_qCurveToOne, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_10_qCurveToOne};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_11_qCurveToOne(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_p1 = 0;
- PyObject *__pyx_v_p2 = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[3] = {0,0,0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_qCurveToOne (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_p1,&__pyx_mstate_global->__pyx_n_u_p2,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 99, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 3:
- values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 99, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 99, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 99, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_qCurveToOne", 0) < (0)) __PYX_ERR(0, 99, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_qCurveToOne", 1, 3, 3, i); __PYX_ERR(0, 99, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 3)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 99, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 99, __pyx_L3_error)
- values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 99, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_p1 = values[1];
- __pyx_v_p2 = values[2];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_qCurveToOne", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 99, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._qCurveToOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_10_qCurveToOne(__pyx_self, __pyx_v_self, __pyx_v_p1, __pyx_v_p2);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_10_qCurveToOne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2) {
- double __pyx_v_x2;
- double __pyx_v_y2;
- double __pyx_v_x1;
- double __pyx_v_y1;
- double __pyx_v_x0;
- double __pyx_v_y0;
- double __pyx_v_r53;
- double __pyx_v_r52;
- double __pyx_v_r51;
- double __pyx_v_r50;
- double __pyx_v_r49;
- double __pyx_v_r48;
- double __pyx_v_r47;
- double __pyx_v_r46;
- double __pyx_v_r45;
- double __pyx_v_r44;
- double __pyx_v_r43;
- double __pyx_v_r42;
- double __pyx_v_r41;
- double __pyx_v_r40;
- double __pyx_v_r39;
- double __pyx_v_r38;
- double __pyx_v_r37;
- double __pyx_v_r36;
- double __pyx_v_r35;
- double __pyx_v_r34;
- double __pyx_v_r33;
- double __pyx_v_r32;
- double __pyx_v_r31;
- double __pyx_v_r30;
- double __pyx_v_r29;
- double __pyx_v_r28;
- double __pyx_v_r27;
- double __pyx_v_r26;
- double __pyx_v_r25;
- double __pyx_v_r24;
- double __pyx_v_r23;
- double __pyx_v_r22;
- double __pyx_v_r21;
- double __pyx_v_r20;
- double __pyx_v_r19;
- double __pyx_v_r18;
- double __pyx_v_r17;
- double __pyx_v_r16;
- double __pyx_v_r15;
- double __pyx_v_r14;
- double __pyx_v_r13;
- double __pyx_v_r12;
- double __pyx_v_r11;
- double __pyx_v_r10;
- double __pyx_v_r9;
- double __pyx_v_r8;
- double __pyx_v_r7;
- double __pyx_v_r6;
- double __pyx_v_r5;
- double __pyx_v_r4;
- double __pyx_v_r3;
- double __pyx_v_r2;
- double __pyx_v_r1;
- double __pyx_v_r0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *(*__pyx_t_6)(PyObject *);
- double __pyx_t_7;
- double __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_qCurveToOne", 0);
- /* "fontTools/pens/momentsPen.py":157
- * @cython.locals(x2=cython.double, y2=cython.double)
- * def _qCurveToOne(self, p1, p2):
- * x0, y0 = self._getCurrentPoint() # <<<<<<<<<<<<<<
- * x1, y1 = p1
- * x2, y2 = p2
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getCurrentPoint, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 157, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
- index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_2);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L4_unpacking_done;
- __pyx_L3_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 157, __pyx_L1_error)
- __pyx_L4_unpacking_done:;
- }
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x0 = __pyx_t_7;
- __pyx_v_y0 = __pyx_t_8;
- /* "fontTools/pens/momentsPen.py":158
- * def _qCurveToOne(self, p1, p2):
- * x0, y0 = self._getCurrentPoint()
- * x1, y1 = p1 # <<<<<<<<<<<<<<
- * x2, y2 = p2
- *
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p1))) || (PyList_CheckExact(__pyx_v_p1))) {
- PyObject* sequence = __pyx_v_p1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 158, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 158, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L6_unpacking_done;
- __pyx_L5_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 158, __pyx_L1_error)
- __pyx_L6_unpacking_done:;
- }
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x1 = __pyx_t_8;
- __pyx_v_y1 = __pyx_t_7;
- /* "fontTools/pens/momentsPen.py":159
- * x0, y0 = self._getCurrentPoint()
- * x1, y1 = p1
- * x2, y2 = p2 # <<<<<<<<<<<<<<
- *
- * r0 = 2 * y1
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p2))) || (PyList_CheckExact(__pyx_v_p2))) {
- PyObject* sequence = __pyx_v_p2;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 159, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_1);
- } else {
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- }
- #else
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 159, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L8_unpacking_done;
- __pyx_L7_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 159, __pyx_L1_error)
- __pyx_L8_unpacking_done:;
- }
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_x2 = __pyx_t_7;
- __pyx_v_y2 = __pyx_t_8;
- /* "fontTools/pens/momentsPen.py":161
- * x2, y2 = p2
- *
- * r0 = 2 * y1 # <<<<<<<<<<<<<<
- * r1 = r0 * x2
- * r2 = x2 * y2
- */
- __pyx_v_r0 = (2.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":162
- *
- * r0 = 2 * y1
- * r1 = r0 * x2 # <<<<<<<<<<<<<<
- * r2 = x2 * y2
- * r3 = 3 * r2
- */
- __pyx_v_r1 = (__pyx_v_r0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":163
- * r0 = 2 * y1
- * r1 = r0 * x2
- * r2 = x2 * y2 # <<<<<<<<<<<<<<
- * r3 = 3 * r2
- * r4 = 2 * x1
- */
- __pyx_v_r2 = (__pyx_v_x2 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":164
- * r1 = r0 * x2
- * r2 = x2 * y2
- * r3 = 3 * r2 # <<<<<<<<<<<<<<
- * r4 = 2 * x1
- * r5 = 3 * y0
- */
- __pyx_v_r3 = (3.0 * __pyx_v_r2);
- /* "fontTools/pens/momentsPen.py":165
- * r2 = x2 * y2
- * r3 = 3 * r2
- * r4 = 2 * x1 # <<<<<<<<<<<<<<
- * r5 = 3 * y0
- * r6 = x1**2
- */
- __pyx_v_r4 = (2.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":166
- * r3 = 3 * r2
- * r4 = 2 * x1
- * r5 = 3 * y0 # <<<<<<<<<<<<<<
- * r6 = x1**2
- * r7 = x2**2
- */
- __pyx_v_r5 = (3.0 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":167
- * r4 = 2 * x1
- * r5 = 3 * y0
- * r6 = x1**2 # <<<<<<<<<<<<<<
- * r7 = x2**2
- * r8 = 4 * y1
- */
- __pyx_v_r6 = pow(__pyx_v_x1, 2.0);
- /* "fontTools/pens/momentsPen.py":168
- * r5 = 3 * y0
- * r6 = x1**2
- * r7 = x2**2 # <<<<<<<<<<<<<<
- * r8 = 4 * y1
- * r9 = 10 * y2
- */
- __pyx_v_r7 = pow(__pyx_v_x2, 2.0);
- /* "fontTools/pens/momentsPen.py":169
- * r6 = x1**2
- * r7 = x2**2
- * r8 = 4 * y1 # <<<<<<<<<<<<<<
- * r9 = 10 * y2
- * r10 = 2 * y2
- */
- __pyx_v_r8 = (4.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":170
- * r7 = x2**2
- * r8 = 4 * y1
- * r9 = 10 * y2 # <<<<<<<<<<<<<<
- * r10 = 2 * y2
- * r11 = r4 * x2
- */
- __pyx_v_r9 = (10.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":171
- * r8 = 4 * y1
- * r9 = 10 * y2
- * r10 = 2 * y2 # <<<<<<<<<<<<<<
- * r11 = r4 * x2
- * r12 = x0**2
- */
- __pyx_v_r10 = (2.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":172
- * r9 = 10 * y2
- * r10 = 2 * y2
- * r11 = r4 * x2 # <<<<<<<<<<<<<<
- * r12 = x0**2
- * r13 = 10 * y0
- */
- __pyx_v_r11 = (__pyx_v_r4 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":173
- * r10 = 2 * y2
- * r11 = r4 * x2
- * r12 = x0**2 # <<<<<<<<<<<<<<
- * r13 = 10 * y0
- * r14 = r4 * y2
- */
- __pyx_v_r12 = pow(__pyx_v_x0, 2.0);
- /* "fontTools/pens/momentsPen.py":174
- * r11 = r4 * x2
- * r12 = x0**2
- * r13 = 10 * y0 # <<<<<<<<<<<<<<
- * r14 = r4 * y2
- * r15 = x2 * y0
- */
- __pyx_v_r13 = (10.0 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":175
- * r12 = x0**2
- * r13 = 10 * y0
- * r14 = r4 * y2 # <<<<<<<<<<<<<<
- * r15 = x2 * y0
- * r16 = 4 * x1
- */
- __pyx_v_r14 = (__pyx_v_r4 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":176
- * r13 = 10 * y0
- * r14 = r4 * y2
- * r15 = x2 * y0 # <<<<<<<<<<<<<<
- * r16 = 4 * x1
- * r17 = r0 * x1 + r2
- */
- __pyx_v_r15 = (__pyx_v_x2 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":177
- * r14 = r4 * y2
- * r15 = x2 * y0
- * r16 = 4 * x1 # <<<<<<<<<<<<<<
- * r17 = r0 * x1 + r2
- * r18 = r2 * r8
- */
- __pyx_v_r16 = (4.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":178
- * r15 = x2 * y0
- * r16 = 4 * x1
- * r17 = r0 * x1 + r2 # <<<<<<<<<<<<<<
- * r18 = r2 * r8
- * r19 = y1**2
- */
- __pyx_v_r17 = ((__pyx_v_r0 * __pyx_v_x1) + __pyx_v_r2);
- /* "fontTools/pens/momentsPen.py":179
- * r16 = 4 * x1
- * r17 = r0 * x1 + r2
- * r18 = r2 * r8 # <<<<<<<<<<<<<<
- * r19 = y1**2
- * r20 = 2 * r19
- */
- __pyx_v_r18 = (__pyx_v_r2 * __pyx_v_r8);
- /* "fontTools/pens/momentsPen.py":180
- * r17 = r0 * x1 + r2
- * r18 = r2 * r8
- * r19 = y1**2 # <<<<<<<<<<<<<<
- * r20 = 2 * r19
- * r21 = y2**2
- */
- __pyx_v_r19 = pow(__pyx_v_y1, 2.0);
- /* "fontTools/pens/momentsPen.py":181
- * r18 = r2 * r8
- * r19 = y1**2
- * r20 = 2 * r19 # <<<<<<<<<<<<<<
- * r21 = y2**2
- * r22 = r21 * x2
- */
- __pyx_v_r20 = (2.0 * __pyx_v_r19);
- /* "fontTools/pens/momentsPen.py":182
- * r19 = y1**2
- * r20 = 2 * r19
- * r21 = y2**2 # <<<<<<<<<<<<<<
- * r22 = r21 * x2
- * r23 = 5 * r22
- */
- __pyx_v_r21 = pow(__pyx_v_y2, 2.0);
- /* "fontTools/pens/momentsPen.py":183
- * r20 = 2 * r19
- * r21 = y2**2
- * r22 = r21 * x2 # <<<<<<<<<<<<<<
- * r23 = 5 * r22
- * r24 = y0**2
- */
- __pyx_v_r22 = (__pyx_v_r21 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":184
- * r21 = y2**2
- * r22 = r21 * x2
- * r23 = 5 * r22 # <<<<<<<<<<<<<<
- * r24 = y0**2
- * r25 = y0 * y2
- */
- __pyx_v_r23 = (5.0 * __pyx_v_r22);
- /* "fontTools/pens/momentsPen.py":185
- * r22 = r21 * x2
- * r23 = 5 * r22
- * r24 = y0**2 # <<<<<<<<<<<<<<
- * r25 = y0 * y2
- * r26 = 5 * r24
- */
- __pyx_v_r24 = pow(__pyx_v_y0, 2.0);
- /* "fontTools/pens/momentsPen.py":186
- * r23 = 5 * r22
- * r24 = y0**2
- * r25 = y0 * y2 # <<<<<<<<<<<<<<
- * r26 = 5 * r24
- * r27 = x1**3
- */
- __pyx_v_r25 = (__pyx_v_y0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":187
- * r24 = y0**2
- * r25 = y0 * y2
- * r26 = 5 * r24 # <<<<<<<<<<<<<<
- * r27 = x1**3
- * r28 = x2**3
- */
- __pyx_v_r26 = (5.0 * __pyx_v_r24);
- /* "fontTools/pens/momentsPen.py":188
- * r25 = y0 * y2
- * r26 = 5 * r24
- * r27 = x1**3 # <<<<<<<<<<<<<<
- * r28 = x2**3
- * r29 = 30 * y1
- */
- __pyx_v_r27 = pow(__pyx_v_x1, 3.0);
- /* "fontTools/pens/momentsPen.py":189
- * r26 = 5 * r24
- * r27 = x1**3
- * r28 = x2**3 # <<<<<<<<<<<<<<
- * r29 = 30 * y1
- * r30 = 6 * y1
- */
- __pyx_v_r28 = pow(__pyx_v_x2, 3.0);
- /* "fontTools/pens/momentsPen.py":190
- * r27 = x1**3
- * r28 = x2**3
- * r29 = 30 * y1 # <<<<<<<<<<<<<<
- * r30 = 6 * y1
- * r31 = 10 * r7 * x1
- */
- __pyx_v_r29 = (30.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":191
- * r28 = x2**3
- * r29 = 30 * y1
- * r30 = 6 * y1 # <<<<<<<<<<<<<<
- * r31 = 10 * r7 * x1
- * r32 = 5 * y2
- */
- __pyx_v_r30 = (6.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":192
- * r29 = 30 * y1
- * r30 = 6 * y1
- * r31 = 10 * r7 * x1 # <<<<<<<<<<<<<<
- * r32 = 5 * y2
- * r33 = 12 * r6
- */
- __pyx_v_r31 = ((10.0 * __pyx_v_r7) * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":193
- * r30 = 6 * y1
- * r31 = 10 * r7 * x1
- * r32 = 5 * y2 # <<<<<<<<<<<<<<
- * r33 = 12 * r6
- * r34 = 30 * x1
- */
- __pyx_v_r32 = (5.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":194
- * r31 = 10 * r7 * x1
- * r32 = 5 * y2
- * r33 = 12 * r6 # <<<<<<<<<<<<<<
- * r34 = 30 * x1
- * r35 = x1 * y1
- */
- __pyx_v_r33 = (12.0 * __pyx_v_r6);
- /* "fontTools/pens/momentsPen.py":195
- * r32 = 5 * y2
- * r33 = 12 * r6
- * r34 = 30 * x1 # <<<<<<<<<<<<<<
- * r35 = x1 * y1
- * r36 = r3 + 20 * r35
- */
- __pyx_v_r34 = (30.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":196
- * r33 = 12 * r6
- * r34 = 30 * x1
- * r35 = x1 * y1 # <<<<<<<<<<<<<<
- * r36 = r3 + 20 * r35
- * r37 = 12 * x1
- */
- __pyx_v_r35 = (__pyx_v_x1 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":197
- * r34 = 30 * x1
- * r35 = x1 * y1
- * r36 = r3 + 20 * r35 # <<<<<<<<<<<<<<
- * r37 = 12 * x1
- * r38 = 20 * r6
- */
- __pyx_v_r36 = (__pyx_v_r3 + (20.0 * __pyx_v_r35));
- /* "fontTools/pens/momentsPen.py":198
- * r35 = x1 * y1
- * r36 = r3 + 20 * r35
- * r37 = 12 * x1 # <<<<<<<<<<<<<<
- * r38 = 20 * r6
- * r39 = 8 * r6 * y1
- */
- __pyx_v_r37 = (12.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":199
- * r36 = r3 + 20 * r35
- * r37 = 12 * x1
- * r38 = 20 * r6 # <<<<<<<<<<<<<<
- * r39 = 8 * r6 * y1
- * r40 = r32 * r7
- */
- __pyx_v_r38 = (20.0 * __pyx_v_r6);
- /* "fontTools/pens/momentsPen.py":200
- * r37 = 12 * x1
- * r38 = 20 * r6
- * r39 = 8 * r6 * y1 # <<<<<<<<<<<<<<
- * r40 = r32 * r7
- * r41 = 60 * y1
- */
- __pyx_v_r39 = ((8.0 * __pyx_v_r6) * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":201
- * r38 = 20 * r6
- * r39 = 8 * r6 * y1
- * r40 = r32 * r7 # <<<<<<<<<<<<<<
- * r41 = 60 * y1
- * r42 = 20 * r19
- */
- __pyx_v_r40 = (__pyx_v_r32 * __pyx_v_r7);
- /* "fontTools/pens/momentsPen.py":202
- * r39 = 8 * r6 * y1
- * r40 = r32 * r7
- * r41 = 60 * y1 # <<<<<<<<<<<<<<
- * r42 = 20 * r19
- * r43 = 4 * r19
- */
- __pyx_v_r41 = (60.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":203
- * r40 = r32 * r7
- * r41 = 60 * y1
- * r42 = 20 * r19 # <<<<<<<<<<<<<<
- * r43 = 4 * r19
- * r44 = 15 * r21
- */
- __pyx_v_r42 = (20.0 * __pyx_v_r19);
- /* "fontTools/pens/momentsPen.py":204
- * r41 = 60 * y1
- * r42 = 20 * r19
- * r43 = 4 * r19 # <<<<<<<<<<<<<<
- * r44 = 15 * r21
- * r45 = 12 * x2
- */
- __pyx_v_r43 = (4.0 * __pyx_v_r19);
- /* "fontTools/pens/momentsPen.py":205
- * r42 = 20 * r19
- * r43 = 4 * r19
- * r44 = 15 * r21 # <<<<<<<<<<<<<<
- * r45 = 12 * x2
- * r46 = 12 * y2
- */
- __pyx_v_r44 = (15.0 * __pyx_v_r21);
- /* "fontTools/pens/momentsPen.py":206
- * r43 = 4 * r19
- * r44 = 15 * r21
- * r45 = 12 * x2 # <<<<<<<<<<<<<<
- * r46 = 12 * y2
- * r47 = 6 * x1
- */
- __pyx_v_r45 = (12.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":207
- * r44 = 15 * r21
- * r45 = 12 * x2
- * r46 = 12 * y2 # <<<<<<<<<<<<<<
- * r47 = 6 * x1
- * r48 = 8 * r19 * x1 + r23
- */
- __pyx_v_r46 = (12.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":208
- * r45 = 12 * x2
- * r46 = 12 * y2
- * r47 = 6 * x1 # <<<<<<<<<<<<<<
- * r48 = 8 * r19 * x1 + r23
- * r49 = 8 * y1**3
- */
- __pyx_v_r47 = (6.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":209
- * r46 = 12 * y2
- * r47 = 6 * x1
- * r48 = 8 * r19 * x1 + r23 # <<<<<<<<<<<<<<
- * r49 = 8 * y1**3
- * r50 = y2**3
- */
- __pyx_v_r48 = (((8.0 * __pyx_v_r19) * __pyx_v_x1) + __pyx_v_r23);
- /* "fontTools/pens/momentsPen.py":210
- * r47 = 6 * x1
- * r48 = 8 * r19 * x1 + r23
- * r49 = 8 * y1**3 # <<<<<<<<<<<<<<
- * r50 = y2**3
- * r51 = y0**3
- */
- __pyx_v_r49 = (8.0 * pow(__pyx_v_y1, 3.0));
- /* "fontTools/pens/momentsPen.py":211
- * r48 = 8 * r19 * x1 + r23
- * r49 = 8 * y1**3
- * r50 = y2**3 # <<<<<<<<<<<<<<
- * r51 = y0**3
- * r52 = 10 * y1
- */
- __pyx_v_r50 = pow(__pyx_v_y2, 3.0);
- /* "fontTools/pens/momentsPen.py":212
- * r49 = 8 * y1**3
- * r50 = y2**3
- * r51 = y0**3 # <<<<<<<<<<<<<<
- * r52 = 10 * y1
- * r53 = 12 * y1
- */
- __pyx_v_r51 = pow(__pyx_v_y0, 3.0);
- /* "fontTools/pens/momentsPen.py":213
- * r50 = y2**3
- * r51 = y0**3
- * r52 = 10 * y1 # <<<<<<<<<<<<<<
- * r53 = 12 * y1
- *
- */
- __pyx_v_r52 = (10.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":214
- * r51 = y0**3
- * r52 = 10 * y1
- * r53 = 12 * y1 # <<<<<<<<<<<<<<
- *
- * self.area += (
- */
- __pyx_v_r53 = (12.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":216
- * r53 = 12 * y1
- *
- * self.area += ( # <<<<<<<<<<<<<<
- * -r1 / 6
- * - r3 / 6
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":221
- * + x0 * (r0 + r5 + y2) / 6
- * + x1 * y2 / 3
- * - y0 * (r4 + x2) / 6 # <<<<<<<<<<<<<<
- * )
- * self.momentX += (
- */
- __pyx_t_4 = PyFloat_FromDouble(((((((-__pyx_v_r1) / 6.0) - (__pyx_v_r3 / 6.0)) + ((__pyx_v_x0 * ((__pyx_v_r0 + __pyx_v_r5) + __pyx_v_y2)) / 6.0)) + ((__pyx_v_x1 * __pyx_v_y2) / 3.0)) - ((__pyx_v_y0 * (__pyx_v_r4 + __pyx_v_x2)) / 6.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":216
- * r53 = 12 * y1
- *
- * self.area += ( # <<<<<<<<<<<<<<
- * -r1 / 6
- * - r3 / 6
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area, __pyx_t_2) < (0)) __PYX_ERR(0, 216, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":223
- * - y0 * (r4 + x2) / 6
- * )
- * self.momentX += ( # <<<<<<<<<<<<<<
- * -r11 * (-r10 + y1) / 30
- * + r12 * (r13 + r8 + y2) / 30
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":230
- * - r7 * r9 / 30
- * + x0 * (r14 - r15 - r16 * y0 + r17) / 30
- * - y0 * (r11 + 2 * r6 + r7) / 30 # <<<<<<<<<<<<<<
- * )
- * self.momentY += (
- */
- __pyx_t_4 = PyFloat_FromDouble((((((((((-__pyx_v_r11) * ((-__pyx_v_r10) + __pyx_v_y1)) / 30.0) + ((__pyx_v_r12 * ((__pyx_v_r13 + __pyx_v_r8) + __pyx_v_y2)) / 30.0)) + ((__pyx_v_r6 * __pyx_v_y2) / 15.0)) - ((__pyx_v_r7 * __pyx_v_r8) / 30.0)) - ((__pyx_v_r7 * __pyx_v_r9) / 30.0)) + ((__pyx_v_x0 * (((__pyx_v_r14 - __pyx_v_r15) - (__pyx_v_r16 * __pyx_v_y0)) + __pyx_v_r17)) / 30.0)) - ((__pyx_v_y0 * ((__pyx_v_r11 + (2.0 * __pyx_v_r6)) + __pyx_v_r7)) / 30.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":223
- * - y0 * (r4 + x2) / 6
- * )
- * self.momentX += ( # <<<<<<<<<<<<<<
- * -r11 * (-r10 + y1) / 30
- * + r12 * (r13 + r8 + y2) / 30
- */
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX, __pyx_t_1) < (0)) __PYX_ERR(0, 223, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":232
- * - y0 * (r11 + 2 * r6 + r7) / 30
- * )
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r18 / 30
- * - r20 * x2 / 30
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":239
- * + x0 * (r0 * y2 + r20 + r21 + r25 + r26 + r8 * y0) / 30
- * + x1 * y2 * (r10 + y1) / 15
- * - y0 * (r1 + r17) / 30 # <<<<<<<<<<<<<<
- * )
- * self.momentXX += (
- */
- __pyx_t_4 = PyFloat_FromDouble(((((((((-__pyx_v_r18) / 30.0) - ((__pyx_v_r20 * __pyx_v_x2) / 30.0)) - (__pyx_v_r23 / 30.0)) - ((__pyx_v_r24 * (__pyx_v_r16 + __pyx_v_x2)) / 30.0)) + ((__pyx_v_x0 * ((((((__pyx_v_r0 * __pyx_v_y2) + __pyx_v_r20) + __pyx_v_r21) + __pyx_v_r25) + __pyx_v_r26) + (__pyx_v_r8 * __pyx_v_y0))) / 30.0)) + (((__pyx_v_x1 * __pyx_v_y2) * (__pyx_v_r10 + __pyx_v_y1)) / 15.0)) - ((__pyx_v_y0 * (__pyx_v_r1 + __pyx_v_r17)) / 30.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":232
- * - y0 * (r11 + 2 * r6 + r7) / 30
- * )
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r18 / 30
- * - r20 * x2 / 30
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY, __pyx_t_2) < (0)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":241
- * - y0 * (r1 + r17) / 30
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * r12 * (r1 - 5 * r15 - r34 * y0 + r36 + r9 * x1) / 420
- * + 2 * r27 * y2 / 105
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":261
- * )
- * / 420
- * - y0 * (8 * r27 + 5 * r28 + r31 + r33 * x2) / 420 # <<<<<<<<<<<<<<
- * )
- * self.momentXY += (
- */
- __pyx_t_4 = PyFloat_FromDouble(((((((((((__pyx_v_r12 * ((((__pyx_v_r1 - (5.0 * __pyx_v_r15)) - (__pyx_v_r34 * __pyx_v_y0)) + __pyx_v_r36) + (__pyx_v_r9 * __pyx_v_x1))) / 420.0) + (((2.0 * __pyx_v_r27) * __pyx_v_y2) / 105.0)) - ((__pyx_v_r28 * __pyx_v_r29) / 420.0)) - ((__pyx_v_r28 * __pyx_v_y2) / 4.0)) - ((__pyx_v_r31 * (__pyx_v_r0 - (3.0 * __pyx_v_y2))) / 420.0)) - (((__pyx_v_r6 * __pyx_v_x2) * (__pyx_v_r0 - __pyx_v_r32)) / 105.0)) + ((pow(__pyx_v_x0, 3.0) * ((__pyx_v_r30 + (21.0 * __pyx_v_y0)) + __pyx_v_y2)) / 84.0)) - ((__pyx_v_x0 * ((((((((__pyx_v_r0 * __pyx_v_r7) + (__pyx_v_r15 * __pyx_v_r37)) - (__pyx_v_r2 * __pyx_v_r37)) - (__pyx_v_r33 * __pyx_v_y2)) + (__pyx_v_r38 * __pyx_v_y0)) - __pyx_v_r39) - __pyx_v_r40) + (__pyx_v_r5 * __pyx_v_r7))) / 420.0)) - ((__pyx_v_y0 * ((((8.0 * __pyx_v_r27) + (5.0 * __pyx_v_r28)) + __pyx_v_r31) + (__pyx_v_r33 * __pyx_v_x2))) / 420.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":241
- * - y0 * (r1 + r17) / 30
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * r12 * (r1 - 5 * r15 - r34 * y0 + r36 + r9 * x1) / 420
- * + 2 * r27 * y2 / 105
- */
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX, __pyx_t_1) < (0)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":263
- * - y0 * (8 * r27 + 5 * r28 + r31 + r33 * x2) / 420
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * r12 * (r13 * y2 + 3 * r21 + 105 * r24 + r41 * y0 + r42 + r46 * y1) / 840
- * - r16 * x2 * (r43 - r44) / 840
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":283
- * )
- * / 420
- * - y0 * (r16 * r2 + r30 * r7 + r35 * r45 + r39 + r40) / 420 # <<<<<<<<<<<<<<
- * )
- * self.momentYY += (
- */
- __pyx_t_4 = PyFloat_FromDouble(((((((((((__pyx_v_r12 * ((((((__pyx_v_r13 * __pyx_v_y2) + (3.0 * __pyx_v_r21)) + (105.0 * __pyx_v_r24)) + (__pyx_v_r41 * __pyx_v_y0)) + __pyx_v_r42) + (__pyx_v_r46 * __pyx_v_y1))) / 840.0) - (((__pyx_v_r16 * __pyx_v_x2) * (__pyx_v_r43 - __pyx_v_r44)) / 840.0)) - ((__pyx_v_r21 * __pyx_v_r7) / 8.0)) - ((__pyx_v_r24 * ((__pyx_v_r38 + (__pyx_v_r45 * __pyx_v_x1)) + (3.0 * __pyx_v_r7))) / 840.0)) - (((__pyx_v_r41 * __pyx_v_r7) * __pyx_v_y2) / 840.0)) - ((__pyx_v_r42 * __pyx_v_r7) / 840.0)) + (((__pyx_v_r6 * __pyx_v_y2) * (__pyx_v_r32 + __pyx_v_r8)) / 210.0)) + ((__pyx_v_x0 * (((((((((-__pyx_v_r15) * __pyx_v_r8) + (__pyx_v_r16 * __pyx_v_r25)) + __pyx_v_r18) + (__pyx_v_r21 * __pyx_v_r47)) - (__pyx_v_r24 * __pyx_v_r34)) - (__pyx_v_r26 * __pyx_v_x2)) + (__pyx_v_r35 * __pyx_v_r46)) + __pyx_v_r48)) / 420.0)) - ((__pyx_v_y0 * (((((__pyx_v_r16 * __pyx_v_r2) + (__pyx_v_r30 * __pyx_v_r7)) + (__pyx_v_r35 * __pyx_v_r45)) + __pyx_v_r39) + __pyx_v_r40)) / 420.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":263
- * - y0 * (8 * r27 + 5 * r28 + r31 + r33 * x2) / 420
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * r12 * (r13 * y2 + 3 * r21 + 105 * r24 + r41 * y0 + r42 + r46 * y1) / 840
- * - r16 * x2 * (r43 - r44) / 840
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY, __pyx_t_2) < (0)) __PYX_ERR(0, 263, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":285
- * - y0 * (r16 * r2 + r30 * r7 + r35 * r45 + r39 + r40) / 420
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r2 * r42 / 420
- * - r22 * r29 / 420
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":307
- * / 420
- * + x1 * y2 * (r43 + r44 + r9 * y1) / 210
- * - y0 * (r19 * r45 + r2 * r53 - r21 * r4 + r48) / 420 # <<<<<<<<<<<<<<
- * )
- *
- */
- __pyx_t_4 = PyFloat_FromDouble((((((((((((-__pyx_v_r2) * __pyx_v_r42) / 420.0) - ((__pyx_v_r22 * __pyx_v_r29) / 420.0)) - ((__pyx_v_r24 * ((__pyx_v_r14 + __pyx_v_r36) + (__pyx_v_r52 * __pyx_v_x2))) / 420.0)) - ((__pyx_v_r49 * __pyx_v_x2) / 420.0)) - ((__pyx_v_r50 * __pyx_v_x2) / 12.0)) - ((__pyx_v_r51 * (__pyx_v_r47 + __pyx_v_x2)) / 84.0)) + ((__pyx_v_x0 * ((((((((((__pyx_v_r19 * __pyx_v_r46) + (__pyx_v_r21 * __pyx_v_r5)) + (__pyx_v_r21 * __pyx_v_r52)) + (__pyx_v_r24 * __pyx_v_r29)) + (__pyx_v_r25 * __pyx_v_r53)) + (__pyx_v_r26 * __pyx_v_y2)) + (__pyx_v_r42 * __pyx_v_y0)) + __pyx_v_r49) + (5.0 * __pyx_v_r50)) + (35.0 * __pyx_v_r51))) / 420.0)) + (((__pyx_v_x1 * __pyx_v_y2) * ((__pyx_v_r43 + __pyx_v_r44) + (__pyx_v_r9 * __pyx_v_y1))) / 210.0)) - ((__pyx_v_y0 * ((((__pyx_v_r19 * __pyx_v_r45) + (__pyx_v_r2 * __pyx_v_r53)) - (__pyx_v_r21 * __pyx_v_r4)) + __pyx_v_r48)) / 420.0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":285
- * - y0 * (r16 * r2 + r30 * r7 + r35 * r45 + r39 + r40) / 420
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r2 * r42 / 420
- * - r22 * r29 / 420
- */
- __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY, __pyx_t_1) < (0)) __PYX_ERR(0, 285, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/pens/momentsPen.py":99
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._qCurveToOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/pens/momentsPen.py":310
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_13_curveToOne(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ); /*proto*/
- PyDoc_STRVAR(__pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_12_curveToOne, "MomentsPen._curveToOne(self, p1, p2, p3)");
- static PyMethodDef __pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_13_curveToOne = {"_curveToOne", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_13_curveToOne, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_4pens_10momentsPen_10MomentsPen_12_curveToOne};
- static PyObject *__pyx_pw_9fontTools_4pens_10momentsPen_10MomentsPen_13_curveToOne(PyObject *__pyx_self,
- #if CYTHON_METH_FASTCALL
- PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
- #else
- PyObject *__pyx_args, PyObject *__pyx_kwds
- #endif
- ) {
- PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_p1 = 0;
- PyObject *__pyx_v_p2 = 0;
- PyObject *__pyx_v_p3 = 0;
- #if !CYTHON_METH_FASTCALL
- CYTHON_UNUSED Py_ssize_t __pyx_nargs;
- #endif
- CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
- PyObject* values[4] = {0,0,0,0};
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_curveToOne (wrapper)", 0);
- #if !CYTHON_METH_FASTCALL
- #if CYTHON_ASSUME_SAFE_SIZE
- __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
- #else
- __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
- #endif
- #endif
- __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
- {
- PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_p1,&__pyx_mstate_global->__pyx_n_u_p2,&__pyx_mstate_global->__pyx_n_u_p3,0};
- const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
- if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 310, __pyx_L3_error)
- if (__pyx_kwds_len > 0) {
- switch (__pyx_nargs) {
- case 4:
- values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 310, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 3:
- values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 310, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 2:
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 310, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 1:
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 310, __pyx_L3_error)
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- const Py_ssize_t kwd_pos_args = __pyx_nargs;
- if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_curveToOne", 0) < (0)) __PYX_ERR(0, 310, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_curveToOne", 1, 4, 4, i); __PYX_ERR(0, 310, __pyx_L3_error) }
- }
- } else if (unlikely(__pyx_nargs != 4)) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 310, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 310, __pyx_L3_error)
- values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 310, __pyx_L3_error)
- values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 310, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_p1 = values[1];
- __pyx_v_p2 = values[2];
- __pyx_v_p3 = values[3];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_curveToOne", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 310, __pyx_L3_error)
- __pyx_L6_skip:;
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L3_error:;
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._curveToOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_12_curveToOne(__pyx_self, __pyx_v_self, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3);
- /* function exit code */
- for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
- Py_XDECREF(values[__pyx_temp]);
- }
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- static PyObject *__pyx_pf_9fontTools_4pens_10momentsPen_10MomentsPen_12_curveToOne(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_p1, PyObject *__pyx_v_p2, PyObject *__pyx_v_p3) {
- double __pyx_v_x3;
- double __pyx_v_y3;
- double __pyx_v_x2;
- double __pyx_v_y2;
- double __pyx_v_x1;
- double __pyx_v_y1;
- double __pyx_v_x0;
- double __pyx_v_y0;
- double __pyx_v_r132;
- double __pyx_v_r131;
- double __pyx_v_r130;
- double __pyx_v_r129;
- double __pyx_v_r128;
- double __pyx_v_r127;
- double __pyx_v_r126;
- double __pyx_v_r125;
- double __pyx_v_r124;
- double __pyx_v_r123;
- double __pyx_v_r122;
- double __pyx_v_r121;
- double __pyx_v_r120;
- double __pyx_v_r119;
- double __pyx_v_r118;
- double __pyx_v_r117;
- double __pyx_v_r116;
- double __pyx_v_r115;
- double __pyx_v_r114;
- double __pyx_v_r113;
- double __pyx_v_r112;
- double __pyx_v_r111;
- double __pyx_v_r110;
- double __pyx_v_r109;
- double __pyx_v_r108;
- double __pyx_v_r107;
- double __pyx_v_r106;
- double __pyx_v_r105;
- double __pyx_v_r104;
- double __pyx_v_r103;
- double __pyx_v_r102;
- double __pyx_v_r101;
- double __pyx_v_r100;
- double __pyx_v_r99;
- double __pyx_v_r98;
- double __pyx_v_r97;
- double __pyx_v_r96;
- double __pyx_v_r95;
- double __pyx_v_r94;
- double __pyx_v_r93;
- double __pyx_v_r92;
- double __pyx_v_r91;
- double __pyx_v_r90;
- double __pyx_v_r89;
- double __pyx_v_r88;
- double __pyx_v_r87;
- double __pyx_v_r86;
- double __pyx_v_r85;
- double __pyx_v_r84;
- double __pyx_v_r83;
- double __pyx_v_r82;
- double __pyx_v_r81;
- double __pyx_v_r80;
- double __pyx_v_r79;
- double __pyx_v_r78;
- double __pyx_v_r77;
- double __pyx_v_r76;
- double __pyx_v_r75;
- double __pyx_v_r74;
- double __pyx_v_r73;
- double __pyx_v_r72;
- double __pyx_v_r71;
- double __pyx_v_r70;
- double __pyx_v_r69;
- double __pyx_v_r68;
- double __pyx_v_r67;
- double __pyx_v_r66;
- double __pyx_v_r65;
- double __pyx_v_r64;
- double __pyx_v_r63;
- double __pyx_v_r62;
- double __pyx_v_r61;
- double __pyx_v_r60;
- double __pyx_v_r59;
- double __pyx_v_r58;
- double __pyx_v_r57;
- double __pyx_v_r56;
- double __pyx_v_r55;
- double __pyx_v_r54;
- double __pyx_v_r53;
- double __pyx_v_r52;
- double __pyx_v_r51;
- double __pyx_v_r50;
- double __pyx_v_r49;
- double __pyx_v_r48;
- double __pyx_v_r47;
- double __pyx_v_r46;
- double __pyx_v_r45;
- double __pyx_v_r44;
- double __pyx_v_r43;
- double __pyx_v_r42;
- double __pyx_v_r41;
- double __pyx_v_r40;
- double __pyx_v_r39;
- double __pyx_v_r38;
- double __pyx_v_r37;
- double __pyx_v_r36;
- double __pyx_v_r35;
- double __pyx_v_r34;
- double __pyx_v_r33;
- double __pyx_v_r32;
- double __pyx_v_r31;
- double __pyx_v_r30;
- double __pyx_v_r29;
- double __pyx_v_r28;
- double __pyx_v_r27;
- double __pyx_v_r26;
- double __pyx_v_r25;
- double __pyx_v_r24;
- double __pyx_v_r23;
- double __pyx_v_r22;
- double __pyx_v_r21;
- double __pyx_v_r20;
- double __pyx_v_r19;
- double __pyx_v_r18;
- double __pyx_v_r17;
- double __pyx_v_r16;
- double __pyx_v_r15;
- double __pyx_v_r14;
- double __pyx_v_r13;
- double __pyx_v_r12;
- double __pyx_v_r11;
- double __pyx_v_r10;
- double __pyx_v_r9;
- double __pyx_v_r8;
- double __pyx_v_r7;
- double __pyx_v_r6;
- double __pyx_v_r5;
- double __pyx_v_r4;
- double __pyx_v_r3;
- double __pyx_v_r2;
- double __pyx_v_r1;
- double __pyx_v_r0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *(*__pyx_t_6)(PyObject *);
- double __pyx_t_7;
- double __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_curveToOne", 0);
- /* "fontTools/pens/momentsPen.py":448
- * @cython.locals(x3=cython.double, y3=cython.double)
- * def _curveToOne(self, p1, p2, p3):
- * x0, y0 = self._getCurrentPoint() # <<<<<<<<<<<<<<
- * x1, y1 = p1
- * x2, y2 = p2
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getCurrentPoint, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
- PyObject* sequence = __pyx_t_1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 448, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
- index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_2);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 448, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L4_unpacking_done;
- __pyx_L3_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 448, __pyx_L1_error)
- __pyx_L4_unpacking_done:;
- }
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x0 = __pyx_t_7;
- __pyx_v_y0 = __pyx_t_8;
- /* "fontTools/pens/momentsPen.py":449
- * def _curveToOne(self, p1, p2, p3):
- * x0, y0 = self._getCurrentPoint()
- * x1, y1 = p1 # <<<<<<<<<<<<<<
- * x2, y2 = p2
- * x3, y3 = p3
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p1))) || (PyList_CheckExact(__pyx_v_p1))) {
- PyObject* sequence = __pyx_v_p1;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 449, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 449, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L6_unpacking_done;
- __pyx_L5_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 449, __pyx_L1_error)
- __pyx_L6_unpacking_done:;
- }
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x1 = __pyx_t_8;
- __pyx_v_y1 = __pyx_t_7;
- /* "fontTools/pens/momentsPen.py":450
- * x0, y0 = self._getCurrentPoint()
- * x1, y1 = p1
- * x2, y2 = p2 # <<<<<<<<<<<<<<
- * x3, y3 = p3
- *
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p2))) || (PyList_CheckExact(__pyx_v_p2))) {
- PyObject* sequence = __pyx_v_p2;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 450, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_1);
- } else {
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- }
- #else
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 450, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L8_unpacking_done;
- __pyx_L7_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 450, __pyx_L1_error)
- __pyx_L8_unpacking_done:;
- }
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_x2 = __pyx_t_7;
- __pyx_v_y2 = __pyx_t_8;
- /* "fontTools/pens/momentsPen.py":451
- * x1, y1 = p1
- * x2, y2 = p2
- * x3, y3 = p3 # <<<<<<<<<<<<<<
- *
- * r0 = 6 * y2
- */
- if ((likely(PyTuple_CheckExact(__pyx_v_p3))) || (PyList_CheckExact(__pyx_v_p3))) {
- PyObject* sequence = __pyx_v_p3;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 451, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- }
- #else
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- } else {
- Py_ssize_t index = -1;
- __pyx_t_2 = PyObject_GetIter(__pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
- index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 451, __pyx_L1_error)
- __pyx_t_6 = NULL;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- goto __pyx_L10_unpacking_done;
- __pyx_L9_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_6 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 451, __pyx_L1_error)
- __pyx_L10_unpacking_done:;
- }
- __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_x3 = __pyx_t_8;
- __pyx_v_y3 = __pyx_t_7;
- /* "fontTools/pens/momentsPen.py":453
- * x3, y3 = p3
- *
- * r0 = 6 * y2 # <<<<<<<<<<<<<<
- * r1 = r0 * x3
- * r2 = 10 * y3
- */
- __pyx_v_r0 = (6.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":454
- *
- * r0 = 6 * y2
- * r1 = r0 * x3 # <<<<<<<<<<<<<<
- * r2 = 10 * y3
- * r3 = r2 * x3
- */
- __pyx_v_r1 = (__pyx_v_r0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":455
- * r0 = 6 * y2
- * r1 = r0 * x3
- * r2 = 10 * y3 # <<<<<<<<<<<<<<
- * r3 = r2 * x3
- * r4 = 3 * y1
- */
- __pyx_v_r2 = (10.0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":456
- * r1 = r0 * x3
- * r2 = 10 * y3
- * r3 = r2 * x3 # <<<<<<<<<<<<<<
- * r4 = 3 * y1
- * r5 = 6 * x1
- */
- __pyx_v_r3 = (__pyx_v_r2 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":457
- * r2 = 10 * y3
- * r3 = r2 * x3
- * r4 = 3 * y1 # <<<<<<<<<<<<<<
- * r5 = 6 * x1
- * r6 = 3 * x2
- */
- __pyx_v_r4 = (3.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":458
- * r3 = r2 * x3
- * r4 = 3 * y1
- * r5 = 6 * x1 # <<<<<<<<<<<<<<
- * r6 = 3 * x2
- * r7 = 6 * y1
- */
- __pyx_v_r5 = (6.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":459
- * r4 = 3 * y1
- * r5 = 6 * x1
- * r6 = 3 * x2 # <<<<<<<<<<<<<<
- * r7 = 6 * y1
- * r8 = 3 * y2
- */
- __pyx_v_r6 = (3.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":460
- * r5 = 6 * x1
- * r6 = 3 * x2
- * r7 = 6 * y1 # <<<<<<<<<<<<<<
- * r8 = 3 * y2
- * r9 = x2**2
- */
- __pyx_v_r7 = (6.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":461
- * r6 = 3 * x2
- * r7 = 6 * y1
- * r8 = 3 * y2 # <<<<<<<<<<<<<<
- * r9 = x2**2
- * r10 = 45 * r9
- */
- __pyx_v_r8 = (3.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":462
- * r7 = 6 * y1
- * r8 = 3 * y2
- * r9 = x2**2 # <<<<<<<<<<<<<<
- * r10 = 45 * r9
- * r11 = r10 * y3
- */
- __pyx_v_r9 = pow(__pyx_v_x2, 2.0);
- /* "fontTools/pens/momentsPen.py":463
- * r8 = 3 * y2
- * r9 = x2**2
- * r10 = 45 * r9 # <<<<<<<<<<<<<<
- * r11 = r10 * y3
- * r12 = x3**2
- */
- __pyx_v_r10 = (45.0 * __pyx_v_r9);
- /* "fontTools/pens/momentsPen.py":464
- * r9 = x2**2
- * r10 = 45 * r9
- * r11 = r10 * y3 # <<<<<<<<<<<<<<
- * r12 = x3**2
- * r13 = r12 * y2
- */
- __pyx_v_r11 = (__pyx_v_r10 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":465
- * r10 = 45 * r9
- * r11 = r10 * y3
- * r12 = x3**2 # <<<<<<<<<<<<<<
- * r13 = r12 * y2
- * r14 = r12 * y3
- */
- __pyx_v_r12 = pow(__pyx_v_x3, 2.0);
- /* "fontTools/pens/momentsPen.py":466
- * r11 = r10 * y3
- * r12 = x3**2
- * r13 = r12 * y2 # <<<<<<<<<<<<<<
- * r14 = r12 * y3
- * r15 = 7 * y3
- */
- __pyx_v_r13 = (__pyx_v_r12 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":467
- * r12 = x3**2
- * r13 = r12 * y2
- * r14 = r12 * y3 # <<<<<<<<<<<<<<
- * r15 = 7 * y3
- * r16 = 15 * x3
- */
- __pyx_v_r14 = (__pyx_v_r12 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":468
- * r13 = r12 * y2
- * r14 = r12 * y3
- * r15 = 7 * y3 # <<<<<<<<<<<<<<
- * r16 = 15 * x3
- * r17 = r16 * x2
- */
- __pyx_v_r15 = (7.0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":469
- * r14 = r12 * y3
- * r15 = 7 * y3
- * r16 = 15 * x3 # <<<<<<<<<<<<<<
- * r17 = r16 * x2
- * r18 = x1**2
- */
- __pyx_v_r16 = (15.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":470
- * r15 = 7 * y3
- * r16 = 15 * x3
- * r17 = r16 * x2 # <<<<<<<<<<<<<<
- * r18 = x1**2
- * r19 = 9 * r18
- */
- __pyx_v_r17 = (__pyx_v_r16 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":471
- * r16 = 15 * x3
- * r17 = r16 * x2
- * r18 = x1**2 # <<<<<<<<<<<<<<
- * r19 = 9 * r18
- * r20 = x0**2
- */
- __pyx_v_r18 = pow(__pyx_v_x1, 2.0);
- /* "fontTools/pens/momentsPen.py":472
- * r17 = r16 * x2
- * r18 = x1**2
- * r19 = 9 * r18 # <<<<<<<<<<<<<<
- * r20 = x0**2
- * r21 = 21 * y1
- */
- __pyx_v_r19 = (9.0 * __pyx_v_r18);
- /* "fontTools/pens/momentsPen.py":473
- * r18 = x1**2
- * r19 = 9 * r18
- * r20 = x0**2 # <<<<<<<<<<<<<<
- * r21 = 21 * y1
- * r22 = 9 * r9
- */
- __pyx_v_r20 = pow(__pyx_v_x0, 2.0);
- /* "fontTools/pens/momentsPen.py":474
- * r19 = 9 * r18
- * r20 = x0**2
- * r21 = 21 * y1 # <<<<<<<<<<<<<<
- * r22 = 9 * r9
- * r23 = r7 * x3
- */
- __pyx_v_r21 = (21.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":475
- * r20 = x0**2
- * r21 = 21 * y1
- * r22 = 9 * r9 # <<<<<<<<<<<<<<
- * r23 = r7 * x3
- * r24 = 9 * y2
- */
- __pyx_v_r22 = (9.0 * __pyx_v_r9);
- /* "fontTools/pens/momentsPen.py":476
- * r21 = 21 * y1
- * r22 = 9 * r9
- * r23 = r7 * x3 # <<<<<<<<<<<<<<
- * r24 = 9 * y2
- * r25 = r24 * x2 + r3
- */
- __pyx_v_r23 = (__pyx_v_r7 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":477
- * r22 = 9 * r9
- * r23 = r7 * x3
- * r24 = 9 * y2 # <<<<<<<<<<<<<<
- * r25 = r24 * x2 + r3
- * r26 = 9 * x2
- */
- __pyx_v_r24 = (9.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":478
- * r23 = r7 * x3
- * r24 = 9 * y2
- * r25 = r24 * x2 + r3 # <<<<<<<<<<<<<<
- * r26 = 9 * x2
- * r27 = x2 * y3
- */
- __pyx_v_r25 = ((__pyx_v_r24 * __pyx_v_x2) + __pyx_v_r3);
- /* "fontTools/pens/momentsPen.py":479
- * r24 = 9 * y2
- * r25 = r24 * x2 + r3
- * r26 = 9 * x2 # <<<<<<<<<<<<<<
- * r27 = x2 * y3
- * r28 = -r26 * y1 + 15 * r27
- */
- __pyx_v_r26 = (9.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":480
- * r25 = r24 * x2 + r3
- * r26 = 9 * x2
- * r27 = x2 * y3 # <<<<<<<<<<<<<<
- * r28 = -r26 * y1 + 15 * r27
- * r29 = 3 * x1
- */
- __pyx_v_r27 = (__pyx_v_x2 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":481
- * r26 = 9 * x2
- * r27 = x2 * y3
- * r28 = -r26 * y1 + 15 * r27 # <<<<<<<<<<<<<<
- * r29 = 3 * x1
- * r30 = 45 * x1
- */
- __pyx_v_r28 = (((-__pyx_v_r26) * __pyx_v_y1) + (15.0 * __pyx_v_r27));
- /* "fontTools/pens/momentsPen.py":482
- * r27 = x2 * y3
- * r28 = -r26 * y1 + 15 * r27
- * r29 = 3 * x1 # <<<<<<<<<<<<<<
- * r30 = 45 * x1
- * r31 = 12 * x3
- */
- __pyx_v_r29 = (3.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":483
- * r28 = -r26 * y1 + 15 * r27
- * r29 = 3 * x1
- * r30 = 45 * x1 # <<<<<<<<<<<<<<
- * r31 = 12 * x3
- * r32 = 45 * r18
- */
- __pyx_v_r30 = (45.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":484
- * r29 = 3 * x1
- * r30 = 45 * x1
- * r31 = 12 * x3 # <<<<<<<<<<<<<<
- * r32 = 45 * r18
- * r33 = 5 * r12
- */
- __pyx_v_r31 = (12.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":485
- * r30 = 45 * x1
- * r31 = 12 * x3
- * r32 = 45 * r18 # <<<<<<<<<<<<<<
- * r33 = 5 * r12
- * r34 = r8 * x3
- */
- __pyx_v_r32 = (45.0 * __pyx_v_r18);
- /* "fontTools/pens/momentsPen.py":486
- * r31 = 12 * x3
- * r32 = 45 * r18
- * r33 = 5 * r12 # <<<<<<<<<<<<<<
- * r34 = r8 * x3
- * r35 = 105 * y0
- */
- __pyx_v_r33 = (5.0 * __pyx_v_r12);
- /* "fontTools/pens/momentsPen.py":487
- * r32 = 45 * r18
- * r33 = 5 * r12
- * r34 = r8 * x3 # <<<<<<<<<<<<<<
- * r35 = 105 * y0
- * r36 = 30 * y0
- */
- __pyx_v_r34 = (__pyx_v_r8 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":488
- * r33 = 5 * r12
- * r34 = r8 * x3
- * r35 = 105 * y0 # <<<<<<<<<<<<<<
- * r36 = 30 * y0
- * r37 = r36 * x2
- */
- __pyx_v_r35 = (105.0 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":489
- * r34 = r8 * x3
- * r35 = 105 * y0
- * r36 = 30 * y0 # <<<<<<<<<<<<<<
- * r37 = r36 * x2
- * r38 = 5 * x3
- */
- __pyx_v_r36 = (30.0 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":490
- * r35 = 105 * y0
- * r36 = 30 * y0
- * r37 = r36 * x2 # <<<<<<<<<<<<<<
- * r38 = 5 * x3
- * r39 = 15 * y3
- */
- __pyx_v_r37 = (__pyx_v_r36 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":491
- * r36 = 30 * y0
- * r37 = r36 * x2
- * r38 = 5 * x3 # <<<<<<<<<<<<<<
- * r39 = 15 * y3
- * r40 = 5 * y3
- */
- __pyx_v_r38 = (5.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":492
- * r37 = r36 * x2
- * r38 = 5 * x3
- * r39 = 15 * y3 # <<<<<<<<<<<<<<
- * r40 = 5 * y3
- * r41 = r40 * x3
- */
- __pyx_v_r39 = (15.0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":493
- * r38 = 5 * x3
- * r39 = 15 * y3
- * r40 = 5 * y3 # <<<<<<<<<<<<<<
- * r41 = r40 * x3
- * r42 = x2 * y2
- */
- __pyx_v_r40 = (5.0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":494
- * r39 = 15 * y3
- * r40 = 5 * y3
- * r41 = r40 * x3 # <<<<<<<<<<<<<<
- * r42 = x2 * y2
- * r43 = 18 * r42
- */
- __pyx_v_r41 = (__pyx_v_r40 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":495
- * r40 = 5 * y3
- * r41 = r40 * x3
- * r42 = x2 * y2 # <<<<<<<<<<<<<<
- * r43 = 18 * r42
- * r44 = 45 * y1
- */
- __pyx_v_r42 = (__pyx_v_x2 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":496
- * r41 = r40 * x3
- * r42 = x2 * y2
- * r43 = 18 * r42 # <<<<<<<<<<<<<<
- * r44 = 45 * y1
- * r45 = r41 + r43 + r44 * x1
- */
- __pyx_v_r43 = (18.0 * __pyx_v_r42);
- /* "fontTools/pens/momentsPen.py":497
- * r42 = x2 * y2
- * r43 = 18 * r42
- * r44 = 45 * y1 # <<<<<<<<<<<<<<
- * r45 = r41 + r43 + r44 * x1
- * r46 = y2 * y3
- */
- __pyx_v_r44 = (45.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":498
- * r43 = 18 * r42
- * r44 = 45 * y1
- * r45 = r41 + r43 + r44 * x1 # <<<<<<<<<<<<<<
- * r46 = y2 * y3
- * r47 = r46 * x3
- */
- __pyx_v_r45 = ((__pyx_v_r41 + __pyx_v_r43) + (__pyx_v_r44 * __pyx_v_x1));
- /* "fontTools/pens/momentsPen.py":499
- * r44 = 45 * y1
- * r45 = r41 + r43 + r44 * x1
- * r46 = y2 * y3 # <<<<<<<<<<<<<<
- * r47 = r46 * x3
- * r48 = y2**2
- */
- __pyx_v_r46 = (__pyx_v_y2 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":500
- * r45 = r41 + r43 + r44 * x1
- * r46 = y2 * y3
- * r47 = r46 * x3 # <<<<<<<<<<<<<<
- * r48 = y2**2
- * r49 = 45 * r48
- */
- __pyx_v_r47 = (__pyx_v_r46 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":501
- * r46 = y2 * y3
- * r47 = r46 * x3
- * r48 = y2**2 # <<<<<<<<<<<<<<
- * r49 = 45 * r48
- * r50 = r49 * x3
- */
- __pyx_v_r48 = pow(__pyx_v_y2, 2.0);
- /* "fontTools/pens/momentsPen.py":502
- * r47 = r46 * x3
- * r48 = y2**2
- * r49 = 45 * r48 # <<<<<<<<<<<<<<
- * r50 = r49 * x3
- * r51 = y3**2
- */
- __pyx_v_r49 = (45.0 * __pyx_v_r48);
- /* "fontTools/pens/momentsPen.py":503
- * r48 = y2**2
- * r49 = 45 * r48
- * r50 = r49 * x3 # <<<<<<<<<<<<<<
- * r51 = y3**2
- * r52 = r51 * x3
- */
- __pyx_v_r50 = (__pyx_v_r49 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":504
- * r49 = 45 * r48
- * r50 = r49 * x3
- * r51 = y3**2 # <<<<<<<<<<<<<<
- * r52 = r51 * x3
- * r53 = y1**2
- */
- __pyx_v_r51 = pow(__pyx_v_y3, 2.0);
- /* "fontTools/pens/momentsPen.py":505
- * r50 = r49 * x3
- * r51 = y3**2
- * r52 = r51 * x3 # <<<<<<<<<<<<<<
- * r53 = y1**2
- * r54 = 9 * r53
- */
- __pyx_v_r52 = (__pyx_v_r51 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":506
- * r51 = y3**2
- * r52 = r51 * x3
- * r53 = y1**2 # <<<<<<<<<<<<<<
- * r54 = 9 * r53
- * r55 = y0**2
- */
- __pyx_v_r53 = pow(__pyx_v_y1, 2.0);
- /* "fontTools/pens/momentsPen.py":507
- * r52 = r51 * x3
- * r53 = y1**2
- * r54 = 9 * r53 # <<<<<<<<<<<<<<
- * r55 = y0**2
- * r56 = 21 * x1
- */
- __pyx_v_r54 = (9.0 * __pyx_v_r53);
- /* "fontTools/pens/momentsPen.py":508
- * r53 = y1**2
- * r54 = 9 * r53
- * r55 = y0**2 # <<<<<<<<<<<<<<
- * r56 = 21 * x1
- * r57 = 6 * x2
- */
- __pyx_v_r55 = pow(__pyx_v_y0, 2.0);
- /* "fontTools/pens/momentsPen.py":509
- * r54 = 9 * r53
- * r55 = y0**2
- * r56 = 21 * x1 # <<<<<<<<<<<<<<
- * r57 = 6 * x2
- * r58 = r16 * y2
- */
- __pyx_v_r56 = (21.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":510
- * r55 = y0**2
- * r56 = 21 * x1
- * r57 = 6 * x2 # <<<<<<<<<<<<<<
- * r58 = r16 * y2
- * r59 = r39 * y2
- */
- __pyx_v_r57 = (6.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":511
- * r56 = 21 * x1
- * r57 = 6 * x2
- * r58 = r16 * y2 # <<<<<<<<<<<<<<
- * r59 = r39 * y2
- * r60 = 9 * r48
- */
- __pyx_v_r58 = (__pyx_v_r16 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":512
- * r57 = 6 * x2
- * r58 = r16 * y2
- * r59 = r39 * y2 # <<<<<<<<<<<<<<
- * r60 = 9 * r48
- * r61 = r6 * y3
- */
- __pyx_v_r59 = (__pyx_v_r39 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":513
- * r58 = r16 * y2
- * r59 = r39 * y2
- * r60 = 9 * r48 # <<<<<<<<<<<<<<
- * r61 = r6 * y3
- * r62 = 3 * y3
- */
- __pyx_v_r60 = (9.0 * __pyx_v_r48);
- /* "fontTools/pens/momentsPen.py":514
- * r59 = r39 * y2
- * r60 = 9 * r48
- * r61 = r6 * y3 # <<<<<<<<<<<<<<
- * r62 = 3 * y3
- * r63 = r36 * y2
- */
- __pyx_v_r61 = (__pyx_v_r6 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":515
- * r60 = 9 * r48
- * r61 = r6 * y3
- * r62 = 3 * y3 # <<<<<<<<<<<<<<
- * r63 = r36 * y2
- * r64 = y1 * y3
- */
- __pyx_v_r62 = (3.0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":516
- * r61 = r6 * y3
- * r62 = 3 * y3
- * r63 = r36 * y2 # <<<<<<<<<<<<<<
- * r64 = y1 * y3
- * r65 = 45 * r53
- */
- __pyx_v_r63 = (__pyx_v_r36 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":517
- * r62 = 3 * y3
- * r63 = r36 * y2
- * r64 = y1 * y3 # <<<<<<<<<<<<<<
- * r65 = 45 * r53
- * r66 = 5 * r51
- */
- __pyx_v_r64 = (__pyx_v_y1 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":518
- * r63 = r36 * y2
- * r64 = y1 * y3
- * r65 = 45 * r53 # <<<<<<<<<<<<<<
- * r66 = 5 * r51
- * r67 = x2**3
- */
- __pyx_v_r65 = (45.0 * __pyx_v_r53);
- /* "fontTools/pens/momentsPen.py":519
- * r64 = y1 * y3
- * r65 = 45 * r53
- * r66 = 5 * r51 # <<<<<<<<<<<<<<
- * r67 = x2**3
- * r68 = x3**3
- */
- __pyx_v_r66 = (5.0 * __pyx_v_r51);
- /* "fontTools/pens/momentsPen.py":520
- * r65 = 45 * r53
- * r66 = 5 * r51
- * r67 = x2**3 # <<<<<<<<<<<<<<
- * r68 = x3**3
- * r69 = 630 * y2
- */
- __pyx_v_r67 = pow(__pyx_v_x2, 3.0);
- /* "fontTools/pens/momentsPen.py":521
- * r66 = 5 * r51
- * r67 = x2**3
- * r68 = x3**3 # <<<<<<<<<<<<<<
- * r69 = 630 * y2
- * r70 = 126 * x3
- */
- __pyx_v_r68 = pow(__pyx_v_x3, 3.0);
- /* "fontTools/pens/momentsPen.py":522
- * r67 = x2**3
- * r68 = x3**3
- * r69 = 630 * y2 # <<<<<<<<<<<<<<
- * r70 = 126 * x3
- * r71 = x1**3
- */
- __pyx_v_r69 = (630.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":523
- * r68 = x3**3
- * r69 = 630 * y2
- * r70 = 126 * x3 # <<<<<<<<<<<<<<
- * r71 = x1**3
- * r72 = 126 * x2
- */
- __pyx_v_r70 = (126.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":524
- * r69 = 630 * y2
- * r70 = 126 * x3
- * r71 = x1**3 # <<<<<<<<<<<<<<
- * r72 = 126 * x2
- * r73 = 63 * r9
- */
- __pyx_v_r71 = pow(__pyx_v_x1, 3.0);
- /* "fontTools/pens/momentsPen.py":525
- * r70 = 126 * x3
- * r71 = x1**3
- * r72 = 126 * x2 # <<<<<<<<<<<<<<
- * r73 = 63 * r9
- * r74 = r73 * x3
- */
- __pyx_v_r72 = (126.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":526
- * r71 = x1**3
- * r72 = 126 * x2
- * r73 = 63 * r9 # <<<<<<<<<<<<<<
- * r74 = r73 * x3
- * r75 = r15 * x3 + 15 * r42
- */
- __pyx_v_r73 = (63.0 * __pyx_v_r9);
- /* "fontTools/pens/momentsPen.py":527
- * r72 = 126 * x2
- * r73 = 63 * r9
- * r74 = r73 * x3 # <<<<<<<<<<<<<<
- * r75 = r15 * x3 + 15 * r42
- * r76 = 630 * x1
- */
- __pyx_v_r74 = (__pyx_v_r73 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":528
- * r73 = 63 * r9
- * r74 = r73 * x3
- * r75 = r15 * x3 + 15 * r42 # <<<<<<<<<<<<<<
- * r76 = 630 * x1
- * r77 = 14 * x3
- */
- __pyx_v_r75 = ((__pyx_v_r15 * __pyx_v_x3) + (15.0 * __pyx_v_r42));
- /* "fontTools/pens/momentsPen.py":529
- * r74 = r73 * x3
- * r75 = r15 * x3 + 15 * r42
- * r76 = 630 * x1 # <<<<<<<<<<<<<<
- * r77 = 14 * x3
- * r78 = 21 * r27
- */
- __pyx_v_r76 = (630.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":530
- * r75 = r15 * x3 + 15 * r42
- * r76 = 630 * x1
- * r77 = 14 * x3 # <<<<<<<<<<<<<<
- * r78 = 21 * r27
- * r79 = 42 * x1
- */
- __pyx_v_r77 = (14.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":531
- * r76 = 630 * x1
- * r77 = 14 * x3
- * r78 = 21 * r27 # <<<<<<<<<<<<<<
- * r79 = 42 * x1
- * r80 = 42 * x2
- */
- __pyx_v_r78 = (21.0 * __pyx_v_r27);
- /* "fontTools/pens/momentsPen.py":532
- * r77 = 14 * x3
- * r78 = 21 * r27
- * r79 = 42 * x1 # <<<<<<<<<<<<<<
- * r80 = 42 * x2
- * r81 = x1 * y2
- */
- __pyx_v_r79 = (42.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":533
- * r78 = 21 * r27
- * r79 = 42 * x1
- * r80 = 42 * x2 # <<<<<<<<<<<<<<
- * r81 = x1 * y2
- * r82 = 63 * r42
- */
- __pyx_v_r80 = (42.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":534
- * r79 = 42 * x1
- * r80 = 42 * x2
- * r81 = x1 * y2 # <<<<<<<<<<<<<<
- * r82 = 63 * r42
- * r83 = x1 * y1
- */
- __pyx_v_r81 = (__pyx_v_x1 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":535
- * r80 = 42 * x2
- * r81 = x1 * y2
- * r82 = 63 * r42 # <<<<<<<<<<<<<<
- * r83 = x1 * y1
- * r84 = r41 + r82 + 378 * r83
- */
- __pyx_v_r82 = (63.0 * __pyx_v_r42);
- /* "fontTools/pens/momentsPen.py":536
- * r81 = x1 * y2
- * r82 = 63 * r42
- * r83 = x1 * y1 # <<<<<<<<<<<<<<
- * r84 = r41 + r82 + 378 * r83
- * r85 = x2 * x3
- */
- __pyx_v_r83 = (__pyx_v_x1 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":537
- * r82 = 63 * r42
- * r83 = x1 * y1
- * r84 = r41 + r82 + 378 * r83 # <<<<<<<<<<<<<<
- * r85 = x2 * x3
- * r86 = r85 * y1
- */
- __pyx_v_r84 = ((__pyx_v_r41 + __pyx_v_r82) + (378.0 * __pyx_v_r83));
- /* "fontTools/pens/momentsPen.py":538
- * r83 = x1 * y1
- * r84 = r41 + r82 + 378 * r83
- * r85 = x2 * x3 # <<<<<<<<<<<<<<
- * r86 = r85 * y1
- * r87 = r27 * x3
- */
- __pyx_v_r85 = (__pyx_v_x2 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":539
- * r84 = r41 + r82 + 378 * r83
- * r85 = x2 * x3
- * r86 = r85 * y1 # <<<<<<<<<<<<<<
- * r87 = r27 * x3
- * r88 = 27 * r9
- */
- __pyx_v_r86 = (__pyx_v_r85 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":540
- * r85 = x2 * x3
- * r86 = r85 * y1
- * r87 = r27 * x3 # <<<<<<<<<<<<<<
- * r88 = 27 * r9
- * r89 = r88 * y2
- */
- __pyx_v_r87 = (__pyx_v_r27 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":541
- * r86 = r85 * y1
- * r87 = r27 * x3
- * r88 = 27 * r9 # <<<<<<<<<<<<<<
- * r89 = r88 * y2
- * r90 = 42 * r14
- */
- __pyx_v_r88 = (27.0 * __pyx_v_r9);
- /* "fontTools/pens/momentsPen.py":542
- * r87 = r27 * x3
- * r88 = 27 * r9
- * r89 = r88 * y2 # <<<<<<<<<<<<<<
- * r90 = 42 * r14
- * r91 = 90 * x1
- */
- __pyx_v_r89 = (__pyx_v_r88 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":543
- * r88 = 27 * r9
- * r89 = r88 * y2
- * r90 = 42 * r14 # <<<<<<<<<<<<<<
- * r91 = 90 * x1
- * r92 = 189 * r18
- */
- __pyx_v_r90 = (42.0 * __pyx_v_r14);
- /* "fontTools/pens/momentsPen.py":544
- * r89 = r88 * y2
- * r90 = 42 * r14
- * r91 = 90 * x1 # <<<<<<<<<<<<<<
- * r92 = 189 * r18
- * r93 = 378 * r18
- */
- __pyx_v_r91 = (90.0 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":545
- * r90 = 42 * r14
- * r91 = 90 * x1
- * r92 = 189 * r18 # <<<<<<<<<<<<<<
- * r93 = 378 * r18
- * r94 = r12 * y1
- */
- __pyx_v_r92 = (189.0 * __pyx_v_r18);
- /* "fontTools/pens/momentsPen.py":546
- * r91 = 90 * x1
- * r92 = 189 * r18
- * r93 = 378 * r18 # <<<<<<<<<<<<<<
- * r94 = r12 * y1
- * r95 = 252 * x1 * x2
- */
- __pyx_v_r93 = (378.0 * __pyx_v_r18);
- /* "fontTools/pens/momentsPen.py":547
- * r92 = 189 * r18
- * r93 = 378 * r18
- * r94 = r12 * y1 # <<<<<<<<<<<<<<
- * r95 = 252 * x1 * x2
- * r96 = r79 * x3
- */
- __pyx_v_r94 = (__pyx_v_r12 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":548
- * r93 = 378 * r18
- * r94 = r12 * y1
- * r95 = 252 * x1 * x2 # <<<<<<<<<<<<<<
- * r96 = r79 * x3
- * r97 = 30 * r85
- */
- __pyx_v_r95 = ((252.0 * __pyx_v_x1) * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":549
- * r94 = r12 * y1
- * r95 = 252 * x1 * x2
- * r96 = r79 * x3 # <<<<<<<<<<<<<<
- * r97 = 30 * r85
- * r98 = r83 * x3
- */
- __pyx_v_r96 = (__pyx_v_r79 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":550
- * r95 = 252 * x1 * x2
- * r96 = r79 * x3
- * r97 = 30 * r85 # <<<<<<<<<<<<<<
- * r98 = r83 * x3
- * r99 = 30 * x3
- */
- __pyx_v_r97 = (30.0 * __pyx_v_r85);
- /* "fontTools/pens/momentsPen.py":551
- * r96 = r79 * x3
- * r97 = 30 * r85
- * r98 = r83 * x3 # <<<<<<<<<<<<<<
- * r99 = 30 * x3
- * r100 = 42 * x3
- */
- __pyx_v_r98 = (__pyx_v_r83 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":552
- * r97 = 30 * r85
- * r98 = r83 * x3
- * r99 = 30 * x3 # <<<<<<<<<<<<<<
- * r100 = 42 * x3
- * r101 = r42 * x1
- */
- __pyx_v_r99 = (30.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":553
- * r98 = r83 * x3
- * r99 = 30 * x3
- * r100 = 42 * x3 # <<<<<<<<<<<<<<
- * r101 = r42 * x1
- * r102 = r10 * y2 + 14 * r14 + 126 * r18 * y1 + r81 * r99
- */
- __pyx_v_r100 = (42.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":554
- * r99 = 30 * x3
- * r100 = 42 * x3
- * r101 = r42 * x1 # <<<<<<<<<<<<<<
- * r102 = r10 * y2 + 14 * r14 + 126 * r18 * y1 + r81 * r99
- * r103 = 378 * r48
- */
- __pyx_v_r101 = (__pyx_v_r42 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":555
- * r100 = 42 * x3
- * r101 = r42 * x1
- * r102 = r10 * y2 + 14 * r14 + 126 * r18 * y1 + r81 * r99 # <<<<<<<<<<<<<<
- * r103 = 378 * r48
- * r104 = 18 * y1
- */
- __pyx_v_r102 = ((((__pyx_v_r10 * __pyx_v_y2) + (14.0 * __pyx_v_r14)) + ((126.0 * __pyx_v_r18) * __pyx_v_y1)) + (__pyx_v_r81 * __pyx_v_r99));
- /* "fontTools/pens/momentsPen.py":556
- * r101 = r42 * x1
- * r102 = r10 * y2 + 14 * r14 + 126 * r18 * y1 + r81 * r99
- * r103 = 378 * r48 # <<<<<<<<<<<<<<
- * r104 = 18 * y1
- * r105 = r104 * y2
- */
- __pyx_v_r103 = (378.0 * __pyx_v_r48);
- /* "fontTools/pens/momentsPen.py":557
- * r102 = r10 * y2 + 14 * r14 + 126 * r18 * y1 + r81 * r99
- * r103 = 378 * r48
- * r104 = 18 * y1 # <<<<<<<<<<<<<<
- * r105 = r104 * y2
- * r106 = y0 * y1
- */
- __pyx_v_r104 = (18.0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":558
- * r103 = 378 * r48
- * r104 = 18 * y1
- * r105 = r104 * y2 # <<<<<<<<<<<<<<
- * r106 = y0 * y1
- * r107 = 252 * y2
- */
- __pyx_v_r105 = (__pyx_v_r104 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":559
- * r104 = 18 * y1
- * r105 = r104 * y2
- * r106 = y0 * y1 # <<<<<<<<<<<<<<
- * r107 = 252 * y2
- * r108 = r107 * y0
- */
- __pyx_v_r106 = (__pyx_v_y0 * __pyx_v_y1);
- /* "fontTools/pens/momentsPen.py":560
- * r105 = r104 * y2
- * r106 = y0 * y1
- * r107 = 252 * y2 # <<<<<<<<<<<<<<
- * r108 = r107 * y0
- * r109 = y0 * y3
- */
- __pyx_v_r107 = (252.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":561
- * r106 = y0 * y1
- * r107 = 252 * y2
- * r108 = r107 * y0 # <<<<<<<<<<<<<<
- * r109 = y0 * y3
- * r110 = 42 * r64
- */
- __pyx_v_r108 = (__pyx_v_r107 * __pyx_v_y0);
- /* "fontTools/pens/momentsPen.py":562
- * r107 = 252 * y2
- * r108 = r107 * y0
- * r109 = y0 * y3 # <<<<<<<<<<<<<<
- * r110 = 42 * r64
- * r111 = 378 * r53
- */
- __pyx_v_r109 = (__pyx_v_y0 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":563
- * r108 = r107 * y0
- * r109 = y0 * y3
- * r110 = 42 * r64 # <<<<<<<<<<<<<<
- * r111 = 378 * r53
- * r112 = 63 * r48
- */
- __pyx_v_r110 = (42.0 * __pyx_v_r64);
- /* "fontTools/pens/momentsPen.py":564
- * r109 = y0 * y3
- * r110 = 42 * r64
- * r111 = 378 * r53 # <<<<<<<<<<<<<<
- * r112 = 63 * r48
- * r113 = 27 * x2
- */
- __pyx_v_r111 = (378.0 * __pyx_v_r53);
- /* "fontTools/pens/momentsPen.py":565
- * r110 = 42 * r64
- * r111 = 378 * r53
- * r112 = 63 * r48 # <<<<<<<<<<<<<<
- * r113 = 27 * x2
- * r114 = r27 * y2
- */
- __pyx_v_r112 = (63.0 * __pyx_v_r48);
- /* "fontTools/pens/momentsPen.py":566
- * r111 = 378 * r53
- * r112 = 63 * r48
- * r113 = 27 * x2 # <<<<<<<<<<<<<<
- * r114 = r27 * y2
- * r115 = r113 * r48 + 42 * r52
- */
- __pyx_v_r113 = (27.0 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":567
- * r112 = 63 * r48
- * r113 = 27 * x2
- * r114 = r27 * y2 # <<<<<<<<<<<<<<
- * r115 = r113 * r48 + 42 * r52
- * r116 = x3 * y3
- */
- __pyx_v_r114 = (__pyx_v_r27 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":568
- * r113 = 27 * x2
- * r114 = r27 * y2
- * r115 = r113 * r48 + 42 * r52 # <<<<<<<<<<<<<<
- * r116 = x3 * y3
- * r117 = 54 * r42
- */
- __pyx_v_r115 = ((__pyx_v_r113 * __pyx_v_r48) + (42.0 * __pyx_v_r52));
- /* "fontTools/pens/momentsPen.py":569
- * r114 = r27 * y2
- * r115 = r113 * r48 + 42 * r52
- * r116 = x3 * y3 # <<<<<<<<<<<<<<
- * r117 = 54 * r42
- * r118 = r51 * x1
- */
- __pyx_v_r116 = (__pyx_v_x3 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":570
- * r115 = r113 * r48 + 42 * r52
- * r116 = x3 * y3
- * r117 = 54 * r42 # <<<<<<<<<<<<<<
- * r118 = r51 * x1
- * r119 = r51 * x2
- */
- __pyx_v_r117 = (54.0 * __pyx_v_r42);
- /* "fontTools/pens/momentsPen.py":571
- * r116 = x3 * y3
- * r117 = 54 * r42
- * r118 = r51 * x1 # <<<<<<<<<<<<<<
- * r119 = r51 * x2
- * r120 = r48 * x1
- */
- __pyx_v_r118 = (__pyx_v_r51 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":572
- * r117 = 54 * r42
- * r118 = r51 * x1
- * r119 = r51 * x2 # <<<<<<<<<<<<<<
- * r120 = r48 * x1
- * r121 = 21 * x3
- */
- __pyx_v_r119 = (__pyx_v_r51 * __pyx_v_x2);
- /* "fontTools/pens/momentsPen.py":573
- * r118 = r51 * x1
- * r119 = r51 * x2
- * r120 = r48 * x1 # <<<<<<<<<<<<<<
- * r121 = 21 * x3
- * r122 = r64 * x1
- */
- __pyx_v_r120 = (__pyx_v_r48 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":574
- * r119 = r51 * x2
- * r120 = r48 * x1
- * r121 = 21 * x3 # <<<<<<<<<<<<<<
- * r122 = r64 * x1
- * r123 = r81 * y3
- */
- __pyx_v_r121 = (21.0 * __pyx_v_x3);
- /* "fontTools/pens/momentsPen.py":575
- * r120 = r48 * x1
- * r121 = 21 * x3
- * r122 = r64 * x1 # <<<<<<<<<<<<<<
- * r123 = r81 * y3
- * r124 = 30 * r27 * y1 + r49 * x2 + 14 * r52 + 126 * r53 * x1
- */
- __pyx_v_r122 = (__pyx_v_r64 * __pyx_v_x1);
- /* "fontTools/pens/momentsPen.py":576
- * r121 = 21 * x3
- * r122 = r64 * x1
- * r123 = r81 * y3 # <<<<<<<<<<<<<<
- * r124 = 30 * r27 * y1 + r49 * x2 + 14 * r52 + 126 * r53 * x1
- * r125 = y2**3
- */
- __pyx_v_r123 = (__pyx_v_r81 * __pyx_v_y3);
- /* "fontTools/pens/momentsPen.py":577
- * r122 = r64 * x1
- * r123 = r81 * y3
- * r124 = 30 * r27 * y1 + r49 * x2 + 14 * r52 + 126 * r53 * x1 # <<<<<<<<<<<<<<
- * r125 = y2**3
- * r126 = y3**3
- */
- __pyx_v_r124 = (((((30.0 * __pyx_v_r27) * __pyx_v_y1) + (__pyx_v_r49 * __pyx_v_x2)) + (14.0 * __pyx_v_r52)) + ((126.0 * __pyx_v_r53) * __pyx_v_x1));
- /* "fontTools/pens/momentsPen.py":578
- * r123 = r81 * y3
- * r124 = 30 * r27 * y1 + r49 * x2 + 14 * r52 + 126 * r53 * x1
- * r125 = y2**3 # <<<<<<<<<<<<<<
- * r126 = y3**3
- * r127 = y1**3
- */
- __pyx_v_r125 = pow(__pyx_v_y2, 3.0);
- /* "fontTools/pens/momentsPen.py":579
- * r124 = 30 * r27 * y1 + r49 * x2 + 14 * r52 + 126 * r53 * x1
- * r125 = y2**3
- * r126 = y3**3 # <<<<<<<<<<<<<<
- * r127 = y1**3
- * r128 = y0**3
- */
- __pyx_v_r126 = pow(__pyx_v_y3, 3.0);
- /* "fontTools/pens/momentsPen.py":580
- * r125 = y2**3
- * r126 = y3**3
- * r127 = y1**3 # <<<<<<<<<<<<<<
- * r128 = y0**3
- * r129 = r51 * y2
- */
- __pyx_v_r127 = pow(__pyx_v_y1, 3.0);
- /* "fontTools/pens/momentsPen.py":581
- * r126 = y3**3
- * r127 = y1**3
- * r128 = y0**3 # <<<<<<<<<<<<<<
- * r129 = r51 * y2
- * r130 = r112 * y3 + r21 * r51
- */
- __pyx_v_r128 = pow(__pyx_v_y0, 3.0);
- /* "fontTools/pens/momentsPen.py":582
- * r127 = y1**3
- * r128 = y0**3
- * r129 = r51 * y2 # <<<<<<<<<<<<<<
- * r130 = r112 * y3 + r21 * r51
- * r131 = 189 * r53
- */
- __pyx_v_r129 = (__pyx_v_r51 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":583
- * r128 = y0**3
- * r129 = r51 * y2
- * r130 = r112 * y3 + r21 * r51 # <<<<<<<<<<<<<<
- * r131 = 189 * r53
- * r132 = 90 * y2
- */
- __pyx_v_r130 = ((__pyx_v_r112 * __pyx_v_y3) + (__pyx_v_r21 * __pyx_v_r51));
- /* "fontTools/pens/momentsPen.py":584
- * r129 = r51 * y2
- * r130 = r112 * y3 + r21 * r51
- * r131 = 189 * r53 # <<<<<<<<<<<<<<
- * r132 = 90 * y2
- *
- */
- __pyx_v_r131 = (189.0 * __pyx_v_r53);
- /* "fontTools/pens/momentsPen.py":585
- * r130 = r112 * y3 + r21 * r51
- * r131 = 189 * r53
- * r132 = 90 * y2 # <<<<<<<<<<<<<<
- *
- * self.area += (
- */
- __pyx_v_r132 = (90.0 * __pyx_v_y2);
- /* "fontTools/pens/momentsPen.py":587
- * r132 = 90 * y2
- *
- * self.area += ( # <<<<<<<<<<<<<<
- * -r1 / 20
- * - r3 / 20
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 587, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":594
- * + 3 * x1 * (y2 + y3) / 20
- * + 3 * x2 * y3 / 10
- * - y0 * (r5 + r6 + x3) / 20 # <<<<<<<<<<<<<<
- * )
- * self.momentX += (
- */
- __pyx_t_1 = PyFloat_FromDouble(((((((((-__pyx_v_r1) / 20.0) - (__pyx_v_r3 / 20.0)) - ((__pyx_v_r4 * (__pyx_v_x2 + __pyx_v_x3)) / 20.0)) + ((__pyx_v_x0 * (((__pyx_v_r7 + __pyx_v_r8) + (10.0 * __pyx_v_y0)) + __pyx_v_y3)) / 20.0)) + (((3.0 * __pyx_v_x1) * (__pyx_v_y2 + __pyx_v_y3)) / 20.0)) + (((3.0 * __pyx_v_x2) * __pyx_v_y3) / 10.0)) - ((__pyx_v_y0 * ((__pyx_v_r5 + __pyx_v_r6) + __pyx_v_x3)) / 20.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":587
- * r132 = 90 * y2
- *
- * self.area += ( # <<<<<<<<<<<<<<
- * -r1 / 20
- * - r3 / 20
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_area, __pyx_t_2) < (0)) __PYX_ERR(0, 587, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":596
- * - y0 * (r5 + r6 + x3) / 20
- * )
- * self.momentX += ( # <<<<<<<<<<<<<<
- * r11 / 840
- * - r13 / 8
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":618
- * )
- * / 840
- * - y0 * (r17 + r30 * x2 + r31 * x1 + r32 + r33 + 18 * r9) / 840 # <<<<<<<<<<<<<<
- * )
- * self.momentY += (
- */
- __pyx_t_1 = PyFloat_FromDouble(((((((((((__pyx_v_r11 / 840.0) - (__pyx_v_r13 / 8.0)) - (__pyx_v_r14 / 3.0)) - ((__pyx_v_r17 * ((-__pyx_v_r15) + __pyx_v_r8)) / 840.0)) + ((__pyx_v_r19 * (__pyx_v_r8 + (2.0 * __pyx_v_y3))) / 840.0)) + ((__pyx_v_r20 * (((__pyx_v_r0 + __pyx_v_r21) + (56.0 * __pyx_v_y0)) + __pyx_v_y3)) / 168.0)) + ((__pyx_v_r29 * (((-__pyx_v_r23) + __pyx_v_r25) + __pyx_v_r28)) / 840.0)) - ((__pyx_v_r4 * (((10.0 * __pyx_v_r12) + __pyx_v_r17) + __pyx_v_r22)) / 840.0)) + ((__pyx_v_x0 * (((((((((12.0 * __pyx_v_r27) + (__pyx_v_r30 * __pyx_v_y2)) + __pyx_v_r34) - (__pyx_v_r35 * __pyx_v_x1)) - __pyx_v_r37) - (__pyx_v_r38 * __pyx_v_y0)) + (__pyx_v_r39 * __pyx_v_x1)) - (__pyx_v_r4 * __pyx_v_x3)) + __pyx_v_r45)) / 840.0)) - ((__pyx_v_y0 * (((((__pyx_v_r17 + (__pyx_v_r30 * __pyx_v_x2)) + (__pyx_v_r31 * __pyx_v_x1)) + __pyx_v_r32) + __pyx_v_r33) + (18.0 * __pyx_v_r9))) / 840.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":596
- * - y0 * (r5 + r6 + x3) / 20
- * )
- * self.momentX += ( # <<<<<<<<<<<<<<
- * r11 / 840
- * - r13 / 8
- */
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentX, __pyx_t_4) < (0)) __PYX_ERR(0, 596, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":620
- * - y0 * (r17 + r30 * x2 + r31 * x1 + r32 + r33 + 18 * r9) / 840
- * )
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r4 * (r25 + r58) / 840
- * - r47 / 8
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":643
- * + x1 * (r24 * y1 + 10 * r51 + r59 + r60 + r7 * y3) / 280
- * + x2 * y3 * (r15 + r8) / 56
- * - y0 * (r16 * y1 + r31 * y2 + r44 * x2 + r45 + r61 - r62 * x1) / 840 # <<<<<<<<<<<<<<
- * )
- * self.momentXX += (
- */
- __pyx_t_1 = PyFloat_FromDouble(((((((((((((-__pyx_v_r4) * (__pyx_v_r25 + __pyx_v_r58)) / 840.0) - (__pyx_v_r47 / 8.0)) - (__pyx_v_r50 / 840.0)) - (__pyx_v_r52 / 6.0)) - ((__pyx_v_r54 * (__pyx_v_r6 + (2.0 * __pyx_v_x3))) / 840.0)) - ((__pyx_v_r55 * ((__pyx_v_r56 + __pyx_v_r57) + __pyx_v_x3)) / 168.0)) + ((__pyx_v_x0 * ((((((((((__pyx_v_r35 * __pyx_v_y1) + (__pyx_v_r40 * __pyx_v_y0)) + (__pyx_v_r44 * __pyx_v_y2)) + (18.0 * __pyx_v_r48)) + (140.0 * __pyx_v_r55)) + __pyx_v_r59) + __pyx_v_r63) + (12.0 * __pyx_v_r64)) + __pyx_v_r65) + __pyx_v_r66)) / 840.0)) + ((__pyx_v_x1 * (((((__pyx_v_r24 * __pyx_v_y1) + (10.0 * __pyx_v_r51)) + __pyx_v_r59) + __pyx_v_r60) + (__pyx_v_r7 * __pyx_v_y3))) / 280.0)) + (((__pyx_v_x2 * __pyx_v_y3) * (__pyx_v_r15 + __pyx_v_r8)) / 56.0)) - ((__pyx_v_y0 * ((((((__pyx_v_r16 * __pyx_v_y1) + (__pyx_v_r31 * __pyx_v_y2)) + (__pyx_v_r44 * __pyx_v_x2)) + __pyx_v_r45) + __pyx_v_r61) - (__pyx_v_r62 * __pyx_v_x1))) / 840.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":620
- * - y0 * (r17 + r30 * x2 + r31 * x1 + r32 + r33 + 18 * r9) / 840
- * )
- * self.momentY += ( # <<<<<<<<<<<<<<
- * -r4 * (r25 + r58) / 840
- * - r47 / 8
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentY, __pyx_t_2) < (0)) __PYX_ERR(0, 620, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":645
- * - y0 * (r16 * y1 + r31 * y2 + r44 * x2 + r45 + r61 - r62 * x1) / 840
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * -r12 * r72 * (-r40 + r8) / 9240
- * + 3 * r18 * (r28 + r34 - r38 * y1 + r75) / 3080
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":703
- * )
- * / 9240
- * - y0 # <<<<<<<<<<<<<<
- * * (
- * r12 * r56
- */
- __pyx_t_1 = PyFloat_FromDouble(((((((((((((((((-__pyx_v_r12) * __pyx_v_r72) * ((-__pyx_v_r40) + __pyx_v_r8)) / 9240.0) + (((3.0 * __pyx_v_r18) * (((__pyx_v_r28 + __pyx_v_r34) - (__pyx_v_r38 * __pyx_v_y1)) + __pyx_v_r75)) / 3080.0)) + ((__pyx_v_r20 * (((((((((__pyx_v_r24 * __pyx_v_x3) - (__pyx_v_r72 * __pyx_v_y0)) - (__pyx_v_r76 * __pyx_v_y0)) - (__pyx_v_r77 * __pyx_v_y0)) + __pyx_v_r78) + (__pyx_v_r79 * __pyx_v_y3)) + (__pyx_v_r80 * __pyx_v_y1)) + (210.0 * __pyx_v_r81)) + __pyx_v_r84)) / 9240.0)) - ((__pyx_v_r29 * ((((((((__pyx_v_r12 * __pyx_v_r21) + (14.0 * __pyx_v_r13)) + (__pyx_v_r44 * __pyx_v_r9)) - (__pyx_v_r73 * __pyx_v_y3)) + (54.0 * __pyx_v_r86)) - (84.0 * __pyx_v_r87)) - __pyx_v_r89) - __pyx_v_r90)) / 9240.0)) - ((__pyx_v_r4 * (((((70.0 * __pyx_v_r12) * __pyx_v_x2) + (27.0 * __pyx_v_r67)) + (42.0 * __pyx_v_r68)) + __pyx_v_r74)) / 9240.0)) + (((3.0 * __pyx_v_r67) * __pyx_v_y3) / 220.0)) - ((__pyx_v_r68 * __pyx_v_r69) / 9240.0)) - ((__pyx_v_r68 * __pyx_v_y3) / 4.0)) - (((__pyx_v_r70 * __pyx_v_r9) * ((-__pyx_v_r62) + __pyx_v_y2)) / 9240.0)) + (((3.0 * __pyx_v_r71) * (__pyx_v_r24 + __pyx_v_r40)) / 3080.0)) + ((pow(__pyx_v_x0, 3.0) * (((__pyx_v_r24 + __pyx_v_r44) + (165.0 * __pyx_v_y0)) + __pyx_v_y3)) / 660.0)) + ((__pyx_v_x0 * (((((((((((((((((((__pyx_v_r100 * __pyx_v_r27) + (162.0 * __pyx_v_r101)) + __pyx_v_r102) + __pyx_v_r11) + ((63.0 * __pyx_v_r18) * __pyx_v_y3)) + (__pyx_v_r27 * __pyx_v_r91)) - (__pyx_v_r33 * __pyx_v_y0)) - (__pyx_v_r37 * __pyx_v_x3)) + (__pyx_v_r43 * __pyx_v_x3)) - (__pyx_v_r73 * __pyx_v_y0)) - (__pyx_v_r88 * __pyx_v_y1)) + (__pyx_v_r92 * __pyx_v_y2)) - (__pyx_v_r93 * __pyx_v_y0)) - (9.0 * __pyx_v_r94)) - (__pyx_v_r95 * __pyx_v_y0)) - (__pyx_v_r96 * __pyx_v_y0)) - (__pyx_v_r97 * __pyx_v_y1)) - (18.0 * __pyx_v_r98)) + ((__pyx_v_r99 * __pyx_v_x1) * __pyx_v_y3))) / 9240.0)) - ((__pyx_v_y0 * ((((((((((__pyx_v_r12 * __pyx_v_r56) + (__pyx_v_r12 * __pyx_v_r80)) + (__pyx_v_r32 * __pyx_v_x3)) + (45.0 * __pyx_v_r67)) + (14.0 * __pyx_v_r68)) + (126.0 * __pyx_v_r71)) + __pyx_v_r74) + (__pyx_v_r85 * __pyx_v_r91)) + ((135.0 * __pyx_v_r9) * __pyx_v_x1)) + (__pyx_v_r92 * __pyx_v_x2))) / 9240.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":645
- * - y0 * (r16 * y1 + r31 * y2 + r44 * x2 + r45 + r61 - r62 * x1) / 840
- * )
- * self.momentXX += ( # <<<<<<<<<<<<<<
- * -r12 * r72 * (-r40 + r8) / 9240
- * + 3 * r18 * (r28 + r34 - r38 * y1 + r75) / 3080
- */
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXX, __pyx_t_4) < (0)) __PYX_ERR(0, 645, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":718
- * / 9240
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * -r103 * r12 / 18480
- * - r12 * r51 / 8
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- /* "fontTools/pens/momentsPen.py":780
- * )
- * / 3080
- * - y0 # <<<<<<<<<<<<<<
- * * (
- * 54 * r101
- */
- __pyx_t_1 = PyFloat_FromDouble((((((((((((((((-__pyx_v_r103) * __pyx_v_r12) / 18480.0) - ((__pyx_v_r12 * __pyx_v_r51) / 8.0)) - (((3.0 * __pyx_v_r14) * __pyx_v_y2) / 44.0)) + (((3.0 * __pyx_v_r18) * ((((__pyx_v_r105 + (__pyx_v_r2 * __pyx_v_y1)) + (18.0 * __pyx_v_r46)) + (15.0 * __pyx_v_r48)) + (7.0 * __pyx_v_r51))) / 6160.0)) + ((__pyx_v_r20 * ((((((((((1260.0 * __pyx_v_r106) + (__pyx_v_r107 * __pyx_v_y1)) + __pyx_v_r108) + (28.0 * __pyx_v_r109)) + __pyx_v_r110) + __pyx_v_r111) + __pyx_v_r112) + (30.0 * __pyx_v_r46)) + (2310.0 * __pyx_v_r55)) + __pyx_v_r66)) / 18480.0)) - ((__pyx_v_r54 * (((7.0 * __pyx_v_r12) + (18.0 * __pyx_v_r85)) + (15.0 * __pyx_v_r9))) / 18480.0)) - ((__pyx_v_r55 * (((((__pyx_v_r33 + __pyx_v_r73) + __pyx_v_r93) + __pyx_v_r95) + __pyx_v_r96) + __pyx_v_r97)) / 18480.0)) - ((__pyx_v_r7 * (((((42.0 * __pyx_v_r13) + (__pyx_v_r82 * __pyx_v_x3)) + (28.0 * __pyx_v_r87)) + __pyx_v_r89) + __pyx_v_r90)) / 18480.0)) - (((3.0 * __pyx_v_r85) * (__pyx_v_r48 - __pyx_v_r66)) / 220.0)) + ((((3.0 * __pyx_v_r9) * __pyx_v_y3) * (__pyx_v_r62 + (2.0 * __pyx_v_y2))) / 440.0)) + ((__pyx_v_x0 * (((((((((((((((((((((((-__pyx_v_r1) * __pyx_v_y0) - ((84.0 * __pyx_v_r106) * __pyx_v_x2)) + (__pyx_v_r109 * __pyx_v_r56)) + (54.0 * __pyx_v_r114)) + (__pyx_v_r117 * __pyx_v_y1)) + (15.0 * __pyx_v_r118)) + (21.0 * __pyx_v_r119)) + (81.0 * __pyx_v_r120)) + (__pyx_v_r121 * __pyx_v_r46)) + (54.0 * __pyx_v_r122)) + (60.0 * __pyx_v_r123)) + __pyx_v_r124) - ((__pyx_v_r21 * __pyx_v_x3) * __pyx_v_y0)) + (__pyx_v_r23 * __pyx_v_y3)) - (__pyx_v_r54 * __pyx_v_x3)) - (__pyx_v_r55 * __pyx_v_r72)) - (__pyx_v_r55 * __pyx_v_r76)) - (__pyx_v_r55 * __pyx_v_r77)) + ((__pyx_v_r57 * __pyx_v_y0) * __pyx_v_y3)) + (__pyx_v_r60 * __pyx_v_x3)) + ((84.0 * __pyx_v_r81) * __pyx_v_y0)) + ((189.0 * __pyx_v_r81) * __pyx_v_y1))) / 9240.0)) + ((__pyx_v_x1 * ((((((((__pyx_v_r104 * __pyx_v_r27) - (__pyx_v_r105 * __pyx_v_x3)) - (__pyx_v_r113 * __pyx_v_r53)) + (63.0 * __pyx_v_r114)) + __pyx_v_r115) - (__pyx_v_r16 * __pyx_v_r53)) + (28.0 * __pyx_v_r47)) + (__pyx_v_r51 * __pyx_v_r80))) / 3080.0)) - ((__pyx_v_y0 * (((((((((((((54.0 * __pyx_v_r101) + __pyx_v_r102) + (__pyx_v_r116 * __pyx_v_r5)) + (__pyx_v_r117 * __pyx_v_x3)) + (21.0 * __pyx_v_r13)) - (__pyx_v_r19 * __pyx_v_y3)) + (__pyx_v_r22 * __pyx_v_y3)) + (__pyx_v_r78 * __pyx_v_x3)) + ((189.0 * __pyx_v_r83) * __pyx_v_x2)) + (60.0 * __pyx_v_r86)) + ((81.0 * __pyx_v_r9) * __pyx_v_y1)) + (15.0 * __pyx_v_r94)) + (54.0 * __pyx_v_r98))) / 9240.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":718
- * / 9240
- * )
- * self.momentXY += ( # <<<<<<<<<<<<<<
- * -r103 * r12 / 18480
- * - r12 * r51 / 8
- */
- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentXY, __pyx_t_2) < (0)) __PYX_ERR(0, 718, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":798
- * / 9240
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r103 * r116 / 9240
- * - r125 * r70 / 9240
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- /* "fontTools/pens/momentsPen.py":846
- * / 3080
- * + 3 * x2 * y3 * (r48 + r66 + r8 * y3) / 220
- * - y0 # <<<<<<<<<<<<<<
- * * (
- * r100 * r46
- */
- __pyx_t_1 = PyFloat_FromDouble((((((((((((((((-__pyx_v_r103) * __pyx_v_r116) / 9240.0) - ((__pyx_v_r125 * __pyx_v_r70) / 9240.0)) - ((__pyx_v_r126 * __pyx_v_x3) / 12.0)) - (((3.0 * __pyx_v_r127) * (__pyx_v_r26 + __pyx_v_r38)) / 3080.0)) - ((__pyx_v_r128 * ((__pyx_v_r26 + __pyx_v_r30) + __pyx_v_x3)) / 660.0)) - ((__pyx_v_r4 * ((((__pyx_v_r112 * __pyx_v_x3) + __pyx_v_r115) - (14.0 * __pyx_v_r119)) + (84.0 * __pyx_v_r47))) / 9240.0)) - ((__pyx_v_r52 * __pyx_v_r69) / 9240.0)) - ((__pyx_v_r54 * ((__pyx_v_r58 + __pyx_v_r61) + __pyx_v_r75)) / 9240.0)) - ((__pyx_v_r55 * ((((((__pyx_v_r100 * __pyx_v_y1) + (__pyx_v_r121 * __pyx_v_y2)) + (__pyx_v_r26 * __pyx_v_y3)) + (__pyx_v_r79 * __pyx_v_y2)) + __pyx_v_r84) + ((210.0 * __pyx_v_x2) * __pyx_v_y1))) / 9240.0)) + ((__pyx_v_x0 * (((((((((((((((((((__pyx_v_r108 * __pyx_v_y1) + (__pyx_v_r110 * __pyx_v_y0)) + (__pyx_v_r111 * __pyx_v_y0)) + (__pyx_v_r112 * __pyx_v_y0)) + (45.0 * __pyx_v_r125)) + (14.0 * __pyx_v_r126)) + (126.0 * __pyx_v_r127)) + (770.0 * __pyx_v_r128)) + (42.0 * __pyx_v_r129)) + __pyx_v_r130) + (__pyx_v_r131 * __pyx_v_y2)) + (__pyx_v_r132 * __pyx_v_r64)) + ((135.0 * __pyx_v_r48) * __pyx_v_y1)) + ((630.0 * __pyx_v_r55) * __pyx_v_y1)) + ((126.0 * __pyx_v_r55) * __pyx_v_y2)) + ((14.0 * __pyx_v_r55) * __pyx_v_y3)) + (__pyx_v_r63 * __pyx_v_y3)) + (__pyx_v_r65 * __pyx_v_y3)) + (__pyx_v_r66 * __pyx_v_y0))) / 9240.0)) + ((__pyx_v_x1 * ((((((((27.0 * __pyx_v_r125) + (42.0 * __pyx_v_r126)) + (70.0 * __pyx_v_r129)) + __pyx_v_r130) + (__pyx_v_r39 * __pyx_v_r53)) + (__pyx_v_r44 * __pyx_v_r48)) + ((27.0 * __pyx_v_r53) * __pyx_v_y2)) + ((54.0 * __pyx_v_r64) * __pyx_v_y2))) / 3080.0)) + ((((3.0 * __pyx_v_x2) * __pyx_v_y3) * ((__pyx_v_r48 + __pyx_v_r66) + (__pyx_v_r8 * __pyx_v_y3))) / 220.0)) - ((__pyx_v_y0 * (((((((((((((__pyx_v_r100 * __pyx_v_r46) + (18.0 * __pyx_v_r114)) - (9.0 * __pyx_v_r118)) - (27.0 * __pyx_v_r120)) - (18.0 * __pyx_v_r122)) - (30.0 * __pyx_v_r123)) + __pyx_v_r124) + (__pyx_v_r131 * __pyx_v_x2)) + ((__pyx_v_r132 * __pyx_v_x3) * __pyx_v_y1)) + ((162.0 * __pyx_v_r42) * __pyx_v_y1)) + __pyx_v_r50) + ((63.0 * __pyx_v_r53) * __pyx_v_x3)) + (__pyx_v_r64 * __pyx_v_r99))) / 9240.0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- /* "fontTools/pens/momentsPen.py":798
- * / 9240
- * )
- * self.momentYY += ( # <<<<<<<<<<<<<<
- * -r103 * r116 / 9240
- * - r125 * r70 / 9240
- */
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_momentYY, __pyx_t_4) < (0)) __PYX_ERR(0, 798, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":310
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.pens.momentsPen.MomentsPen._curveToOne", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* #### Code section: module_exttypes ### */
- static PyMethodDef __pyx_methods[] = {
- {0, 0, 0, 0}
- };
- /* #### Code section: initfunc_declarations ### */
- static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
- static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
- /* #### Code section: init_module ### */
- static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
- /*--- Global init code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
- /*--- Variable export code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
- /*--- Function export code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
- /*--- Type init code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
- /*--- Type import code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
- /*--- Variable import code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
- /*--- Function import code ---*/
- __Pyx_RefNannyFinishContext();
- return 0;
- }
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
- static int __pyx_pymod_exec_momentsPen(PyObject* module); /*proto*/
- static PyModuleDef_Slot __pyx_moduledef_slots[] = {
- {Py_mod_create, (void*)__pyx_pymod_create},
- {Py_mod_exec, (void*)__pyx_pymod_exec_momentsPen},
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
- #endif
- #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
- {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
- #endif
- {0, NULL}
- };
- #endif
- #ifdef __cplusplus
- namespace {
- struct PyModuleDef __pyx_moduledef =
- #else
- static struct PyModuleDef __pyx_moduledef =
- #endif
- {
- PyModuleDef_HEAD_INIT,
- "momentsPen",
- 0, /* m_doc */
- #if CYTHON_USE_MODULE_STATE
- sizeof(__pyx_mstatetype), /* m_size */
- #else
- (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
- #endif
- __pyx_methods /* m_methods */,
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- __pyx_moduledef_slots, /* m_slots */
- #else
- NULL, /* m_reload */
- #endif
- #if CYTHON_USE_MODULE_STATE
- __pyx_m_traverse, /* m_traverse */
- __pyx_m_clear, /* m_clear */
- NULL /* m_free */
- #else
- NULL, /* m_traverse */
- NULL, /* m_clear */
- NULL /* m_free */
- #endif
- };
- #ifdef __cplusplus
- } /* anonymous namespace */
- #endif
- /* PyModInitFuncType */
- #ifndef CYTHON_NO_PYINIT_EXPORT
- #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
- #else
- #ifdef __cplusplus
- #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
- #else
- #define __Pyx_PyMODINIT_FUNC PyObject *
- #endif
- #endif
- __Pyx_PyMODINIT_FUNC PyInit_momentsPen(void) CYTHON_SMALL_CODE; /*proto*/
- __Pyx_PyMODINIT_FUNC PyInit_momentsPen(void)
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- {
- return PyModuleDef_Init(&__pyx_moduledef);
- }
- /* ModuleCreationPEP489 */
- #if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
- || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
- static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
- {
- PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
- if (!module) {
- PyErr_Clear(); // just try the 3.8-3.12 version
- module = PyImport_ImportModule("_xxsubinterpreters");
- if (!module) goto bad;
- }
- PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
- Py_DECREF(module);
- if (!current) goto bad;
- if (PyTuple_Check(current)) {
- PyObject *new_current = PySequence_GetItem(current, 0);
- Py_DECREF(current);
- current = new_current;
- if (!new_current) goto bad;
- }
- long long as_c_int = PyLong_AsLongLong(current);
- Py_DECREF(current);
- return as_c_int;
- }
- bad:
- PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
- return -1;
- }
- #endif
- #if !CYTHON_USE_MODULE_STATE
- static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
- static PY_INT64_T main_interpreter_id = -1;
- #if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
- PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
- #elif CYTHON_COMPILING_IN_GRAAL
- PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
- #elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
- || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
- PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
- #elif CYTHON_COMPILING_IN_LIMITED_API
- PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
- #else
- PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
- #endif
- if (unlikely(current_id == -1)) {
- return -1;
- }
- if (main_interpreter_id == -1) {
- main_interpreter_id = current_id;
- return 0;
- } else if (unlikely(main_interpreter_id != current_id)) {
- PyErr_SetString(
- PyExc_ImportError,
- "Interpreter change detected - this module can only be loaded into one interpreter per process.");
- return -1;
- }
- return 0;
- }
- #endif
- static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
- {
- PyObject *value = PyObject_GetAttrString(spec, from_name);
- int result = 0;
- if (likely(value)) {
- if (allow_none || value != Py_None) {
- result = PyDict_SetItemString(moddict, to_name, value);
- }
- Py_DECREF(value);
- } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
- PyErr_Clear();
- } else {
- result = -1;
- }
- return result;
- }
- static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
- PyObject *module = NULL, *moddict, *modname;
- CYTHON_UNUSED_VAR(def);
- #if !CYTHON_USE_MODULE_STATE
- if (__Pyx_check_single_interpreter())
- return NULL;
- #endif
- if (__pyx_m)
- return __Pyx_NewRef(__pyx_m);
- modname = PyObject_GetAttrString(spec, "name");
- if (unlikely(!modname)) goto bad;
- module = PyModule_NewObject(modname);
- Py_DECREF(modname);
- if (unlikely(!module)) goto bad;
- moddict = PyModule_GetDict(module);
- if (unlikely(!moddict)) goto bad;
- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
- return module;
- bad:
- Py_XDECREF(module);
- return NULL;
- }
- static CYTHON_SMALL_CODE int __pyx_pymod_exec_momentsPen(PyObject *__pyx_pyinit_module)
- #endif
- {
- int stringtab_initialized = 0;
- #if CYTHON_USE_MODULE_STATE
- int pystate_addmodule_run = 0;
- #endif
- __pyx_mstatetype *__pyx_mstate = NULL;
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- int __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- PyObject *__pyx_t_13 = NULL;
- PyObject *__pyx_t_14 = NULL;
- size_t __pyx_t_15;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannyDeclarations
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- if (__pyx_m) {
- if (__pyx_m == __pyx_pyinit_module) return 0;
- PyErr_SetString(PyExc_RuntimeError, "Module 'momentsPen' has already been imported. Re-initialisation is not supported.");
- return -1;
- }
- #else
- if (__pyx_m) return __Pyx_NewRef(__pyx_m);
- #endif
- /*--- Module creation code ---*/
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- __pyx_t_1 = __pyx_pyinit_module;
- Py_INCREF(__pyx_t_1);
- #else
- __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
- #endif
- #if CYTHON_USE_MODULE_STATE
- {
- int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
- __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "momentsPen" pseudovariable */
- if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
- pystate_addmodule_run = 1;
- }
- #else
- __pyx_m = __pyx_t_1;
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
- #endif
- __pyx_mstate = __pyx_mstate_global;
- CYTHON_UNUSED_VAR(__pyx_t_1);
- __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
- Py_INCREF(__pyx_mstate->__pyx_d);
- __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
- /* ImportRefnannyAPI */
- #if CYTHON_REFNANNY
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
- if (!__Pyx_RefNanny) {
- PyErr_Clear();
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
- if (!__Pyx_RefNanny)
- Py_FatalError("failed to import 'refnanny' module");
- }
- #endif
-
- __Pyx_RefNannySetupContext("PyInit_momentsPen", 0);
- __Pyx_init_runtime_version();
- if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
- /*--- Library function declarations ---*/
- /*--- Initialize various global constants etc. ---*/
- if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- stringtab_initialized = 1;
- if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- if (__pyx_module_is_main_fontTools__pens__momentsPen) {
- if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- }
- {
- PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
- if (!PyDict_GetItemString(modules, "fontTools.pens.momentsPen")) {
- if (unlikely((PyDict_SetItemString(modules, "fontTools.pens.momentsPen", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
- }
- }
- /*--- Builtin init code ---*/
- if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- /*--- Constants init code ---*/
- if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- /*--- Global type/function init code ---*/
- (void)__Pyx_modinit_global_init_code(__pyx_mstate);
- (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
- (void)__Pyx_modinit_function_export_code(__pyx_mstate);
- (void)__Pyx_modinit_type_init_code(__pyx_mstate);
- (void)__Pyx_modinit_type_import_code(__pyx_mstate);
- (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
- (void)__Pyx_modinit_function_import_code(__pyx_mstate);
- /*--- Execution code ---*/
- /* "fontTools/pens/momentsPen.py":1
- * from fontTools.pens.basePen import BasePen, OpenContourError # <<<<<<<<<<<<<<
- *
- * try:
- */
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BasePen,__pyx_mstate_global->__pyx_n_u_OpenContourError};
- __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_pens_basePen, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
- }
- __pyx_t_2 = __pyx_t_1;
- __Pyx_GOTREF(__pyx_t_2);
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_BasePen,__pyx_mstate_global->__pyx_n_u_OpenContourError};
- for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
- __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- }
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":3
- * from fontTools.pens.basePen import BasePen, OpenContourError
- *
- * try: # <<<<<<<<<<<<<<
- * import cython
- * except (AttributeError, ImportError):
- */
- {
- (void)__pyx_t_1; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */
- /*try:*/ {
- /* "fontTools/pens/momentsPen.py":4
- *
- * try:
- * import cython # <<<<<<<<<<<<<<
- * except (AttributeError, ImportError):
- * # if cython not installed, use mock module with no-op decorators and types
- */
- }
- }
- /* "fontTools/pens/momentsPen.py":8
- * # if cython not installed, use mock module with no-op decorators and types
- * from fontTools.misc import cython
- * COMPILED = cython.compiled # <<<<<<<<<<<<<<
- *
- *
- */
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_COMPILED, Py_True) < (0)) __PYX_ERR(0, 8, __pyx_L1_error)
- /* "fontTools/pens/momentsPen.py":11
- *
- *
- * __all__ = ["MomentsPen"] # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_MomentsPen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 11, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":14
- *
- *
- * class MomentsPen(BasePen): # <<<<<<<<<<<<<<
- *
- * def __init__(self, glyphset=None):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BasePen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MomentsPen, __pyx_mstate_global->__pyx_n_u_MomentsPen, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- if (__pyx_t_2 != __pyx_t_4) {
- if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 14, __pyx_L1_error)
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":16
- * class MomentsPen(BasePen):
- *
- * def __init__(self, glyphset=None): # <<<<<<<<<<<<<<
- * BasePen.__init__(self, glyphset)
- *
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen___init, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0]);
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":26
- * self.momentYY = 0
- *
- * def _moveTo(self, p0): # <<<<<<<<<<<<<<
- * self._startPoint = p0
- *
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_3_moveTo, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__moveTo, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_moveTo, __pyx_t_4) < (0)) __PYX_ERR(0, 26, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":29
- * self._startPoint = p0
- *
- * def _closePath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_5_closePath, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__closePath, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_closePath, __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":34
- * self._lineTo(self._startPoint)
- *
- * def _endPath(self): # <<<<<<<<<<<<<<
- * p0 = self._getCurrentPoint()
- * if p0 != self._startPoint:
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_7_endPath, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__endPath, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_endPath, __pyx_t_4) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":39
- * raise OpenContourError("Glyph statistics is not defined on open contours.")
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_9_lineTo, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__lineTo, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_lineTo, __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":99
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_11_qCurveToOne, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__qCurveToOne, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_qCurveToOne, __pyx_t_4) < (0)) __PYX_ERR(0, 99, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":310
- * )
- *
- * @cython.locals(r0=cython.double) # <<<<<<<<<<<<<<
- * @cython.locals(r1=cython.double)
- * @cython.locals(r2=cython.double)
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_4pens_10momentsPen_10MomentsPen_13_curveToOne, 0, __pyx_mstate_global->__pyx_n_u_MomentsPen__curveToOne, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_pens_momentsPen, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_curveToOne, __pyx_t_4) < (0)) __PYX_ERR(0, 310, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":14
- *
- *
- * class MomentsPen(BasePen): # <<<<<<<<<<<<<<
- *
- * def __init__(self, glyphset=None):
- */
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MomentsPen, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
- #endif
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MomentsPen, __pyx_t_4) < (0)) __PYX_ERR(0, 14, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":866
- *
- *
- * if __name__ == "__main__": # <<<<<<<<<<<<<<
- * from fontTools.misc.symfont import x, y, printGreenPen
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_main, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 866, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_9) {
- /* "fontTools/pens/momentsPen.py":867
- *
- * if __name__ == "__main__":
- * from fontTools.misc.symfont import x, y, printGreenPen # <<<<<<<<<<<<<<
- *
- * printGreenPen(
- */
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_x,__pyx_mstate_global->__pyx_n_u_y,__pyx_mstate_global->__pyx_n_u_printGreenPen};
- __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_misc_symfont, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
- }
- __pyx_t_2 = __pyx_t_6;
- __Pyx_GOTREF(__pyx_t_2);
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_x,__pyx_mstate_global->__pyx_n_u_y,__pyx_mstate_global->__pyx_n_u_printGreenPen};
- for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) {
- __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 867, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_7) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":869
- * from fontTools.misc.symfont import x, y, printGreenPen
- *
- * printGreenPen( # <<<<<<<<<<<<<<
- * "MomentsPen",
- * [
- */
- __pyx_t_7 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_printGreenPen); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 869, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- /* "fontTools/pens/momentsPen.py":873
- * [
- * ("area", 1),
- * ("momentX", x), # <<<<<<<<<<<<<<
- * ("momentY", y),
- * ("momentXX", x**2),
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_momentX, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 873, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":874
- * ("area", 1),
- * ("momentX", x),
- * ("momentY", y), # <<<<<<<<<<<<<<
- * ("momentXX", x**2),
- * ("momentXY", x * y),
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_11 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_momentY, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 874, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/pens/momentsPen.py":875
- * ("momentX", x),
- * ("momentY", y),
- * ("momentXX", x**2), # <<<<<<<<<<<<<<
- * ("momentXY", x * y),
- * ("momentYY", y**2),
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_12 = PyNumber_Power(__pyx_t_4, __pyx_mstate_global->__pyx_int_2, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 875, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_momentXX, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "fontTools/pens/momentsPen.py":876
- * ("momentY", y),
- * ("momentXX", x**2),
- * ("momentXY", x * y), # <<<<<<<<<<<<<<
- * ("momentYY", y**2),
- * ],
- */
- __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 876, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 876, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_13);
- __pyx_t_14 = PyNumber_Multiply(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 876, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_momentXY, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 876, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_13);
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "fontTools/pens/momentsPen.py":877
- * ("momentXX", x**2),
- * ("momentXY", x * y),
- * ("momentYY", y**2), # <<<<<<<<<<<<<<
- * ],
- * )
- */
- __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_y); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 877, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_12 = PyNumber_Power(__pyx_t_14, __pyx_mstate_global->__pyx_int_2, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 877, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_14 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_momentYY, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 877, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "fontTools/pens/momentsPen.py":871
- * printGreenPen(
- * "MomentsPen",
- * [ # <<<<<<<<<<<<<<
- * ("area", 1),
- * ("momentX", x),
- */
- __pyx_t_12 = __Pyx_PyList_Pack(6, __pyx_mstate_global->__pyx_tuple[1], __pyx_t_10, __pyx_t_11, __pyx_t_4, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 871, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_15 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MomentsPen, __pyx_t_12};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_15, (3-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/pens/momentsPen.py":866
- *
- *
- * if __name__ == "__main__": # <<<<<<<<<<<<<<
- * from fontTools.misc.symfont import x, y, printGreenPen
- *
- */
- }
- /* "fontTools/pens/momentsPen.py":1
- * from fontTools.pens.basePen import BasePen, OpenContourError # <<<<<<<<<<<<<<
- *
- * try:
- */
- __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /*--- Wrapped vars code ---*/
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11);
- __Pyx_XDECREF(__pyx_t_12);
- __Pyx_XDECREF(__pyx_t_13);
- __Pyx_XDECREF(__pyx_t_14);
- if (__pyx_m) {
- if (__pyx_mstate->__pyx_d && stringtab_initialized) {
- __Pyx_AddTraceback("init fontTools.pens.momentsPen", __pyx_clineno, __pyx_lineno, __pyx_filename);
- }
- #if !CYTHON_USE_MODULE_STATE
- Py_CLEAR(__pyx_m);
- #else
- Py_DECREF(__pyx_m);
- if (pystate_addmodule_run) {
- PyObject *tp, *value, *tb;
- PyErr_Fetch(&tp, &value, &tb);
- PyState_RemoveModule(&__pyx_moduledef);
- PyErr_Restore(tp, value, tb);
- }
- #endif
- } else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_ImportError, "init fontTools.pens.momentsPen");
- }
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- #if CYTHON_PEP489_MULTI_PHASE_INIT
- return (__pyx_m != NULL) ? 0 : -1;
- #else
- return __pyx_m;
- #endif
- }
- /* #### Code section: pystring_table ### */
- /* #### Code section: cached_builtins ### */
- static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
- CYTHON_UNUSED_VAR(__pyx_mstate);
- /* Cached unbound methods */
- __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
- __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
- __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
- __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
- __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
- __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
- return 0;
- }
- /* #### Code section: cached_constants ### */
- static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
- __Pyx_RefNannyDeclarations
- CYTHON_UNUSED_VAR(__pyx_mstate);
- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- /* "fontTools/pens/momentsPen.py":16
- * class MomentsPen(BasePen):
- *
- * def __init__(self, glyphset=None): # <<<<<<<<<<<<<<
- * BasePen.__init__(self, glyphset)
- *
- */
- __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 16, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
- /* "fontTools/pens/momentsPen.py":872
- * "MomentsPen",
- * [
- * ("area", 1), # <<<<<<<<<<<<<<
- * ("momentX", x),
- * ("momentY", y),
- */
- __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_area, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 872, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
- #if CYTHON_IMMORTAL_CONSTANTS
- {
- PyObject **table = __pyx_mstate->__pyx_tuple;
- for (Py_ssize_t i=0; i<2; ++i) {
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #if PY_VERSION_HEX < 0x030E0000
- if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
- #else
- if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
- #endif
- {
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
- }
- #else
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
- #endif
- }
- }
- #endif
- __Pyx_RefNannyFinishContext();
- return 0;
- __pyx_L1_error:;
- __Pyx_RefNannyFinishContext();
- return -1;
- }
- /* #### Code section: init_constants ### */
- static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
- CYTHON_UNUSED_VAR(__pyx_mstate);
- {
- const struct { const unsigned int length: 13; } index[] = {{1},{49},{32},{1},{7},{8},{10},{19},{21},{22},{19},{18},{18},{23},{16},{20},{7},{4},{18},{18},{10},{11},{7},{8},{22},{22},{25},{8},{16},{8},{8},{13},{5},{7},{8},{13},{10},{7},{8},{8},{7},{8},{7},{15},{8},{2},{2},{2},{2},{3},{11},{13},{12},{12},{2},{2},{3},{4},{4},{4},{4},{4},{4},{4},{4},{4},{4},{3},{4},{4},{4},{4},{4},{4},{4},{4},{4},{4},{3},{4},{4},{4},{4},{4},{4},{4},{4},{4},{4},{3},{4},{4},{4},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{2},{3},{3},{3},{3},{3},{3},{3},{3},{3},{3},{4},{12},{10},{11},{8},{6},{1},{2},{2},{2},{2},{1},{2},{2},{2},{2},{4139},{568},{9},{33},{34},{1710},{58}};
- #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (1942 bytes) */
- const char* const cstring = "BZh91AY&SYn\312\265%\000\004@\177\377\376o\377\200\177\001\377\340\276\357\376`\277\357\377`@@@@@@@@@@@@@\000@\000`\010\377\017O\251\235\343\326\333\346n\2631/\270\372\212*x\367\017\205\004\246\222I\2652\203\310\374$\311\023C\322d\006\203@4\017\325\000\006\200\000\000%\024\232i\277J'\242\237\244jC@h\003\324\000\000\000\00044\000\000\032\236!\024\246CM\r\000\r\000\006\201\240\311\240\014\200\000\r\r2\002M%)\251\003\375T\311\376\252\001\352y \366\232\240\000\031\000\000\000h\000\006\236\240IE\036\236\246\244\000\310\000\000\000\000\003@\000\006\236\240\006\200\010\222Bi#\023Q\340M\232Jx\247\250\000\310\031\006\200\001\246\203\020i\265\r\351K\253{\274\376\277\322\036C\373\241\362\312\265\026\222\"\265\003\312\000\221\006\220\270\033\216\221\377\034\034\004\300p00\372\177\354\027\007\007\000\302\315W\230\326\022)\006\020\022\021I\000\024\317\330wK\"\335\000\"H\004\204D\032U\336`\257\002\220\212\022 \021\024\212\202\200\204\" \204\004$H\211\005\001\022\004\000$,\002\245\007\\\3431s\301\r\2316\366YD+j\303Q\002\256sf\001\022\200\022\344\013\326\364\332LS\023Y\261\234\"\222\"\n1Q%\225\220\311\204\231\r!$\025\004\310d\316\245\375\351F\251R\336<\306/XQ\255\231F\347b\254\337\nA\272\"%)\315\314^\247\234\231\014\022\331\304@\021\001\223\"BH\002\021\004\020\010$\322A\001=\370\252\362\302\275'{8\0374\323\215A\036\356\325v\266\275W\277gkor\236\357\337\345\004\212\307$)\005\005UUU\327[\206\272\256\272\353\256\272\353\257}\307\340\001'&Y\203\311\323\352*\252\252\252\256\333a\266\334V\355\266\333m\266\333t\302\035F`\312\014gf\316\006r2\325\325I %(I*\245)JR\224\245\376&\303\030\2068\266%\303\023\234\335\347L\3479\316w5\314\305\315qv!\2162\030\234\346\3579\345\234\3479\353_}\350bR\223\274\245*\245)J\221\210\210w\210\210\315\021\031\006\"!\336\"\"+\210\240b\"\035\342\"\"\270\215\030\037\346p\002N6\226\035\315\303x\363\357J\222\366\326\261\231\372\254\001p\r\313\231s\016&\366\203\237\314g\031\231,\333\237=\3250\025\005McY\265\206\263\006b\353m\361\335V\333\266\3254\006\336\035M_e\266o""\325\277\000\301_\273v\035\004\271`:1\276C\021\245e\263i;\203N\325\007N\344\242\373\202\241\027\263\014\331\366\324/An\004\304\\G\0239\302\354p\370\340`\200\"\000\210#\343\321\274\t\004\004\014@@A\r\022\314\031qo\301\327+4\005\240\200\\em\356p\353\211\375l\356\357s\310\245\304\222{\006\3302$V\316R\317\204r\021sg(,\305\203g\224\200e\032\334h\316\324\377\177\330\266dV\2763v\263\300\277w\210\342uj\205\2059\256+\223U\2548Ba! \300\265\212\352\337\340\270U\301U/P\300\014D\364\034\375\236=\375\311\013o\037|\331\333(\332\000\0310\322iH\221+\244O=\227\332\003\005\241k5\201c\"\340}\303\016\357\246\333\240\342~#\276\215\242\025\345\326\271\201(\243TPm<lT\206\036\232u\353\377\261\230W\363\026\323\242\354\034\331\262\337\305\227\224\3538?6\216^\033\372\255m\232\214\206]\341\272\336\323mR/\252\037^\331\213u\310l\005\366\377xp\263z\275\377s\236\275c\017P\340\276\316\311\214\007(Lv\357\332\353`v\314\304 T7i\251\234\"UHR\225\371\001\277\313\301\312f\nN\2132KN\326:Y\261\006\276\014u\032\205\331\312\214Do\276\374\221R\314[a~\"\244\333\234\323i\033\233hr\017\270\2403\006\355C\266\034\246\\\274\013\357\276\373\360\225\252\353\256\272\353\256\374)P\222I*\222\310\222IWS\327B\256\272\353\255T\222\310\222IeI*RIR\222K*IdI$\252IP\222I,\311:I$\225hI$\222K\213\257\261\250\345o6i}\356J\214\335\307\255\303\236\314\306\221\231\214A\267\003u\013\256\032\343>\216g\017F\312BQ\030\351\3624\244\236DK7x\3440>\336\030l\340\260\032\300,\013\013,\246\366Lr\232\336L\026d0BobqU\034\006\240`\270x\025&c\001\233\0000f0\033\00660\356\335\316\267\231\247\230\372(w\240\223\022\221}8\203\343\253V\254\273\233\207\302\020\304\320\220\242?2\306\234\245)\363\252\035\002Gzr\007!\"d\222H\201\024C\274\241\342\005\306.\261>\200$P!\340\241\246\004\210QS\264\361(G%\006\231!\360\305$\002\035\372T\227>\024\027\300\203 \363\202\360\211\006Z\315\201\250\020\217T.\205C&\222\000\326\243%\n\200\330\000 \220A\000`+\357\003\374\007%\022\300\376\361j\212\273_H\251\332'\222]MJ\263\222K \220E\021\005\354\177g8M\302\026\001\371 9d\254D""\003\030\210\263\241\207\334\023\303\t\331 \002\254%\336\230L\013\230\377\307\213\331d!\351\204\350\222[+\3642bUh9CD\360\235=\272:\005C\305\351A\215J\t\031\032B\242\364(\360\337\3031\314\300\034\207\360\225\033B\305\024F\3607\310\210s\305IFD\354s\033\341\301TU\255i\016\201\r\346\363\372\212pj\314X\203\016}\362NjT\254Q\025\224\243\343\020\346=\022\236{Z4FYL\235|\234\252Y\003@e\225~\326(\220\035)\325\352\250\226M\247')9b\3208\370\374/)9pK\024Qhv\203\244\322i\265@\343\r.\262\2112-%#\324\350\rZ\252MTV\204\350\312\241\252\200\320j\312\005B\211I\240\322\031P{\031\031\003\306\232&\202\243f\265\\\316=\201\232\326\035\247FI\254I\322\n\023\032-\2617f\224\364;\320\227\024(\364'G\022p\2212\210N\3225\320\323\2311\2455;h\222\243FS\021\022i\nh\330\244\330\214\323FY\207\214\324e\254\215e\nJ\223\013\247\257\220\322\330l>\306\215\336\207\321u\372\324\022\226ssnw\317\236\313tY\237\221h\252m\336|\333'\177\236sY\363\263\311\321\271\304i\026E\210(\312u\325Krnf\232P\320p\342wf\206F\322\255\256\266\315)UT\035\0253&d\266\212U\271wesJ\213\202%\252-\335\322\270i\2731\211\203iLf\227\245\242\351\245\310\256\224\241\243E7XN \014\020\222\014L\t\213^\202f\327\245p\344\331\272\223r\3158\264\210\233\314\250\233\305\323E\230\002*\320\341S\252\021xX\211\0218X\275@@\222\250\340^\246\3224Db\344 p\300\273\202M\215\020\240\025%\262\213A\222L7*\013\274C%C\025\016\033\020\231T\341\222\3410@\017)r\301\307C1\266\225\254\251\240\232Z\0327-q\315*&`\"\010e\031\010\253\213[\030\242\252xXt+&H7\263\262\2522\035\204*\267\374]\311\024\341BA\273*\324\224";
- PyObject *data = __Pyx_DecompressString(cstring, 1942, 2);
- if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
- const char* const bytes = __Pyx_PyBytes_AsString(data);
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
- #endif
- #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2182 bytes) */
- const char* const cstring = "x\332\245X;s\333H\022>\211r\225\256\326>\233\017\335\245\"%_(\023/>\242-\221R\355m\235\367,>\266\3526B\201 \274\313:\222 \033\240K\314\0342D\210\220!C\206\014\0312T\350P?\301?\341z\000\0148x\020\204\356\244\0021\230\351\351\351\376\3721=s\363\323p>\371\343\3220\025s`\230\003\325\270\034\030\227c\335\274\354k\237\007c\255\177\251\217/\365\2116\276T\365\261\251\317\300\270\3718\350}\370\214\037]]\037\032\037p\310\3700\322G\332\3304\036\264\361\315d\376cC14l6?\375\362\360\363\307\373\273_\374\301}\353F\226\007\343\201)\313l\227:\324q\242b\376\021\350\234\301\027\255\253\177\032kl\2576\356\207\t\207(mWg{F\372\227P\317\264\351s\373\204\2027]\225\356\001t\220\345\207\371#>w\003\325\224\377\245=\232m\355\263,+\303!\376\200\246(\306|\254\016\364\033U\007}f\342R\206J\026D-d\023\024U\353)\352\177\366\n0R\313r_We\231J\354\003w3\032\030\352\2151\037\221\236}/\201\363\246\347\002\030\352\335\203,\313\237gc\302\364w\315D\215\000\273\037\364\301\330\374\235\230\322\320L\n\256<0d_\340\201\251\215\014\017%Y\036)(9\376\2154SQ\207\212a8\037z\1776\324\310\233\254\364o\357E\337\277\271o\372\372\315\303\027\311AG\365L\030h\016\227\2612B\036\223\362\204\233\360\023a\242O\360\003\264\t\242H\032(\346O\240ic\242\006c\016Y\236\316\224\241;\025\312\300\001\207?e\362\220&\217\217\200\217\210\217\204O\005\237*>5|\352\300!\t!w\336H\312!)\207\244\034\222rH\312!)\207\244\034\222\3420\217\244<\222\362\244\215\244<\222\362H\312#)\217\244<\222\362H\212C\002\222\nH* )R!\021\322 \tR\324\201\007\344\204\214\220\017\262A.\310\004y \013\344\200\014\004\300\3518\033'\013\330\026A\220@\250\200P\005\241\006B\035D\020\313 r \362 \n \342\247\004b\005\304*\2105\020\353 \201T\006\211\003\211\007I\000I\004\t{* UA\252\201T\207\nT\312P\341\240\302CE\200\212\010\025\t*\330Y\205J\r*u\250B\265\014U\016\252<T\005\250\212P\225\240Z\201*\366\327\240Z\207\032\324\312P\343\240\306CM\200\232\0105\tj\025\250U\241\206Cu\300\3772\3249\250\363P\027\240.B]\202z\005\352U\250\327\240^7\264!\006\010\3616\327j\330\302\224\241\314""\206\246\214\311\004\\\217\224eS3\360\367\2132\234i\306\343c\371\221{\344\037\205\371\274<\347\346\374\\\370z\373\275{\366\247?\277Y\334[\205\247\213\277/\225o\347\257\261\235\r\276\236\317\337,\332\013 \337o\026\035\353\324*\3067|\232\0274\376\262P\255\234\305\221F\337*Y\267\244\321s\0312=\321\241\204Y\321\206O\234\320C\3704-\260\263\361t\312\302\264x\253c\237\332Wv\333\236\306\023E\033\t\362&h\020/\335\355\221\265\010\315\035\nxm\367\226'iWH\000\375E\200\2461U\032m\022\026MX\"\001Tj\327\274\335\260\225\264P\246i\244\200;A\254x~\267\207\033\276o\036g\372va\270=o\035\247m\321\006\365^s\311/\273\253\334J\\\301:\277n\254\373\233\322&H\355\317\237Y\rK\211\347\030\035\212\322$\014\221\351}\273d7mXf\217\320F\033\t4\206g\027\252igu\272\272Z\265W\346\232_w7\271\215\270\201\255\263 P\264\022\032\001qU;g\213T\334\240(\317\230)o\277\275\246\311\3605\265\205\323\310;\306+8y\203\351 \036\251.sKa\331[\235\255\032+\205\014\022\227\276BKel\336\356\342 \267\357l[\006\342u\033f\321_\226\226t\375wtu\327%\202\215+\253\345 ~\267<]\026i\027\361\211\022\345\302v\022\267\316x\360]\257z\353\223(\223\367KXe\303*\022\310\177]\225V\0163T\351\315\267wy\007\252w9\353\332\352\331'\244QL\370\362\033D\343\2513\376\354\262r\027\272c\204#^,\240pg\236\0277\321\266\205m{;e\354\221\261D\024\355\302\211\322\003\3100\020\305\342\321\365\014_X\266\227\323\275^\005'\002\222e\017*Y\014\352\025\257\034q\\\003\227\277\363\220'\312\251\276\343z\256%\2407R\270[\341\331&c\267\014\343\366\004\032s\307\357Z><]d%\242_\025\203\372\021\207\273fV\2408\277Z\267\327\351\0008f\334\375\270\257\177\210g\024\302(\272IPR\207$P6\321S\013\230\003\214ui}\2679\335\274\247P\272\212\366\234pkQg 0\372Q\344\346]\377#\021\252\331\262\261\364\243\230P\233^\024\213\270~\036C\274\217\3533\201qq\304KLG\252d\374^\324(\2450X\000w\007\227C\026Jc\230\004?\310\004\264s\026\361\375\362\327\260\031\374\217\210\305\250\001.\230\204E\363}\007m}\275\351mO\267\245\355\375.\267\343b\260\177\357\030\370@pF\373\367\344>,}gt\357mw\214\004\255\270\034b""\256\370Uw\235[K(^1.\201\206\367,\t5(&z\233\273=\\9\336\306{K\264\366\332fq\001&\256fN1\304j\023\325/j\31344\305x\353\276\244\021\235\031\211\2053\"\177\310-\243\006\215\212YLH\322!v\376\246U<\302\363\2106g\024\352\000V\356N\036A0\032\004\367\3506\216\327j(O\227\375\350\260\021\361\0369\222M\361\025MK\032\356\020t\237\276\306\002\343\204\272\031a(x\224\006\356\323\367\350\207\302\272\267y\265io\2461\031p\357\271\027\224\r\002\264/\210$\\\340\312s\270\316\372t}\215\2742\033~\323\335\346\266\342\026v\371]cGaMa\252\004\327J\252\020\342y\004\360?\374\221&\325\036\362\216\204\01089\354\303\376\207\3176\034\303\307v\014\177\271Rd\277< R\000\236|,\020\0076\036G\310\257\267\337/cn\n\236\223o\002\376\257\333\202\203\247A\022!?c!J\374\217\367\222n\003\2753\203E\212\212\376,\256a\343\\^|\264O\3742\233\367\034\276\341\025Edo(m\032\033u\233\3376\321Q\013\273\366n\372\215\255\343\335\254\356\206K\306\231\357\332\204,\301c%dl\2566\035\314\314WXV\031\273\322\356\356\351\241\375\324\356\004\212+\301\261\177\270\226P\331\021\372\021\330\321\\bw\3553\222\350\237\303\222M\0172:\t\037\021zL\214\266\330\n2|~H\342\036S\014\371\332\004\253rv\367j}\275%\230~\2629\322@L\236\262%<}\234\377\260\020p^\001\203\350u\356)\207]\313\303\004\357\254s\264c\301F^\337\315\223\303\327UG\356\251\376\227\353)\177z\272\333\244#\027@.\226/\275\356Hs\375\222\366\316\313\227 \215\354\361\"\007\030\273\256\222\362J'\rL\301\362\356\234\006\203s\325\220\250\246\323Hq\014\317\263\207\273\330\210q\016\352L\020\347\255[\177\017\314\262\233\242\037\233\307\"1\264\010\215\0252W\305\223\225\204\333f\221\035,y)\213l\002\331@:\341b#1rP\315\306i\374\362\363d\223\036\234\375\353\205\214\243\311)SXd\274Z\226\324\020g\230N\225\027\037\253b\016\335l~\322\250D\354\241\252\023\316h\207n\032\022\252\207Pq\0378<6\274m\261\347iy\346m\305\344\360Xd\320\020\231\014\033\246\273\302\212\312\334\362\333.\036<\304\035<\265\332\35412P\255E\020\241\206\314;\373Z\340\006\206\275\316\214\337WB\226\244'\200B\2123\331\321C\372\241k\006z\003s""\217e_0\014\257\331\r$\266\260,\260\206<\274\315D\034<\375%\304\261\373\211`\021\305(\033\2043p\027\026w\027EoT5,\200[Og\177#\271\361\355b\216\273\327_\335\224\362\017\313\331\016\377iM\231\327G\222a\331\327\177\001<\245]\242";
- PyObject *data = __Pyx_DecompressString(cstring, 2182, 1);
- if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
- const char* const bytes = __Pyx_PyBytes_AsString(data);
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
- #endif
- #else /* compression: none (7701 bytes) */
- const char* const bytes = ".Glyph statistics is not defined on open contours.Lib/fontTools/pens/momentsPen.py?BasePenCOMPILEDMomentsPenMomentsPen.__init__MomentsPen._closePathMomentsPen._curveToOneMomentsPen._endPathMomentsPen._lineToMomentsPen._moveToMomentsPen._qCurveToOneOpenContourError__Pyx_PyDict_NextRef__all__areaasyncio.coroutinescline_in_traceback_closePath_curveToOne__doc___endPathfontTools.misc.symfontfontTools.pens.basePenfontTools.pens.momentsPen__func___getCurrentPointglyphset__init___is_coroutineitems_lineTo__main____metaclass____module__momentXmomentXXmomentXYmomentYmomentYY_moveTo__mro_entries____name__p0p1p2p3pop__prepare__printGreenPen_qCurveToOne__qualname__r0r1r10r100r101r102r103r104r105r106r107r108r109r11r110r111r112r113r114r115r116r117r118r119r12r120r121r122r123r124r125r126r127r128r129r13r130r131r132r14r15r16r17r18r19r2r20r21r22r23r24r25r26r27r28r29r3r30r31r32r33r34r35r36r37r38r39r4r40r41r42r43r44r45r46r47r48r49r5r50r51r52r53r54r55r56r57r58r59r6r60r61r62r63r64r65r66r67r68r69r7r70r71r72r73r74r75r76r77r78r79r8r80r81r82r83r84r85r86r87r88r89r9r90r91r92r93r94r95r96r97r98r99self__set_name__setdefault_startPoint__test__valuesxx0x1x2x3yy0y1y2y3\200A\360T\004\000\t\r\210E\220\024\320\025&\240a\330\010\014\210E\220\021\330\010\014\210E\220\021\330\010\014\210E\220\021\340\010\r\210R\210r\220\021\330\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!""\330\010\016\210d\220\"\220C\220r\230\021\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210a\210t\2202\220S\230\002\230#\230R\230q\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220D\230\002\230$\230b\240\001\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220C\220r\230\023\230B\230a\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220D\230\002\230$\230b\240\001\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330""\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220A\330\010\016\210d\220\"\220C\220r\230\021\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210t\2202\220S\230\002\230#\230R\230t\2402\240T\250\022\2504\250r\260\023\260B\260d\270\"\270A\330\010\017\210t\2202\220Q\330\010\017\210s\220\"\220A\330\010\017\210u\220B\220a\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210u\220B\220a\330\010\017\210s\220\"\220A\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210s\220\"\220A\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210u\220B\220d\230\"\230C\230r\240\021\330\010\017\210s\220\"\220A\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210t\2202\220Q\330\010\017\210t\2202\220Q\330\010\017\210s\220\"\220A\330\010\017\210t\2202\220Q\330\010\017\210t\2202\220Q\330\010\017\210s\220\"\220D\230\002\230#\230R\230t\2402\240S\250\002\250#\250R\250t\2602\260T\270\022\2704\270r\300\021\330\010\017\210r\220\022\2201\330\010\017\210r\220\022\2201\330\010\017\210r\220\022\2201\330\010\017\210r\220\022\2201\330\010\017\210t\2202\220Q\330\010\017\210u\220B\220c\230\022\2304\230r\240\021\330\010\017\210t\2202\220Q\330\010\017\210s\220\"\220A\340\010\014\210A\330\014\r\210S\220\002\220!\330\014\016\210c\220\022\2201\330\014\016\210c\220\023\220C\220r\230\024\230R\230q\330\014\016\210c\220\023\220C\220r\230\023\230B\230c\240\022\2403\240b\250\004\250B\250a\330\014\016\210b\220\002\220#\220S\230\003\2302\230T\240\022\2401\330\014\016\210b\220\002\220#\220R\220s\230\"\230A\330\014\016\210c\220\023\220C\220r\230\023\230B\230d\240\"\240A\340\010\014\210A\330\014\020\220\002\220!\330\014\016\210d\220\"\220A\330\014\016\210d\220\"\220A\330\014\016\210d\220#\220Q\220d\230\"""\230D\240\002\240!\330\014\016\210d\220#\220S\230\002\230\"\230B\230d\240\"\240A\330\014\016\210d\220#\220S\230\002\230$\230b\240\003\2402\240S\250\002\250$\250b\260\001\330\014\016\210d\220#\220Q\220d\230\"\230D\240\002\240%\240r\250\021\330\014\016\210c\220\023\220C\220r\230\024\230R\230t\2402\240U\250\"\250A\330\014\016\210a\330\014\r\330\020\023\2202\220Q\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220!\340\014\016\210a\330\014\016\210c\220\023\220D\230\002\230$\230b\240\003\2402\240T\250\022\2503\250b\260\004\260B\260d\270\"\270C\270r\300\024\300R\300q\340\010\014\210A\330\014\r\210S\220\003\2204\220r\230\025\230b\240\001\330\014\016\210d\220\"\220A\330\014\016\210d\220\"\220A\330\014\016\210d\220\"\220A\330\014\016\210d\220#\220S\230\002\230\"\230B\230d\240\"\240A\330\014\016\210d\220#\220T\230\022\2304\230r\240\024\240R\240q\330\014\016\210a\330\014\r\330\020\024\220B\220a\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220!\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220!\340\014\016\210a\330\014\016\210c\220\023\220D\230\002\230#\230R\230s\240\"\240D\250\002\250$\250b\260\004\260B\260c\270\022\2704\270r\300\021\330\014\016\210c\220\022\2203\220c\230\024\230R\230t\2402\240Q\330\014\016\210c\220\023\220D\230\002\230#\230R\230t\2402\240S\250\002\250$\250b\260\003\2602\260T\270\022\2704\270r\300\024\300R\300t\3102\310Q\340\010\014\210A\330\014\r\210T\220\022\2204\220s\230!\2304\230r\240\024\240R\240q\330\014\016\210b\220\002\220$\220c\230\024\230R\230t\2402\240T\250\022\2503\250b\260\005\260R\260q\330\014\016\210a\330\014\r\330\020\024\220B\220a\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230""\001\330\020\022\220$\220b\230\001\330\020\022\220!\340\014\016\210a\330\014\016\210a\330\014\r\330\020\024\220B\220a\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220!\340\014\016\210a\330\014\016\210c\220\023\220C\220r\230\024\230R\230s\240\"\240C\240r\250\024\250R\250s\260\"\260D\270\002\270%\270r\300\021\330\014\016\210b\220\002\220$\220b\230\003\2302\230Q\330\014\016\210d\220\"\220D\230\002\230!\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220\"\220C\220s\230!\2304\230r\240\024\240R\240q\330\014\016\210b\220\002\220$\220c\230\024\230R\230u\240B\240a\330\014\016\210b\220\002\220\"\220C\220t\2302\230T\240\022\2404\240r\250\023\250B\250d\260\"\260A\330\014\016\210a\330\014\r\330\020\025\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220!\330\020\022\220#\220R\220t\2302\230Q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220\"\220B\220a\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\003\2302\230Q\340\014\016\210a\330\014\016\210a\330\014\r\330\020\024\220B\220a\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\003\2302\230Q\330\020\022\220$\220b\230\001\340\014\016\210a\340\010\014\210A\330\014\r\210U\220\"\220D\230\002\230!\330\014\016\210d\220\"\220D\230\002\230!\330\014\016\210b\220\002\220$\220b\230\003\2302\230Q\330\014\016\210b\220\002\220$\220c\230\025\230b\240\003\2402\240S\250\002\250#\250R\250t\2602\260S\270\002\270$\270b\300\002\300\"\300E""\310\022\3101\330\014\016\210a\330\014\r\330\020\025\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220!\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220!\330\020\022\220!\330\020\022\220#\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220!\340\014\016\210a\330\014\016\210d\220#\220R\220r\230\024\230R\230s\240\"\240D\250\002\250#\250R\250t\2602\260Q\330\014\016\210d\220#\220T\230\022\2304\230r\240\024\240R\240t\2502\250T\260\022\2605\270\002\270!\330\014\016\210c\220\023\220C\220r\230\024\230R\230t\2402\240S\250\002\250#\250R\250t\2602\260T\270\022\2705\300\002\300!\330\014\016\210b\220\002\220$\220c\230\024\230R\230u\240B\240a\330\014\016\210b\220\002\220#\220R\220s\230#\230T\240\022\2402\240R\240t\2502\250Q\330\014\016\210a\330\014\r\330\020\021\220\023\220B\220a\330\020\022\220#\220R\220u\230B\230a\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220$\220b\230\003\2302\230Q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\003\2302\230Q\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220t\2302\230Q\330\020\022\220$\220b\230\004\230B\230a\340\014\016\210a\330\014\016\210a\330\014\r\330\020\025\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\340\014\016\210a\330\014\016\210a\330\014\r\330\020\023\2202\220Q\330\020\022\220!\330\020\022\220%\220r\230\021\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\004\230B\230a""\330\020\022\220#\220R\220q\330\020\022\220#\220R\220s\230\"\230A\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\340\014\016\210a\340\010\014\210A\330\014\r\210U\220\"\220E\230\022\2301\330\014\016\210e\2202\220T\230\022\2301\330\014\016\210e\2202\220S\230\002\230!\330\014\016\210b\220\002\220%\220s\230$\230b\240\005\240R\240q\330\014\016\210e\2203\220d\230\"\230D\240\002\240$\240b\250\001\330\014\016\210c\220\023\220E\230\022\2303\230b\240\005\240R\240s\250\"\250E\260\022\2603\260b\270\005\270R\270q\330\014\016\210d\220\"\220D\230\002\230!\330\014\016\210d\220#\220T\230\022\2304\230r\240\025\240b\250\001\330\014\016\210a\330\014\017\210u\220B\220c\230\022\2305\240\002\240#\240R\240t\2502\250S\260\002\260$\260b\270\003\2702\270T\300\022\3004\300r\310\023\310B\310a\330\014\016\210a\330\014\016\210a\330\014\r\330\020\025\220R\220q\330\020\022\220%\220r\230\021\330\020\022\220%\220r\230\021\330\020\022\220%\220r\230\021\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220%\220r\230\021\330\020\022\220%\220r\230\021\330\020\022\220$\220b\230\004\230B\230a\330\020\022\220$\220b\230\004\230B\230a\330\020\022\220$\220b\230\004\230B\230a\330\020\022\220#\220R\220t\2302\230Q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\340\014\016\210a\330\014\016\210a\330\014\r\330\020\023\2202\220Q\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220t\2302\230Q\330\020\022\220#\220R\220t\2302\230Q\340\014\016\210a\330\014\016\210b\220\002\220#\220R\220s\230#\230T\240\022\2404\240r\250\023\250B\250d\260\"\260A\330\014\016\210a\330\014\r\330\020\025\220R\220q\330\020\022\220#\220R\220q\330\020\022\220\"\220B\220a\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220#\220R\220q\330\020\022\220!\330\020""\022\220%\220r\230\021\330\020\022\220%\220r\230\023\230B\230a\330\020\022\220$\220b\230\004\230B\230a\330\020\022\220!\330\020\022\220#\220R\220t\2302\230Q\330\020\022\220$\220b\230\001\340\014\016\210a\200A\360 \000\t\r\210E\220\024\320\025&\240a\330\010\014\210E\220\021\340\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210R\210r\220\021\330\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\340\010\014\210I\220Q\220c\230\022\2302\230R\230s\240\"\240B\240b\250\003\2503\250c\260\022\2604\260r\270\021\330\010\014\210L\230\001\230\023\230B\230c\240\022\2402\240R\240s\250\"\250B\250b\260\003\2602\260S\270\002\270\"\270B\270c\300\023\300C\300r\310\024\310R\310q\330\010\014\210A\330\014\r\210S\220\002\220#\220R\220r\230\022\2303\230b\240\003\2402\240R\240r\250\023\250B\250c\260\022\2602\260R\260s\270#\270S\300\002\300#\300R\300s\310\"\310D\320PR\320RS\340\010\014\210A\330\014\r\210T\220\022\2203\220b\230\001\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\022\2203\220b\230\003\2302\230Q\330\014\016\210b\220\002\220\"\220C\220r\230\022\2303\230b\240\004\240B\240a\340\010\014\210A\330\014\r\210S\220\002\220#\220R\220q\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\023\220C\220r\230\023\230B\230b\240\002\240#\240R\240t\2502\250Q\330\014\016\210c\220\022\2203\220c\230\023\230B\230d\240\"\240A\340\010\014\210A\330\014\r\210S\220\002\220#\220R\220q\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210c\220\023\220D\230\002\230$\230b\240\003\2402\240S\250\002\250#\250R\250t\2602\260Q\200A\330\010\014\210O\2301\200A\330\010\r\210T\320""\021\"\240!\330\010\013\2103\210c\220\024\220Q\330\014\022\320\022\"\240!\2401\200A\330\010\r\210T\320\021\"\240!\330\010\013\2103\210c\220\024\220Q\330\014\020\220\010\230\001\230\024\230Q\200A\360t\001\000\t\r\210E\220\024\320\025&\240a\330\010\014\210E\220\021\330\010\014\210E\220\021\340\010\r\210R\210r\220\021\330\010\r\210S\220\002\220!\330\010\r\210S\220\002\220!\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210R\210r\220\021\330\010\r\210S\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2203\220b\230\001\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210d\220\"\220A\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2203\220b\230\001\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2203\220b\230\001\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220#\220R\220q\330\010\016\210d\220\"\220A\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220$\220b\230\003\2302\230Q\330\010\016\210b\220\002\220\"\220B\220a\330\010\016\210b\220\002\220!\330\010\016\210b\220\002\220!\330\010\016\210c\220\022\2201\330\010\016\210c\220\022\2201\340\010\014\210A\330\014\r\210S""\220\002\220!\330\014\016\210c\220\022\2201\330\014\016\210c\220\023\220C\220r\230\023\230B\230d\240\"\240A\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\023\220C\220r\230\024\230R\230q\340\010\014\210A\330\014\r\210T\220\023\220A\220T\230\022\2304\230r\240\021\330\014\016\210d\220#\220T\230\022\2303\230b\240\004\240B\240a\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\022\2203\220b\230\001\330\014\016\210c\220\023\220D\230\002\230$\230b\240\004\240B\240c\250\022\2505\260\002\260!\330\014\016\210c\220\023\220D\230\002\230\"\230B\230c\240\022\2404\240r\250\021\340\010\014\210A\330\014\r\210T\220\022\2201\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220\"\220A\330\014\016\210d\220#\220T\230\022\2304\230r\240\021\330\014\016\210c\220\023\220C\220r\230\023\230B\230d\240\"\240D\250\002\250$\250b\260\004\260B\260c\270\022\2704\270r\300\021\330\014\016\210c\220\022\2203\220c\230\024\230R\230t\2402\240Q\330\014\016\210c\220\023\220C\220r\230\025\230b\240\001\340\010\014\210A\330\014\020\220\003\2203\220b\230\002\230\"\230D\240\002\240$\240b\250\003\2502\250T\260\022\2603\260b\270\004\270B\270a\330\014\016\210b\220\002\220$\220b\230\003\2302\230Q\330\014\016\210d\220\"\220D\230\002\230!\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220#\220S\230\002\230\"\230B\230d\240\"\240A\330\014\016\210c\220\022\2203\220c\230\023\230B\230e\2402\240Q\330\014\016\210b\220\002\220\"\220C\220t\2302\230S\240\002\240#\240R\240t\2502\250Q\330\014\016\210a\330\014\r\330\020\023\2202\220Q\330\020\022\220$\220b\230\001\330\020\022\220#\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220!\330\020\022\220#\220R\220q\340\014\016\210a\330\014\016\210c\220\023\220B\220b\230\004\230B\230b\240\002\240$\240b\250\004\250B\250d\260\"\260D\270\002\270!\340\010\014\210A\330\014\020\220\003\2204\220r\230\023\230B\230b\240\002\240$\240b\250\004\250B\250d\260""\"\260D\270\002\270#\270R\270t\3002\300T\310\022\3104\310r\320QR\330\014\016\210d\220\"\220C\220s\230$\230b\240\005\240R\240q\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220#\220T\230\022\2304\230r\240\023\240B\240b\250\002\250$\250b\260\001\330\014\016\210d\220\"\220C\220r\230\023\230B\230a\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210c\220\022\2203\220c\230\024\230R\230t\2402\240Q\330\014\016\210a\330\014\r\330\020\021\220\024\220R\220q\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220!\340\014\016\210a\330\014\016\210c\220\023\220D\230\002\230#\230R\230t\2402\240S\250\002\250$\250b\260\004\260B\260d\270\"\270E\300\022\3001\340\010\014\210A\330\014\r\210S\220\002\220$\220b\230\001\330\014\016\210d\220\"\220D\230\002\230!\330\014\016\210d\220#\220T\230\022\2304\230r\240\024\240R\240t\2502\250Q\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220\"\220C\220r\230\021\330\014\016\210d\220#\220T\230\022\2304\230r\240\021\330\014\016\210a\330\014\r\330\020\024\220B\220a\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220$\220b\230\001\330\020\022\220!\330\020\022\220\"\220B\220a\330\020\022\220#\220R\220q\340\014\016\210a\330\014\016\210c\220\022\2203\220c\230\024\230R\230t\2402\240S\250\002\250$\250b\260\001\330\014\016\210c\220\023\220D\230\002\230$\230b\240\003\2402\240T\250\022\2504\250r\260\023\260B\260e\2702\270Q\320\004\027\220q\330\010\017\210y\230\001\230\026\230q\340\010\014\210H\220A\330\010\014\210K\220q\330\010\014\210K\220q\330\010\014\210L\230\001\330\010\014\210L\230\001\330\010\014\210L\230\001";
- PyObject *data = NULL;
- CYTHON_UNUSED_VAR(__Pyx_DecompressString);
- #endif
- PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
- Py_ssize_t pos = 0;
- for (int i = 0; i < 203; i++) {
- Py_ssize_t bytes_length = index[i].length;
- PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
- if (likely(string) && i >= 4) PyUnicode_InternInPlace(&string);
- if (unlikely(!string)) {
- Py_XDECREF(data);
- __PYX_ERR(0, 1, __pyx_L1_error)
- }
- stringtab[i] = string;
- pos += bytes_length;
- }
- for (int i = 203; i < 210; i++) {
- Py_ssize_t bytes_length = index[i].length;
- PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
- stringtab[i] = string;
- pos += bytes_length;
- if (unlikely(!string)) {
- Py_XDECREF(data);
- __PYX_ERR(0, 1, __pyx_L1_error)
- }
- }
- Py_XDECREF(data);
- for (Py_ssize_t i = 0; i < 210; i++) {
- if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
- __PYX_ERR(0, 1, __pyx_L1_error)
- }
- }
- #if CYTHON_IMMORTAL_CONSTANTS
- {
- PyObject **table = stringtab + 203;
- for (Py_ssize_t i=0; i<7; ++i) {
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #if PY_VERSION_HEX < 0x030E0000
- if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
- #else
- if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
- #endif
- {
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
- }
- #else
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
- #endif
- }
- }
- #endif
- }
- {
- PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
- int8_t const cint_constants_1[] = {0,1,2};
- for (int i = 0; i < 3; i++) {
- numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
- if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
- }
- }
- #if CYTHON_IMMORTAL_CONSTANTS
- {
- PyObject **table = __pyx_mstate->__pyx_number_tab;
- for (Py_ssize_t i=0; i<3; ++i) {
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #if PY_VERSION_HEX < 0x030E0000
- if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
- #else
- if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
- #endif
- {
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
- }
- #else
- Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
- #endif
- }
- }
- #endif
- return 0;
- __pyx_L1_error:;
- return -1;
- }
- /* #### Code section: init_codeobjects ### */
- typedef struct {
- unsigned int argcount : 3;
- unsigned int num_posonly_args : 1;
- unsigned int num_kwonly_args : 1;
- unsigned int nlocals : 8;
- unsigned int flags : 10;
- unsigned int first_line : 9;
- } __Pyx_PyCode_New_function_description;
- /* NewCodeObj.proto */
- static PyObject* __Pyx_PyCode_New(
- const __Pyx_PyCode_New_function_description descr,
- PyObject * const *varnames,
- PyObject *filename,
- PyObject *funcname,
- PyObject *line_table,
- PyObject *tuple_dedup_map
- );
- static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
- PyObject* tuple_dedup_map = PyDict_New();
- if (unlikely(!tuple_dedup_map)) return -1;
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_glyphset};
- __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_y_q_HA_Kq_Kq_L_L_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 26};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p0};
- __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_moveTo, __pyx_mstate->__pyx_kp_b_iso88591_A_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 29};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p0};
- __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_closePath, __pyx_mstate->__pyx_kp_b_iso88591_A_T_3c_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 34};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p0};
- __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_endPath, __pyx_mstate->__pyx_kp_b_iso88591_A_T_3c_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 39};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_x1, __pyx_mstate->__pyx_n_u_y1, __pyx_mstate->__pyx_n_u_x0, __pyx_mstate->__pyx_n_u_y0, __pyx_mstate->__pyx_n_u_r12, __pyx_mstate->__pyx_n_u_r11, __pyx_mstate->__pyx_n_u_r10, __pyx_mstate->__pyx_n_u_r9, __pyx_mstate->__pyx_n_u_r8, __pyx_mstate->__pyx_n_u_r7, __pyx_mstate->__pyx_n_u_r6, __pyx_mstate->__pyx_n_u_r5, __pyx_mstate->__pyx_n_u_r4, __pyx_mstate->__pyx_n_u_r3, __pyx_mstate->__pyx_n_u_r2, __pyx_mstate->__pyx_n_u_r1, __pyx_mstate->__pyx_n_u_r0};
- __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_lineTo, __pyx_mstate->__pyx_kp_b_iso88591_A_E_a_E_S_S_Rr_S_S_S_Rr_Rr_Rr_Rr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 63, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 99};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_p2, __pyx_mstate->__pyx_n_u_x2, __pyx_mstate->__pyx_n_u_y2, __pyx_mstate->__pyx_n_u_x1, __pyx_mstate->__pyx_n_u_y1, __pyx_mstate->__pyx_n_u_x0, __pyx_mstate->__pyx_n_u_y0, __pyx_mstate->__pyx_n_u_r53, __pyx_mstate->__pyx_n_u_r52, __pyx_mstate->__pyx_n_u_r51, __pyx_mstate->__pyx_n_u_r50, __pyx_mstate->__pyx_n_u_r49, __pyx_mstate->__pyx_n_u_r48, __pyx_mstate->__pyx_n_u_r47, __pyx_mstate->__pyx_n_u_r46, __pyx_mstate->__pyx_n_u_r45, __pyx_mstate->__pyx_n_u_r44, __pyx_mstate->__pyx_n_u_r43, __pyx_mstate->__pyx_n_u_r42, __pyx_mstate->__pyx_n_u_r41, __pyx_mstate->__pyx_n_u_r40, __pyx_mstate->__pyx_n_u_r39, __pyx_mstate->__pyx_n_u_r38, __pyx_mstate->__pyx_n_u_r37, __pyx_mstate->__pyx_n_u_r36, __pyx_mstate->__pyx_n_u_r35, __pyx_mstate->__pyx_n_u_r34, __pyx_mstate->__pyx_n_u_r33, __pyx_mstate->__pyx_n_u_r32, __pyx_mstate->__pyx_n_u_r31, __pyx_mstate->__pyx_n_u_r30, __pyx_mstate->__pyx_n_u_r29, __pyx_mstate->__pyx_n_u_r28, __pyx_mstate->__pyx_n_u_r27, __pyx_mstate->__pyx_n_u_r26, __pyx_mstate->__pyx_n_u_r25, __pyx_mstate->__pyx_n_u_r24, __pyx_mstate->__pyx_n_u_r23, __pyx_mstate->__pyx_n_u_r22, __pyx_mstate->__pyx_n_u_r21, __pyx_mstate->__pyx_n_u_r20, __pyx_mstate->__pyx_n_u_r19, __pyx_mstate->__pyx_n_u_r18, __pyx_mstate->__pyx_n_u_r17, __pyx_mstate->__pyx_n_u_r16, __pyx_mstate->__pyx_n_u_r15, __pyx_mstate->__pyx_n_u_r14, __pyx_mstate->__pyx_n_u_r13, __pyx_mstate->__pyx_n_u_r12, __pyx_mstate->__pyx_n_u_r11, __pyx_mstate->__pyx_n_u_r10, __pyx_mstate->__pyx_n_u_r9, __pyx_mstate->__pyx_n_u_r8, __pyx_mstate->__pyx_n_u_r7, __pyx_mstate->__pyx_n_u_r6, __pyx_mstate->__pyx_n_u_r5, __pyx_mstate->__pyx_n_u_r4, __pyx_mstate->__pyx_n_u_r3, __pyx_mstate->__pyx_n_u_r2, __pyx_mstate->__pyx_n_u_r1, __pyx_mstate->__pyx_n_u_r0};
- __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_qCurveToOne, __pyx_mstate->__pyx_kp_b_iso88591_At_E_a_E_E_Rr_S_S_Rr_Rr_Rr_Rr_Rr, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 145, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 310};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_p2, __pyx_mstate->__pyx_n_u_p3, __pyx_mstate->__pyx_n_u_x3, __pyx_mstate->__pyx_n_u_y3, __pyx_mstate->__pyx_n_u_x2, __pyx_mstate->__pyx_n_u_y2, __pyx_mstate->__pyx_n_u_x1, __pyx_mstate->__pyx_n_u_y1, __pyx_mstate->__pyx_n_u_x0, __pyx_mstate->__pyx_n_u_y0, __pyx_mstate->__pyx_n_u_r132, __pyx_mstate->__pyx_n_u_r131, __pyx_mstate->__pyx_n_u_r130, __pyx_mstate->__pyx_n_u_r129, __pyx_mstate->__pyx_n_u_r128, __pyx_mstate->__pyx_n_u_r127, __pyx_mstate->__pyx_n_u_r126, __pyx_mstate->__pyx_n_u_r125, __pyx_mstate->__pyx_n_u_r124, __pyx_mstate->__pyx_n_u_r123, __pyx_mstate->__pyx_n_u_r122, __pyx_mstate->__pyx_n_u_r121, __pyx_mstate->__pyx_n_u_r120, __pyx_mstate->__pyx_n_u_r119, __pyx_mstate->__pyx_n_u_r118, __pyx_mstate->__pyx_n_u_r117, __pyx_mstate->__pyx_n_u_r116, __pyx_mstate->__pyx_n_u_r115, __pyx_mstate->__pyx_n_u_r114, __pyx_mstate->__pyx_n_u_r113, __pyx_mstate->__pyx_n_u_r112, __pyx_mstate->__pyx_n_u_r111, __pyx_mstate->__pyx_n_u_r110, __pyx_mstate->__pyx_n_u_r109, __pyx_mstate->__pyx_n_u_r108, __pyx_mstate->__pyx_n_u_r107, __pyx_mstate->__pyx_n_u_r106, __pyx_mstate->__pyx_n_u_r105, __pyx_mstate->__pyx_n_u_r104, __pyx_mstate->__pyx_n_u_r103, __pyx_mstate->__pyx_n_u_r102, __pyx_mstate->__pyx_n_u_r101, __pyx_mstate->__pyx_n_u_r100, __pyx_mstate->__pyx_n_u_r99, __pyx_mstate->__pyx_n_u_r98, __pyx_mstate->__pyx_n_u_r97, __pyx_mstate->__pyx_n_u_r96, __pyx_mstate->__pyx_n_u_r95, __pyx_mstate->__pyx_n_u_r94, __pyx_mstate->__pyx_n_u_r93, __pyx_mstate->__pyx_n_u_r92, __pyx_mstate->__pyx_n_u_r91, __pyx_mstate->__pyx_n_u_r90, __pyx_mstate->__pyx_n_u_r89, __pyx_mstate->__pyx_n_u_r88, __pyx_mstate->__pyx_n_u_r87, __pyx_mstate->__pyx_n_u_r86, __pyx_mstate->__pyx_n_u_r85, __pyx_mstate->__pyx_n_u_r84, __pyx_mstate->__pyx_n_u_r83, __pyx_mstate->__pyx_n_u_r82, __pyx_mstate->__pyx_n_u_r81, __pyx_mstate->__pyx_n_u_r80, __pyx_mstate->__pyx_n_u_r79, __pyx_mstate->__pyx_n_u_r78, __pyx_mstate->__pyx_n_u_r77, __pyx_mstate->__pyx_n_u_r76, __pyx_mstate->__pyx_n_u_r75, __pyx_mstate->__pyx_n_u_r74, __pyx_mstate->__pyx_n_u_r73, __pyx_mstate->__pyx_n_u_r72, __pyx_mstate->__pyx_n_u_r71, __pyx_mstate->__pyx_n_u_r70, __pyx_mstate->__pyx_n_u_r69, __pyx_mstate->__pyx_n_u_r68, __pyx_mstate->__pyx_n_u_r67, __pyx_mstate->__pyx_n_u_r66, __pyx_mstate->__pyx_n_u_r65, __pyx_mstate->__pyx_n_u_r64, __pyx_mstate->__pyx_n_u_r63, __pyx_mstate->__pyx_n_u_r62, __pyx_mstate->__pyx_n_u_r61, __pyx_mstate->__pyx_n_u_r60, __pyx_mstate->__pyx_n_u_r59, __pyx_mstate->__pyx_n_u_r58, __pyx_mstate->__pyx_n_u_r57, __pyx_mstate->__pyx_n_u_r56, __pyx_mstate->__pyx_n_u_r55, __pyx_mstate->__pyx_n_u_r54, __pyx_mstate->__pyx_n_u_r53, __pyx_mstate->__pyx_n_u_r52, __pyx_mstate->__pyx_n_u_r51, __pyx_mstate->__pyx_n_u_r50, __pyx_mstate->__pyx_n_u_r49, __pyx_mstate->__pyx_n_u_r48, __pyx_mstate->__pyx_n_u_r47, __pyx_mstate->__pyx_n_u_r46, __pyx_mstate->__pyx_n_u_r45, __pyx_mstate->__pyx_n_u_r44, __pyx_mstate->__pyx_n_u_r43, __pyx_mstate->__pyx_n_u_r42, __pyx_mstate->__pyx_n_u_r41, __pyx_mstate->__pyx_n_u_r40, __pyx_mstate->__pyx_n_u_r39, __pyx_mstate->__pyx_n_u_r38, __pyx_mstate->__pyx_n_u_r37, __pyx_mstate->__pyx_n_u_r36, __pyx_mstate->__pyx_n_u_r35, __pyx_mstate->__pyx_n_u_r34, __pyx_mstate->__pyx_n_u_r33, __pyx_mstate->__pyx_n_u_r32, __pyx_mstate->__pyx_n_u_r31, __pyx_mstate->__pyx_n_u_r30, __pyx_mstate->__pyx_n_u_r29, __pyx_mstate->__pyx_n_u_r28, __pyx_mstate->__pyx_n_u_r27, __pyx_mstate->__pyx_n_u_r26, __pyx_mstate->__pyx_n_u_r25, __pyx_mstate->__pyx_n_u_r24, __pyx_mstate->__pyx_n_u_r23, __pyx_mstate->__pyx_n_u_r22, __pyx_mstate->__pyx_n_u_r21, __pyx_mstate->__pyx_n_u_r20, __pyx_mstate->__pyx_n_u_r19, __pyx_mstate->__pyx_n_u_r18, __pyx_mstate->__pyx_n_u_r17, __pyx_mstate->__pyx_n_u_r16, __pyx_mstate->__pyx_n_u_r15, __pyx_mstate->__pyx_n_u_r14, __pyx_mstate->__pyx_n_u_r13, __pyx_mstate->__pyx_n_u_r12, __pyx_mstate->__pyx_n_u_r11, __pyx_mstate->__pyx_n_u_r10, __pyx_mstate->__pyx_n_u_r9, __pyx_mstate->__pyx_n_u_r8, __pyx_mstate->__pyx_n_u_r7, __pyx_mstate->__pyx_n_u_r6, __pyx_mstate->__pyx_n_u_r5, __pyx_mstate->__pyx_n_u_r4, __pyx_mstate->__pyx_n_u_r3, __pyx_mstate->__pyx_n_u_r2, __pyx_mstate->__pyx_n_u_r1, __pyx_mstate->__pyx_n_u_r0};
- __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_pens_momentsPen_py, __pyx_mstate->__pyx_n_u_curveToOne, __pyx_mstate->__pyx_kp_b_iso88591_AT_E_a_E_E_E_Rr_S_S_S_Rr_Rr_Rr_R, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
- }
- Py_DECREF(tuple_dedup_map);
- return 0;
- bad:
- Py_DECREF(tuple_dedup_map);
- return -1;
- }
- /* #### Code section: init_globals ### */
- static int __Pyx_InitGlobals(void) {
- /* PythonCompatibility.init */
- if (likely(__Pyx_init_co_variables() == 0)); else
-
- if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
- /* CommonTypesMetaclass.init */
- if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
-
- if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
- /* CachedMethodType.init */
- #if CYTHON_COMPILING_IN_LIMITED_API
- {
- PyObject *typesModule=NULL;
- typesModule = PyImport_ImportModule("types");
- if (typesModule) {
- __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
- Py_DECREF(typesModule);
- }
- } // error handling follows
- #endif
-
- if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
- /* CythonFunctionShared.init */
- if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
-
- if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
- return 0;
- __pyx_L1_error:;
- return -1;
- }
- /* #### Code section: cleanup_globals ### */
- /* #### Code section: cleanup_module ### */
- /* #### Code section: main_method ### */
- /* #### Code section: utility_code_pragmas ### */
- #ifdef _MSC_VER
- #pragma warning( push )
- /* Warning 4127: conditional expression is constant
- * Cython uses constant conditional expressions to allow in inline functions to be optimized at
- * compile-time, so this warning is not useful
- */
- #pragma warning( disable : 4127 )
- #endif
- /* #### Code section: utility_code_def ### */
- /* --- Runtime support code --- */
- /* Refnanny */
- #if CYTHON_REFNANNY
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
- PyObject *m = NULL, *p = NULL;
- void *r = NULL;
- m = PyImport_ImportModule(modname);
- if (!m) goto end;
- p = PyObject_GetAttrString(m, "RefNannyAPI");
- if (!p) goto end;
- r = PyLong_AsVoidPtr(p);
- end:
- Py_XDECREF(p);
- Py_XDECREF(m);
- return (__Pyx_RefNannyAPIStruct *)r;
- }
- #endif
- /* TupleAndListFromArray (used by fastcall) */
- #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
- static CYTHON_INLINE PyObject *
- __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
- {
- PyObject *res;
- Py_ssize_t i;
- if (n <= 0) {
- return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
- }
- res = PyTuple_New(n);
- if (unlikely(res == NULL)) return NULL;
- for (i = 0; i < n; i++) {
- if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
- Py_DECREF(res);
- return NULL;
- }
- Py_INCREF(src[i]);
- }
- return res;
- }
- #elif CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
- PyObject *v;
- Py_ssize_t i;
- for (i = 0; i < length; i++) {
- v = dest[i] = src[i];
- Py_INCREF(v);
- }
- }
- static CYTHON_INLINE PyObject *
- __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
- {
- PyObject *res;
- if (n <= 0) {
- return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
- }
- res = PyTuple_New(n);
- if (unlikely(res == NULL)) return NULL;
- __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
- return res;
- }
- static CYTHON_INLINE PyObject *
- __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
- {
- PyObject *res;
- if (n <= 0) {
- return PyList_New(0);
- }
- res = PyList_New(n);
- if (unlikely(res == NULL)) return NULL;
- __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
- return res;
- }
- #endif
- /* BytesEquals (used by UnicodeEquals) */
- static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
- #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
- !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
- return PyObject_RichCompareBool(s1, s2, equals);
- #else
- if (s1 == s2) {
- return (equals == Py_EQ);
- } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
- const char *ps1, *ps2;
- Py_ssize_t length = PyBytes_GET_SIZE(s1);
- if (length != PyBytes_GET_SIZE(s2))
- return (equals == Py_NE);
- ps1 = PyBytes_AS_STRING(s1);
- ps2 = PyBytes_AS_STRING(s2);
- if (ps1[0] != ps2[0]) {
- return (equals == Py_NE);
- } else if (length == 1) {
- return (equals == Py_EQ);
- } else {
- int result;
- #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
- Py_hash_t hash1, hash2;
- hash1 = ((PyBytesObject*)s1)->ob_shash;
- hash2 = ((PyBytesObject*)s2)->ob_shash;
- if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
- return (equals == Py_NE);
- }
- #endif
- result = memcmp(ps1, ps2, (size_t)length);
- return (equals == Py_EQ) ? (result == 0) : (result != 0);
- }
- } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
- return (equals == Py_NE);
- } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
- return (equals == Py_NE);
- } else {
- int result;
- PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
- if (!py_result)
- return -1;
- result = __Pyx_PyObject_IsTrue(py_result);
- Py_DECREF(py_result);
- return result;
- }
- #endif
- }
- /* UnicodeEquals (used by fastcall) */
- static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
- #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
- return PyObject_RichCompareBool(s1, s2, equals);
- #else
- int s1_is_unicode, s2_is_unicode;
- if (s1 == s2) {
- goto return_eq;
- }
- s1_is_unicode = PyUnicode_CheckExact(s1);
- s2_is_unicode = PyUnicode_CheckExact(s2);
- if (s1_is_unicode & s2_is_unicode) {
- Py_ssize_t length, length2;
- int kind;
- void *data1, *data2;
- #if !CYTHON_COMPILING_IN_LIMITED_API
- if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
- return -1;
- #endif
- length = __Pyx_PyUnicode_GET_LENGTH(s1);
- #if !CYTHON_ASSUME_SAFE_SIZE
- if (unlikely(length < 0)) return -1;
- #endif
- length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
- #if !CYTHON_ASSUME_SAFE_SIZE
- if (unlikely(length2 < 0)) return -1;
- #endif
- if (length != length2) {
- goto return_ne;
- }
- #if CYTHON_USE_UNICODE_INTERNALS
- {
- Py_hash_t hash1, hash2;
- hash1 = ((PyASCIIObject*)s1)->hash;
- hash2 = ((PyASCIIObject*)s2)->hash;
- if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
- goto return_ne;
- }
- }
- #endif
- kind = __Pyx_PyUnicode_KIND(s1);
- if (kind != __Pyx_PyUnicode_KIND(s2)) {
- goto return_ne;
- }
- data1 = __Pyx_PyUnicode_DATA(s1);
- data2 = __Pyx_PyUnicode_DATA(s2);
- if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
- goto return_ne;
- } else if (length == 1) {
- goto return_eq;
- } else {
- int result = memcmp(data1, data2, (size_t)(length * kind));
- return (equals == Py_EQ) ? (result == 0) : (result != 0);
- }
- } else if ((s1 == Py_None) & s2_is_unicode) {
- goto return_ne;
- } else if ((s2 == Py_None) & s1_is_unicode) {
- goto return_ne;
- } else {
- int result;
- PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
- if (!py_result)
- return -1;
- result = __Pyx_PyObject_IsTrue(py_result);
- Py_DECREF(py_result);
- return result;
- }
- return_eq:
- return (equals == Py_EQ);
- return_ne:
- return (equals == Py_NE);
- #endif
- }
- /* fastcall */
- #if CYTHON_METH_FASTCALL
- static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
- {
- Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
- #if !CYTHON_ASSUME_SAFE_SIZE
- if (unlikely(n == -1)) return NULL;
- #endif
- for (i = 0; i < n; i++)
- {
- PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely(!namei)) return NULL;
- #endif
- if (s == namei) return kwvalues[i];
- }
- for (i = 0; i < n; i++)
- {
- PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely(!namei)) return NULL;
- #endif
- int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
- if (unlikely(eq != 0)) {
- if (unlikely(eq < 0)) return NULL;
- return kwvalues[i];
- }
- }
- return NULL;
- }
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
- CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
- Py_ssize_t i, nkwargs;
- PyObject *dict;
- #if !CYTHON_ASSUME_SAFE_SIZE
- nkwargs = PyTuple_Size(kwnames);
- if (unlikely(nkwargs < 0)) return NULL;
- #else
- nkwargs = PyTuple_GET_SIZE(kwnames);
- #endif
- dict = PyDict_New();
- if (unlikely(!dict))
- return NULL;
- for (i=0; i<nkwargs; i++) {
- #if !CYTHON_ASSUME_SAFE_MACROS
- PyObject *key = PyTuple_GetItem(kwnames, i);
- if (!key) goto bad;
- #else
- PyObject *key = PyTuple_GET_ITEM(kwnames, i);
- #endif
- if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
- goto bad;
- }
- return dict;
- bad:
- Py_DECREF(dict);
- return NULL;
- }
- #endif
- #endif
- /* PyObjectCall (used by PyObjectFastCall) */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- PyObject *result;
- ternaryfunc call = Py_TYPE(func)->tp_call;
- if (unlikely(!call))
- return PyObject_Call(func, arg, kw);
- if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
- return NULL;
- result = (*call)(func, arg, kw);
- Py_LeaveRecursiveCall();
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
- PyErr_SetString(
- PyExc_SystemError,
- "NULL result without error in PyObject_Call");
- }
- return result;
- }
- #endif
- /* PyObjectCallMethO (used by PyObjectFastCall) */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
- PyObject *self, *result;
- PyCFunction cfunc;
- cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
- self = __Pyx_CyOrPyCFunction_GET_SELF(func);
- if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
- return NULL;
- result = cfunc(self, arg);
- Py_LeaveRecursiveCall();
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
- PyErr_SetString(
- PyExc_SystemError,
- "NULL result without error in PyObject_Call");
- }
- return result;
- }
- #endif
- /* PyObjectFastCall (used by PyObjectCallOneArg) */
- #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
- static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
- PyObject *argstuple;
- PyObject *result = 0;
- size_t i;
- argstuple = PyTuple_New((Py_ssize_t)nargs);
- if (unlikely(!argstuple)) return NULL;
- for (i = 0; i < nargs; i++) {
- Py_INCREF(args[i]);
- if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
- }
- result = __Pyx_PyObject_Call(func, argstuple, kwargs);
- bad:
- Py_DECREF(argstuple);
- return result;
- }
- #endif
- #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
- #if PY_VERSION_HEX < 0x03090000
- #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
- #elif CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
- PyTypeObject *tp = Py_TYPE(callable);
- #if defined(__Pyx_CyFunction_USED)
- if (__Pyx_CyFunction_CheckExact(callable)) {
- return __Pyx_CyFunction_func_vectorcall(callable);
- }
- #endif
- if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
- return NULL;
- }
- assert(PyCallable_Check(callable));
- Py_ssize_t offset = tp->tp_vectorcall_offset;
- assert(offset > 0);
- vectorcallfunc ptr;
- memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
- return ptr;
- }
- #else
- #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
- #endif
- #endif
- static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
- Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (nargs == 0 && kwargs == NULL) {
- if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
- return __Pyx_PyObject_CallMethO(func, NULL);
- }
- else if (nargs == 1 && kwargs == NULL) {
- if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
- return __Pyx_PyObject_CallMethO(func, args[0]);
- }
- #endif
- if (kwargs == NULL) {
- #if CYTHON_VECTORCALL
- #if CYTHON_COMPILING_IN_LIMITED_API
- return PyObject_Vectorcall(func, args, _nargs, NULL);
- #else
- vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
- if (f) {
- return f(func, args, _nargs, NULL);
- }
- #endif
- #endif
- }
- if (nargs == 0) {
- return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
- }
- #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
- return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
- #else
- return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
- #endif
- }
- /* PyObjectCallOneArg (used by CallUnboundCMethod0) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
- PyObject *args[2] = {NULL, arg};
- return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
- }
- /* PyObjectGetAttrStr (used by UnpackUnboundCMethod) */
- #if CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
- PyTypeObject* tp = Py_TYPE(obj);
- if (likely(tp->tp_getattro))
- return tp->tp_getattro(obj, attr_name);
- return PyObject_GetAttr(obj, attr_name);
- }
- #endif
- /* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
- static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
- PyObject *result;
- PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
- if (unlikely(!selfless_args)) return NULL;
- result = PyObject_Call(method, selfless_args, kwargs);
- Py_DECREF(selfless_args);
- return result;
- }
- #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
- static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
- return _PyObject_Vectorcall
- (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
- }
- #else
- static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
- return
- #if PY_VERSION_HEX < 0x03090000
- _PyObject_Vectorcall
- #else
- PyObject_Vectorcall
- #endif
- (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
- }
- #endif
- static PyMethodDef __Pyx_UnboundCMethod_Def = {
- "CythonUnboundCMethod",
- __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
- METH_VARARGS | METH_KEYWORDS,
- #else
- METH_FASTCALL | METH_KEYWORDS,
- #endif
- NULL
- };
- static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
- PyObject *method, *result=NULL;
- method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
- if (unlikely(!method))
- return -1;
- result = method;
- #if CYTHON_COMPILING_IN_CPYTHON
- if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
- {
- PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
- target->func = descr->d_method->ml_meth;
- target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
- } else
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- #else
- if (PyCFunction_Check(method))
- #endif
- {
- PyObject *self;
- int self_found;
- #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
- self = PyObject_GetAttrString(method, "__self__");
- if (!self) {
- PyErr_Clear();
- }
- #else
- self = PyCFunction_GET_SELF(method);
- #endif
- self_found = (self && self != Py_None);
- #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
- Py_XDECREF(self);
- #endif
- if (self_found) {
- PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
- if (unlikely(!unbound_method)) return -1;
- Py_DECREF(method);
- result = unbound_method;
- }
- }
- #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- if (unlikely(target->method)) {
- Py_DECREF(result);
- } else
- #endif
- target->method = result;
- return 0;
- }
- /* CallUnboundCMethod0 */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
- int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
- if (likely(was_initialized == 2 && cfunc->func)) {
- if (likely(cfunc->flag == METH_NOARGS))
- return __Pyx_CallCFunction(cfunc, self, NULL);
- if (likely(cfunc->flag == METH_FASTCALL))
- return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
- if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
- return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
- if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
- return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
- if (cfunc->flag == METH_VARARGS)
- return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
- return __Pyx__CallUnboundCMethod0(cfunc, self);
- }
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- else if (unlikely(was_initialized == 1)) {
- __Pyx_CachedCFunction tmp_cfunc = {
- #ifndef __cplusplus
- 0
- #endif
- };
- tmp_cfunc.type = cfunc->type;
- tmp_cfunc.method_name = cfunc->method_name;
- return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
- }
- #endif
- PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
- __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
- return result;
- }
- #endif
- static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
- PyObject *result;
- if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
- result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
- return result;
- }
- /* py_dict_items (used by OwnedDictNext) */
- static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
- return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
- }
- /* py_dict_values (used by OwnedDictNext) */
- static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
- return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
- }
- /* OwnedDictNext (used by ParseKeywordsImpl) */
- #if CYTHON_AVOID_BORROWED_REFS
- static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
- PyObject *next = NULL;
- if (!*ppos) {
- if (pvalue) {
- PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
- if (unlikely(!dictview)) goto bad;
- *ppos = PyObject_GetIter(dictview);
- Py_DECREF(dictview);
- } else {
- *ppos = PyObject_GetIter(p);
- }
- if (unlikely(!*ppos)) goto bad;
- }
- next = PyIter_Next(*ppos);
- if (!next) {
- if (PyErr_Occurred()) goto bad;
- return 0;
- }
- if (pkey && pvalue) {
- *pkey = __Pyx_PySequence_ITEM(next, 0);
- if (unlikely(*pkey)) goto bad;
- *pvalue = __Pyx_PySequence_ITEM(next, 1);
- if (unlikely(*pvalue)) goto bad;
- Py_DECREF(next);
- } else if (pkey) {
- *pkey = next;
- } else {
- assert(pvalue);
- *pvalue = next;
- }
- return 1;
- bad:
- Py_XDECREF(next);
- #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
- PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
- #else
- PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
- #endif
- if (pkey) *pkey = NULL;
- if (pvalue) *pvalue = NULL;
- return 0;
- }
- #else // !CYTHON_AVOID_BORROWED_REFS
- static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
- int result = PyDict_Next(p, ppos, pkey, pvalue);
- if (likely(result == 1)) {
- if (pkey) Py_INCREF(*pkey);
- if (pvalue) Py_INCREF(*pvalue);
- }
- return result;
- }
- #endif
- /* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
- static void __Pyx_RaiseDoubleKeywordsError(
- const char* func_name,
- PyObject* kw_name)
- {
- PyErr_Format(PyExc_TypeError,
- "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
- }
- /* CallUnboundCMethod2 */
- #if CYTHON_COMPILING_IN_CPYTHON
- static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
- int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
- if (likely(was_initialized == 2 && cfunc->func)) {
- PyObject *args[2] = {arg1, arg2};
- if (cfunc->flag == METH_FASTCALL) {
- return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
- }
- if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
- return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
- }
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- else if (unlikely(was_initialized == 1)) {
- __Pyx_CachedCFunction tmp_cfunc = {
- #ifndef __cplusplus
- 0
- #endif
- };
- tmp_cfunc.type = cfunc->type;
- tmp_cfunc.method_name = cfunc->method_name;
- return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
- }
- #endif
- PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
- __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
- return result;
- }
- #endif
- static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
- if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
- #if CYTHON_COMPILING_IN_CPYTHON
- if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
- PyObject *result = NULL;
- PyObject *args = PyTuple_New(2);
- if (unlikely(!args)) return NULL;
- Py_INCREF(arg1);
- PyTuple_SET_ITEM(args, 0, arg1);
- Py_INCREF(arg2);
- PyTuple_SET_ITEM(args, 1, arg2);
- if (cfunc->flag & METH_KEYWORDS)
- result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
- else
- result = __Pyx_CallCFunction(cfunc, self, args);
- Py_DECREF(args);
- return result;
- }
- #endif
- {
- PyObject *args[4] = {NULL, self, arg1, arg2};
- return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
- }
- }
- /* ParseKeywordsImpl (used by ParseKeywords) */
- static int __Pyx_ValidateDuplicatePosArgs(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject ** const *first_kw_arg,
- const char* function_name)
- {
- PyObject ** const *name = argnames;
- while (name != first_kw_arg) {
- PyObject *key = **name;
- int found = PyDict_Contains(kwds, key);
- if (unlikely(found)) {
- if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
- goto bad;
- }
- name++;
- }
- return 0;
- bad:
- return -1;
- }
- #if CYTHON_USE_UNICODE_INTERNALS
- static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
- int kind;
- Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
- if (len != PyUnicode_GET_LENGTH(s2)) return 0;
- kind = PyUnicode_KIND(s1);
- if (kind != PyUnicode_KIND(s2)) return 0;
- const void *data1 = PyUnicode_DATA(s1);
- const void *data2 = PyUnicode_DATA(s2);
- return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
- }
- #endif
- static int __Pyx_MatchKeywordArg_str(
- PyObject *key,
- PyObject ** const argnames[],
- PyObject ** const *first_kw_arg,
- size_t *index_found,
- const char *function_name)
- {
- PyObject ** const *name;
- #if CYTHON_USE_UNICODE_INTERNALS
- Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
- if (unlikely(key_hash == -1)) {
- key_hash = PyObject_Hash(key);
- if (unlikely(key_hash == -1))
- goto bad;
- }
- #endif
- name = first_kw_arg;
- while (*name) {
- PyObject *name_str = **name;
- #if CYTHON_USE_UNICODE_INTERNALS
- if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
- *index_found = (size_t) (name - argnames);
- return 1;
- }
- #else
- #if CYTHON_ASSUME_SAFE_SIZE
- if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
- #endif
- {
- int cmp = PyUnicode_Compare(name_str, key);
- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
- if (cmp == 0) {
- *index_found = (size_t) (name - argnames);
- return 1;
- }
- }
- #endif
- name++;
- }
- name = argnames;
- while (name != first_kw_arg) {
- PyObject *name_str = **name;
- #if CYTHON_USE_UNICODE_INTERNALS
- if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
- if (__Pyx_UnicodeKeywordsEqual(name_str, key))
- goto arg_passed_twice;
- }
- #else
- #if CYTHON_ASSUME_SAFE_SIZE
- if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
- #endif
- {
- if (unlikely(name_str == key)) goto arg_passed_twice;
- int cmp = PyUnicode_Compare(name_str, key);
- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
- if (cmp == 0) goto arg_passed_twice;
- }
- #endif
- name++;
- }
- return 0;
- arg_passed_twice:
- __Pyx_RaiseDoubleKeywordsError(function_name, key);
- goto bad;
- bad:
- return -1;
- }
- static int __Pyx_MatchKeywordArg_nostr(
- PyObject *key,
- PyObject ** const argnames[],
- PyObject ** const *first_kw_arg,
- size_t *index_found,
- const char *function_name)
- {
- PyObject ** const *name;
- if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
- name = first_kw_arg;
- while (*name) {
- int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
- if (cmp == 1) {
- *index_found = (size_t) (name - argnames);
- return 1;
- }
- if (unlikely(cmp == -1)) goto bad;
- name++;
- }
- name = argnames;
- while (name != first_kw_arg) {
- int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
- if (unlikely(cmp != 0)) {
- if (cmp == 1) goto arg_passed_twice;
- else goto bad;
- }
- name++;
- }
- return 0;
- arg_passed_twice:
- __Pyx_RaiseDoubleKeywordsError(function_name, key);
- goto bad;
- invalid_keyword_type:
- PyErr_Format(PyExc_TypeError,
- "%.200s() keywords must be strings", function_name);
- goto bad;
- bad:
- return -1;
- }
- static CYTHON_INLINE int __Pyx_MatchKeywordArg(
- PyObject *key,
- PyObject ** const argnames[],
- PyObject ** const *first_kw_arg,
- size_t *index_found,
- const char *function_name)
- {
- return likely(PyUnicode_CheckExact(key)) ?
- __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
- __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
- }
- static void __Pyx_RejectUnknownKeyword(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject ** const *first_kw_arg,
- const char *function_name)
- {
- #if CYTHON_AVOID_BORROWED_REFS
- PyObject *pos = NULL;
- #else
- Py_ssize_t pos = 0;
- #endif
- PyObject *key = NULL;
- __Pyx_BEGIN_CRITICAL_SECTION(kwds);
- while (
- #if CYTHON_AVOID_BORROWED_REFS
- __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
- #else
- PyDict_Next(kwds, &pos, &key, NULL)
- #endif
- ) {
- PyObject** const *name = first_kw_arg;
- while (*name && (**name != key)) name++;
- if (!*name) {
- size_t index_found = 0;
- int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
- if (cmp != 1) {
- if (cmp == 0) {
- PyErr_Format(PyExc_TypeError,
- "%s() got an unexpected keyword argument '%U'",
- function_name, key);
- }
- #if CYTHON_AVOID_BORROWED_REFS
- Py_DECREF(key);
- #endif
- break;
- }
- }
- #if CYTHON_AVOID_BORROWED_REFS
- Py_DECREF(key);
- #endif
- }
- __Pyx_END_CRITICAL_SECTION();
- #if CYTHON_AVOID_BORROWED_REFS
- Py_XDECREF(pos);
- #endif
- assert(PyErr_Occurred());
- }
- static int __Pyx_ParseKeywordDict(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject *values[],
- Py_ssize_t num_pos_args,
- Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs)
- {
- PyObject** const *name;
- PyObject** const *first_kw_arg = argnames + num_pos_args;
- Py_ssize_t extracted = 0;
- #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
- if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
- #endif
- name = first_kw_arg;
- while (*name && num_kwargs > extracted) {
- PyObject * key = **name;
- PyObject *value;
- int found = 0;
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- found = PyDict_GetItemRef(kwds, key, &value);
- #else
- value = PyDict_GetItemWithError(kwds, key);
- if (value) {
- Py_INCREF(value);
- found = 1;
- } else {
- if (unlikely(PyErr_Occurred())) goto bad;
- }
- #endif
- if (found) {
- if (unlikely(found < 0)) goto bad;
- values[name-argnames] = value;
- extracted++;
- }
- name++;
- }
- if (num_kwargs > extracted) {
- if (ignore_unknown_kwargs) {
- if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
- goto bad;
- } else {
- __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
- goto bad;
- }
- }
- return 0;
- bad:
- return -1;
- }
- static int __Pyx_ParseKeywordDictToDict(
- PyObject *kwds,
- PyObject ** const argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- const char* function_name)
- {
- PyObject** const *name;
- PyObject** const *first_kw_arg = argnames + num_pos_args;
- Py_ssize_t len;
- #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
- if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
- #endif
- if (PyDict_Update(kwds2, kwds) < 0) goto bad;
- name = first_kw_arg;
- while (*name) {
- PyObject *key = **name;
- PyObject *value;
- #if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
- int found = PyDict_Pop(kwds2, key, &value);
- if (found) {
- if (unlikely(found < 0)) goto bad;
- values[name-argnames] = value;
- }
- #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- int found = PyDict_GetItemRef(kwds2, key, &value);
- if (found) {
- if (unlikely(found < 0)) goto bad;
- values[name-argnames] = value;
- if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
- }
- #else
- #if CYTHON_COMPILING_IN_CPYTHON
- value = _PyDict_Pop(kwds2, key, kwds2);
- #else
- value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
- #endif
- if (value == kwds2) {
- Py_DECREF(value);
- } else {
- if (unlikely(!value)) goto bad;
- values[name-argnames] = value;
- }
- #endif
- name++;
- }
- len = PyDict_Size(kwds2);
- if (len > 0) {
- return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
- } else if (unlikely(len == -1)) {
- goto bad;
- }
- return 0;
- bad:
- return -1;
- }
- static int __Pyx_ParseKeywordsTuple(
- PyObject *kwds,
- PyObject * const *kwvalues,
- PyObject ** const argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs)
- {
- PyObject *key = NULL;
- PyObject** const * name;
- PyObject** const *first_kw_arg = argnames + num_pos_args;
- for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
- #if CYTHON_AVOID_BORROWED_REFS
- key = __Pyx_PySequence_ITEM(kwds, pos);
- #else
- key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
- #endif
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely(!key)) goto bad;
- #endif
- name = first_kw_arg;
- while (*name && (**name != key)) name++;
- if (*name) {
- PyObject *value = kwvalues[pos];
- values[name-argnames] = __Pyx_NewRef(value);
- } else {
- size_t index_found = 0;
- int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
- if (cmp == 1) {
- PyObject *value = kwvalues[pos];
- values[index_found] = __Pyx_NewRef(value);
- } else {
- if (unlikely(cmp == -1)) goto bad;
- if (kwds2) {
- PyObject *value = kwvalues[pos];
- if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
- } else if (!ignore_unknown_kwargs) {
- goto invalid_keyword;
- }
- }
- }
- #if CYTHON_AVOID_BORROWED_REFS
- Py_DECREF(key);
- key = NULL;
- #endif
- }
- return 0;
- invalid_keyword:
- PyErr_Format(PyExc_TypeError,
- "%s() got an unexpected keyword argument '%U'",
- function_name, key);
- goto bad;
- bad:
- #if CYTHON_AVOID_BORROWED_REFS
- Py_XDECREF(key);
- #endif
- return -1;
- }
- /* ParseKeywords */
- static int __Pyx_ParseKeywords(
- PyObject *kwds,
- PyObject * const *kwvalues,
- PyObject ** const argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- Py_ssize_t num_kwargs,
- const char* function_name,
- int ignore_unknown_kwargs)
- {
- if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
- return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
- else if (kwds2)
- return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
- else
- return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
- }
- /* RaiseArgTupleInvalid */
- static void __Pyx_RaiseArgtupleInvalid(
- const char* func_name,
- int exact,
- Py_ssize_t num_min,
- Py_ssize_t num_max,
- Py_ssize_t num_found)
- {
- Py_ssize_t num_expected;
- const char *more_or_less;
- if (num_found < num_min) {
- num_expected = num_min;
- more_or_less = "at least";
- } else {
- num_expected = num_max;
- more_or_less = "at most";
- }
- if (exact) {
- more_or_less = "exactly";
- }
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
- func_name, more_or_less, num_expected,
- (num_expected == 1) ? "" : "s", num_found);
- }
- /* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
- #if CYTHON_FAST_THREAD_STATE
- static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
- Py_ssize_t i, n;
- n = PyTuple_GET_SIZE(tuple);
- for (i=0; i<n; i++) {
- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
- }
- for (i=0; i<n; i++) {
- if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
- }
- return 0;
- }
- static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
- int result;
- PyObject *exc_type;
- #if PY_VERSION_HEX >= 0x030C00A6
- PyObject *current_exception = tstate->current_exception;
- if (unlikely(!current_exception)) return 0;
- exc_type = (PyObject*) Py_TYPE(current_exception);
- if (exc_type == err) return 1;
- #else
- exc_type = tstate->curexc_type;
- if (exc_type == err) return 1;
- if (unlikely(!exc_type)) return 0;
- #endif
- #if CYTHON_AVOID_BORROWED_REFS
- Py_INCREF(exc_type);
- #endif
- if (unlikely(PyTuple_Check(err))) {
- result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
- } else {
- result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
- }
- #if CYTHON_AVOID_BORROWED_REFS
- Py_DECREF(exc_type);
- #endif
- return result;
- }
- #endif
- /* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
- #if CYTHON_FAST_THREAD_STATE
- static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
- #if PY_VERSION_HEX >= 0x030C00A6
- PyObject *tmp_value;
- assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
- if (value) {
- #if CYTHON_COMPILING_IN_CPYTHON
- if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
- #endif
- PyException_SetTraceback(value, tb);
- }
- tmp_value = tstate->current_exception;
- tstate->current_exception = value;
- Py_XDECREF(tmp_value);
- Py_XDECREF(type);
- Py_XDECREF(tb);
- #else
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- tmp_type = tstate->curexc_type;
- tmp_value = tstate->curexc_value;
- tmp_tb = tstate->curexc_traceback;
- tstate->curexc_type = type;
- tstate->curexc_value = value;
- tstate->curexc_traceback = tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
- #endif
- }
- static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
- #if PY_VERSION_HEX >= 0x030C00A6
- PyObject* exc_value;
- exc_value = tstate->current_exception;
- tstate->current_exception = 0;
- *value = exc_value;
- *type = NULL;
- *tb = NULL;
- if (exc_value) {
- *type = (PyObject*) Py_TYPE(exc_value);
- Py_INCREF(*type);
- #if CYTHON_COMPILING_IN_CPYTHON
- *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
- Py_XINCREF(*tb);
- #else
- *tb = PyException_GetTraceback(exc_value);
- #endif
- }
- #else
- *type = tstate->curexc_type;
- *value = tstate->curexc_value;
- *tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
- #endif
- }
- #endif
- /* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
- #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
- static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
- __Pyx_PyErr_Clear();
- }
- #endif
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
- PyObject *result;
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
- return result;
- #else
- #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
- PyTypeObject* tp = Py_TYPE(obj);
- if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
- return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
- }
- #endif
- result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
- if (unlikely(!result)) {
- __Pyx_PyObject_GetAttrStr_ClearAttributeError();
- }
- return result;
- #endif
- }
- /* GetBuiltinName (used by GetModuleGlobalName) */
- static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
- PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
- if (unlikely(!result) && !PyErr_Occurred()) {
- PyErr_Format(PyExc_NameError,
- "name '%U' is not defined", name);
- }
- return result;
- }
- /* PyDictVersioning (used by GetModuleGlobalName) */
- #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
- PyObject *dict = Py_TYPE(obj)->tp_dict;
- return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
- }
- static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
- PyObject **dictptr = NULL;
- Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
- if (offset) {
- #if CYTHON_COMPILING_IN_CPYTHON
- dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
- #else
- dictptr = _PyObject_GetDictPtr(obj);
- #endif
- }
- return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
- }
- static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
- PyObject *dict = Py_TYPE(obj)->tp_dict;
- if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
- return 0;
- return obj_dict_version == __Pyx_get_object_dict_version(obj);
- }
- #endif
- /* GetModuleGlobalName */
- #if CYTHON_USE_DICT_VERSIONS
- static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
- #else
- static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
- #endif
- {
- PyObject *result;
- #if CYTHON_COMPILING_IN_LIMITED_API
- if (unlikely(!__pyx_m)) {
- if (!PyErr_Occurred())
- PyErr_SetNone(PyExc_NameError);
- return NULL;
- }
- result = PyObject_GetAttr(__pyx_m, name);
- if (likely(result)) {
- return result;
- }
- PyErr_Clear();
- #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
- if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
- __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
- if (likely(result)) {
- return result;
- }
- #else
- result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
- __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
- if (likely(result)) {
- return __Pyx_NewRef(result);
- }
- PyErr_Clear();
- #endif
- return __Pyx_GetBuiltinName(name);
- }
- /* PyObjectSetAttrStr */
- #if CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
- PyTypeObject* tp = Py_TYPE(obj);
- if (likely(tp->tp_setattro))
- return tp->tp_setattro(obj, attr_name, value);
- return PyObject_SetAttr(obj, attr_name, value);
- }
- #endif
- /* PyObjectFastCallMethod */
- #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
- static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
- PyObject *result;
- PyObject *attr = PyObject_GetAttr(args[0], name);
- if (unlikely(!attr))
- return NULL;
- result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
- Py_DECREF(attr);
- return result;
- }
- #endif
- /* RaiseException */
- static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
- PyObject* owned_instance = NULL;
- if (tb == Py_None) {
- tb = 0;
- } else if (tb && !PyTraceBack_Check(tb)) {
- PyErr_SetString(PyExc_TypeError,
- "raise: arg 3 must be a traceback or None");
- goto bad;
- }
- if (value == Py_None)
- value = 0;
- if (PyExceptionInstance_Check(type)) {
- if (value) {
- PyErr_SetString(PyExc_TypeError,
- "instance exception may not have a separate value");
- goto bad;
- }
- value = type;
- type = (PyObject*) Py_TYPE(value);
- } else if (PyExceptionClass_Check(type)) {
- PyObject *instance_class = NULL;
- if (value && PyExceptionInstance_Check(value)) {
- instance_class = (PyObject*) Py_TYPE(value);
- if (instance_class != type) {
- int is_subclass = PyObject_IsSubclass(instance_class, type);
- if (!is_subclass) {
- instance_class = NULL;
- } else if (unlikely(is_subclass == -1)) {
- goto bad;
- } else {
- type = instance_class;
- }
- }
- }
- if (!instance_class) {
- PyObject *args;
- if (!value)
- args = PyTuple_New(0);
- else if (PyTuple_Check(value)) {
- Py_INCREF(value);
- args = value;
- } else
- args = PyTuple_Pack(1, value);
- if (!args)
- goto bad;
- owned_instance = PyObject_Call(type, args, NULL);
- Py_DECREF(args);
- if (!owned_instance)
- goto bad;
- value = owned_instance;
- if (!PyExceptionInstance_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "calling %R should have returned an instance of "
- "BaseException, not %R",
- type, Py_TYPE(value));
- goto bad;
- }
- }
- } else {
- PyErr_SetString(PyExc_TypeError,
- "raise: exception class must be a subclass of BaseException");
- goto bad;
- }
- if (cause) {
- PyObject *fixed_cause;
- if (cause == Py_None) {
- fixed_cause = NULL;
- } else if (PyExceptionClass_Check(cause)) {
- fixed_cause = PyObject_CallObject(cause, NULL);
- if (fixed_cause == NULL)
- goto bad;
- } else if (PyExceptionInstance_Check(cause)) {
- fixed_cause = cause;
- Py_INCREF(fixed_cause);
- } else {
- PyErr_SetString(PyExc_TypeError,
- "exception causes must derive from "
- "BaseException");
- goto bad;
- }
- PyException_SetCause(value, fixed_cause);
- }
- PyErr_SetObject(type, value);
- if (tb) {
- #if PY_VERSION_HEX >= 0x030C00A6
- PyException_SetTraceback(value, tb);
- #elif CYTHON_FAST_THREAD_STATE
- PyThreadState *tstate = __Pyx_PyThreadState_Current;
- PyObject* tmp_tb = tstate->curexc_traceback;
- if (tb != tmp_tb) {
- Py_INCREF(tb);
- tstate->curexc_traceback = tb;
- Py_XDECREF(tmp_tb);
- }
- #else
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
- Py_INCREF(tb);
- PyErr_Restore(tmp_type, tmp_value, tb);
- Py_XDECREF(tmp_tb);
- #endif
- }
- bad:
- Py_XDECREF(owned_instance);
- return;
- }
- /* RaiseTooManyValuesToUnpack */
- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
- PyErr_Format(PyExc_ValueError,
- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
- }
- /* RaiseNeedMoreValuesToUnpack */
- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
- PyErr_Format(PyExc_ValueError,
- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
- index, (index == 1) ? "" : "s");
- }
- /* IterFinish */
- static CYTHON_INLINE int __Pyx_IterFinish(void) {
- PyObject* exc_type;
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- exc_type = __Pyx_PyErr_CurrentExceptionType();
- if (unlikely(exc_type)) {
- if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
- return -1;
- __Pyx_PyErr_Clear();
- return 0;
- }
- return 0;
- }
- /* UnpackItemEndCheck */
- static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
- if (unlikely(retval)) {
- Py_DECREF(retval);
- __Pyx_RaiseTooManyValuesError(expected);
- return -1;
- }
- return __Pyx_IterFinish();
- }
- /* HasAttr (used by ImportImpl) */
- #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
- static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
- PyObject *r;
- if (unlikely(!PyUnicode_Check(n))) {
- PyErr_SetString(PyExc_TypeError,
- "hasattr(): attribute name must be string");
- return -1;
- }
- r = __Pyx_PyObject_GetAttrStrNoError(o, n);
- if (!r) {
- return (unlikely(PyErr_Occurred())) ? -1 : 0;
- } else {
- Py_DECREF(r);
- return 1;
- }
- }
- #endif
- /* ImportImpl (used by Import) */
- static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
- PyObject *imported_module = PyImport_GetModule(qualname);
- if (unlikely(!imported_module)) {
- *module = NULL;
- if (PyErr_Occurred()) {
- return -1;
- }
- return 0;
- }
- *module = imported_module;
- return 1;
- }
- static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
- PyObject *imported_module;
- PyObject *top_level_package_name;
- Py_ssize_t i;
- int status, module_found;
- Py_ssize_t dot_index;
- module_found = __Pyx__Import_GetModule(qualname, &imported_module);
- if (unlikely(!module_found || module_found == -1)) {
- *module = NULL;
- return module_found;
- }
- if (imported_names) {
- for (i = 0; i < len_imported_names; i++) {
- PyObject *imported_name = imported_names[i];
- #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
- int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
- #else
- int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
- if (unlikely(has_imported_attribute == -1)) goto error;
- #endif
- if (!has_imported_attribute) {
- goto not_found;
- }
- }
- *module = imported_module;
- return 1;
- }
- dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
- if (dot_index == -1) {
- *module = imported_module;
- return 1;
- }
- if (unlikely(dot_index == -2)) goto error;
- top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
- if (unlikely(!top_level_package_name)) goto error;
- Py_DECREF(imported_module);
- status = __Pyx__Import_GetModule(top_level_package_name, module);
- Py_DECREF(top_level_package_name);
- return status;
- error:
- Py_DECREF(imported_module);
- *module = NULL;
- return -1;
- not_found:
- Py_DECREF(imported_module);
- *module = NULL;
- return 0;
- }
- static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
- PyObject *module = 0;
- PyObject *empty_dict = 0;
- PyObject *from_list = 0;
- int module_found;
- if (!qualname) {
- qualname = name;
- }
- module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
- if (likely(module_found == 1)) {
- return module;
- } else if (unlikely(module_found == -1)) {
- return NULL;
- }
- empty_dict = PyDict_New();
- if (unlikely(!empty_dict))
- goto bad;
- if (imported_names) {
- #if CYTHON_COMPILING_IN_CPYTHON
- from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
- if (unlikely(!from_list))
- goto bad;
- #else
- from_list = PyList_New(len_imported_names);
- if (unlikely(!from_list)) goto bad;
- for (Py_ssize_t i=0; i<len_imported_names; ++i) {
- if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
- }
- #endif
- }
- if (level == -1) {
- const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
- if (package_sep != (0)) {
- module = PyImport_ImportModuleLevelObject(
- name, moddict, empty_dict, from_list, 1);
- if (unlikely(!module)) {
- if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
- goto bad;
- PyErr_Clear();
- }
- }
- level = 0;
- }
- if (!module) {
- module = PyImport_ImportModuleLevelObject(
- name, moddict, empty_dict, from_list, level);
- }
- bad:
- Py_XDECREF(from_list);
- Py_XDECREF(empty_dict);
- return module;
- }
- /* Import */
- static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
- return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
- }
- /* ImportFrom */
- static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
- PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
- if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
- const char* module_name_str = 0;
- PyObject* module_name = 0;
- PyObject* module_dot = 0;
- PyObject* full_name = 0;
- PyErr_Clear();
- module_name_str = PyModule_GetName(module);
- if (unlikely(!module_name_str)) { goto modbad; }
- module_name = PyUnicode_FromString(module_name_str);
- if (unlikely(!module_name)) { goto modbad; }
- module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_);
- if (unlikely(!module_dot)) { goto modbad; }
- full_name = PyUnicode_Concat(module_dot, name);
- if (unlikely(!full_name)) { goto modbad; }
- #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\
- CYTHON_COMPILING_IN_GRAAL
- {
- PyObject *modules = PyImport_GetModuleDict();
- if (unlikely(!modules))
- goto modbad;
- value = PyObject_GetItem(modules, full_name);
- }
- #else
- value = PyImport_GetModule(full_name);
- #endif
- modbad:
- Py_XDECREF(full_name);
- Py_XDECREF(module_dot);
- Py_XDECREF(module_name);
- }
- if (unlikely(!value)) {
- PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
- }
- return value;
- }
- /* ListPack */
- static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
- va_list va;
- PyObject *l = PyList_New(n);
- va_start(va, n);
- if (unlikely(!l)) goto end;
- for (Py_ssize_t i=0; i<n; ++i) {
- PyObject *arg = va_arg(va, PyObject*);
- Py_INCREF(arg);
- if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
- Py_CLEAR(l);
- goto end;
- }
- }
- end:
- va_end(va);
- return l;
- }
- /* Py3UpdateBases */
- static PyObject*
- __Pyx_PEP560_update_bases(PyObject *bases)
- {
- Py_ssize_t i, j, size_bases;
- PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
- #if CYTHON_ASSUME_SAFE_SIZE
- size_bases = PyTuple_GET_SIZE(bases);
- #else
- size_bases = PyTuple_Size(bases);
- if (size_bases < 0) return NULL;
- #endif
- for (i = 0; i < size_bases; i++) {
- #if CYTHON_AVOID_BORROWED_REFS
- Py_CLEAR(base);
- #endif
- #if CYTHON_ASSUME_SAFE_MACROS
- base = PyTuple_GET_ITEM(bases, i);
- #else
- base = PyTuple_GetItem(bases, i);
- if (!base) goto error;
- #endif
- #if CYTHON_AVOID_BORROWED_REFS
- Py_INCREF(base);
- #endif
- if (PyType_Check(base)) {
- if (new_bases) {
- if (PyList_Append(new_bases, base) < 0) {
- goto error;
- }
- }
- continue;
- }
- meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
- if (!meth && PyErr_Occurred()) {
- goto error;
- }
- if (!meth) {
- if (new_bases) {
- if (PyList_Append(new_bases, base) < 0) {
- goto error;
- }
- }
- continue;
- }
- new_base = __Pyx_PyObject_CallOneArg(meth, bases);
- Py_DECREF(meth);
- if (!new_base) {
- goto error;
- }
- if (!PyTuple_Check(new_base)) {
- PyErr_SetString(PyExc_TypeError,
- "__mro_entries__ must return a tuple");
- Py_DECREF(new_base);
- goto error;
- }
- if (!new_bases) {
- if (!(new_bases = PyList_New(i))) {
- goto error;
- }
- for (j = 0; j < i; j++) {
- PyObject *base_from_list;
- #if CYTHON_ASSUME_SAFE_MACROS
- base_from_list = PyTuple_GET_ITEM(bases, j);
- PyList_SET_ITEM(new_bases, j, base_from_list);
- Py_INCREF(base_from_list);
- #else
- base_from_list = PyTuple_GetItem(bases, j);
- if (!base_from_list) goto error;
- Py_INCREF(base_from_list);
- if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
- #endif
- }
- }
- #if CYTHON_ASSUME_SAFE_SIZE
- j = PyList_GET_SIZE(new_bases);
- #else
- j = PyList_Size(new_bases);
- if (j < 0) goto error;
- #endif
- if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
- goto error;
- }
- Py_DECREF(new_base);
- }
- if (!new_bases) {
- Py_INCREF(bases);
- return bases;
- }
- result = PyList_AsTuple(new_bases);
- Py_DECREF(new_bases);
- #if CYTHON_AVOID_BORROWED_REFS
- Py_XDECREF(base);
- #endif
- return result;
- error:
- Py_XDECREF(new_bases);
- #if CYTHON_AVOID_BORROWED_REFS
- Py_XDECREF(base);
- #endif
- return NULL;
- }
- /* CalculateMetaclass */
- static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
- Py_ssize_t i, nbases;
- #if CYTHON_ASSUME_SAFE_SIZE
- nbases = PyTuple_GET_SIZE(bases);
- #else
- nbases = PyTuple_Size(bases);
- if (nbases < 0) return NULL;
- #endif
- for (i=0; i < nbases; i++) {
- PyTypeObject *tmptype;
- #if CYTHON_ASSUME_SAFE_MACROS
- PyObject *tmp = PyTuple_GET_ITEM(bases, i);
- #else
- PyObject *tmp = PyTuple_GetItem(bases, i);
- if (!tmp) return NULL;
- #endif
- tmptype = Py_TYPE(tmp);
- if (!metaclass) {
- metaclass = tmptype;
- continue;
- }
- if (PyType_IsSubtype(metaclass, tmptype))
- continue;
- if (PyType_IsSubtype(tmptype, metaclass)) {
- metaclass = tmptype;
- continue;
- }
- PyErr_SetString(PyExc_TypeError,
- "metaclass conflict: "
- "the metaclass of a derived class "
- "must be a (non-strict) subclass "
- "of the metaclasses of all its bases");
- return NULL;
- }
- if (!metaclass) {
- metaclass = &PyType_Type;
- }
- Py_INCREF((PyObject*) metaclass);
- return (PyObject*) metaclass;
- }
- /* dict_setdefault (used by FetchCommonType) */
- static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
- PyObject* value;
- #if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
- PyDict_SetDefaultRef(d, key, default_value, &value);
- #elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
- PyObject *args[] = {d, key, default_value};
- value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
- #elif CYTHON_COMPILING_IN_LIMITED_API
- value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
- #else
- value = PyDict_SetDefault(d, key, default_value);
- if (unlikely(!value)) return NULL;
- Py_INCREF(value);
- #endif
- return value;
- }
- /* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
- #if CYTHON_COMPILING_IN_LIMITED_API
- static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
- PyObject *tp_dictoffset_o;
- Py_ssize_t tp_dictoffset;
- tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
- if (unlikely(!tp_dictoffset_o)) return -1;
- tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
- Py_DECREF(tp_dictoffset_o);
- if (unlikely(tp_dictoffset == 0)) {
- PyErr_SetString(
- PyExc_TypeError,
- "'type' doesn't have a dictoffset");
- return -1;
- } else if (unlikely(tp_dictoffset < 0)) {
- PyErr_SetString(
- PyExc_TypeError,
- "'type' has an unexpected negative dictoffset. "
- "Please report this as Cython bug");
- return -1;
- }
- return tp_dictoffset;
- }
- static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
- static Py_ssize_t tp_dictoffset = 0;
- if (unlikely(tp_dictoffset == 0)) {
- tp_dictoffset = __Pyx_GetTypeDictOffset();
- if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
- tp_dictoffset = 0; // try again next time?
- return NULL;
- }
- }
- return *(PyObject**)((char*)tp + tp_dictoffset);
- }
- #endif
- /* SetItemOnTypeDict (used by FixUpExtensionType) */
- static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
- int result;
- PyObject *tp_dict;
- #if CYTHON_COMPILING_IN_LIMITED_API
- tp_dict = __Pyx_GetTypeDict(tp);
- if (unlikely(!tp_dict)) return -1;
- #else
- tp_dict = tp->tp_dict;
- #endif
- result = PyDict_SetItem(tp_dict, k, v);
- if (likely(!result)) {
- PyType_Modified(tp);
- if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
- PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
- if (!setNameResult) return -1;
- Py_DECREF(setNameResult);
- }
- }
- return result;
- }
- /* FixUpExtensionType (used by FetchCommonType) */
- static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
- #if __PYX_LIMITED_VERSION_HEX > 0x030900B1
- CYTHON_UNUSED_VAR(spec);
- CYTHON_UNUSED_VAR(type);
- CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
- #else
- const PyType_Slot *slot = spec->slots;
- int changed = 0;
- #if !CYTHON_COMPILING_IN_LIMITED_API
- while (slot && slot->slot && slot->slot != Py_tp_members)
- slot++;
- if (slot && slot->slot == Py_tp_members) {
- #if !CYTHON_COMPILING_IN_CPYTHON
- const
- #endif // !CYTHON_COMPILING_IN_CPYTHON)
- PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
- while (memb && memb->name) {
- if (memb->name[0] == '_' && memb->name[1] == '_') {
- if (strcmp(memb->name, "__weaklistoffset__") == 0) {
- assert(memb->type == T_PYSSIZET);
- assert(memb->flags == READONLY);
- type->tp_weaklistoffset = memb->offset;
- changed = 1;
- }
- else if (strcmp(memb->name, "__dictoffset__") == 0) {
- assert(memb->type == T_PYSSIZET);
- assert(memb->flags == READONLY);
- type->tp_dictoffset = memb->offset;
- changed = 1;
- }
- #if CYTHON_METH_FASTCALL
- else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
- assert(memb->type == T_PYSSIZET);
- assert(memb->flags == READONLY);
- type->tp_vectorcall_offset = memb->offset;
- changed = 1;
- }
- #endif // CYTHON_METH_FASTCALL
- #if !CYTHON_COMPILING_IN_PYPY
- else if (strcmp(memb->name, "__module__") == 0) {
- PyObject *descr;
- assert(memb->type == T_OBJECT);
- assert(memb->flags == 0 || memb->flags == READONLY);
- descr = PyDescr_NewMember(type, memb);
- if (unlikely(!descr))
- return -1;
- int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
- Py_DECREF(descr);
- if (unlikely(set_item_result < 0)) {
- return -1;
- }
- changed = 1;
- }
- #endif // !CYTHON_COMPILING_IN_PYPY
- }
- memb++;
- }
- }
- #endif // !CYTHON_COMPILING_IN_LIMITED_API
- #if !CYTHON_COMPILING_IN_PYPY
- slot = spec->slots;
- while (slot && slot->slot && slot->slot != Py_tp_getset)
- slot++;
- if (slot && slot->slot == Py_tp_getset) {
- PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
- while (getset && getset->name) {
- if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
- PyObject *descr = PyDescr_NewGetSet(type, getset);
- if (unlikely(!descr))
- return -1;
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *pyname = PyUnicode_FromString(getset->name);
- if (unlikely(!pyname)) {
- Py_DECREF(descr);
- return -1;
- }
- int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
- Py_DECREF(pyname);
- #else
- CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
- int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
- #endif
- Py_DECREF(descr);
- if (unlikely(set_item_result < 0)) {
- return -1;
- }
- changed = 1;
- }
- ++getset;
- }
- }
- #else
- CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
- #endif // !CYTHON_COMPILING_IN_PYPY
- if (changed)
- PyType_Modified(type);
- #endif // PY_VERSION_HEX > 0x030900B1
- return 0;
- }
- /* AddModuleRef (used by FetchSharedCythonModule) */
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
- PyObject *module_dict = PyImport_GetModuleDict();
- PyObject *m;
- if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
- return NULL;
- }
- if (m != NULL && PyModule_Check(m)) {
- return m;
- }
- Py_XDECREF(m);
- m = PyModule_NewObject(name);
- if (m == NULL)
- return NULL;
- if (PyDict_CheckExact(module_dict)) {
- PyObject *new_m;
- (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
- Py_DECREF(m);
- return new_m;
- } else {
- if (PyObject_SetItem(module_dict, name, m) != 0) {
- Py_DECREF(m);
- return NULL;
- }
- return m;
- }
- }
- static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
- PyObject *py_name = PyUnicode_FromString(name);
- if (!py_name) return NULL;
- PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
- Py_DECREF(py_name);
- return module;
- }
- #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
- #else
- static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
- PyObject *module = PyImport_AddModule(name);
- Py_XINCREF(module);
- return module;
- }
- #endif
- /* FetchSharedCythonModule (used by FetchCommonType) */
- static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
- return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
- }
- /* FetchCommonType (used by CommonTypesMetaclass) */
- #if __PYX_LIMITED_VERSION_HEX < 0x030C0000
- static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
- PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
- if (result && metaclass) {
- PyObject *old_tp = (PyObject*)Py_TYPE(result);
- Py_INCREF((PyObject*)metaclass);
- #if __PYX_LIMITED_VERSION_HEX >= 0x03090000
- Py_SET_TYPE(result, metaclass);
- #else
- result->ob_type = metaclass;
- #endif
- Py_DECREF(old_tp);
- }
- return result;
- }
- #else
- #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
- #endif
- static int __Pyx_VerifyCachedType(PyObject *cached_type,
- const char *name,
- Py_ssize_t expected_basicsize) {
- Py_ssize_t basicsize;
- if (!PyType_Check(cached_type)) {
- PyErr_Format(PyExc_TypeError,
- "Shared Cython type %.200s is not a type object", name);
- return -1;
- }
- if (expected_basicsize == 0) {
- return 0; // size is inherited, nothing useful to check
- }
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *py_basicsize;
- py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
- if (unlikely(!py_basicsize)) return -1;
- basicsize = PyLong_AsSsize_t(py_basicsize);
- Py_DECREF(py_basicsize);
- py_basicsize = NULL;
- if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
- #else
- basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
- #endif
- if (basicsize != expected_basicsize) {
- PyErr_Format(PyExc_TypeError,
- "Shared Cython type %.200s has the wrong size, try recompiling",
- name);
- return -1;
- }
- return 0;
- }
- static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
- PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
- int get_item_ref_result;
- const char* object_name = strrchr(spec->name, '.');
- object_name = object_name ? object_name+1 : spec->name;
- py_object_name = PyUnicode_FromString(object_name);
- if (!py_object_name) return NULL;
- abi_module = __Pyx_FetchSharedCythonABIModule();
- if (!abi_module) goto done;
- abi_module_dict = PyModule_GetDict(abi_module);
- if (!abi_module_dict) goto done;
- get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
- if (get_item_ref_result == 1) {
- if (__Pyx_VerifyCachedType(
- cached_type,
- object_name,
- spec->basicsize) < 0) {
- goto bad;
- }
- goto done;
- } else if (unlikely(get_item_ref_result == -1)) {
- goto bad;
- }
- cached_type = __Pyx_PyType_FromMetaclass(
- metaclass,
- CYTHON_USE_MODULE_STATE ? module : abi_module,
- spec, bases);
- if (unlikely(!cached_type)) goto bad;
- if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
- new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
- if (unlikely(new_cached_type != cached_type)) {
- if (unlikely(!new_cached_type)) goto bad;
- Py_DECREF(cached_type);
- cached_type = new_cached_type;
- if (__Pyx_VerifyCachedType(
- cached_type,
- object_name,
- spec->basicsize) < 0) {
- goto bad;
- }
- goto done;
- } else {
- Py_DECREF(new_cached_type);
- }
- done:
- Py_XDECREF(abi_module);
- Py_DECREF(py_object_name);
- assert(cached_type == NULL || PyType_Check(cached_type));
- return (PyTypeObject *) cached_type;
- bad:
- Py_XDECREF(cached_type);
- cached_type = NULL;
- goto done;
- }
- /* CommonTypesMetaclass (used by CythonFunctionShared) */
- static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
- return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
- }
- #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
- static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
- PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
- return NULL;
- }
- static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
- PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
- return -1;
- }
- #endif
- static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
- {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
- {0, 0, 0, 0, 0}
- };
- static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
- {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
- #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
- {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
- {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
- {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
- #endif
- {0, 0}
- };
- static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
- __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
- 0,
- 0,
- Py_TPFLAGS_IMMUTABLETYPE |
- Py_TPFLAGS_DISALLOW_INSTANTIATION |
- Py_TPFLAGS_DEFAULT,
- __pyx_CommonTypesMetaclass_slots
- };
- static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
- __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
- PyObject *bases = PyTuple_Pack(1, &PyType_Type);
- if (unlikely(!bases)) {
- return -1;
- }
- mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
- Py_DECREF(bases);
- if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
- return -1;
- }
- return 0;
- }
- /* CallTypeTraverse (used by CythonFunctionShared) */
- #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
- #else
- static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
- if (__Pyx_get_runtime_version() < 0x03090000) return 0;
- #endif
- if (!always_call) {
- PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
- unsigned long flags = PyType_GetFlags(base);
- if (flags & Py_TPFLAGS_HEAPTYPE) {
- return 0;
- }
- }
- Py_VISIT((PyObject*)Py_TYPE(o));
- return 0;
- }
- #endif
- /* PyMethodNew (used by CythonFunctionShared) */
- #if CYTHON_COMPILING_IN_LIMITED_API
- static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
- PyObject *result;
- CYTHON_UNUSED_VAR(typ);
- if (!self)
- return __Pyx_NewRef(func);
- #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
- {
- PyObject *args[] = {func, self};
- result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
- }
- #else
- result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
- #endif
- return result;
- }
- #else
- static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
- CYTHON_UNUSED_VAR(typ);
- if (!self)
- return __Pyx_NewRef(func);
- return PyMethod_New(func, self);
- }
- #endif
- /* PyVectorcallFastCallDict (used by CythonFunctionShared) */
- #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
- static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
- {
- PyObject *res = NULL;
- PyObject *kwnames;
- PyObject **newargs;
- PyObject **kwvalues;
- Py_ssize_t i;
- #if CYTHON_AVOID_BORROWED_REFS
- PyObject *pos;
- #else
- Py_ssize_t pos;
- #endif
- size_t j;
- PyObject *key, *value;
- unsigned long keys_are_strings;
- #if !CYTHON_ASSUME_SAFE_SIZE
- Py_ssize_t nkw = PyDict_Size(kw);
- if (unlikely(nkw == -1)) return NULL;
- #else
- Py_ssize_t nkw = PyDict_GET_SIZE(kw);
- #endif
- newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
- if (unlikely(newargs == NULL)) {
- PyErr_NoMemory();
- return NULL;
- }
- for (j = 0; j < nargs; j++) newargs[j] = args[j];
- kwnames = PyTuple_New(nkw);
- if (unlikely(kwnames == NULL)) {
- PyMem_Free(newargs);
- return NULL;
- }
- kwvalues = newargs + nargs;
- pos = 0;
- i = 0;
- keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
- while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
- keys_are_strings &=
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyType_GetFlags(Py_TYPE(key));
- #else
- Py_TYPE(key)->tp_flags;
- #endif
- #if !CYTHON_ASSUME_SAFE_MACROS
- if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
- #else
- PyTuple_SET_ITEM(kwnames, i, key);
- #endif
- kwvalues[i] = value;
- i++;
- }
- if (unlikely(!keys_are_strings)) {
- PyErr_SetString(PyExc_TypeError, "keywords must be strings");
- goto cleanup;
- }
- res = vc(func, newargs, nargs, kwnames);
- cleanup:
- #if CYTHON_AVOID_BORROWED_REFS
- Py_DECREF(pos);
- #endif
- Py_DECREF(kwnames);
- for (i = 0; i < nkw; i++)
- Py_DECREF(kwvalues[i]);
- PyMem_Free(newargs);
- return res;
- }
- static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
- {
- Py_ssize_t kw_size =
- likely(kw == NULL) ?
- 0 :
- #if !CYTHON_ASSUME_SAFE_SIZE
- PyDict_Size(kw);
- #else
- PyDict_GET_SIZE(kw);
- #endif
- if (kw_size == 0) {
- return vc(func, args, nargs, NULL);
- }
- #if !CYTHON_ASSUME_SAFE_SIZE
- else if (unlikely(kw_size == -1)) {
- return NULL;
- }
- #endif
- return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
- }
- #endif
- /* CythonFunctionShared (used by CythonFunction) */
- #if CYTHON_COMPILING_IN_LIMITED_API
- static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
- if (__Pyx_CyFunction_Check(func)) {
- return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
- } else if (PyCFunction_Check(func)) {
- return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
- }
- return 0;
- }
- static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
- if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
- int result;
- PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
- if (unlikely(!newFunc)) {
- PyErr_Clear(); // It's only an optimization, so don't throw an error
- return 0;
- }
- result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
- Py_DECREF(newFunc);
- return result;
- }
- return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
- }
- #else
- static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
- if (PyMethod_Check(func)) {
- func = PyMethod_GET_FUNCTION(func);
- }
- return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
- }
- #endif
- static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
- #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
- __Pyx_Py_XDECREF_SET(
- __Pyx_CyFunction_GetClassObj(f),
- ((classobj) ? __Pyx_NewRef(classobj) : NULL));
- #else
- __Pyx_Py_XDECREF_SET(
- ((PyCMethodObject *) (f))->mm_class,
- (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
- #endif
- }
- static PyObject *
- __Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
- {
- if (unlikely(op->func_doc == NULL)) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
- if (unlikely(!op->func_doc)) return NULL;
- #else
- if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
- op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
- if (unlikely(op->func_doc == NULL))
- return NULL;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
- #endif
- }
- Py_INCREF(op->func_doc);
- return op->func_doc;
- }
- static PyObject *
- __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
- PyObject *result;
- CYTHON_UNUSED_VAR(closure);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- result = __Pyx_CyFunction_get_doc_locked(op);
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static int
- __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- if (value == NULL) {
- value = Py_None;
- }
- Py_INCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->func_doc, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- static PyObject *
- __Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
- {
- if (unlikely(op->func_name == NULL)) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- op->func_name = PyObject_GetAttrString(op->func, "__name__");
- #else
- op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
- #endif
- if (unlikely(op->func_name == NULL))
- return NULL;
- }
- Py_INCREF(op->func_name);
- return op->func_name;
- }
- static PyObject *
- __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
- {
- PyObject *result = NULL;
- CYTHON_UNUSED_VAR(context);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- result = __Pyx_CyFunction_get_name_locked(op);
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static int
- __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- if (unlikely(value == NULL || !PyUnicode_Check(value))) {
- PyErr_SetString(PyExc_TypeError,
- "__name__ must be set to a string object");
- return -1;
- }
- Py_INCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->func_name, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- static PyObject *
- __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- PyObject *result;
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- Py_INCREF(op->func_qualname);
- result = op->func_qualname;
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static int
- __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- if (unlikely(value == NULL || !PyUnicode_Check(value))) {
- PyErr_SetString(PyExc_TypeError,
- "__qualname__ must be set to a string object");
- return -1;
- }
- Py_INCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->func_qualname, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- static PyObject *
- __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- if (unlikely(op->func_dict == NULL)) {
- op->func_dict = PyDict_New();
- if (unlikely(op->func_dict == NULL))
- return NULL;
- }
- Py_INCREF(op->func_dict);
- return op->func_dict;
- }
- #endif
- static PyObject *
- __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
- {
- CYTHON_UNUSED_VAR(context);
- Py_INCREF(op->func_globals);
- return op->func_globals;
- }
- static PyObject *
- __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
- {
- CYTHON_UNUSED_VAR(op);
- CYTHON_UNUSED_VAR(context);
- Py_INCREF(Py_None);
- return Py_None;
- }
- static PyObject *
- __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
- {
- PyObject* result = (op->func_code) ? op->func_code : Py_None;
- CYTHON_UNUSED_VAR(context);
- Py_INCREF(result);
- return result;
- }
- static int
- __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
- int result = 0;
- PyObject *res = op->defaults_getter((PyObject *) op);
- if (unlikely(!res))
- return -1;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
- Py_INCREF(op->defaults_tuple);
- op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
- Py_INCREF(op->defaults_kwdict);
- #else
- op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
- if (unlikely(!op->defaults_tuple)) result = -1;
- else {
- op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
- if (unlikely(!op->defaults_kwdict)) result = -1;
- }
- #endif
- Py_DECREF(res);
- return result;
- }
- static int
- __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
- CYTHON_UNUSED_VAR(context);
- if (!value) {
- value = Py_None;
- } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
- PyErr_SetString(PyExc_TypeError,
- "__defaults__ must be set to a tuple object");
- return -1;
- }
- PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
- "currently affect the values used in function calls", 1);
- Py_INCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- static PyObject *
- __Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
- PyObject* result = op->defaults_tuple;
- if (unlikely(!result)) {
- if (op->defaults_getter) {
- if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
- result = op->defaults_tuple;
- } else {
- result = Py_None;
- }
- }
- Py_INCREF(result);
- return result;
- }
- static PyObject *
- __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
- PyObject* result = NULL;
- CYTHON_UNUSED_VAR(context);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- result = __Pyx_CyFunction_get_defaults_locked(op);
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static int
- __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
- CYTHON_UNUSED_VAR(context);
- if (!value) {
- value = Py_None;
- } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
- PyErr_SetString(PyExc_TypeError,
- "__kwdefaults__ must be set to a dict object");
- return -1;
- }
- PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
- "currently affect the values used in function calls", 1);
- Py_INCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- static PyObject *
- __Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
- PyObject* result = op->defaults_kwdict;
- if (unlikely(!result)) {
- if (op->defaults_getter) {
- if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
- result = op->defaults_kwdict;
- } else {
- result = Py_None;
- }
- }
- Py_INCREF(result);
- return result;
- }
- static PyObject *
- __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
- PyObject* result;
- CYTHON_UNUSED_VAR(context);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- result = __Pyx_CyFunction_get_kwdefaults_locked(op);
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static int
- __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
- CYTHON_UNUSED_VAR(context);
- if (!value || value == Py_None) {
- value = NULL;
- } else if (unlikely(!PyDict_Check(value))) {
- PyErr_SetString(PyExc_TypeError,
- "__annotations__ must be set to a dict object");
- return -1;
- }
- Py_XINCREF(value);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- __Pyx_Py_XDECREF_SET(op->func_annotations, value);
- __Pyx_END_CRITICAL_SECTION();
- return 0;
- }
- static PyObject *
- __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
- PyObject* result = op->func_annotations;
- if (unlikely(!result)) {
- result = PyDict_New();
- if (unlikely(!result)) return NULL;
- op->func_annotations = result;
- }
- Py_INCREF(result);
- return result;
- }
- static PyObject *
- __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
- PyObject *result;
- CYTHON_UNUSED_VAR(context);
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- result = __Pyx_CyFunction_get_annotations_locked(op);
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static PyObject *
- __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
- int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
- if (is_coroutine) {
- PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
- fromlist = PyList_New(1);
- if (unlikely(!fromlist)) return NULL;
- Py_INCREF(marker);
- #if CYTHON_ASSUME_SAFE_MACROS
- PyList_SET_ITEM(fromlist, 0, marker);
- #else
- if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
- Py_DECREF(marker);
- Py_DECREF(fromlist);
- return NULL;
- }
- #endif
- module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
- Py_DECREF(fromlist);
- if (unlikely(!module)) goto ignore;
- is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
- Py_DECREF(module);
- if (likely(is_coroutine_value)) {
- return is_coroutine_value;
- }
- ignore:
- PyErr_Clear();
- }
- return __Pyx_PyBool_FromLong(is_coroutine);
- }
- static PyObject *
- __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
- PyObject *result;
- CYTHON_UNUSED_VAR(context);
- if (op->func_is_coroutine) {
- return __Pyx_NewRef(op->func_is_coroutine);
- }
- result = __Pyx_CyFunction_get_is_coroutine_value(op);
- if (unlikely(!result))
- return NULL;
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- if (op->func_is_coroutine) {
- Py_DECREF(result);
- result = __Pyx_NewRef(op->func_is_coroutine);
- } else {
- op->func_is_coroutine = __Pyx_NewRef(result);
- }
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
- if (!py_name) return;
- PyErr_Format(PyExc_TypeError,
- "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
- py_name, message, size);
- Py_DECREF(py_name);
- #else
- const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
- PyErr_Format(PyExc_TypeError,
- "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
- name, message, size);
- #endif
- }
- static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
- if (!py_name) return;
- PyErr_Format(PyExc_TypeError,
- "%.200S() %s",
- py_name, message);
- Py_DECREF(py_name);
- #else
- const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
- PyErr_Format(PyExc_TypeError,
- "%.200s() %s",
- name, message);
- #endif
- }
- #if CYTHON_COMPILING_IN_LIMITED_API
- static PyObject *
- __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
- CYTHON_UNUSED_VAR(context);
- return PyObject_GetAttrString(op->func, "__module__");
- }
- static int
- __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
- CYTHON_UNUSED_VAR(context);
- return PyObject_SetAttrString(op->func, "__module__", value);
- }
- #endif
- static PyGetSetDef __pyx_CyFunction_getsets[] = {
- {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
- {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
- {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
- {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
- {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
- {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
- #else
- {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
- {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
- #endif
- {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
- {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
- {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
- {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
- {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
- {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
- {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
- {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
- {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
- {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
- {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
- #if CYTHON_COMPILING_IN_LIMITED_API
- {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
- #endif
- {0, 0, 0, 0, 0}
- };
- static PyMemberDef __pyx_CyFunction_members[] = {
- #if !CYTHON_COMPILING_IN_LIMITED_API
- {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
- #endif
- #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
- {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
- #endif
- #if CYTHON_METH_FASTCALL
- #if CYTHON_COMPILING_IN_LIMITED_API
- {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
- #else
- {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
- #else
- {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
- #endif
- #endif
- {0, 0, 0, 0, 0}
- };
- static PyObject *
- __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
- {
- PyObject *result = NULL;
- CYTHON_UNUSED_VAR(args);
- __Pyx_BEGIN_CRITICAL_SECTION(m);
- Py_INCREF(m->func_qualname);
- result = m->func_qualname;
- __Pyx_END_CRITICAL_SECTION();
- return result;
- }
- static PyMethodDef __pyx_CyFunction_methods[] = {
- {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
- {0, 0, 0, 0}
- };
- #if CYTHON_COMPILING_IN_LIMITED_API
- #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
- #else
- #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
- #endif
- static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
- #if !CYTHON_COMPILING_IN_LIMITED_API
- PyCFunctionObject *cf = (PyCFunctionObject*) op;
- #endif
- if (unlikely(op == NULL))
- return NULL;
- #if CYTHON_COMPILING_IN_LIMITED_API
- op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
- if (unlikely(!op->func)) return NULL;
- #endif
- op->flags = flags;
- __Pyx_CyFunction_weakreflist(op) = NULL;
- #if !CYTHON_COMPILING_IN_LIMITED_API
- cf->m_ml = ml;
- cf->m_self = (PyObject *) op;
- #endif
- Py_XINCREF(closure);
- op->func_closure = closure;
- #if !CYTHON_COMPILING_IN_LIMITED_API
- Py_XINCREF(module);
- cf->m_module = module;
- #endif
- #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
- op->func_dict = NULL;
- #endif
- op->func_name = NULL;
- Py_INCREF(qualname);
- op->func_qualname = qualname;
- op->func_doc = NULL;
- #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
- op->func_classobj = NULL;
- #else
- ((PyCMethodObject*)op)->mm_class = NULL;
- #endif
- op->func_globals = globals;
- Py_INCREF(op->func_globals);
- Py_XINCREF(code);
- op->func_code = code;
- op->defaults = NULL;
- op->defaults_tuple = NULL;
- op->defaults_kwdict = NULL;
- op->defaults_getter = NULL;
- op->func_annotations = NULL;
- op->func_is_coroutine = NULL;
- #if CYTHON_METH_FASTCALL
- switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
- case METH_NOARGS:
- __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
- break;
- case METH_O:
- __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
- break;
- case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
- __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
- break;
- case METH_FASTCALL | METH_KEYWORDS:
- __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
- break;
- case METH_VARARGS | METH_KEYWORDS:
- __Pyx_CyFunction_func_vectorcall(op) = NULL;
- break;
- default:
- PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
- Py_DECREF(op);
- return NULL;
- }
- #endif
- return (PyObject *) op;
- }
- static int
- __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
- {
- Py_CLEAR(m->func_closure);
- #if CYTHON_COMPILING_IN_LIMITED_API
- Py_CLEAR(m->func);
- #else
- Py_CLEAR(((PyCFunctionObject*)m)->m_module);
- #endif
- #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
- Py_CLEAR(m->func_dict);
- #elif PY_VERSION_HEX < 0x030d0000
- _PyObject_ClearManagedDict((PyObject*)m);
- #else
- PyObject_ClearManagedDict((PyObject*)m);
- #endif
- Py_CLEAR(m->func_name);
- Py_CLEAR(m->func_qualname);
- Py_CLEAR(m->func_doc);
- Py_CLEAR(m->func_globals);
- Py_CLEAR(m->func_code);
- #if !CYTHON_COMPILING_IN_LIMITED_API
- #if PY_VERSION_HEX < 0x030900B1
- Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
- #else
- {
- PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
- ((PyCMethodObject *) (m))->mm_class = NULL;
- Py_XDECREF(cls);
- }
- #endif
- #endif
- Py_CLEAR(m->defaults_tuple);
- Py_CLEAR(m->defaults_kwdict);
- Py_CLEAR(m->func_annotations);
- Py_CLEAR(m->func_is_coroutine);
- Py_CLEAR(m->defaults);
- return 0;
- }
- static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
- {
- if (__Pyx_CyFunction_weakreflist(m) != NULL)
- PyObject_ClearWeakRefs((PyObject *) m);
- __Pyx_CyFunction_clear(m);
- __Pyx_PyHeapTypeObject_GC_Del(m);
- }
- static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
- {
- PyObject_GC_UnTrack(m);
- __Pyx__CyFunction_dealloc(m);
- }
- static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
- {
- {
- int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
- if (e) return e;
- }
- Py_VISIT(m->func_closure);
- #if CYTHON_COMPILING_IN_LIMITED_API
- Py_VISIT(m->func);
- #else
- Py_VISIT(((PyCFunctionObject*)m)->m_module);
- #endif
- #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
- Py_VISIT(m->func_dict);
- #else
- {
- int e =
- #if PY_VERSION_HEX < 0x030d0000
- _PyObject_VisitManagedDict
- #else
- PyObject_VisitManagedDict
- #endif
- ((PyObject*)m, visit, arg);
- if (e != 0) return e;
- }
- #endif
- __Pyx_VISIT_CONST(m->func_name);
- __Pyx_VISIT_CONST(m->func_qualname);
- Py_VISIT(m->func_doc);
- Py_VISIT(m->func_globals);
- __Pyx_VISIT_CONST(m->func_code);
- #if !CYTHON_COMPILING_IN_LIMITED_API
- Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
- #endif
- Py_VISIT(m->defaults_tuple);
- Py_VISIT(m->defaults_kwdict);
- Py_VISIT(m->func_is_coroutine);
- Py_VISIT(m->defaults);
- return 0;
- }
- static PyObject*
- __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
- {
- PyObject *repr;
- __Pyx_BEGIN_CRITICAL_SECTION(op);
- repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
- op->func_qualname, (void *)op);
- __Pyx_END_CRITICAL_SECTION();
- return repr;
- }
- static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
- PyCFunction meth;
- int flags;
- meth = PyCFunction_GetFunction(f);
- if (unlikely(!meth)) return NULL;
- flags = PyCFunction_GetFlags(f);
- if (unlikely(flags < 0)) return NULL;
- #else
- PyCFunctionObject* f = (PyCFunctionObject*)func;
- PyCFunction meth = f->m_ml->ml_meth;
- int flags = f->m_ml->ml_flags;
- #endif
- Py_ssize_t size;
- switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
- case METH_VARARGS:
- if (likely(kw == NULL || PyDict_Size(kw) == 0))
- return (*meth)(self, arg);
- break;
- case METH_VARARGS | METH_KEYWORDS:
- return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
- case METH_NOARGS:
- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
- #if CYTHON_ASSUME_SAFE_SIZE
- size = PyTuple_GET_SIZE(arg);
- #else
- size = PyTuple_Size(arg);
- if (unlikely(size < 0)) return NULL;
- #endif
- if (likely(size == 0))
- return (*meth)(self, NULL);
- __Pyx_CyFunction_raise_argument_count_error(
- (__pyx_CyFunctionObject*)func,
- "takes no arguments", size);
- return NULL;
- }
- break;
- case METH_O:
- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
- #if CYTHON_ASSUME_SAFE_SIZE
- size = PyTuple_GET_SIZE(arg);
- #else
- size = PyTuple_Size(arg);
- if (unlikely(size < 0)) return NULL;
- #endif
- if (likely(size == 1)) {
- PyObject *result, *arg0;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- arg0 = PyTuple_GET_ITEM(arg, 0);
- #else
- arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
- #endif
- result = (*meth)(self, arg0);
- #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
- Py_DECREF(arg0);
- #endif
- return result;
- }
- __Pyx_CyFunction_raise_argument_count_error(
- (__pyx_CyFunctionObject*)func,
- "takes exactly one argument", size);
- return NULL;
- }
- break;
- default:
- PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
- return NULL;
- }
- __Pyx_CyFunction_raise_type_error(
- (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
- return NULL;
- }
- static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- PyObject *self, *result;
- #if CYTHON_COMPILING_IN_LIMITED_API
- self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
- if (unlikely(!self) && PyErr_Occurred()) return NULL;
- #else
- self = ((PyCFunctionObject*)func)->m_self;
- #endif
- result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
- return result;
- }
- static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
- PyObject *result;
- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
- #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
- __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
- if (vc) {
- #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
- #else
- (void) &__Pyx_PyVectorcall_FastCallDict;
- return PyVectorcall_Call(func, args, kw);
- #endif
- }
- #endif
- if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
- Py_ssize_t argc;
- PyObject *new_args;
- PyObject *self;
- #if CYTHON_ASSUME_SAFE_SIZE
- argc = PyTuple_GET_SIZE(args);
- #else
- argc = PyTuple_Size(args);
- if (unlikely(argc < 0)) return NULL;
- #endif
- new_args = PyTuple_GetSlice(args, 1, argc);
- if (unlikely(!new_args))
- return NULL;
- self = PyTuple_GetItem(args, 0);
- if (unlikely(!self)) {
- Py_DECREF(new_args);
- PyErr_Format(PyExc_TypeError,
- "unbound method %.200S() needs an argument",
- cyfunc->func_qualname);
- return NULL;
- }
- result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
- Py_DECREF(new_args);
- } else {
- result = __Pyx_CyFunction_Call(func, args, kw);
- }
- return result;
- }
- #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
- static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
- {
- int ret = 0;
- if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
- if (unlikely(nargs < 1)) {
- __Pyx_CyFunction_raise_type_error(
- cyfunc, "needs an argument");
- return -1;
- }
- ret = 1;
- }
- if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
- __Pyx_CyFunction_raise_type_error(
- cyfunc, "takes no keyword arguments");
- return -1;
- }
- return ret;
- }
- static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
- {
- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
- Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
- PyObject *self;
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
- if (unlikely(!meth)) return NULL;
- #else
- PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
- #endif
- switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
- case 1:
- self = args[0];
- args += 1;
- nargs -= 1;
- break;
- case 0:
- #if CYTHON_COMPILING_IN_LIMITED_API
- self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
- if (unlikely(!self) && PyErr_Occurred()) return NULL;
- #else
- self = ((PyCFunctionObject*)cyfunc)->m_self;
- #endif
- break;
- default:
- return NULL;
- }
- if (unlikely(nargs != 0)) {
- __Pyx_CyFunction_raise_argument_count_error(
- cyfunc, "takes no arguments", nargs);
- return NULL;
- }
- return meth(self, NULL);
- }
- static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
- {
- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
- Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
- PyObject *self;
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
- if (unlikely(!meth)) return NULL;
- #else
- PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
- #endif
- switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
- case 1:
- self = args[0];
- args += 1;
- nargs -= 1;
- break;
- case 0:
- #if CYTHON_COMPILING_IN_LIMITED_API
- self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
- if (unlikely(!self) && PyErr_Occurred()) return NULL;
- #else
- self = ((PyCFunctionObject*)cyfunc)->m_self;
- #endif
- break;
- default:
- return NULL;
- }
- if (unlikely(nargs != 1)) {
- __Pyx_CyFunction_raise_argument_count_error(
- cyfunc, "takes exactly one argument", nargs);
- return NULL;
- }
- return meth(self, args[0]);
- }
- static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
- {
- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
- Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
- PyObject *self;
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
- if (unlikely(!meth)) return NULL;
- #else
- PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
- #endif
- switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
- case 1:
- self = args[0];
- args += 1;
- nargs -= 1;
- break;
- case 0:
- #if CYTHON_COMPILING_IN_LIMITED_API
- self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
- if (unlikely(!self) && PyErr_Occurred()) return NULL;
- #else
- self = ((PyCFunctionObject*)cyfunc)->m_self;
- #endif
- break;
- default:
- return NULL;
- }
- return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
- }
- static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
- {
- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
- PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
- Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
- PyObject *self;
- #if CYTHON_COMPILING_IN_LIMITED_API
- PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
- if (unlikely(!meth)) return NULL;
- #else
- PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
- #endif
- switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
- case 1:
- self = args[0];
- args += 1;
- nargs -= 1;
- break;
- case 0:
- #if CYTHON_COMPILING_IN_LIMITED_API
- self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
- if (unlikely(!self) && PyErr_Occurred()) return NULL;
- #else
- self = ((PyCFunctionObject*)cyfunc)->m_self;
- #endif
- break;
- default:
- return NULL;
- }
- #if PY_VERSION_HEX < 0x030e00A6
- size_t nargs_value = (size_t) nargs;
- #else
- Py_ssize_t nargs_value = nargs;
- #endif
- return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
- }
- #endif
- static PyType_Slot __pyx_CyFunctionType_slots[] = {
- {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
- {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
- {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
- {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
- {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
- {Py_tp_methods, (void *)__pyx_CyFunction_methods},
- {Py_tp_members, (void *)__pyx_CyFunction_members},
- {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
- {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
- {0, 0},
- };
- static PyType_Spec __pyx_CyFunctionType_spec = {
- __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
- sizeof(__pyx_CyFunctionObject),
- 0,
- #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
- Py_TPFLAGS_METHOD_DESCRIPTOR |
- #endif
- #if CYTHON_METH_FASTCALL
- #if defined(Py_TPFLAGS_HAVE_VECTORCALL)
- Py_TPFLAGS_HAVE_VECTORCALL |
- #elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
- _Py_TPFLAGS_HAVE_VECTORCALL |
- #endif
- #endif // CYTHON_METH_FASTCALL
- #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
- Py_TPFLAGS_MANAGED_DICT |
- #endif
- Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
- __pyx_CyFunctionType_slots
- };
- static int __pyx_CyFunction_init(PyObject *module) {
- __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
- mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
- mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
- if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
- return -1;
- }
- return 0;
- }
- static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
- m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
- if (unlikely(!m->defaults))
- return NULL;
- return m->defaults;
- }
- static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
- m->defaults_tuple = tuple;
- Py_INCREF(tuple);
- }
- static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
- m->defaults_kwdict = dict;
- Py_INCREF(dict);
- }
- static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
- m->func_annotations = dict;
- Py_INCREF(dict);
- }
- /* CythonFunction */
- static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
- PyObject *op = __Pyx_CyFunction_Init(
- PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
- ml, flags, qualname, closure, module, globals, code
- );
- if (likely(op)) {
- PyObject_GC_Track(op);
- }
- return op;
- }
- /* PyObjectCall2Args (used by Py3ClassCreate) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
- PyObject *args[3] = {NULL, arg1, arg2};
- return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
- }
- /* PyObjectLookupSpecial (used by Py3ClassCreate) */
- #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
- PyObject *res;
- PyTypeObject *tp = Py_TYPE(obj);
- res = _PyType_Lookup(tp, attr_name);
- if (likely(res)) {
- descrgetfunc f = Py_TYPE(res)->tp_descr_get;
- if (!f) {
- Py_INCREF(res);
- } else {
- res = f(res, obj, (PyObject *)tp);
- }
- } else if (with_error) {
- PyErr_SetObject(PyExc_AttributeError, attr_name);
- }
- return res;
- }
- #endif
- /* Py3ClassCreate */
- static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
- PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
- PyObject *ns;
- if (metaclass) {
- PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
- if (prep) {
- PyObject *pargs[3] = {NULL, name, bases};
- ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
- Py_DECREF(prep);
- } else {
- if (unlikely(PyErr_Occurred()))
- return NULL;
- ns = PyDict_New();
- }
- } else {
- ns = PyDict_New();
- }
- if (unlikely(!ns))
- return NULL;
- if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
- if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
- if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
- return ns;
- bad:
- Py_DECREF(ns);
- return NULL;
- }
- static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
- PyObject *dict, PyObject *mkw,
- int calculate_metaclass, int allow_py2_metaclass) {
- PyObject *result;
- PyObject *owned_metaclass = NULL;
- PyObject *margs[4] = {NULL, name, bases, dict};
- if (allow_py2_metaclass) {
- owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
- if (owned_metaclass) {
- metaclass = owned_metaclass;
- } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
- PyErr_Clear();
- } else {
- return NULL;
- }
- }
- if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
- metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
- Py_XDECREF(owned_metaclass);
- if (unlikely(!metaclass))
- return NULL;
- owned_metaclass = metaclass;
- }
- result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
- Py_XDECREF(owned_metaclass);
- return result;
- }
- /* CLineInTraceback (used by AddTraceback) */
- #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- #define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
- #elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- #define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
- #else
- PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
- PyObject **dict_ptr = _PyObject_GetDictPtr(o);
- return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
- }
- #endif
- static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
- PyObject *use_cline = NULL;
- PyObject *ptype, *pvalue, *ptraceback;
- PyObject *cython_runtime_dict;
- CYTHON_MAYBE_UNUSED_VAR(tstate);
- if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
- return c_line;
- }
- __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
- cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
- if (likely(cython_runtime_dict)) {
- __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
- use_cline, cython_runtime_dict,
- __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
- }
- if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
- c_line = 0;
- }
- Py_XDECREF(use_cline);
- Py_XDECREF(cython_runtime_dict);
- __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
- return c_line;
- }
- #endif
- /* CodeObjectCache (used by AddTraceback) */
- static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
- int start = 0, mid = 0, end = count - 1;
- if (end >= 0 && code_line > entries[end].code_line) {
- return count;
- }
- while (start < end) {
- mid = start + (end - start) / 2;
- if (code_line < entries[mid].code_line) {
- end = mid;
- } else if (code_line > entries[mid].code_line) {
- start = mid + 1;
- } else {
- return mid;
- }
- }
- if (code_line <= entries[mid].code_line) {
- return mid;
- } else {
- return mid + 1;
- }
- }
- static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
- __Pyx_CachedCodeObjectType* code_object;
- int pos;
- if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
- return NULL;
- }
- pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
- if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
- return NULL;
- }
- code_object = code_cache->entries[pos].code_object;
- Py_INCREF(code_object);
- return code_object;
- }
- static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
- (void)__pyx__find_code_object;
- return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
- #else
- struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
- if (old_count < 0) {
- __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
- return NULL;
- }
- #endif
- __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
- #endif
- return result;
- #endif
- }
- static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
- {
- int pos, i;
- __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
- if (unlikely(!code_line)) {
- return;
- }
- if (unlikely(!entries)) {
- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
- if (likely(entries)) {
- code_cache->entries = entries;
- code_cache->max_count = 64;
- code_cache->count = 1;
- entries[0].code_line = code_line;
- entries[0].code_object = code_object;
- Py_INCREF(code_object);
- }
- return;
- }
- pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
- if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
- __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
- entries[pos].code_object = code_object;
- Py_INCREF(code_object);
- Py_DECREF(tmp);
- return;
- }
- if (code_cache->count == code_cache->max_count) {
- int new_max = code_cache->max_count + 64;
- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
- code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
- if (unlikely(!entries)) {
- return;
- }
- code_cache->entries = entries;
- code_cache->max_count = new_max;
- }
- for (i=code_cache->count; i>pos; i--) {
- entries[i] = entries[i-1];
- }
- entries[pos].code_line = code_line;
- entries[pos].code_object = code_object;
- code_cache->count++;
- Py_INCREF(code_object);
- }
- static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
- (void)__pyx__insert_code_object;
- return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
- #else
- struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- __pyx_nonatomic_int_type expected = 0;
- if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
- return;
- }
- #endif
- __pyx__insert_code_object(code_cache, code_line, code_object);
- #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
- __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
- #endif
- #endif
- }
- /* AddTraceback */
- #include "compile.h"
- #include "frameobject.h"
- #include "traceback.h"
- #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
- #ifndef Py_BUILD_CORE
- #define Py_BUILD_CORE 1
- #endif
- #include "internal/pycore_frame.h"
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API
- static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
- PyObject *firstlineno, PyObject *name) {
- PyObject *replace = NULL;
- if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
- if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
- replace = PyObject_GetAttrString(code, "replace");
- if (likely(replace)) {
- PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
- Py_DECREF(replace);
- return result;
- }
- PyErr_Clear();
- return NULL;
- }
- static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename) {
- PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
- PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
- PyObject *exc_type, *exc_value, *exc_traceback;
- int success = 0;
- if (c_line) {
- c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
- }
- PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
- code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
- if (!code_object) {
- code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
- if (unlikely(!code_object)) goto bad;
- py_py_line = PyLong_FromLong(py_line);
- if (unlikely(!py_py_line)) goto bad;
- if (c_line) {
- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
- } else {
- py_funcname = PyUnicode_FromString(funcname);
- }
- if (unlikely(!py_funcname)) goto bad;
- dict = PyDict_New();
- if (unlikely(!dict)) goto bad;
- {
- PyObject *old_code_object = code_object;
- code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
- Py_DECREF(old_code_object);
- }
- if (unlikely(!code_object)) goto bad;
- __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
- } else {
- dict = PyDict_New();
- }
- getframe = PySys_GetObject("_getframe");
- if (unlikely(!getframe)) goto bad;
- if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
- frame = PyEval_EvalCode(code_object, dict, dict);
- if (unlikely(!frame) || frame == Py_None) goto bad;
- success = 1;
- bad:
- PyErr_Restore(exc_type, exc_value, exc_traceback);
- Py_XDECREF(code_object);
- Py_XDECREF(py_py_line);
- Py_XDECREF(py_funcname);
- Py_XDECREF(dict);
- Py_XDECREF(replace);
- if (success) {
- PyTraceBack_Here(
- (struct _frame*)frame);
- }
- Py_XDECREF(frame);
- }
- #else
- static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
- const char *funcname, int c_line,
- int py_line, const char *filename) {
- PyCodeObject *py_code = NULL;
- PyObject *py_funcname = NULL;
- if (c_line) {
- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
- if (!py_funcname) goto bad;
- funcname = PyUnicode_AsUTF8(py_funcname);
- if (!funcname) goto bad;
- }
- py_code = PyCode_NewEmpty(filename, funcname, py_line);
- Py_XDECREF(py_funcname);
- return py_code;
- bad:
- Py_XDECREF(py_funcname);
- return NULL;
- }
- static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename) {
- PyCodeObject *py_code = 0;
- PyFrameObject *py_frame = 0;
- PyThreadState *tstate = __Pyx_PyThreadState_Current;
- PyObject *ptype, *pvalue, *ptraceback;
- if (c_line) {
- c_line = __Pyx_CLineForTraceback(tstate, c_line);
- }
- py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
- if (!py_code) {
- __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
- py_code = __Pyx_CreateCodeObjectForTraceback(
- funcname, c_line, py_line, filename);
- if (!py_code) {
- /* If the code object creation fails, then we should clear the
- fetched exception references and propagate the new exception */
- Py_XDECREF(ptype);
- Py_XDECREF(pvalue);
- Py_XDECREF(ptraceback);
- goto bad;
- }
- __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
- __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
- }
- py_frame = PyFrame_New(
- tstate, /*PyThreadState *tstate,*/
- py_code, /*PyCodeObject *code,*/
- __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
- 0 /*PyObject *locals*/
- );
- if (!py_frame) goto bad;
- __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
- PyTraceBack_Here(py_frame);
- bad:
- Py_XDECREF(py_code);
- Py_XDECREF(py_frame);
- }
- #endif
- /* FormatTypeName */
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
- static __Pyx_TypeName
- __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
- {
- PyObject *module = NULL, *name = NULL, *result = NULL;
- #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
- name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
- __pyx_mstate_global->__pyx_n_u_qualname);
- #else
- name = PyType_GetQualName(tp);
- #endif
- if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
- module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
- __pyx_mstate_global->__pyx_n_u_module);
- if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
- if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
- result = name;
- name = NULL;
- goto done;
- }
- result = PyUnicode_FromFormat("%U.%U", module, name);
- if (unlikely(result == NULL)) goto bad;
- done:
- Py_XDECREF(name);
- Py_XDECREF(module);
- return result;
- bad:
- PyErr_Clear();
- if (name) {
- result = name;
- name = NULL;
- } else {
- result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2);
- }
- goto done;
- }
- #endif
- /* PyObjectVectorCallKwBuilder (used by CIntToPy) */
- #if CYTHON_VECTORCALL
- static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
- (void)__Pyx_PyObject_FastCallDict;
- if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
- Py_INCREF(key);
- args[n] = value;
- return 0;
- }
- CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
- (void)__Pyx_VectorcallBuilder_AddArgStr;
- if (unlikely(!PyUnicode_Check(key))) {
- PyErr_SetString(PyExc_TypeError, "keywords must be strings");
- return -1;
- }
- return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
- }
- static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
- PyObject *pyKey = PyUnicode_FromString(key);
- if (!pyKey) return -1;
- return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
- }
- #else // CYTHON_VECTORCALL
- CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
- if (unlikely(!PyUnicode_Check(key))) {
- PyErr_SetString(PyExc_TypeError, "keywords must be strings");
- return -1;
- }
- return PyDict_SetItem(builder, key, value);
- }
- #endif
- /* CIntToPy */
- static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wconversion"
- #endif
- const long neg_one = (long) -1, const_zero = (long) 0;
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic pop
- #endif
- const int is_unsigned = neg_one > const_zero;
- if (is_unsigned) {
- if (sizeof(long) < sizeof(long)) {
- return PyLong_FromLong((long) value);
- } else if (sizeof(long) <= sizeof(unsigned long)) {
- return PyLong_FromUnsignedLong((unsigned long) value);
- #if !CYTHON_COMPILING_IN_PYPY
- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- #endif
- }
- } else {
- if (sizeof(long) <= sizeof(long)) {
- return PyLong_FromLong((long) value);
- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
- return PyLong_FromLongLong((PY_LONG_LONG) value);
- }
- }
- {
- unsigned char *bytes = (unsigned char *)&value;
- #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
- if (is_unsigned) {
- return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
- } else {
- return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
- }
- #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
- int one = 1; int little = (int)*(unsigned char *)&one;
- return _PyLong_FromByteArray(bytes, sizeof(long),
- little, !is_unsigned);
- #else
- int one = 1; int little = (int)*(unsigned char *)&one;
- PyObject *from_bytes, *result = NULL, *kwds = NULL;
- PyObject *py_bytes = NULL, *order_str = NULL;
- from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
- if (!from_bytes) return NULL;
- py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
- if (!py_bytes) goto limited_bad;
- order_str = PyUnicode_FromString(little ? "little" : "big");
- if (!order_str) goto limited_bad;
- {
- PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
- if (!is_unsigned) {
- kwds = __Pyx_MakeVectorcallBuilderKwds(1);
- if (!kwds) goto limited_bad;
- if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
- }
- result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
- }
- limited_bad:
- Py_XDECREF(kwds);
- Py_XDECREF(order_str);
- Py_XDECREF(py_bytes);
- Py_XDECREF(from_bytes);
- return result;
- #endif
- }
- }
- /* CIntFromPyVerify (used by CIntFromPy) */
- #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
- #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
- #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
- {\
- func_type value = func_value;\
- if (sizeof(target_type) < sizeof(func_type)) {\
- if (unlikely(value != (func_type) (target_type) value)) {\
- func_type zero = 0;\
- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
- return (target_type) -1;\
- if (is_unsigned && unlikely(value < zero))\
- goto raise_neg_overflow;\
- else\
- goto raise_overflow;\
- }\
- }\
- return (target_type) value;\
- }
- /* CIntFromPy */
- static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wconversion"
- #endif
- const long neg_one = (long) -1, const_zero = (long) 0;
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic pop
- #endif
- const int is_unsigned = neg_one > const_zero;
- if (unlikely(!PyLong_Check(x))) {
- long val;
- PyObject *tmp = __Pyx_PyNumber_Long(x);
- if (!tmp) return (long) -1;
- val = __Pyx_PyLong_As_long(tmp);
- Py_DECREF(tmp);
- return val;
- }
- if (is_unsigned) {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (unlikely(__Pyx_PyLong_IsNeg(x))) {
- goto raise_neg_overflow;
- } else if (__Pyx_PyLong_IsCompact(x)) {
- __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
- } else {
- const digit* digits = __Pyx_PyLong_Digits(x);
- assert(__Pyx_PyLong_DigitCount(x) > 1);
- switch (__Pyx_PyLong_DigitCount(x)) {
- case 2:
- if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
- }
- }
- break;
- case 3:
- if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
- }
- }
- break;
- case 4:
- if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
- }
- }
- break;
- }
- }
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
- if (unlikely(Py_SIZE(x) < 0)) {
- goto raise_neg_overflow;
- }
- #else
- {
- int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
- if (unlikely(result < 0))
- return (long) -1;
- if (unlikely(result == 1))
- goto raise_neg_overflow;
- }
- #endif
- if ((sizeof(long) <= sizeof(unsigned long))) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
- } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
- }
- } else {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (__Pyx_PyLong_IsCompact(x)) {
- __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
- } else {
- const digit* digits = __Pyx_PyLong_Digits(x);
- assert(__Pyx_PyLong_DigitCount(x) > 1);
- switch (__Pyx_PyLong_SignedDigitCount(x)) {
- case -2:
- if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- case 2:
- if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- case -3:
- if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- case 3:
- if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- case -4:
- if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- case 4:
- if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
- }
- }
- break;
- }
- }
- #endif
- if ((sizeof(long) <= sizeof(long))) {
- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
- } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
- }
- }
- {
- long val;
- int ret = -1;
- #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
- Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
- x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
- if (unlikely(bytes_copied == -1)) {
- } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
- goto raise_overflow;
- } else {
- ret = 0;
- }
- #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
- int one = 1; int is_little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&val;
- ret = _PyLong_AsByteArray((PyLongObject *)x,
- bytes, sizeof(val),
- is_little, !is_unsigned);
- #else
- PyObject *v;
- PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
- int bits, remaining_bits, is_negative = 0;
- int chunk_size = (sizeof(long) < 8) ? 30 : 62;
- if (likely(PyLong_CheckExact(x))) {
- v = __Pyx_NewRef(x);
- } else {
- v = PyNumber_Long(x);
- if (unlikely(!v)) return (long) -1;
- assert(PyLong_CheckExact(v));
- }
- {
- int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
- if (unlikely(result < 0)) {
- Py_DECREF(v);
- return (long) -1;
- }
- is_negative = result == 1;
- }
- if (is_unsigned && unlikely(is_negative)) {
- Py_DECREF(v);
- goto raise_neg_overflow;
- } else if (is_negative) {
- stepval = PyNumber_Invert(v);
- Py_DECREF(v);
- if (unlikely(!stepval))
- return (long) -1;
- } else {
- stepval = v;
- }
- v = NULL;
- val = (long) 0;
- mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
- shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
- for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
- PyObject *tmp, *digit;
- long idigit;
- digit = PyNumber_And(stepval, mask);
- if (unlikely(!digit)) goto done;
- idigit = PyLong_AsLong(digit);
- Py_DECREF(digit);
- if (unlikely(idigit < 0)) goto done;
- val |= ((long) idigit) << bits;
- tmp = PyNumber_Rshift(stepval, shift);
- if (unlikely(!tmp)) goto done;
- Py_DECREF(stepval); stepval = tmp;
- }
- Py_DECREF(shift); shift = NULL;
- Py_DECREF(mask); mask = NULL;
- {
- long idigit = PyLong_AsLong(stepval);
- if (unlikely(idigit < 0)) goto done;
- remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
- if (unlikely(idigit >= (1L << remaining_bits)))
- goto raise_overflow;
- val |= ((long) idigit) << bits;
- }
- if (!is_unsigned) {
- if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
- goto raise_overflow;
- if (is_negative)
- val = ~val;
- }
- ret = 0;
- done:
- Py_XDECREF(shift);
- Py_XDECREF(mask);
- Py_XDECREF(stepval);
- #endif
- if (unlikely(ret))
- return (long) -1;
- return val;
- }
- raise_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to long");
- return (long) -1;
- raise_neg_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to long");
- return (long) -1;
- }
- /* CIntFromPy */
- static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wconversion"
- #endif
- const int neg_one = (int) -1, const_zero = (int) 0;
- #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
- #pragma GCC diagnostic pop
- #endif
- const int is_unsigned = neg_one > const_zero;
- if (unlikely(!PyLong_Check(x))) {
- int val;
- PyObject *tmp = __Pyx_PyNumber_Long(x);
- if (!tmp) return (int) -1;
- val = __Pyx_PyLong_As_int(tmp);
- Py_DECREF(tmp);
- return val;
- }
- if (is_unsigned) {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (unlikely(__Pyx_PyLong_IsNeg(x))) {
- goto raise_neg_overflow;
- } else if (__Pyx_PyLong_IsCompact(x)) {
- __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
- } else {
- const digit* digits = __Pyx_PyLong_Digits(x);
- assert(__Pyx_PyLong_DigitCount(x) > 1);
- switch (__Pyx_PyLong_DigitCount(x)) {
- case 2:
- if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
- }
- }
- break;
- case 3:
- if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
- }
- }
- break;
- case 4:
- if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
- }
- }
- break;
- }
- }
- #endif
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
- if (unlikely(Py_SIZE(x) < 0)) {
- goto raise_neg_overflow;
- }
- #else
- {
- int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
- if (unlikely(result < 0))
- return (int) -1;
- if (unlikely(result == 1))
- goto raise_neg_overflow;
- }
- #endif
- if ((sizeof(int) <= sizeof(unsigned long))) {
- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
- } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
- }
- } else {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (__Pyx_PyLong_IsCompact(x)) {
- __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
- } else {
- const digit* digits = __Pyx_PyLong_Digits(x);
- assert(__Pyx_PyLong_DigitCount(x) > 1);
- switch (__Pyx_PyLong_SignedDigitCount(x)) {
- case -2:
- if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- case 2:
- if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- case -3:
- if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- case 3:
- if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- case -4:
- if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- case 4:
- if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
- if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
- __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])))
- } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
- }
- }
- break;
- }
- }
- #endif
- if ((sizeof(int) <= sizeof(long))) {
- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
- } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
- }
- }
- {
- int val;
- int ret = -1;
- #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
- Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
- x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
- if (unlikely(bytes_copied == -1)) {
- } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
- goto raise_overflow;
- } else {
- ret = 0;
- }
- #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
- int one = 1; int is_little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&val;
- ret = _PyLong_AsByteArray((PyLongObject *)x,
- bytes, sizeof(val),
- is_little, !is_unsigned);
- #else
- PyObject *v;
- PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
- int bits, remaining_bits, is_negative = 0;
- int chunk_size = (sizeof(long) < 8) ? 30 : 62;
- if (likely(PyLong_CheckExact(x))) {
- v = __Pyx_NewRef(x);
- } else {
- v = PyNumber_Long(x);
- if (unlikely(!v)) return (int) -1;
- assert(PyLong_CheckExact(v));
- }
- {
- int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
- if (unlikely(result < 0)) {
- Py_DECREF(v);
- return (int) -1;
- }
- is_negative = result == 1;
- }
- if (is_unsigned && unlikely(is_negative)) {
- Py_DECREF(v);
- goto raise_neg_overflow;
- } else if (is_negative) {
- stepval = PyNumber_Invert(v);
- Py_DECREF(v);
- if (unlikely(!stepval))
- return (int) -1;
- } else {
- stepval = v;
- }
- v = NULL;
- val = (int) 0;
- mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
- shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
- for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
- PyObject *tmp, *digit;
- long idigit;
- digit = PyNumber_And(stepval, mask);
- if (unlikely(!digit)) goto done;
- idigit = PyLong_AsLong(digit);
- Py_DECREF(digit);
- if (unlikely(idigit < 0)) goto done;
- val |= ((int) idigit) << bits;
- tmp = PyNumber_Rshift(stepval, shift);
- if (unlikely(!tmp)) goto done;
- Py_DECREF(stepval); stepval = tmp;
- }
- Py_DECREF(shift); shift = NULL;
- Py_DECREF(mask); mask = NULL;
- {
- long idigit = PyLong_AsLong(stepval);
- if (unlikely(idigit < 0)) goto done;
- remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
- if (unlikely(idigit >= (1L << remaining_bits)))
- goto raise_overflow;
- val |= ((int) idigit) << bits;
- }
- if (!is_unsigned) {
- if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
- goto raise_overflow;
- if (is_negative)
- val = ~val;
- }
- ret = 0;
- done:
- Py_XDECREF(shift);
- Py_XDECREF(mask);
- Py_XDECREF(stepval);
- #endif
- if (unlikely(ret))
- return (int) -1;
- return val;
- }
- raise_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to int");
- return (int) -1;
- raise_neg_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to int");
- return (int) -1;
- }
- /* FastTypeChecks */
- #if CYTHON_COMPILING_IN_CPYTHON
- static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
- while (a) {
- a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
- if (a == b)
- return 1;
- }
- return b == &PyBaseObject_Type;
- }
- static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
- PyObject *mro;
- if (a == b) return 1;
- mro = a->tp_mro;
- if (likely(mro)) {
- Py_ssize_t i, n;
- n = PyTuple_GET_SIZE(mro);
- for (i = 0; i < n; i++) {
- if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
- return 1;
- }
- return 0;
- }
- return __Pyx_InBases(a, b);
- }
- static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
- PyObject *mro;
- if (cls == a || cls == b) return 1;
- mro = cls->tp_mro;
- if (likely(mro)) {
- Py_ssize_t i, n;
- n = PyTuple_GET_SIZE(mro);
- for (i = 0; i < n; i++) {
- PyObject *base = PyTuple_GET_ITEM(mro, i);
- if (base == (PyObject *)a || base == (PyObject *)b)
- return 1;
- }
- return 0;
- }
- return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
- }
- static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
- if (exc_type1) {
- return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
- } else {
- return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
- }
- }
- static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
- Py_ssize_t i, n;
- assert(PyExceptionClass_Check(exc_type));
- n = PyTuple_GET_SIZE(tuple);
- for (i=0; i<n; i++) {
- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
- }
- for (i=0; i<n; i++) {
- PyObject *t = PyTuple_GET_ITEM(tuple, i);
- if (likely(PyExceptionClass_Check(t))) {
- if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
- } else {
- }
- }
- return 0;
- }
- static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
- if (likely(err == exc_type)) return 1;
- if (likely(PyExceptionClass_Check(err))) {
- if (likely(PyExceptionClass_Check(exc_type))) {
- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
- } else if (likely(PyTuple_Check(exc_type))) {
- return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
- } else {
- }
- }
- return PyErr_GivenExceptionMatches(err, exc_type);
- }
- static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
- assert(PyExceptionClass_Check(exc_type1));
- assert(PyExceptionClass_Check(exc_type2));
- if (likely(err == exc_type1 || err == exc_type2)) return 1;
- if (likely(PyExceptionClass_Check(err))) {
- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
- }
- return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
- }
- #endif
- /* GetRuntimeVersion */
- #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
- void __Pyx_init_runtime_version(void) {
- if (__Pyx_cached_runtime_version == 0) {
- const char* rt_version = Py_GetVersion();
- unsigned long version = 0;
- unsigned long factor = 0x01000000UL;
- unsigned int digit = 0;
- int i = 0;
- while (factor) {
- while ('0' <= rt_version[i] && rt_version[i] <= '9') {
- digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
- ++i;
- }
- version += factor * digit;
- if (rt_version[i] != '.')
- break;
- digit = 0;
- factor >>= 8;
- ++i;
- }
- __Pyx_cached_runtime_version = version;
- }
- }
- #endif
- static unsigned long __Pyx_get_runtime_version(void) {
- #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
- return Py_Version & ~0xFFUL;
- #else
- return __Pyx_cached_runtime_version;
- #endif
- }
- /* CheckBinaryVersion */
- static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
- const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
- if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
- return 0;
- if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
- return 1;
- {
- char message[200];
- PyOS_snprintf(message, sizeof(message),
- "compile time Python version %d.%d "
- "of module '%.100s' "
- "%s "
- "runtime version %d.%d",
- (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
- __Pyx_MODULE_NAME,
- (allow_newer) ? "was newer than" : "does not match",
- (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
- );
- return PyErr_WarnEx(NULL, message, 1);
- }
- }
- /* NewCodeObj */
- #if CYTHON_COMPILING_IN_LIMITED_API
- static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
- PyObject *code, PyObject *c, PyObject* n, PyObject *v,
- PyObject *fv, PyObject *cell, PyObject* fn,
- PyObject *name, int fline, PyObject *lnos) {
- PyObject *exception_table = NULL;
- PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
- #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
- PyObject *version_info;
- PyObject *py_minor_version = NULL;
- #endif
- long minor_version = 0;
- PyObject *type, *value, *traceback;
- PyErr_Fetch(&type, &value, &traceback);
- #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
- minor_version = 11;
- #else
- if (!(version_info = PySys_GetObject("version_info"))) goto end;
- if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
- minor_version = PyLong_AsLong(py_minor_version);
- Py_DECREF(py_minor_version);
- if (minor_version == -1 && PyErr_Occurred()) goto end;
- #endif
- if (!(types_module = PyImport_ImportModule("types"))) goto end;
- if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
- if (minor_version <= 7) {
- (void)p;
- result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
- c, n, v, fn, name, fline, lnos, fv, cell);
- } else if (minor_version <= 10) {
- result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
- c, n, v, fn, name, fline, lnos, fv, cell);
- } else {
- if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
- result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
- c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
- }
- end:
- Py_XDECREF(code_type);
- Py_XDECREF(exception_table);
- Py_XDECREF(types_module);
- if (type) {
- PyErr_Restore(type, value, traceback);
- }
- return result;
- }
- #elif PY_VERSION_HEX >= 0x030B0000
- static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
- PyObject *code, PyObject *c, PyObject* n, PyObject *v,
- PyObject *fv, PyObject *cell, PyObject* fn,
- PyObject *name, int fline, PyObject *lnos) {
- PyCodeObject *result;
- result =
- #if PY_VERSION_HEX >= 0x030C0000
- PyUnstable_Code_NewWithPosOnlyArgs
- #else
- PyCode_NewWithPosOnlyArgs
- #endif
- (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
- if (likely(result))
- result->_co_firsttraceable = 0;
- #endif
- return result;
- }
- #elif !CYTHON_COMPILING_IN_PYPY
- #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #else
- #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #endif
- static PyObject* __Pyx_PyCode_New(
- const __Pyx_PyCode_New_function_description descr,
- PyObject * const *varnames,
- PyObject *filename,
- PyObject *funcname,
- PyObject *line_table,
- PyObject *tuple_dedup_map
- ) {
- PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
- Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
- PyObject *varnames_tuple = PyTuple_New(var_count);
- if (unlikely(!varnames_tuple)) return NULL;
- for (Py_ssize_t i=0; i < var_count; i++) {
- Py_INCREF(varnames[i]);
- if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
- }
- #if CYTHON_COMPILING_IN_LIMITED_API
- varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
- if (!varnames_tuple_dedup) {
- if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
- varnames_tuple_dedup = varnames_tuple;
- }
- #else
- varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
- if (unlikely(!varnames_tuple_dedup)) goto done;
- #endif
- #if CYTHON_AVOID_BORROWED_REFS
- Py_INCREF(varnames_tuple_dedup);
- #endif
- if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
- Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
- #if !CYTHON_ASSUME_SAFE_SIZE
- if (unlikely(line_table_length == -1)) goto done;
- #endif
- Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
- code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
- if (unlikely(!code_bytes)) goto done;
- char* c_code_bytes = PyBytes_AsString(code_bytes);
- if (unlikely(!c_code_bytes)) goto done;
- memset(c_code_bytes, 0, (size_t) code_len);
- }
- code_obj = (PyObject*) __Pyx__PyCode_New(
- (int) descr.argcount,
- (int) descr.num_posonly_args,
- (int) descr.num_kwonly_args,
- (int) descr.nlocals,
- 0,
- (int) descr.flags,
- code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
- __pyx_mstate_global->__pyx_empty_tuple,
- __pyx_mstate_global->__pyx_empty_tuple,
- varnames_tuple_dedup,
- __pyx_mstate_global->__pyx_empty_tuple,
- __pyx_mstate_global->__pyx_empty_tuple,
- filename,
- funcname,
- (int) descr.first_line,
- (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
- );
- done:
- Py_XDECREF(code_bytes);
- #if CYTHON_AVOID_BORROWED_REFS
- Py_XDECREF(varnames_tuple_dedup);
- #endif
- Py_DECREF(varnames_tuple);
- return code_obj;
- }
- /* DecompressString */
- static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
- PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
- const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
- PyObject *methodname = PyUnicode_FromString("decompress");
- if (unlikely(!methodname)) return NULL;
- #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
- if (algo == 3) {
- PyObject *fromlist = Py_BuildValue("[O]", methodname);
- if (unlikely(!fromlist)) goto bad;
- module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
- Py_DECREF(fromlist);
- } else
- #endif
- module = PyImport_ImportModule(module_name);
- if (unlikely(!module)) goto import_failed;
- decompress = PyObject_GetAttr(module, methodname);
- if (unlikely(!decompress)) goto import_failed;
- {
- #ifdef __cplusplus
- char *memview_bytes = const_cast<char*>(s);
- #else
- #if defined(__clang__)
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wcast-qual"
- #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wcast-qual"
- #endif
- char *memview_bytes = (char*) s;
- #if defined(__clang__)
- #pragma clang diagnostic pop
- #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
- #pragma GCC diagnostic pop
- #endif
- #endif
- #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
- int memview_flags = 0x100;
- #else
- int memview_flags = PyBUF_READ;
- #endif
- compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
- }
- if (unlikely(!compressed_bytes)) {
- Py_DECREF(decompress);
- goto bad;
- }
- decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
- Py_DECREF(compressed_bytes);
- Py_DECREF(decompress);
- Py_DECREF(module);
- Py_DECREF(methodname);
- return decompressed;
- import_failed:
- PyErr_Format(PyExc_ImportError,
- "Failed to import '%.20s.decompress' - cannot initialise module strings. "
- "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
- module_name, algo);
- bad:
- Py_XDECREF(module);
- Py_DECREF(methodname);
- return NULL;
- }
- #include <string.h>
- static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
- size_t len = strlen(s);
- if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
- PyErr_SetString(PyExc_OverflowError, "byte string is too long");
- return -1;
- }
- return (Py_ssize_t) len;
- }
- static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
- Py_ssize_t len = __Pyx_ssize_strlen(c_str);
- if (unlikely(len < 0)) return NULL;
- return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
- }
- static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
- Py_ssize_t len = __Pyx_ssize_strlen(c_str);
- if (unlikely(len < 0)) return NULL;
- return PyByteArray_FromStringAndSize(c_str, len);
- }
- static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
- Py_ssize_t ignore;
- return __Pyx_PyObject_AsStringAndSize(o, &ignore);
- }
- #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
- static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
- if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
- #if CYTHON_COMPILING_IN_LIMITED_API
- {
- const char* result;
- Py_ssize_t unicode_length;
- CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
- if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
- #else
- result = PyUnicode_AsUTF8AndSize(o, length);
- #endif
- #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- unicode_length = PyUnicode_GetLength(o);
- if (unlikely(unicode_length < 0)) return NULL;
- if (unlikely(unicode_length != *length)) {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
- #endif
- return result;
- }
- #else
- #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- if (likely(PyUnicode_IS_ASCII(o))) {
- *length = PyUnicode_GET_LENGTH(o);
- return PyUnicode_AsUTF8(o);
- } else {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
- #else
- return PyUnicode_AsUTF8AndSize(o, length);
- #endif
- #endif
- }
- #endif
- static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
- #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
- if (PyUnicode_Check(o)) {
- return __Pyx_PyUnicode_AsStringAndSize(o, length);
- } else
- #endif
- if (PyByteArray_Check(o)) {
- #if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
- *length = PyByteArray_GET_SIZE(o);
- return PyByteArray_AS_STRING(o);
- #else
- *length = PyByteArray_Size(o);
- if (*length == -1) return NULL;
- return PyByteArray_AsString(o);
- #endif
- } else
- {
- char* result;
- int r = PyBytes_AsStringAndSize(o, &result, length);
- if (unlikely(r < 0)) {
- return NULL;
- } else {
- return result;
- }
- }
- }
- static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
- int is_true = x == Py_True;
- if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
- else return PyObject_IsTrue(x);
- }
- static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
- int retval;
- if (unlikely(!x)) return -1;
- retval = __Pyx_PyObject_IsTrue(x);
- Py_DECREF(x);
- return retval;
- }
- static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
- __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
- if (PyLong_Check(result)) {
- if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
- "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
- "The ability to return an instance of a strict subclass of int is deprecated, "
- "and may be removed in a future version of Python.",
- result_type_name)) {
- __Pyx_DECREF_TypeName(result_type_name);
- Py_DECREF(result);
- return NULL;
- }
- __Pyx_DECREF_TypeName(result_type_name);
- return result;
- }
- PyErr_Format(PyExc_TypeError,
- "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
- result_type_name);
- __Pyx_DECREF_TypeName(result_type_name);
- Py_DECREF(result);
- return NULL;
- }
- static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
- #if CYTHON_USE_TYPE_SLOTS
- PyNumberMethods *m;
- #endif
- PyObject *res = NULL;
- if (likely(PyLong_Check(x)))
- return __Pyx_NewRef(x);
- #if CYTHON_USE_TYPE_SLOTS
- m = Py_TYPE(x)->tp_as_number;
- if (likely(m && m->nb_int)) {
- res = m->nb_int(x);
- }
- #else
- if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
- res = PyNumber_Long(x);
- }
- #endif
- if (likely(res)) {
- if (unlikely(!PyLong_CheckExact(res))) {
- return __Pyx_PyNumber_LongWrongResultType(res);
- }
- }
- else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError,
- "an integer is required");
- }
- return res;
- }
- static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
- Py_ssize_t ival;
- PyObject *x;
- if (likely(PyLong_CheckExact(b))) {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (likely(__Pyx_PyLong_IsCompact(b))) {
- return __Pyx_PyLong_CompactValue(b);
- } else {
- const digit* digits = __Pyx_PyLong_Digits(b);
- const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
- switch (size) {
- case 2:
- if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
- return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
- }
- break;
- case -2:
- if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
- return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
- }
- break;
- case 3:
- if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
- return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
- }
- break;
- case -3:
- if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
- return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
- }
- break;
- case 4:
- if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
- 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]));
- }
- break;
- case -4:
- if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
- 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]));
- }
- break;
- }
- }
- #endif
- return PyLong_AsSsize_t(b);
- }
- x = PyNumber_Index(b);
- if (!x) return -1;
- ival = PyLong_AsSsize_t(x);
- Py_DECREF(x);
- return ival;
- }
- static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
- if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
- return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
- } else {
- Py_ssize_t ival;
- PyObject *x;
- x = PyNumber_Index(o);
- if (!x) return -1;
- ival = PyLong_AsLong(x);
- Py_DECREF(x);
- return ival;
- }
- }
- static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
- CYTHON_UNUSED_VAR(b);
- return __Pyx_NewRef(Py_None);
- }
- static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
- return __Pyx_NewRef(b ? Py_True: Py_False);
- }
- static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
- return PyLong_FromSize_t(ival);
- }
- /* MultiPhaseInitModuleState */
- #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
- #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
- #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
- #else
- #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
- #endif
- #endif
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
- #error "Module state with PEP489 requires atomics. Currently that's one of\
- C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
- #endif
- #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- #define __Pyx_ModuleStateLookup_Lock()
- #define __Pyx_ModuleStateLookup_Unlock()
- #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
- static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
- #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
- #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
- #elif defined(__cplusplus) && __cplusplus >= 201103L
- #include <mutex>
- static std::mutex __Pyx_ModuleStateLookup_mutex;
- #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
- #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
- #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
- #include <threads.h>
- static mtx_t __Pyx_ModuleStateLookup_mutex;
- static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
- static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
- mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
- }
- #define __Pyx_ModuleStateLookup_Lock()\
- call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
- mtx_lock(&__Pyx_ModuleStateLookup_mutex)
- #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
- #elif defined(HAVE_PTHREAD_H)
- #include <pthread.h>
- static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
- #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
- #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
- #elif defined(_WIN32)
- #include <Windows.h> // synchapi.h on its own doesn't work
- static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
- #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
- #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
- #else
- #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
- Requires C standard >= C11, or C++ standard >= C++11,\
- or pthreads, or the Windows 32 API, or Python >= 3.13."
- #endif
- typedef struct {
- int64_t id;
- PyObject *module;
- } __Pyx_InterpreterIdAndModule;
- typedef struct {
- char interpreter_id_as_index;
- Py_ssize_t count;
- Py_ssize_t allocated;
- __Pyx_InterpreterIdAndModule table[1];
- } __Pyx_ModuleStateLookupData;
- #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
- #endif
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
- #else
- static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
- #endif
- static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
- __Pyx_InterpreterIdAndModule* table,
- Py_ssize_t count,
- int64_t interpreterId) {
- __Pyx_InterpreterIdAndModule* begin = table;
- __Pyx_InterpreterIdAndModule* end = begin + count;
- if (begin->id == interpreterId) {
- return begin;
- }
- while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
- __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
- if (halfway->id == interpreterId) {
- return halfway;
- }
- if (halfway->id < interpreterId) {
- begin = halfway;
- } else {
- end = halfway;
- }
- }
- for (; begin < end; ++begin) {
- if (begin->id >= interpreterId) return begin;
- }
- return begin;
- }
- static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
- int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
- if (interpreter_id == -1) return NULL;
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
- {
- __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
- if (likely(data)) {
- __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
- if (likely(data == new_data)) {
- goto read_finished;
- }
- }
- __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
- __Pyx_ModuleStateLookup_Lock();
- __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
- data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
- __Pyx_ModuleStateLookup_Unlock();
- }
- read_finished:;
- #else
- __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
- #endif
- __Pyx_InterpreterIdAndModule* found = NULL;
- if (unlikely(!data)) goto end;
- if (data->interpreter_id_as_index) {
- if (interpreter_id < data->count) {
- found = data->table+interpreter_id;
- }
- } else {
- found = __Pyx_State_FindModuleStateLookupTableLowerBound(
- data->table, data->count, interpreter_id);
- }
- end:
- {
- PyObject *result=NULL;
- if (found && found->id == interpreter_id) {
- result = found->module;
- }
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
- #endif
- return result;
- }
- }
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
- while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
- }
- #else
- #define __Pyx_ModuleStateLookup_wait_until_no_readers()
- #endif
- static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
- Py_ssize_t to_allocate = (*old_data)->allocated;
- while (to_allocate <= interpreter_id) {
- if (to_allocate == 0) to_allocate = 1;
- else to_allocate *= 2;
- }
- __Pyx_ModuleStateLookupData *new_data = *old_data;
- if (to_allocate != (*old_data)->allocated) {
- new_data = (__Pyx_ModuleStateLookupData *)realloc(
- *old_data,
- sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
- if (!new_data) {
- PyErr_NoMemory();
- return -1;
- }
- for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
- new_data->table[i].id = i;
- new_data->table[i].module = NULL;
- }
- new_data->allocated = to_allocate;
- }
- new_data->table[interpreter_id].module = module;
- if (new_data->count < interpreter_id+1) {
- new_data->count = interpreter_id+1;
- }
- *old_data = new_data;
- return 0;
- }
- static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
- __Pyx_InterpreterIdAndModule *read = data->table;
- __Pyx_InterpreterIdAndModule *write = data->table;
- __Pyx_InterpreterIdAndModule *end = read + data->count;
- for (; read<end; ++read) {
- if (read->module) {
- write->id = read->id;
- write->module = read->module;
- ++write;
- }
- }
- data->count = write - data->table;
- for (; write<end; ++write) {
- write->id = 0;
- write->module = NULL;
- }
- data->interpreter_id_as_index = 0;
- }
- static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
- int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
- if (interpreter_id == -1) return -1;
- int result = 0;
- __Pyx_ModuleStateLookup_Lock();
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
- __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
- #else
- __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
- #endif
- __Pyx_ModuleStateLookupData *new_data = old_data;
- if (!new_data) {
- new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
- if (!new_data) {
- result = -1;
- PyErr_NoMemory();
- goto end;
- }
- new_data->allocated = 1;
- new_data->interpreter_id_as_index = 1;
- }
- __Pyx_ModuleStateLookup_wait_until_no_readers();
- if (new_data->interpreter_id_as_index) {
- if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
- result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
- goto end;
- }
- __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
- }
- {
- Py_ssize_t insert_at = 0;
- {
- __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
- new_data->table, new_data->count, interpreter_id);
- assert(lower_bound);
- insert_at = lower_bound - new_data->table;
- if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
- lower_bound->module = module;
- goto end; // already in table, nothing more to do
- }
- }
- if (new_data->count+1 >= new_data->allocated) {
- Py_ssize_t to_allocate = (new_data->count+1)*2;
- new_data =
- (__Pyx_ModuleStateLookupData*)realloc(
- new_data,
- sizeof(__Pyx_ModuleStateLookupData) +
- (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
- if (!new_data) {
- result = -1;
- new_data = old_data;
- PyErr_NoMemory();
- goto end;
- }
- new_data->allocated = to_allocate;
- }
- ++new_data->count;
- int64_t last_id = interpreter_id;
- PyObject *last_module = module;
- for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
- int64_t current_id = new_data->table[i].id;
- new_data->table[i].id = last_id;
- last_id = current_id;
- PyObject *current_module = new_data->table[i].module;
- new_data->table[i].module = last_module;
- last_module = current_module;
- }
- }
- end:
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
- #else
- __Pyx_ModuleStateLookup_data = new_data;
- #endif
- __Pyx_ModuleStateLookup_Unlock();
- return result;
- }
- static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
- int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
- if (interpreter_id == -1) return -1;
- __Pyx_ModuleStateLookup_Lock();
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
- __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
- #else
- __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
- #endif
- if (data->interpreter_id_as_index) {
- if (interpreter_id < data->count) {
- data->table[interpreter_id].module = NULL;
- }
- goto done;
- }
- {
- __Pyx_ModuleStateLookup_wait_until_no_readers();
- __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
- data->table, data->count, interpreter_id);
- if (!lower_bound) goto done;
- if (lower_bound->id != interpreter_id) goto done;
- __Pyx_InterpreterIdAndModule *end = data->table+data->count;
- for (;lower_bound<end-1; ++lower_bound) {
- lower_bound->id = (lower_bound+1)->id;
- lower_bound->module = (lower_bound+1)->module;
- }
- }
- --data->count;
- if (data->count == 0) {
- free(data);
- data = NULL;
- }
- done:
- #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
- __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
- #else
- __Pyx_ModuleStateLookup_data = data;
- #endif
- __Pyx_ModuleStateLookup_Unlock();
- return 0;
- }
- #endif
- /* #### Code section: utility_code_pragmas_end ### */
- #ifdef _MSC_VER
- #pragma warning( pop )
- #endif
- /* #### Code section: end ### */
- #endif /* Py_PYTHON_H */
|