| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059 |
- /* Generated by Cython 3.2.4 */
- /* BEGIN: Cython Metadata
- {
- "distutils": {
- "name": "fontTools.feaLib.lexer",
- "sources": [
- "Lib/fontTools/feaLib/lexer.py"
- ]
- },
- "module_name": "fontTools.feaLib.lexer"
- }
- 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__feaLib__lexer
- #define __PYX_HAVE_API__fontTools__feaLib__lexer
- /* 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/feaLib/lexer.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)
- /* 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
- /* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
- #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
- /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
- /* GetBuiltinName.proto */
- static PyObject *__Pyx_GetBuiltinName(PyObject *name);
- /* 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);
- /* 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);
- /* 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
- /* 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
- /* 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
- /* 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);
- /* PyLongBinop.proto */
- #if !CYTHON_COMPILING_IN_PYPY
- static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
- #else
- #define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
- (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
- #endif
- /* PyStopIteration_Check.proto */
- #define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration)
- /* RaiseException.export */
- static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
- /* GetItemInt.proto */
- #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
- (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
- __Pyx_GetItemInt_Generic(o, to_py_func(i))))
- #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
- (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck, int unsafe_shared);
- #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
- (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck, int unsafe_shared);
- static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
- int is_list, int wraparound, int boundscheck, int unsafe_shared);
- /* ObjectGetItem.proto */
- #if CYTHON_USE_TYPE_SLOTS
- static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
- #else
- #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
- #endif
- /* SliceObject.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
- PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
- PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
- int has_cstart, int has_cstop, int wraparound);
- /* PyLongBinop.proto */
- #if !CYTHON_COMPILING_IN_PYPY
- static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
- #else
- #define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
- (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
- #endif
- /* PySequenceContains.proto */
- static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
- int result = PySequence_Contains(seq, item);
- return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
- }
- /* PyUnicodeContains.proto */
- static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
- int result = PyUnicode_Contains(text, substring);
- return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
- }
- /* pybytes_as_double.proto (used by pynumber_float) */
- static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
- static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
- static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
- char* as_c_string;
- Py_ssize_t size;
- #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- as_c_string = PyBytes_AS_STRING(obj);
- size = PyBytes_GET_SIZE(obj);
- #else
- if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
- return (double)-1;
- }
- #endif
- return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
- }
- static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
- char* as_c_string;
- Py_ssize_t size;
- #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- as_c_string = PyByteArray_AS_STRING(obj);
- size = PyByteArray_GET_SIZE(obj);
- #else
- as_c_string = PyByteArray_AsString(obj);
- if (as_c_string == NULL) {
- return (double)-1;
- }
- size = PyByteArray_Size(obj);
- #endif
- return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
- }
- /* pyunicode_as_double.proto (used by pynumber_float) */
- #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
- static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
- int last_was_punctuation;
- Py_ssize_t i;
- last_was_punctuation = 1;
- for (i=start; i <= end; i++) {
- Py_UCS4 chr = PyUnicode_READ(kind, data, i);
- int is_punctuation = (chr == '_') | (chr == '.');
- *buffer = (char)chr;
- buffer += (chr != '_');
- if (unlikely(chr > 127)) goto parse_failure;
- if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
- last_was_punctuation = is_punctuation;
- }
- if (unlikely(last_was_punctuation)) goto parse_failure;
- *buffer = '\0';
- return buffer;
- parse_failure:
- return NULL;
- }
- static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
- int matches = 1;
- Py_UCS4 chr;
- Py_UCS4 sign = PyUnicode_READ(kind, data, start);
- int is_signed = (sign == '-') | (sign == '+');
- start += is_signed;
- length -= is_signed;
- switch (PyUnicode_READ(kind, data, start)) {
- #ifdef Py_NAN
- case 'n':
- case 'N':
- if (unlikely(length != 3)) goto parse_failure;
- chr = PyUnicode_READ(kind, data, start+1);
- matches &= (chr == 'a') | (chr == 'A');
- chr = PyUnicode_READ(kind, data, start+2);
- matches &= (chr == 'n') | (chr == 'N');
- if (unlikely(!matches)) goto parse_failure;
- return (sign == '-') ? -Py_NAN : Py_NAN;
- #endif
- case 'i':
- case 'I':
- if (unlikely(length < 3)) goto parse_failure;
- chr = PyUnicode_READ(kind, data, start+1);
- matches &= (chr == 'n') | (chr == 'N');
- chr = PyUnicode_READ(kind, data, start+2);
- matches &= (chr == 'f') | (chr == 'F');
- if (likely(length == 3 && matches))
- return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
- if (unlikely(length != 8)) goto parse_failure;
- chr = PyUnicode_READ(kind, data, start+3);
- matches &= (chr == 'i') | (chr == 'I');
- chr = PyUnicode_READ(kind, data, start+4);
- matches &= (chr == 'n') | (chr == 'N');
- chr = PyUnicode_READ(kind, data, start+5);
- matches &= (chr == 'i') | (chr == 'I');
- chr = PyUnicode_READ(kind, data, start+6);
- matches &= (chr == 't') | (chr == 'T');
- chr = PyUnicode_READ(kind, data, start+7);
- matches &= (chr == 'y') | (chr == 'Y');
- if (unlikely(!matches)) goto parse_failure;
- return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
- case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
- break;
- default:
- goto parse_failure;
- }
- return 0.0;
- parse_failure:
- return -1.0;
- }
- static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
- double value;
- const char *last;
- char *end;
- Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
- const int kind = PyUnicode_KIND(obj);
- const void* data = PyUnicode_DATA(obj);
- start = 0;
- while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
- start++;
- while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
- length--;
- length -= start;
- if (unlikely(length <= 0)) goto fallback;
- value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
- if (unlikely(value == -1.0)) goto fallback;
- if (value != 0.0) return value;
- if (length < 40) {
- char number[40];
- last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
- if (unlikely(!last)) goto fallback;
- value = PyOS_string_to_double(number, &end, NULL);
- } else {
- char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
- if (unlikely(!number)) goto fallback;
- last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
- if (unlikely(!last)) {
- PyMem_Free(number);
- goto fallback;
- }
- value = PyOS_string_to_double(number, &end, NULL);
- PyMem_Free(number);
- }
- if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
- return value;
- }
- fallback:
- return __Pyx_SlowPyString_AsDouble(obj);
- }
- #endif
- static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
- #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
- if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
- return (double)-1;
- if (likely(PyUnicode_IS_ASCII(obj))) {
- const char *s;
- Py_ssize_t length;
- s = PyUnicode_AsUTF8AndSize(obj, &length);
- return __Pyx__PyBytes_AsDouble(obj, s, length);
- }
- return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
- #else
- return __Pyx_SlowPyString_AsDouble(obj);
- #endif
- }
- /* pynumber_float.proto */
- static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
- #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
- /* PyObjectVectorCallKwBuilder.proto */
- 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
- /* PyFileNotFoundError_Check.proto */
- #define __Pyx_PyExc_FileNotFoundError_Check(obj) __Pyx_TypeCheck(obj, PyExc_FileNotFoundError)
- /* IterNextPlain.proto (used by IterNext) */
- static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
- #endif
- /* IterNext.proto */
- #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
- static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);
- /* GetTopmostException.proto (used by SaveResetException) */
- #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
- static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
- #endif
- /* SaveResetException.proto */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
- static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
- #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
- static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
- #else
- #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
- #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
- #endif
- /* GetException.proto */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
- static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
- #else
- static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
- #endif
- /* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
- /* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
- #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
- static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
- #endif
- /* PyObjectCallMethod0.proto (used by pop) */
- static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
- /* pop.proto */
- static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
- #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
- #define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
- __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
- #else
- #define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L)
- #define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L)
- #endif
- /* ListAppend.proto (used by append) */
- #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
- static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
- Py_INCREF(x);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
- L->ob_item[len] = x;
- #else
- PyList_SET_ITEM(list, len, x);
- #endif
- __Pyx_SET_SIZE(list, len + 1);
- return 0;
- }
- return PyList_Append(list, x);
- }
- #else
- #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
- #endif
- /* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
- /* PyObjectCallMethod1.proto (used by append) */
- static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
- /* append.proto */
- static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
- /* SwapException.proto */
- #if CYTHON_FAST_THREAD_STATE
- #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
- static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
- #else
- static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
- #endif
- /* HasAttr.proto */
- #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
- /* GetAttr3.proto */
- static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
- /* 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);
- /* Py3UpdateBases.proto */
- static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
- /* CalculateMetaclass.proto */
- static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
- /* 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
- /* 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);
- /* 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);
- /* GCCDiagnostics.proto */
- #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
- #define __Pyx_HAS_GCC_DIAGNOSTIC
- #endif
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
- /* 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
- /* 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.feaLib.lexer" */
- /* #### Code section: typeinfo ### */
- /* #### Code section: before_global_var ### */
- #define __Pyx_MODULE_NAME "fontTools.feaLib.lexer"
- extern int __pyx_module_is_main_fontTools__feaLib__lexer;
- int __pyx_module_is_main_fontTools__feaLib__lexer = 0;
- /* Implementation of "fontTools.feaLib.lexer" */
- /* #### Code section: global_var ### */
- static PyObject *__pyx_builtin_object;
- static PyObject *__pyx_builtin_staticmethod;
- static PyObject *__pyx_builtin_open;
- /* #### Code section: string_decls ### */
- /* #### Code section: decls ### */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_filename); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stop_at); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_featurefile, PyObject *__pyx_v_includeDir); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
- static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* 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;
- __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop;
- PyObject *__pyx_tuple[4];
- PyObject *__pyx_codeobj_tab[16];
- PyObject *__pyx_string_tab[197];
- PyObject *__pyx_number_tab[6];
- /* #### Code section: module_state_contents ### */
- /* IterNextPlain.module_state_decls */
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
- #endif
- /* 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_0 __pyx_string_tab[1]
- #define __pyx_kp_u_0123456789 __pyx_string_tab[2]
- #define __pyx_kp_u_0123456789ABCDEFabcdef __pyx_string_tab[3]
- #define __pyx_kp_u_A_Lexer_that_follows_include_sta __pyx_string_tab[4]
- #define __pyx_kp_u_A_Za_z_0_9 __pyx_string_tab[5]
- #define __pyx_kp_u_Expected_after_file_name __pyx_string_tab[6]
- #define __pyx_kp_u_Expected_before_file_name __pyx_string_tab[7]
- #define __pyx_kp_u_Expected_file_name __pyx_string_tab[8]
- #define __pyx_kp_u_Expected_glyph_class_name __pyx_string_tab[9]
- #define __pyx_kp_u_Expected_s_to_terminate_anonymou __pyx_string_tab[10]
- #define __pyx_kp_u_Expected_to_terminate_string __pyx_string_tab[11]
- #define __pyx_kp_u_Glyph_class_names_must_consist_o __pyx_string_tab[12]
- #define __pyx_kp_u_Lexer_that_does_not_follow_inclu __pyx_string_tab[13]
- #define __pyx_kp_u_Lib_fontTools_feaLib_lexer_py __pyx_string_tab[14]
- #define __pyx_kp_u_Too_many_recursive_includes __pyx_string_tab[15]
- #define __pyx_kp_u_Unexpected_character_r __pyx_string_tab[16]
- #define __pyx_kp_u__10 __pyx_string_tab[17]
- #define __pyx_kp_u__11 __pyx_string_tab[18]
- #define __pyx_kp_u__12 __pyx_string_tab[19]
- #define __pyx_kp_u__13 __pyx_string_tab[20]
- #define __pyx_kp_u__14 __pyx_string_tab[21]
- #define __pyx_kp_u__15 __pyx_string_tab[22]
- #define __pyx_kp_u__16 __pyx_string_tab[23]
- #define __pyx_kp_u__17 __pyx_string_tab[24]
- #define __pyx_kp_u__18 __pyx_string_tab[25]
- #define __pyx_kp_u__2 __pyx_string_tab[26]
- #define __pyx_kp_u__3 __pyx_string_tab[27]
- #define __pyx_kp_u__4 __pyx_string_tab[28]
- #define __pyx_kp_u__5 __pyx_string_tab[29]
- #define __pyx_kp_u__6 __pyx_string_tab[30]
- #define __pyx_kp_u__7 __pyx_string_tab[31]
- #define __pyx_kp_u__8 __pyx_string_tab[32]
- #define __pyx_kp_u__9 __pyx_string_tab[33]
- #define __pyx_kp_u_features __pyx_string_tab[34]
- #define __pyx_kp_u_s __pyx_string_tab[35]
- #define __pyx_kp_u_s_2 __pyx_string_tab[36]
- #define __pyx_kp_u_utf_8_sig __pyx_string_tab[37]
- #define __pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef __pyx_string_tab[38]
- #define __pyx_n_u_ANONYMOUS_BLOCK __pyx_string_tab[39]
- #define __pyx_n_u_CHAR_DIGIT __pyx_string_tab[40]
- #define __pyx_n_u_CHAR_HEXDIGIT __pyx_string_tab[41]
- #define __pyx_n_u_CHAR_LETTER __pyx_string_tab[42]
- #define __pyx_n_u_CHAR_NAME_CONTINUATION __pyx_string_tab[43]
- #define __pyx_n_u_CHAR_NAME_START __pyx_string_tab[44]
- #define __pyx_n_u_CHAR_NEWLINE __pyx_string_tab[45]
- #define __pyx_n_u_CHAR_SYMBOL __pyx_string_tab[46]
- #define __pyx_n_u_CHAR_WHITESPACE __pyx_string_tab[47]
- #define __pyx_n_u_CID __pyx_string_tab[48]
- #define __pyx_n_u_COMMENT __pyx_string_tab[49]
- #define __pyx_n_u_FILENAME __pyx_string_tab[50]
- #define __pyx_n_u_FLOAT __pyx_string_tab[51]
- #define __pyx_n_u_FeatureLibError __pyx_string_tab[52]
- #define __pyx_n_u_FeatureLibLocation __pyx_string_tab[53]
- #define __pyx_n_u_GLYPHCLASS __pyx_string_tab[54]
- #define __pyx_n_u_HEXADECIMAL __pyx_string_tab[55]
- #define __pyx_n_u_IncludedFeaNotFound __pyx_string_tab[56]
- #define __pyx_n_u_IncludingLexer __pyx_string_tab[57]
- #define __pyx_n_u_IncludingLexer___init __pyx_string_tab[58]
- #define __pyx_n_u_IncludingLexer___iter __pyx_string_tab[59]
- #define __pyx_n_u_IncludingLexer___next __pyx_string_tab[60]
- #define __pyx_n_u_IncludingLexer_make_lexer __pyx_string_tab[61]
- #define __pyx_n_u_IncludingLexer_next __pyx_string_tab[62]
- #define __pyx_n_u_IncludingLexer_scan_anonymous_bl __pyx_string_tab[63]
- #define __pyx_n_u_Lexer __pyx_string_tab[64]
- #define __pyx_n_u_Lexer___init __pyx_string_tab[65]
- #define __pyx_n_u_Lexer___iter __pyx_string_tab[66]
- #define __pyx_n_u_Lexer___next __pyx_string_tab[67]
- #define __pyx_n_u_Lexer_location __pyx_string_tab[68]
- #define __pyx_n_u_Lexer_next __pyx_string_tab[69]
- #define __pyx_n_u_Lexer_next_2 __pyx_string_tab[70]
- #define __pyx_n_u_Lexer_scan_anonymous_block __pyx_string_tab[71]
- #define __pyx_n_u_Lexer_scan_over __pyx_string_tab[72]
- #define __pyx_n_u_Lexer_scan_until __pyx_string_tab[73]
- #define __pyx_n_u_MODE_FILENAME __pyx_string_tab[74]
- #define __pyx_n_u_MODE_NORMAL __pyx_string_tab[75]
- #define __pyx_n_u_NAME __pyx_string_tab[76]
- #define __pyx_n_u_NEWLINE __pyx_string_tab[77]
- #define __pyx_n_u_NORMAL __pyx_string_tab[78]
- #define __pyx_n_u_NUMBER __pyx_string_tab[79]
- #define __pyx_n_u_NUMBERS __pyx_string_tab[80]
- #define __pyx_n_u_NonIncludingLexer __pyx_string_tab[81]
- #define __pyx_n_u_NonIncludingLexer___next __pyx_string_tab[82]
- #define __pyx_n_u_OCTAL __pyx_string_tab[83]
- #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[84]
- #define __pyx_n_u_RE_GLYPHCLASS __pyx_string_tab[85]
- #define __pyx_n_u_STRING __pyx_string_tab[86]
- #define __pyx_n_u_SYMBOL __pyx_string_tab[87]
- #define __pyx_n_u_append __pyx_string_tab[88]
- #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[89]
- #define __pyx_n_u_class_getitem __pyx_string_tab[90]
- #define __pyx_n_u_cline_in_traceback __pyx_string_tab[91]
- #define __pyx_n_u_close __pyx_string_tab[92]
- #define __pyx_n_u_closing __pyx_string_tab[93]
- #define __pyx_n_u_column __pyx_string_tab[94]
- #define __pyx_n_u_compile __pyx_string_tab[95]
- #define __pyx_n_u_cur_char __pyx_string_tab[96]
- #define __pyx_n_u_curpath __pyx_string_tab[97]
- #define __pyx_n_u_data __pyx_string_tab[98]
- #define __pyx_n_u_dirname __pyx_string_tab[99]
- #define __pyx_n_u_doc __pyx_string_tab[100]
- #define __pyx_n_u_encoding __pyx_string_tab[101]
- #define __pyx_n_u_err __pyx_string_tab[102]
- #define __pyx_n_u_featurefile __pyx_string_tab[103]
- #define __pyx_n_u_featurefilepath __pyx_string_tab[104]
- #define __pyx_n_u_file_or_path __pyx_string_tab[105]
- #define __pyx_n_u_filename __pyx_string_tab[106]
- #define __pyx_n_u_filename_2 __pyx_string_tab[107]
- #define __pyx_n_u_fileobj __pyx_string_tab[108]
- #define __pyx_n_u_fname_location __pyx_string_tab[109]
- #define __pyx_n_u_fname_token __pyx_string_tab[110]
- #define __pyx_n_u_fname_type __pyx_string_tab[111]
- #define __pyx_n_u_fontTools_feaLib_error __pyx_string_tab[112]
- #define __pyx_n_u_fontTools_feaLib_lexer __pyx_string_tab[113]
- #define __pyx_n_u_fontTools_feaLib_location __pyx_string_tab[114]
- #define __pyx_n_u_func __pyx_string_tab[115]
- #define __pyx_n_u_getcwd __pyx_string_tab[116]
- #define __pyx_n_u_glyphclass __pyx_string_tab[117]
- #define __pyx_n_u_include __pyx_string_tab[118]
- #define __pyx_n_u_includeDir __pyx_string_tab[119]
- #define __pyx_n_u_init __pyx_string_tab[120]
- #define __pyx_n_u_is_coroutine __pyx_string_tab[121]
- #define __pyx_n_u_isabs __pyx_string_tab[122]
- #define __pyx_n_u_items __pyx_string_tab[123]
- #define __pyx_n_u_iter __pyx_string_tab[124]
- #define __pyx_n_u_join __pyx_string_tab[125]
- #define __pyx_n_u_lexer __pyx_string_tab[126]
- #define __pyx_n_u_lexers __pyx_string_tab[127]
- #define __pyx_n_u_limit __pyx_string_tab[128]
- #define __pyx_n_u_line __pyx_string_tab[129]
- #define __pyx_n_u_line_start __pyx_string_tab[130]
- #define __pyx_n_u_location __pyx_string_tab[131]
- #define __pyx_n_u_location_2 __pyx_string_tab[132]
- #define __pyx_n_u_main __pyx_string_tab[133]
- #define __pyx_n_u_make_lexer __pyx_string_tab[134]
- #define __pyx_n_u_match __pyx_string_tab[135]
- #define __pyx_n_u_maxsplit __pyx_string_tab[136]
- #define __pyx_n_u_metaclass __pyx_string_tab[137]
- #define __pyx_n_u_mode __pyx_string_tab[138]
- #define __pyx_n_u_module __pyx_string_tab[139]
- #define __pyx_n_u_mro_entries __pyx_string_tab[140]
- #define __pyx_n_u_name __pyx_string_tab[141]
- #define __pyx_n_u_name_2 __pyx_string_tab[142]
- #define __pyx_n_u_next __pyx_string_tab[143]
- #define __pyx_n_u_next_2 __pyx_string_tab[144]
- #define __pyx_n_u_next_3 __pyx_string_tab[145]
- #define __pyx_n_u_next_char __pyx_string_tab[146]
- #define __pyx_n_u_object __pyx_string_tab[147]
- #define __pyx_n_u_open __pyx_string_tab[148]
- #define __pyx_n_u_os __pyx_string_tab[149]
- #define __pyx_n_u_p __pyx_string_tab[150]
- #define __pyx_n_u_path __pyx_string_tab[151]
- #define __pyx_n_u_pop __pyx_string_tab[152]
- #define __pyx_n_u_pos __pyx_string_tab[153]
- #define __pyx_n_u_prepare __pyx_string_tab[154]
- #define __pyx_n_u_qualname __pyx_string_tab[155]
- #define __pyx_n_u_r __pyx_string_tab[156]
- #define __pyx_n_u_re __pyx_string_tab[157]
- #define __pyx_n_u_read __pyx_string_tab[158]
- #define __pyx_n_u_regexp __pyx_string_tab[159]
- #define __pyx_n_u_scan_anonymous_block __pyx_string_tab[160]
- #define __pyx_n_u_scan_over __pyx_string_tab[161]
- #define __pyx_n_u_scan_until __pyx_string_tab[162]
- #define __pyx_n_u_self __pyx_string_tab[163]
- #define __pyx_n_u_set_name __pyx_string_tab[164]
- #define __pyx_n_u_setdefault __pyx_string_tab[165]
- #define __pyx_n_u_split __pyx_string_tab[166]
- #define __pyx_n_u_start __pyx_string_tab[167]
- #define __pyx_n_u_staticmethod __pyx_string_tab[168]
- #define __pyx_n_u_stop_at __pyx_string_tab[169]
- #define __pyx_n_u_string __pyx_string_tab[170]
- #define __pyx_n_u_strip __pyx_string_tab[171]
- #define __pyx_n_u_sub __pyx_string_tab[172]
- #define __pyx_n_u_tag __pyx_string_tab[173]
- #define __pyx_n_u_test __pyx_string_tab[174]
- #define __pyx_n_u_text __pyx_string_tab[175]
- #define __pyx_n_u_text_2 __pyx_string_tab[176]
- #define __pyx_n_u_text_length __pyx_string_tab[177]
- #define __pyx_n_u_token __pyx_string_tab[178]
- #define __pyx_n_u_token_type __pyx_string_tab[179]
- #define __pyx_n_u_valid __pyx_string_tab[180]
- #define __pyx_n_u_values __pyx_string_tab[181]
- #define __pyx_n_u_xX __pyx_string_tab[182]
- #define __pyx_kp_b_iso88591_A_4z_c_q_L_a_Kq_Q_4r_V1D_1_3awc __pyx_string_tab[183]
- #define __pyx_kp_b_iso88591_A_7_Z_Q_j_a_d_U_1_we1_7_9HA_1_6 __pyx_string_tab[184]
- #define __pyx_kp_b_iso88591_A_D_b_nD_F_3c_HA __pyx_string_tab[185]
- #define __pyx_kp_b_iso88591_A_D_b_nD_F_3gQ_HA __pyx_string_tab[186]
- #define __pyx_kp_b_iso88591_A_Kq_Q_4z_A_t1_1A_6_A_q_4q_D_r_v __pyx_string_tab[187]
- #define __pyx_kp_b_iso88591_A_M_IQ_HA_O1_IQ_Cq_IU __pyx_string_tab[188]
- #define __pyx_kp_b_iso88591_A_V2T_b_k_N_ha __pyx_string_tab[189]
- #define __pyx_kp_b_iso88591_A_d_D_G_d_1_HD_U_F_Q_M_uA_gU_2U __pyx_string_tab[190]
- #define __pyx_kp_b_iso88591_A_fA_U_G1 __pyx_string_tab[191]
- #define __pyx_kp_b_iso88591_A_q __pyx_string_tab[192]
- #define __pyx_kp_b_iso88591_A_t1D __pyx_string_tab[193]
- #define __pyx_kp_b_iso88591_A_t82R_4AQ __pyx_string_tab[194]
- #define __pyx_kp_b_iso88591_A_t9A __pyx_string_tab[195]
- #define __pyx_kp_b_iso88591_q_Kq_L_t81Ba_N __pyx_string_tab[196]
- #define __pyx_int_0 __pyx_number_tab[0]
- #define __pyx_int_1 __pyx_number_tab[1]
- #define __pyx_int_2 __pyx_number_tab[2]
- #define __pyx_int_8 __pyx_number_tab[3]
- #define __pyx_int_10 __pyx_number_tab[4]
- #define __pyx_int_16 __pyx_number_tab[5]
- /* #### 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<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
- for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
- for (int i=0; i<197; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
- for (int i=0; i<6; ++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<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
- for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
- for (int i=0; i<197; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
- for (int i=0; i<6; ++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/feaLib/lexer.py":43
- * MODE_FILENAME_ = "FILENAME"
- *
- * def __init__(self, text, filename): # <<<<<<<<<<<<<<
- * self.filename_ = filename
- * self.line_ = 1
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_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_6feaLib_5lexer_5Lexer___init__, "Lexer.__init__(self, text, filename)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer___init__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_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_text = 0;
- PyObject *__pyx_v_filename = 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("__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_text,&__pyx_mstate_global->__pyx_n_u_filename,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, 43, __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, 43, __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, 43, __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, 43, __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, 43, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 43, __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, 43, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 43, __pyx_L3_error)
- values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 43, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_text = values[1];
- __pyx_v_filename = values[2];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 43, __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.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(__pyx_self, __pyx_v_self, __pyx_v_text, __pyx_v_filename);
- /* 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_6feaLib_5lexer_5Lexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_filename) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- Py_ssize_t __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
- /* "fontTools/feaLib/lexer.py":44
- *
- * def __init__(self, text, filename):
- * self.filename_ = filename # <<<<<<<<<<<<<<
- * self.line_ = 1
- * self.pos_ = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_filename_2, __pyx_v_filename) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":45
- * def __init__(self, text, filename):
- * self.filename_ = filename
- * self.line_ = 1 # <<<<<<<<<<<<<<
- * self.pos_ = 0
- * self.line_start_ = 0
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 45, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":46
- * self.filename_ = filename
- * self.line_ = 1
- * self.pos_ = 0 # <<<<<<<<<<<<<<
- * self.line_start_ = 0
- * self.text_ = text
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 46, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":47
- * self.line_ = 1
- * self.pos_ = 0
- * self.line_start_ = 0 # <<<<<<<<<<<<<<
- * self.text_ = text
- * self.text_length_ = len(text)
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 47, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":48
- * self.pos_ = 0
- * self.line_start_ = 0
- * self.text_ = text # <<<<<<<<<<<<<<
- * self.text_length_ = len(text)
- * self.mode_ = Lexer.MODE_NORMAL_
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2, __pyx_v_text) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":49
- * self.line_start_ = 0
- * self.text_ = text
- * self.text_length_ = len(text) # <<<<<<<<<<<<<<
- * self.mode_ = Lexer.MODE_NORMAL_
- *
- */
- __pyx_t_1 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error)
- __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length, __pyx_t_2) < (0)) __PYX_ERR(0, 49, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":50
- * self.text_ = text
- * self.text_length_ = len(text)
- * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
- *
- * def __iter__(self):
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_3) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":43
- * MODE_FILENAME_ = "FILENAME"
- *
- * def __init__(self, text, filename): # <<<<<<<<<<<<<<
- * self.filename_ = filename
- * self.line_ = 1
- */
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":52
- * self.mode_ = Lexer.MODE_NORMAL_
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__(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_6feaLib_5lexer_5Lexer_2__iter__, "Lexer.__iter__(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_2__iter__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__(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("__iter__ (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, 52, __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, 52, __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, "__iter__", 0) < (0)) __PYX_ERR(0, 52, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 52, __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, 52, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 52, __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.feaLib.lexer.Lexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(__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_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__iter__", 0);
- /* "fontTools/feaLib/lexer.py":53
- *
- * def __iter__(self):
- * return self # <<<<<<<<<<<<<<
- *
- * def next(self): # Python 2
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_self);
- __pyx_r = __pyx_v_self;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":52
- * self.mode_ = Lexer.MODE_NORMAL_
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":55
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next(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_6feaLib_5lexer_5Lexer_4next, "Lexer.next(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_5next = {"next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_4next};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next(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("next (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, 55, __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, 55, __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, "next", 0) < (0)) __PYX_ERR(0, 55, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 55, __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, 55, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 55, __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.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(__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_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("next", 0);
- /* "fontTools/feaLib/lexer.py":56
- *
- * def next(self): # Python 2
- * return self.__next__() # <<<<<<<<<<<<<<
- *
- * def __next__(self): # Python 3
- */
- __Pyx_XDECREF(__pyx_r);
- __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_next, __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, 56, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":55
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":58
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while True:
- * token_type, token, location = self.next_()
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__(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_6feaLib_5lexer_5Lexer_6__next__, "Lexer.__next__(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_7__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_6__next__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__(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("__next__ (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, 58, __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, 58, __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, "__next__", 0) < (0)) __PYX_ERR(0, 58, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 58, __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, 58, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 58, __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.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(__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_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_token_type = NULL;
- PyObject *__pyx_v_token = NULL;
- PyObject *__pyx_v_location = NULL;
- 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 = NULL;
- PyObject *(*__pyx_t_7)(PyObject *);
- int __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__next__", 0);
- /* "fontTools/feaLib/lexer.py":59
- *
- * def __next__(self): # Python 3
- * while True: # <<<<<<<<<<<<<<
- * token_type, token, location = self.next_()
- * if token_type != Lexer.NEWLINE:
- */
- while (1) {
- /* "fontTools/feaLib/lexer.py":60
- * def __next__(self): # Python 3
- * while True:
- * token_type, token, location = self.next_() # <<<<<<<<<<<<<<
- * if token_type != Lexer.NEWLINE:
- * return (token_type, token, location)
- */
- __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_next_2, __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, 60, __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 != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 60, __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);
- __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
- __Pyx_INCREF(__pyx_t_5);
- } else {
- __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __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, 60, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_5);
- }
- #else
- __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
- index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_2);
- index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_4);
- index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_5);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 60, __pyx_L1_error)
- __pyx_t_7 = NULL;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L6_unpacking_done;
- __pyx_L5_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_7 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 60, __pyx_L1_error)
- __pyx_L6_unpacking_done:;
- }
- __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_2);
- __pyx_t_2 = 0;
- __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_4);
- __pyx_t_4 = 0;
- __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_5);
- __pyx_t_5 = 0;
- /* "fontTools/feaLib/lexer.py":61
- * while True:
- * token_type, token, location = self.next_()
- * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
- * return (token_type, token, location)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_token_type, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":62
- * token_type, token, location = self.next_()
- * if token_type != Lexer.NEWLINE:
- * return (token_type, token, location) # <<<<<<<<<<<<<<
- *
- * def location_(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_v_token_type);
- __Pyx_GIVEREF(__pyx_v_token_type);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_token);
- __Pyx_GIVEREF(__pyx_v_token);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":61
- * while True:
- * token_type, token, location = self.next_()
- * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
- * return (token_type, token, location)
- *
- */
- }
- }
- /* "fontTools/feaLib/lexer.py":58
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while True:
- * token_type, token, location = self.next_()
- */
- /* 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_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_token_type);
- __Pyx_XDECREF(__pyx_v_token);
- __Pyx_XDECREF(__pyx_v_location);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":64
- * return (token_type, token, location)
- *
- * def location_(self): # <<<<<<<<<<<<<<
- * column = self.pos_ - self.line_start_ + 1
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_(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_6feaLib_5lexer_5Lexer_8location_, "Lexer.location_(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_9location_ = {"location_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_8location_};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_(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("location_ (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, 64, __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, 64, __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, "location_", 0) < (0)) __PYX_ERR(0, 64, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, i); __PYX_ERR(0, 64, __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, 64, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 64, __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.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(__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_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_column = NULL;
- 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;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_t_6;
- size_t __pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("location_", 0);
- /* "fontTools/feaLib/lexer.py":65
- *
- * def location_(self):
- * column = self.pos_ - self.line_start_ + 1 # <<<<<<<<<<<<<<
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- *
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_column = __pyx_t_2;
- __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":66
- * def location_(self):
- * column = self.pos_ - self.line_start_ + 1
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column) # <<<<<<<<<<<<<<
- *
- * def next_(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibLocation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_filename_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
- if (!__pyx_t_6) {
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- } else {
- __Pyx_INCREF(__pyx_t_5);
- __pyx_t_4 = __pyx_t_5;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L3_bool_binop_done;
- }
- __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_features);
- __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_features;
- __pyx_L3_bool_binop_done:;
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
- assert(__pyx_t_3);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
- __pyx_t_7 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_column};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":64
- * return (token_type, token, location)
- *
- * def location_(self): # <<<<<<<<<<<<<<
- * column = self.pos_ - self.line_start_ + 1
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_column);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":68
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- *
- * def next_(self): # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_WHITESPACE_)
- * location = self.location_()
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_(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_6feaLib_5lexer_5Lexer_10next_, "Lexer.next_(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_11next_ = {"next_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_10next_};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_(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("next_ (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, 68, __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, 68, __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, "next_", 0) < (0)) __PYX_ERR(0, 68, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, i); __PYX_ERR(0, 68, __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, 68, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 68, __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.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(__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_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_location = NULL;
- PyObject *__pyx_v_start = NULL;
- PyObject *__pyx_v_text = NULL;
- Py_ssize_t __pyx_v_limit;
- PyObject *__pyx_v_cur_char = NULL;
- PyObject *__pyx_v_next_char = NULL;
- PyObject *__pyx_v_glyphclass = NULL;
- PyObject *__pyx_v_token = NULL;
- PyObject *__pyx_v_string = NULL;
- 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;
- Py_ssize_t __pyx_t_6;
- int __pyx_t_7;
- int __pyx_t_8;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("next_", 0);
- /* "fontTools/feaLib/lexer.py":69
- *
- * def next_(self):
- * self.scan_over_(Lexer.CHAR_WHITESPACE_) # <<<<<<<<<<<<<<
- * location = self.location_()
- * start = self.pos_
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_WHITESPACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__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, 69, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":70
- * def next_(self):
- * self.scan_over_(Lexer.CHAR_WHITESPACE_)
- * location = self.location_() # <<<<<<<<<<<<<<
- * start = self.pos_
- * text = self.text_
- */
- __pyx_t_4 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_4);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_location, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_v_location = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":71
- * self.scan_over_(Lexer.CHAR_WHITESPACE_)
- * location = self.location_()
- * start = self.pos_ # <<<<<<<<<<<<<<
- * text = self.text_
- * limit = len(text)
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_start = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":72
- * location = self.location_()
- * start = self.pos_
- * text = self.text_ # <<<<<<<<<<<<<<
- * limit = len(text)
- * if start >= limit:
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_text = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":73
- * start = self.pos_
- * text = self.text_
- * limit = len(text) # <<<<<<<<<<<<<<
- * if start >= limit:
- * raise StopIteration()
- */
- __pyx_t_6 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error)
- __pyx_v_limit = __pyx_t_6;
- /* "fontTools/feaLib/lexer.py":74
- * text = self.text_
- * limit = len(text)
- * if start >= limit: # <<<<<<<<<<<<<<
- * raise StopIteration()
- * cur_char = text[start]
- */
- __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_start, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(__pyx_t_7)) {
- /* "fontTools/feaLib/lexer.py":75
- * limit = len(text)
- * if start >= limit:
- * raise StopIteration() # <<<<<<<<<<<<<<
- * cur_char = text[start]
- * next_char = text[start + 1] if start + 1 < limit else None
- */
- __pyx_t_1 = NULL;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
- __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_StopIteration)), __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 75, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":74
- * text = self.text_
- * limit = len(text)
- * if start >= limit: # <<<<<<<<<<<<<<
- * raise StopIteration()
- * cur_char = text[start]
- */
- }
- /* "fontTools/feaLib/lexer.py":76
- * if start >= limit:
- * raise StopIteration()
- * cur_char = text[start] # <<<<<<<<<<<<<<
- * next_char = text[start + 1] if start + 1 < limit else None
- *
- */
- __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_v_cur_char = __pyx_t_4;
- __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":77
- * raise StopIteration()
- * cur_char = text[start]
- * next_char = text[start + 1] if start + 1 < limit else None # <<<<<<<<<<<<<<
- *
- * if cur_char == "\n":
- */
- __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_7) {
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = __pyx_t_2;
- __pyx_t_2 = 0;
- } else {
- __Pyx_INCREF(Py_None);
- __pyx_t_4 = Py_None;
- }
- __pyx_v_next_char = __pyx_t_4;
- __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":79
- * next_char = text[start + 1] if start + 1 < limit else None
- *
- * if cur_char == "\n": # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.line_ += 1
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 79, __pyx_L1_error)
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":80
- *
- * if cur_char == "\n":
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.line_ += 1
- * self.line_start_ = self.pos_
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_2) < (0)) __PYX_ERR(0, 80, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":81
- * if cur_char == "\n":
- * self.pos_ += 1
- * self.line_ += 1 # <<<<<<<<<<<<<<
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_t_4) < (0)) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":82
- * self.pos_ += 1
- * self.line_ += 1
- * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "\r":
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_t_4) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":83
- * self.line_ += 1
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
- * if cur_char == "\r":
- * self.pos_ += 2 if next_char == "\n" else 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
- __pyx_t_2 = 0;
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":79
- * next_char = text[start + 1] if start + 1 < limit else None
- *
- * if cur_char == "\n": # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.line_ += 1
- */
- }
- /* "fontTools/feaLib/lexer.py":84
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "\r": # <<<<<<<<<<<<<<
- * self.pos_ += 2 if next_char == "\n" else 1
- * self.line_ += 1
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 84, __pyx_L1_error)
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":85
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "\r":
- * self.pos_ += 2 if next_char == "\n" else 1 # <<<<<<<<<<<<<<
- * self.line_ += 1
- * self.line_start_ = self.pos_
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_next_char, __pyx_mstate_global->__pyx_kp_u_, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 85, __pyx_L1_error)
- if (__pyx_t_7) {
- __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
- __pyx_t_2 = __pyx_mstate_global->__pyx_int_2;
- } else {
- __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
- __pyx_t_2 = __pyx_mstate_global->__pyx_int_1;
- }
- __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":86
- * if cur_char == "\r":
- * self.pos_ += 2 if next_char == "\n" else 1
- * self.line_ += 1 # <<<<<<<<<<<<<<
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_t_2) < (0)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":87
- * self.pos_ += 2 if next_char == "\n" else 1
- * self.line_ += 1
- * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "#":
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_t_2) < (0)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":88
- * self.line_ += 1
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
- * if cur_char == "#":
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
- __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":84
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "\r": # <<<<<<<<<<<<<<
- * self.pos_ += 2 if next_char == "\n" else 1
- * self.line_ += 1
- */
- }
- /* "fontTools/feaLib/lexer.py":89
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "#": # <<<<<<<<<<<<<<
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * return (Lexer.COMMENT, text[start : self.pos_], location)
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 89, __pyx_L1_error)
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":90
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "#":
- * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
- * return (Lexer.COMMENT, text[start : self.pos_], location)
- *
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":91
- * if cur_char == "#":
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * return (Lexer.COMMENT, text[start : self.pos_], location) # <<<<<<<<<<<<<<
- *
- * if self.mode_ is Lexer.MODE_FILENAME_:
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_COMMENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":89
- * self.line_start_ = self.pos_
- * return (Lexer.NEWLINE, None, location)
- * if cur_char == "#": # <<<<<<<<<<<<<<
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * return (Lexer.COMMENT, text[start : self.pos_], location)
- */
- }
- /* "fontTools/feaLib/lexer.py":93
- * return (Lexer.COMMENT, text[start : self.pos_], location)
- *
- * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
- * if cur_char != "(":
- * raise FeatureLibError("Expected '(' before file name", location)
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = (__pyx_t_2 == __pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":94
- *
- * if self.mode_ is Lexer.MODE_FILENAME_:
- * if cur_char != "(": # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected '(' before file name", location)
- * self.scan_until_(")")
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__4, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 94, __pyx_L1_error)
- if (unlikely(__pyx_t_7)) {
- /* "fontTools/feaLib/lexer.py":95
- * if self.mode_ is Lexer.MODE_FILENAME_:
- * if cur_char != "(":
- * raise FeatureLibError("Expected '(' before file name", location) # <<<<<<<<<<<<<<
- * self.scan_until_(")")
- * cur_char = text[self.pos_] if self.pos_ < limit else None
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
- assert(__pyx_t_2);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_before_file_name, __pyx_v_location};
- __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __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_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 95, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":94
- *
- * if self.mode_ is Lexer.MODE_FILENAME_:
- * if cur_char != "(": # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected '(' before file name", location)
- * self.scan_until_(")")
- */
- }
- /* "fontTools/feaLib/lexer.py":96
- * if cur_char != "(":
- * raise FeatureLibError("Expected '(' before file name", location)
- * self.scan_until_(")") # <<<<<<<<<<<<<<
- * cur_char = text[self.pos_] if self.pos_ < limit else None
- * if cur_char != ")":
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__5};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":97
- * raise FeatureLibError("Expected '(' before file name", location)
- * self.scan_until_(")")
- * cur_char = text[self.pos_] if self.pos_ < limit else None # <<<<<<<<<<<<<<
- * if cur_char != ")":
- * raise FeatureLibError("Expected ')' after file name", location)
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_7) {
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_1 = __pyx_t_2;
- __pyx_t_2 = 0;
- } else {
- __Pyx_INCREF(Py_None);
- __pyx_t_1 = Py_None;
- }
- __Pyx_DECREF_SET(__pyx_v_cur_char, __pyx_t_1);
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":98
- * self.scan_until_(")")
- * cur_char = text[self.pos_] if self.pos_ < limit else None
- * if cur_char != ")": # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected ')' after file name", location)
- * self.pos_ += 1
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__5, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 98, __pyx_L1_error)
- if (unlikely(__pyx_t_7)) {
- /* "fontTools/feaLib/lexer.py":99
- * cur_char = text[self.pos_] if self.pos_ < limit else None
- * if cur_char != ")":
- * raise FeatureLibError("Expected ')' after file name", location) # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.mode_ = Lexer.MODE_NORMAL_
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __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_mstate_global->__pyx_kp_u_Expected_after_file_name, __pyx_v_location};
- __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, 99, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 99, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":98
- * self.scan_until_(")")
- * cur_char = text[self.pos_] if self.pos_ < limit else None
- * if cur_char != ")": # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected ')' after file name", location)
- * self.pos_ += 1
- */
- }
- /* "fontTools/feaLib/lexer.py":100
- * if cur_char != ")":
- * raise FeatureLibError("Expected ')' after file name", location)
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.mode_ = Lexer.MODE_NORMAL_
- * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_4) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":101
- * raise FeatureLibError("Expected ')' after file name", location)
- * self.pos_ += 1
- * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
- * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_1) < (0)) __PYX_ERR(0, 101, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":102
- * self.pos_ += 1
- * self.mode_ = Lexer.MODE_NORMAL_
- * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location) # <<<<<<<<<<<<<<
- *
- * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FILENAME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_1, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
- __pyx_t_4 = 0;
- __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":93
- * return (Lexer.COMMENT, text[start : self.pos_], location)
- *
- * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
- * if cur_char != "(":
- * raise FeatureLibError("Expected '(' before file name", location)
- */
- }
- /* "fontTools/feaLib/lexer.py":104
- * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
- *
- * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__6, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 104, __pyx_L1_error)
- if (__pyx_t_8) {
- } else {
- __pyx_t_7 = __pyx_t_8;
- goto __pyx_L11_bool_binop_done;
- }
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 104, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_7 = __pyx_t_8;
- __pyx_L11_bool_binop_done:;
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":105
- *
- * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 105, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":106
- * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
- * if cur_char == "@":
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
- __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":107
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location) # <<<<<<<<<<<<<<
- * if cur_char == "@":
- * self.pos_ += 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_2 = NULL;
- __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_4, &__pyx_t_9, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __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_10); __pyx_t_10 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":104
- * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
- *
- * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- }
- /* "fontTools/feaLib/lexer.py":108
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
- * if cur_char == "@": # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 108, __pyx_L1_error)
- if (__pyx_t_7) {
- /* "fontTools/feaLib/lexer.py":109
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
- * if cur_char == "@":
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * glyphclass = text[start + 1 : self.pos_]
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 109, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 109, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":110
- * if cur_char == "@":
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
- * glyphclass = text[start + 1 : self.pos_]
- * if len(glyphclass) < 1:
- */
- __pyx_t_10 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_10);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
- __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":111
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * glyphclass = text[start + 1 : self.pos_] # <<<<<<<<<<<<<<
- * if len(glyphclass) < 1:
- * raise FeatureLibError("Expected glyph class name", location)
- */
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_3, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_glyphclass = __pyx_t_10;
- __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":112
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * glyphclass = text[start + 1 : self.pos_]
- * if len(glyphclass) < 1: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected glyph class name", location)
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
- */
- __pyx_t_6 = PyObject_Length(__pyx_v_glyphclass); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error)
- __pyx_t_7 = (__pyx_t_6 < 1);
- if (unlikely(__pyx_t_7)) {
- /* "fontTools/feaLib/lexer.py":113
- * glyphclass = text[start + 1 : self.pos_]
- * if len(glyphclass) < 1:
- * raise FeatureLibError("Expected glyph class name", location) # <<<<<<<<<<<<<<
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
- * raise FeatureLibError(
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
- assert(__pyx_t_2);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_glyph_class_name, __pyx_v_location};
- __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __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_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __PYX_ERR(0, 113, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":112
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * glyphclass = text[start + 1 : self.pos_]
- * if len(glyphclass) < 1: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected glyph class name", location)
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
- */
- }
- /* "fontTools/feaLib/lexer.py":114
- * if len(glyphclass) < 1:
- * raise FeatureLibError("Expected glyph class name", location)
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
- * raise FeatureLibError(
- * "Glyph class names must consist of letters, digits, "
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RE_GLYPHCLASS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_t_1;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_glyphclass};
- __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_8 = (!__pyx_t_7);
- if (unlikely(__pyx_t_8)) {
- /* "fontTools/feaLib/lexer.py":115
- * raise FeatureLibError("Expected glyph class name", location)
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
- * raise FeatureLibError( # <<<<<<<<<<<<<<
- * "Glyph class names must consist of letters, digits, "
- * "underscore, period or hyphen",
- */
- __pyx_t_1 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- /* "fontTools/feaLib/lexer.py":118
- * "Glyph class names must consist of letters, digits, "
- * "underscore, period or hyphen",
- * location, # <<<<<<<<<<<<<<
- * )
- * return (Lexer.GLYPHCLASS, glyphclass, location)
- */
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
- assert(__pyx_t_1);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Glyph_class_names_must_consist_o, __pyx_v_location};
- __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __PYX_ERR(0, 115, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":114
- * if len(glyphclass) < 1:
- * raise FeatureLibError("Expected glyph class name", location)
- * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
- * raise FeatureLibError(
- * "Glyph class names must consist of letters, digits, "
- */
- }
- /* "fontTools/feaLib/lexer.py":120
- * location,
- * )
- * return (Lexer.GLYPHCLASS, glyphclass, location) # <<<<<<<<<<<<<<
- * if cur_char in Lexer.CHAR_NAME_START_:
- * self.pos_ += 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_glyphclass);
- __Pyx_GIVEREF(__pyx_v_glyphclass);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_glyphclass) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
- __pyx_t_3 = 0;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":108
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
- * if cur_char == "@": # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- */
- }
- /* "fontTools/feaLib/lexer.py":121
- * )
- * return (Lexer.GLYPHCLASS, glyphclass, location)
- * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 121, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_START); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":122
- * return (Lexer.GLYPHCLASS, glyphclass, location)
- * if cur_char in Lexer.CHAR_NAME_START_:
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * token = text[start : self.pos_]
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 122, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_10) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":123
- * if cur_char in Lexer.CHAR_NAME_START_:
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
- * token = text[start : self.pos_]
- * if token == "include":
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
- __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 123, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":124
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * token = text[start : self.pos_] # <<<<<<<<<<<<<<
- * if token == "include":
- * self.mode_ = Lexer.MODE_FILENAME_
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 124, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_v_token = __pyx_t_2;
- __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":125
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * token = text[start : self.pos_]
- * if token == "include": # <<<<<<<<<<<<<<
- * self.mode_ = Lexer.MODE_FILENAME_
- * return (Lexer.NAME, token, location)
- */
- __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_token, __pyx_mstate_global->__pyx_n_u_include, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 125, __pyx_L1_error)
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":126
- * token = text[start : self.pos_]
- * if token == "include":
- * self.mode_ = Lexer.MODE_FILENAME_ # <<<<<<<<<<<<<<
- * return (Lexer.NAME, token, location)
- * if cur_char == "0" and next_char in "xX":
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_10) < (0)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":125
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- * token = text[start : self.pos_]
- * if token == "include": # <<<<<<<<<<<<<<
- * self.mode_ = Lexer.MODE_FILENAME_
- * return (Lexer.NAME, token, location)
- */
- }
- /* "fontTools/feaLib/lexer.py":127
- * if token == "include":
- * self.mode_ = Lexer.MODE_FILENAME_
- * return (Lexer.NAME, token, location) # <<<<<<<<<<<<<<
- * if cur_char == "0" and next_char in "xX":
- * self.pos_ += 2
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NAME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_token);
- __Pyx_GIVEREF(__pyx_v_token);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
- __pyx_t_2 = 0;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":121
- * )
- * return (Lexer.GLYPHCLASS, glyphclass, location)
- * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
- */
- }
- /* "fontTools/feaLib/lexer.py":128
- * self.mode_ = Lexer.MODE_FILENAME_
- * return (Lexer.NAME, token, location)
- * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
- * self.pos_ += 2
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_0, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 128, __pyx_L1_error)
- if (__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L19_bool_binop_done;
- }
- __pyx_t_7 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_next_char, __pyx_mstate_global->__pyx_n_u_xX, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 128, __pyx_L1_error)
- __pyx_t_8 = __pyx_t_7;
- __pyx_L19_bool_binop_done:;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":129
- * return (Lexer.NAME, token, location)
- * if cur_char == "0" and next_char in "xX":
- * self.pos_ += 2 # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_2, 2, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_2) < (0)) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":130
- * if cur_char == "0" and next_char in "xX":
- * self.pos_ += 2
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_) # <<<<<<<<<<<<<<
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
- */
- __pyx_t_10 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_10);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_HEXDIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":131
- * self.pos_ += 2
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location) # <<<<<<<<<<<<<<
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_10 = NULL;
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_9, __pyx_mstate_global->__pyx_int_16};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
- __pyx_t_1 = 0;
- __pyx_t_2 = 0;
- __pyx_r = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":128
- * self.mode_ = Lexer.MODE_FILENAME_
- * return (Lexer.NAME, token, location)
- * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
- * self.pos_ += 2
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- */
- }
- /* "fontTools/feaLib/lexer.py":132
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_0, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
- if (__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L22_bool_binop_done;
- }
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = __pyx_t_7;
- __pyx_L22_bool_binop_done:;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":133
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- * if cur_char in Lexer.CHAR_DIGIT_:
- */
- __pyx_t_9 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":134
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location) # <<<<<<<<<<<<<<
- * if cur_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OCTAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_9 = NULL;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_3, __pyx_mstate_global->__pyx_int_8};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_10);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
- __pyx_t_10 = 0;
- __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":132
- * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
- * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
- * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- */
- }
- /* "fontTools/feaLib/lexer.py":135
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".":
- */
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 135, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":136
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- * if cur_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":137
- * if cur_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_9 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L26_bool_binop_done;
- }
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__8, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_8 = __pyx_t_7;
- __pyx_L26_bool_binop_done:;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":138
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_NUMBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = NULL;
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_1, __pyx_mstate_global->__pyx_int_10};
- __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __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_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_9);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
- __pyx_t_3 = 0;
- __pyx_t_9 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":137
- * if cur_char in Lexer.CHAR_DIGIT_:
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- */
- }
- /* "fontTools/feaLib/lexer.py":139
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".") # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- */
- __pyx_t_9 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_9);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__8};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":140
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
- */
- __pyx_t_9 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":141
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
- * self.pos_ += 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_2);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
- __pyx_t_2 = 0;
- __pyx_t_1 = 0;
- __pyx_r = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":135
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
- * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".":
- */
- }
- /* "fontTools/feaLib/lexer.py":142
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
- if (__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L29_bool_binop_done;
- }
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_8 = __pyx_t_7;
- __pyx_L29_bool_binop_done:;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":143
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".":
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_9) < (0)) __PYX_ERR(0, 143, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":144
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- */
- __pyx_t_1 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
- __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":145
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L32_bool_binop_done;
- }
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = __pyx_t_7;
- __pyx_L32_bool_binop_done:;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":146
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NUMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_9 = NULL;
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = 1;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_3);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
- __pyx_t_1 = 0;
- __pyx_t_3 = 0;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":145
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- */
- }
- /* "fontTools/feaLib/lexer.py":147
- * if self.pos_ >= limit or text[self.pos_] != ".":
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".") # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8};
- __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":148
- * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char in Lexer.CHAR_SYMBOL_:
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
- __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":149
- * self.scan_over_(".")
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
- * if cur_char in Lexer.CHAR_SYMBOL_:
- * self.pos_ += 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_9);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_10);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
- __pyx_t_9 = 0;
- __pyx_t_10 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":142
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- */
- }
- /* "fontTools/feaLib/lexer.py":150
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * return (Lexer.SYMBOL, cur_char, location)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_SYMBOL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_10, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 150, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":151
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char in Lexer.CHAR_SYMBOL_:
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * return (Lexer.SYMBOL, cur_char, location)
- * if cur_char == '"':
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 151, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":152
- * if cur_char in Lexer.CHAR_SYMBOL_:
- * self.pos_ += 1
- * return (Lexer.SYMBOL, cur_char, location) # <<<<<<<<<<<<<<
- * if cur_char == '"':
- * self.pos_ += 1
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SYMBOL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_10);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_cur_char);
- __Pyx_GIVEREF(__pyx_v_cur_char);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cur_char) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
- __pyx_t_10 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":150
- * self.scan_over_(Lexer.CHAR_DIGIT_)
- * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
- * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * return (Lexer.SYMBOL, cur_char, location)
- */
- }
- /* "fontTools/feaLib/lexer.py":153
- * self.pos_ += 1
- * return (Lexer.SYMBOL, cur_char, location)
- * if cur_char == '"': # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_until_('"')
- */
- __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__10, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 153, __pyx_L1_error)
- if (__pyx_t_8) {
- /* "fontTools/feaLib/lexer.py":154
- * return (Lexer.SYMBOL, cur_char, location)
- * if cur_char == '"':
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * self.scan_until_('"')
- * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_10) < (0)) __PYX_ERR(0, 154, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":155
- * if cur_char == '"':
- * self.pos_ += 1
- * self.scan_until_('"') # <<<<<<<<<<<<<<
- * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
- * self.pos_ += 1
- */
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__10};
- __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 155, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- }
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":156
- * self.pos_ += 1
- * self.scan_until_('"')
- * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * # strip newlines embedded within a string
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_7) {
- } else {
- __pyx_t_8 = __pyx_t_7;
- goto __pyx_L37_bool_binop_done;
- }
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_mstate_global->__pyx_kp_u__10, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 156, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_8 = __pyx_t_7;
- __pyx_L37_bool_binop_done:;
- if (likely(__pyx_t_8)) {
- /* "fontTools/feaLib/lexer.py":157
- * self.scan_until_('"')
- * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
- * self.pos_ += 1 # <<<<<<<<<<<<<<
- * # strip newlines embedded within a string
- * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
- */
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":159
- * self.pos_ += 1
- * # strip newlines embedded within a string
- * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1]) # <<<<<<<<<<<<<<
- * return (Lexer.STRING, string, location)
- * else:
- */
- __pyx_t_10 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_9, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
- assert(__pyx_t_10);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_10);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u__11, __pyx_mstate_global->__pyx_kp_u__12, __pyx_t_2};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __pyx_v_string = __pyx_t_3;
- __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":160
- * # strip newlines embedded within a string
- * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
- * return (Lexer.STRING, string, location) # <<<<<<<<<<<<<<
- * else:
- * raise FeatureLibError("Expected '\"' to terminate string", location)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_string);
- __Pyx_GIVEREF(__pyx_v_string);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_string) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
- __pyx_t_1 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":156
- * self.pos_ += 1
- * self.scan_until_('"')
- * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * # strip newlines embedded within a string
- */
- }
- /* "fontTools/feaLib/lexer.py":162
- * return (Lexer.STRING, string, location)
- * else:
- * raise FeatureLibError("Expected '\"' to terminate string", location) # <<<<<<<<<<<<<<
- * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
- *
- */
- /*else*/ {
- __pyx_t_1 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
- assert(__pyx_t_1);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Expected_to_terminate_string, __pyx_v_location};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 162, __pyx_L1_error)
- }
- /* "fontTools/feaLib/lexer.py":153
- * self.pos_ += 1
- * return (Lexer.SYMBOL, cur_char, location)
- * if cur_char == '"': # <<<<<<<<<<<<<<
- * self.pos_ += 1
- * self.scan_until_('"')
- */
- }
- /* "fontTools/feaLib/lexer.py":163
- * else:
- * raise FeatureLibError("Expected '\"' to terminate string", location)
- * raise FeatureLibError("Unexpected character: %r" % cur_char, location) # <<<<<<<<<<<<<<
- *
- * def scan_over_(self, valid):
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unexpected_character_r, __pyx_v_cur_char); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 163, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
- assert(__pyx_t_2);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
- __pyx_t_5 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_v_location};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __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_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 163, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":68
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- *
- * def next_(self): # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_WHITESPACE_)
- * location = self.location_()
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_location);
- __Pyx_XDECREF(__pyx_v_start);
- __Pyx_XDECREF(__pyx_v_text);
- __Pyx_XDECREF(__pyx_v_cur_char);
- __Pyx_XDECREF(__pyx_v_next_char);
- __Pyx_XDECREF(__pyx_v_glyphclass);
- __Pyx_XDECREF(__pyx_v_token);
- __Pyx_XDECREF(__pyx_v_string);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":165
- * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
- *
- * def scan_over_(self, valid): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] in valid:
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_(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_6feaLib_5lexer_5Lexer_12scan_over_, "Lexer.scan_over_(self, valid)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_ = {"scan_over_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_(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_valid = 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("scan_over_ (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_valid,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, 165, __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, 165, __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, 165, __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, "scan_over_", 0) < (0)) __PYX_ERR(0, 165, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, i); __PYX_ERR(0, 165, __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, 165, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_valid = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 165, __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.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(__pyx_self, __pyx_v_self, __pyx_v_valid);
- /* 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_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid) {
- PyObject *__pyx_v_p = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("scan_over_", 0);
- /* "fontTools/feaLib/lexer.py":166
- *
- * def scan_over_(self, valid):
- * p = self.pos_ # <<<<<<<<<<<<<<
- * while p < self.text_length_ and self.text_[p] in valid:
- * p += 1
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_p = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":167
- * def scan_over_(self, valid):
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] in valid: # <<<<<<<<<<<<<<
- * p += 1
- * self.pos_ = p
- */
- while (1) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_p, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_4) {
- } else {
- __pyx_t_2 = __pyx_t_4;
- goto __pyx_L5_bool_binop_done;
- }
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_valid, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = __pyx_t_4;
- __pyx_L5_bool_binop_done:;
- if (!__pyx_t_2) break;
- /* "fontTools/feaLib/lexer.py":168
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] in valid:
- * p += 1 # <<<<<<<<<<<<<<
- * self.pos_ = p
- *
- */
- __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_p, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
- __pyx_t_1 = 0;
- }
- /* "fontTools/feaLib/lexer.py":169
- * while p < self.text_length_ and self.text_[p] in valid:
- * p += 1
- * self.pos_ = p # <<<<<<<<<<<<<<
- *
- * def scan_until_(self, stop_at):
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_v_p) < (0)) __PYX_ERR(0, 169, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":165
- * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
- *
- * def scan_over_(self, valid): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] in valid:
- */
- /* 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_3);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_p);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":171
- * self.pos_ = p
- *
- * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_(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_6feaLib_5lexer_5Lexer_14scan_until_, "Lexer.scan_until_(self, stop_at)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_ = {"scan_until_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_(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_stop_at = 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("scan_until_ (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_stop_at,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, 171, __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, 171, __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, 171, __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, "scan_until_", 0) < (0)) __PYX_ERR(0, 171, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, i); __PYX_ERR(0, 171, __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, 171, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 171, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_stop_at = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 171, __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.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(__pyx_self, __pyx_v_self, __pyx_v_stop_at);
- /* 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_6feaLib_5lexer_5Lexer_14scan_until_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stop_at) {
- PyObject *__pyx_v_p = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("scan_until_", 0);
- /* "fontTools/feaLib/lexer.py":172
- *
- * def scan_until_(self, stop_at):
- * p = self.pos_ # <<<<<<<<<<<<<<
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- * p += 1
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_p = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":173
- * def scan_until_(self, stop_at):
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] not in stop_at: # <<<<<<<<<<<<<<
- * p += 1
- * self.pos_ = p
- */
- while (1) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_p, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_4) {
- } else {
- __pyx_t_2 = __pyx_t_4;
- goto __pyx_L5_bool_binop_done;
- }
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_stop_at, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = __pyx_t_4;
- __pyx_L5_bool_binop_done:;
- if (!__pyx_t_2) break;
- /* "fontTools/feaLib/lexer.py":174
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- * p += 1 # <<<<<<<<<<<<<<
- * self.pos_ = p
- *
- */
- __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_p, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
- __pyx_t_1 = 0;
- }
- /* "fontTools/feaLib/lexer.py":175
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- * p += 1
- * self.pos_ = p # <<<<<<<<<<<<<<
- *
- * def scan_anonymous_block(self, tag):
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_v_p) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":171
- * self.pos_ = p
- *
- * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- */
- /* 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_3);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_p);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":177
- * self.pos_ = p
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * location = self.location_()
- * tag = tag.strip()
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block(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_6feaLib_5lexer_5Lexer_16scan_anonymous_block, "Lexer.scan_anonymous_block(self, tag)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block = {"scan_anonymous_block", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block(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_tag = 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("scan_anonymous_block (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_tag,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, 177, __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, 177, __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, 177, __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, "scan_anonymous_block", 0) < (0)) __PYX_ERR(0, 177, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 177, __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, 177, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 177, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_tag = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 177, __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.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
- /* 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_6feaLib_5lexer_5Lexer_16scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
- PyObject *__pyx_v_location = NULL;
- PyObject *__pyx_v_regexp = NULL;
- PyObject *__pyx_v_split = NULL;
- 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 = NULL;
- PyObject *__pyx_t_7 = NULL;
- Py_ssize_t __pyx_t_8;
- int __pyx_t_9;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("scan_anonymous_block", 0);
- __Pyx_INCREF(__pyx_v_tag);
- /* "fontTools/feaLib/lexer.py":178
- *
- * def scan_anonymous_block(self, tag):
- * location = self.location_() # <<<<<<<<<<<<<<
- * tag = tag.strip()
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- */
- __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_location, __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, 178, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_v_location = __pyx_t_1;
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":179
- * def scan_anonymous_block(self, tag):
- * location = self.location_()
- * tag = tag.strip() # <<<<<<<<<<<<<<
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * self.scan_over_(Lexer.CHAR_NEWLINE_)
- */
- __pyx_t_2 = __pyx_v_tag;
- __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_strip, __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, 179, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1);
- __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":180
- * location = self.location_()
- * tag = tag.strip()
- * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_NEWLINE_)
- * regexp = r"}\s*" + tag + r"\s*;"
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":181
- * tag = tag.strip()
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * self.scan_over_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
- * regexp = r"}\s*" + tag + r"\s*;"
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
- */
- __pyx_t_5 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "fontTools/feaLib/lexer.py":182
- * self.scan_until_(Lexer.CHAR_NEWLINE_)
- * self.scan_over_(Lexer.CHAR_NEWLINE_)
- * regexp = r"}\s*" + tag + r"\s*;" # <<<<<<<<<<<<<<
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
- * if len(split) != 2:
- */
- __pyx_t_1 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u_s, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_s_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_regexp = __pyx_t_4;
- __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":183
- * self.scan_over_(Lexer.CHAR_NEWLINE_)
- * regexp = r"}\s*" + tag + r"\s*;"
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1) # <<<<<<<<<<<<<<
- * if len(split) != 2:
- * raise FeatureLibError(
- */
- __pyx_t_1 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_3 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
- assert(__pyx_t_1);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
- __pyx_t_3 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_regexp, __pyx_t_7};
- __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maxsplit, __pyx_mstate_global->__pyx_int_1, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 183, __pyx_L1_error)
- __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- }
- __pyx_v_split = __pyx_t_4;
- __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":184
- * regexp = r"}\s*" + tag + r"\s*;"
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
- * if len(split) != 2: # <<<<<<<<<<<<<<
- * raise FeatureLibError(
- * "Expected '} %s;' to terminate anonymous block" % tag, location
- */
- __pyx_t_8 = PyObject_Length(__pyx_v_split); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 184, __pyx_L1_error)
- __pyx_t_9 = (__pyx_t_8 != 2);
- if (unlikely(__pyx_t_9)) {
- /* "fontTools/feaLib/lexer.py":185
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
- * if len(split) != 2:
- * raise FeatureLibError( # <<<<<<<<<<<<<<
- * "Expected '} %s;' to terminate anonymous block" % tag, location
- * )
- */
- __pyx_t_2 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- /* "fontTools/feaLib/lexer.py":186
- * if len(split) != 2:
- * raise FeatureLibError(
- * "Expected '} %s;' to terminate anonymous block" % tag, location # <<<<<<<<<<<<<<
- * )
- * self.pos_ += len(split[0])
- */
- __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_s_to_terminate_anonymou, __pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_6))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
- assert(__pyx_t_2);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
- __pyx_t_3 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_v_location};
- __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_Raise(__pyx_t_4, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 185, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":184
- * regexp = r"}\s*" + tag + r"\s*;"
- * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
- * if len(split) != 2: # <<<<<<<<<<<<<<
- * raise FeatureLibError(
- * "Expected '} %s;' to terminate anonymous block" % tag, location
- */
- }
- /* "fontTools/feaLib/lexer.py":188
- * "Expected '} %s;' to terminate anonymous block" % tag, location
- * )
- * self.pos_ += len(split[0]) # <<<<<<<<<<<<<<
- * return (Lexer.ANONYMOUS_BLOCK, split[0], location)
- *
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_7) < (0)) __PYX_ERR(0, 188, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "fontTools/feaLib/lexer.py":189
- * )
- * self.pos_ += len(split[0])
- * return (Lexer.ANONYMOUS_BLOCK, split[0], location) # <<<<<<<<<<<<<<
- *
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_6);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
- __Pyx_GIVEREF(__pyx_t_7);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":177
- * self.pos_ = p
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * location = self.location_()
- * tag = tag.strip()
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_location);
- __Pyx_XDECREF(__pyx_v_regexp);
- __Pyx_XDECREF(__pyx_v_split);
- __Pyx_XDECREF(__pyx_v_tag);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":207
- * """
- *
- * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
- * """Initializes an IncludingLexer.
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_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_6feaLib_5lexer_14IncludingLexer___init__, "IncludingLexer.__init__(self, featurefile, *, includeDir=None)\n\nInitializes an IncludingLexer.\n\nBehavior:\n If includeDir is passed, it will be used to determine the top-level\n include directory to use for all encountered include statements. If it is\n not passed, ``os.path.dirname(featurefile)`` will be considered the\n include directory.");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_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_featurefile = 0;
- PyObject *__pyx_v_includeDir = 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("__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_featurefile,&__pyx_mstate_global->__pyx_n_u_includeDir,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, 207, __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, 207, __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, 207, __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, 207, __pyx_L3_error)
- if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 207, __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, 207, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 207, __pyx_L3_error)
- if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
- }
- __pyx_v_self = values[0];
- __pyx_v_featurefile = values[1];
- __pyx_v_includeDir = values[2];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 207, __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.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(__pyx_self, __pyx_v_self, __pyx_v_featurefile, __pyx_v_includeDir);
- /* 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_6feaLib_5lexer_14IncludingLexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_featurefile, PyObject *__pyx_v_includeDir) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
- /* "fontTools/feaLib/lexer.py":217
- * """
- *
- * self.lexers_ = [self.make_lexer_(featurefile)] # <<<<<<<<<<<<<<
- * self.featurefilepath = self.lexers_[0].filename_
- * self.includeDir = includeDir
- */
- __pyx_t_2 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_featurefile};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_callargs+__pyx_t_3, (2-__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, 217, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
- if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
- __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers, __pyx_t_2) < (0)) __PYX_ERR(0, 217, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":218
- *
- * self.lexers_ = [self.make_lexer_(featurefile)]
- * self.featurefilepath = self.lexers_[0].filename_ # <<<<<<<<<<<<<<
- * self.includeDir = includeDir
- *
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filename_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath, __pyx_t_2) < (0)) __PYX_ERR(0, 218, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":219
- * self.lexers_ = [self.make_lexer_(featurefile)]
- * self.featurefilepath = self.lexers_[0].filename_
- * self.includeDir = includeDir # <<<<<<<<<<<<<<
- *
- * def __iter__(self):
- */
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir, __pyx_v_includeDir) < (0)) __PYX_ERR(0, 219, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":207
- * """
- *
- * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
- * """Initializes an IncludingLexer.
- *
- */
- /* 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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":221
- * self.includeDir = includeDir
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__(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_6feaLib_5lexer_14IncludingLexer_2__iter__, "IncludingLexer.__iter__(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__(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("__iter__ (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, 221, __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, 221, __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, "__iter__", 0) < (0)) __PYX_ERR(0, 221, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 221, __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, 221, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 221, __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.feaLib.lexer.IncludingLexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(__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_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__iter__", 0);
- /* "fontTools/feaLib/lexer.py":222
- *
- * def __iter__(self):
- * return self # <<<<<<<<<<<<<<
- *
- * def next(self): # Python 2
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_self);
- __pyx_r = __pyx_v_self;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":221
- * self.includeDir = includeDir
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":224
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next(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_6feaLib_5lexer_14IncludingLexer_4next, "IncludingLexer.next(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_5next = {"next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_4next};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next(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("next (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, 224, __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, 224, __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, "next", 0) < (0)) __PYX_ERR(0, 224, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 224, __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, 224, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 224, __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.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(__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_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- size_t __pyx_t_3;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("next", 0);
- /* "fontTools/feaLib/lexer.py":225
- *
- * def next(self): # Python 2
- * return self.__next__() # <<<<<<<<<<<<<<
- *
- * def __next__(self): # Python 3
- */
- __Pyx_XDECREF(__pyx_r);
- __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_next, __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, 225, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":224
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":227
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__(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_6feaLib_5lexer_14IncludingLexer_6__next__, "IncludingLexer.__next__(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__(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("__next__ (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, 227, __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, 227, __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, "__next__", 0) < (0)) __PYX_ERR(0, 227, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 227, __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, 227, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 227, __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.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(__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_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_v_lexer = NULL;
- PyObject *__pyx_v_token_type = NULL;
- PyObject *__pyx_v_token = NULL;
- PyObject *__pyx_v_location = NULL;
- PyObject *__pyx_v_fname_type = NULL;
- PyObject *__pyx_v_fname_token = NULL;
- PyObject *__pyx_v_fname_location = NULL;
- PyObject *__pyx_v_path = NULL;
- PyObject *__pyx_v_curpath = NULL;
- PyObject *__pyx_v_err = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- 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;
- PyObject *__pyx_t_9 = NULL;
- PyObject *(*__pyx_t_10)(PyObject *);
- int __pyx_t_11;
- int __pyx_t_12;
- size_t __pyx_t_13;
- Py_ssize_t __pyx_t_14;
- int __pyx_t_15;
- PyObject *__pyx_t_16 = NULL;
- int __pyx_t_17;
- char const *__pyx_t_18;
- PyObject *__pyx_t_19 = NULL;
- PyObject *__pyx_t_20 = NULL;
- PyObject *__pyx_t_21 = NULL;
- PyObject *__pyx_t_22 = NULL;
- PyObject *__pyx_t_23 = NULL;
- PyObject *__pyx_t_24 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__next__", 0);
- /* "fontTools/feaLib/lexer.py":228
- *
- * def __next__(self): # Python 3
- * while self.lexers_: # <<<<<<<<<<<<<<
- * lexer = self.lexers_[-1]
- * try:
- */
- while (1) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!__pyx_t_2) break;
- /* "fontTools/feaLib/lexer.py":229
- * def __next__(self): # Python 3
- * while self.lexers_:
- * lexer = self.lexers_[-1] # <<<<<<<<<<<<<<
- * try:
- * token_type, token, location = next(lexer)
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF_SET(__pyx_v_lexer, __pyx_t_3);
- __pyx_t_3 = 0;
- /* "fontTools/feaLib/lexer.py":230
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- * try: # <<<<<<<<<<<<<<
- * token_type, token, location = next(lexer)
- * except StopIteration:
- */
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
- __Pyx_XGOTREF(__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_5);
- __Pyx_XGOTREF(__pyx_t_6);
- /*try:*/ {
- /* "fontTools/feaLib/lexer.py":231
- * lexer = self.lexers_[-1]
- * try:
- * token_type, token, location = next(lexer) # <<<<<<<<<<<<<<
- * except StopIteration:
- * self.lexers_.pop()
- */
- __pyx_t_3 = __Pyx_PyIter_Next(__pyx_v_lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_3);
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 231, __pyx_L5_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_7 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
- __Pyx_INCREF(__pyx_t_8);
- } else {
- __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_XGOTREF(__pyx_t_1);
- __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_XGOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_XGOTREF(__pyx_t_8);
- }
- #else
- __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_8);
- #endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
- index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_7);
- index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_8);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < (0)) __PYX_ERR(0, 231, __pyx_L5_error)
- __pyx_t_10 = NULL;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- goto __pyx_L14_unpacking_done;
- __pyx_L13_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_10 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 231, __pyx_L5_error)
- __pyx_L14_unpacking_done:;
- }
- __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_1);
- __pyx_t_1 = 0;
- __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_7);
- __pyx_t_7 = 0;
- __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_8);
- __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":230
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- * try: # <<<<<<<<<<<<<<
- * token_type, token, location = next(lexer)
- * except StopIteration:
- */
- }
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L12_try_end;
- __pyx_L5_error:;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":232
- * try:
- * token_type, token, location = next(lexer)
- * except StopIteration: # <<<<<<<<<<<<<<
- * self.lexers_.pop()
- * continue
- */
- __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
- if (__pyx_t_11) {
- __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 232, __pyx_L7_except_error)
- __Pyx_XGOTREF(__pyx_t_3);
- __Pyx_XGOTREF(__pyx_t_8);
- __Pyx_XGOTREF(__pyx_t_7);
- /* "fontTools/feaLib/lexer.py":233
- * token_type, token, location = next(lexer)
- * except StopIteration:
- * self.lexers_.pop() # <<<<<<<<<<<<<<
- * continue
- * if token_type is Lexer.NAME and token == "include":
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L7_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyObject_Pop(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L7_except_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":234
- * except StopIteration:
- * self.lexers_.pop()
- * continue # <<<<<<<<<<<<<<
- * if token_type is Lexer.NAME and token == "include":
- * fname_type, fname_token, fname_location = lexer.next()
- */
- goto __pyx_L15_except_continue;
- __pyx_L15_except_continue:;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- goto __pyx_L11_try_continue;
- }
- goto __pyx_L7_except_error;
- /* "fontTools/feaLib/lexer.py":230
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- * try: # <<<<<<<<<<<<<<
- * token_type, token, location = next(lexer)
- * except StopIteration:
- */
- __pyx_L7_except_error:;
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- goto __pyx_L1_error;
- __pyx_L11_try_continue:;
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
- goto __pyx_L3_continue;
- __pyx_L12_try_end:;
- }
- /* "fontTools/feaLib/lexer.py":235
- * self.lexers_.pop()
- * continue
- * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
- * fname_type, fname_token, fname_location = lexer.next()
- * if fname_type is not Lexer.FILENAME:
- */
- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NAME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_12 = (__pyx_v_token_type == __pyx_t_8);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (__pyx_t_12) {
- } else {
- __pyx_t_2 = __pyx_t_12;
- goto __pyx_L18_bool_binop_done;
- }
- __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_token, __pyx_mstate_global->__pyx_n_u_include, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 235, __pyx_L1_error)
- __pyx_t_2 = __pyx_t_12;
- __pyx_L18_bool_binop_done:;
- if (__pyx_t_2) {
- /* "fontTools/feaLib/lexer.py":236
- * continue
- * if token_type is Lexer.NAME and token == "include":
- * fname_type, fname_token, fname_location = lexer.next() # <<<<<<<<<<<<<<
- * if fname_type is not Lexer.FILENAME:
- * raise FeatureLibError("Expected file name", fname_location)
- */
- __pyx_t_7 = __pyx_v_lexer;
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_13 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
- __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next_3, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- }
- if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
- PyObject* sequence = __pyx_t_8;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 3)) {
- if (size > 3) __Pyx_RaiseTooManyValuesError(3);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 236, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
- __Pyx_INCREF(__pyx_t_9);
- } else {
- __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_7);
- __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_3);
- __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_XGOTREF(__pyx_t_9);
- }
- #else
- __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- #endif
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- } else {
- Py_ssize_t index = -1;
- __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
- index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L20_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_7);
- index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L20_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_3);
- index = 2; __pyx_t_9 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L20_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_9);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 3) < (0)) __PYX_ERR(0, 236, __pyx_L1_error)
- __pyx_t_10 = NULL;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L21_unpacking_done;
- __pyx_L20_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_10 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 236, __pyx_L1_error)
- __pyx_L21_unpacking_done:;
- }
- __Pyx_XDECREF_SET(__pyx_v_fname_type, __pyx_t_7);
- __pyx_t_7 = 0;
- __Pyx_XDECREF_SET(__pyx_v_fname_token, __pyx_t_3);
- __pyx_t_3 = 0;
- __Pyx_XDECREF_SET(__pyx_v_fname_location, __pyx_t_9);
- __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":237
- * if token_type is Lexer.NAME and token == "include":
- * fname_type, fname_token, fname_location = lexer.next()
- * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected file name", fname_location)
- * # semi_type, semi_token, semi_location = lexer.next()
- */
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_FILENAME); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = (__pyx_v_fname_type != __pyx_t_9);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(__pyx_t_2)) {
- /* "fontTools/feaLib/lexer.py":238
- * fname_type, fname_token, fname_location = lexer.next()
- * if fname_type is not Lexer.FILENAME:
- * raise FeatureLibError("Expected file name", fname_location) # <<<<<<<<<<<<<<
- * # semi_type, semi_token, semi_location = lexer.next()
- * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
- */
- __pyx_t_8 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_13 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
- assert(__pyx_t_8);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_8);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
- __pyx_t_13 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Expected_file_name, __pyx_v_fname_location};
- __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __PYX_ERR(0, 238, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":237
- * if token_type is Lexer.NAME and token == "include":
- * fname_type, fname_token, fname_location = lexer.next()
- * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Expected file name", fname_location)
- * # semi_type, semi_token, semi_location = lexer.next()
- */
- }
- /* "fontTools/feaLib/lexer.py":242
- * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
- * # raise FeatureLibError("Expected ';'", semi_location)
- * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
- * path = fname_token
- * else:
- */
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_3 = __pyx_t_7;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_13 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fname_token};
- __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isabs, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 242, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_2) {
- /* "fontTools/feaLib/lexer.py":243
- * # raise FeatureLibError("Expected ';'", semi_location)
- * if os.path.isabs(fname_token):
- * path = fname_token # <<<<<<<<<<<<<<
- * else:
- * if self.includeDir is not None:
- */
- __Pyx_INCREF(__pyx_v_fname_token);
- __Pyx_XDECREF_SET(__pyx_v_path, __pyx_v_fname_token);
- /* "fontTools/feaLib/lexer.py":242
- * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
- * # raise FeatureLibError("Expected ';'", semi_location)
- * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
- * path = fname_token
- * else:
- */
- goto __pyx_L23;
- }
- /* "fontTools/feaLib/lexer.py":245
- * path = fname_token
- * else:
- * if self.includeDir is not None: # <<<<<<<<<<<<<<
- * curpath = self.includeDir
- * elif self.featurefilepath is not None:
- */
- /*else*/ {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 245, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = (__pyx_t_9 != Py_None);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_2) {
- /* "fontTools/feaLib/lexer.py":246
- * else:
- * if self.includeDir is not None:
- * curpath = self.includeDir # <<<<<<<<<<<<<<
- * elif self.featurefilepath is not None:
- * curpath = os.path.dirname(self.featurefilepath)
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 246, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
- __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":245
- * path = fname_token
- * else:
- * if self.includeDir is not None: # <<<<<<<<<<<<<<
- * curpath = self.includeDir
- * elif self.featurefilepath is not None:
- */
- goto __pyx_L24;
- }
- /* "fontTools/feaLib/lexer.py":247
- * if self.includeDir is not None:
- * curpath = self.includeDir
- * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
- * curpath = os.path.dirname(self.featurefilepath)
- * else:
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = (__pyx_t_9 != Py_None);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_2) {
- /* "fontTools/feaLib/lexer.py":248
- * curpath = self.includeDir
- * elif self.featurefilepath is not None:
- * curpath = os.path.dirname(self.featurefilepath) # <<<<<<<<<<<<<<
- * else:
- * # if the IncludingLexer was initialized from an in-memory
- */
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 248, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = __pyx_t_8;
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_13 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
- __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dirname, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 248, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
- __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":247
- * if self.includeDir is not None:
- * curpath = self.includeDir
- * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
- * curpath = os.path.dirname(self.featurefilepath)
- * else:
- */
- goto __pyx_L24;
- }
- /* "fontTools/feaLib/lexer.py":254
- * # its filesystem path, therefore we fall back to using the
- * # current working directory to resolve relative includes
- * curpath = os.getcwd() # <<<<<<<<<<<<<<
- * path = os.path.join(curpath, fname_token)
- * if len(self.lexers_) >= 5:
- */
- /*else*/ {
- __pyx_t_8 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getcwd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_13 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
- assert(__pyx_t_8);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_8);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
- __pyx_t_13 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
- __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
- __pyx_t_9 = 0;
- }
- __pyx_L24:;
- /* "fontTools/feaLib/lexer.py":255
- * # current working directory to resolve relative includes
- * curpath = os.getcwd()
- * path = os.path.join(curpath, fname_token) # <<<<<<<<<<<<<<
- * if len(self.lexers_) >= 5:
- * raise FeatureLibError("Too many recursive includes", fname_location)
- */
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_7 = __pyx_t_3;
- __Pyx_INCREF(__pyx_t_7);
- __pyx_t_13 = 0;
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_curpath, __pyx_v_fname_token};
- __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_9);
- __pyx_t_9 = 0;
- }
- __pyx_L23:;
- /* "fontTools/feaLib/lexer.py":256
- * curpath = os.getcwd()
- * path = os.path.join(curpath, fname_token)
- * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try:
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 256, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_14 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = (__pyx_t_14 >= 5);
- if (unlikely(__pyx_t_2)) {
- /* "fontTools/feaLib/lexer.py":257
- * path = os.path.join(curpath, fname_token)
- * if len(self.lexers_) >= 5:
- * raise FeatureLibError("Too many recursive includes", fname_location) # <<<<<<<<<<<<<<
- * try:
- * self.lexers_.append(self.make_lexer_(path))
- */
- __pyx_t_3 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_13 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
- assert(__pyx_t_3);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
- __pyx_t_13 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Too_many_recursive_includes, __pyx_v_fname_location};
- __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- }
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __PYX_ERR(0, 257, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":256
- * curpath = os.getcwd()
- * path = os.path.join(curpath, fname_token)
- * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try:
- */
- }
- /* "fontTools/feaLib/lexer.py":258
- * if len(self.lexers_) >= 5:
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try: # <<<<<<<<<<<<<<
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err:
- */
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_6);
- __Pyx_XGOTREF(__pyx_t_5);
- __Pyx_XGOTREF(__pyx_t_4);
- /*try:*/ {
- /* "fontTools/feaLib/lexer.py":259
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try:
- * self.lexers_.append(self.make_lexer_(path)) # <<<<<<<<<<<<<<
- * except FileNotFoundError as err:
- * raise IncludedFeaNotFound(fname_token, fname_location) from err
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L26_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_3 = __pyx_v_self;
- __Pyx_INCREF(__pyx_t_3);
- __pyx_t_13 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_path};
- __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L26_error)
- __Pyx_GOTREF(__pyx_t_7);
- }
- __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_9, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L26_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "fontTools/feaLib/lexer.py":258
- * if len(self.lexers_) >= 5:
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try: # <<<<<<<<<<<<<<
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err:
- */
- }
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- goto __pyx_L33_try_end;
- __pyx_L26_error:;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "fontTools/feaLib/lexer.py":260
- * try:
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err: # <<<<<<<<<<<<<<
- * raise IncludedFeaNotFound(fname_token, fname_location) from err
- * else:
- */
- __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_FileNotFoundError))));
- if (__pyx_t_11) {
- __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 260, __pyx_L28_except_error)
- __Pyx_XGOTREF(__pyx_t_7);
- __Pyx_XGOTREF(__pyx_t_9);
- __Pyx_XGOTREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_9);
- __pyx_v_err = __pyx_t_9;
- /*try:*/ {
- /* "fontTools/feaLib/lexer.py":261
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err:
- * raise IncludedFeaNotFound(fname_token, fname_location) from err # <<<<<<<<<<<<<<
- * else:
- * return (token_type, token, location)
- */
- __pyx_t_1 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 261, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_16);
- __pyx_t_13 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_16))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
- assert(__pyx_t_1);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
- __pyx_t_13 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_fname_token, __pyx_v_fname_location};
- __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_8);
- }
- __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(0, 261, __pyx_L39_error)
- }
- /* "fontTools/feaLib/lexer.py":260
- * try:
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err: # <<<<<<<<<<<<<<
- * raise IncludedFeaNotFound(fname_token, fname_location) from err
- * else:
- */
- /*finally:*/ {
- __pyx_L39_error:;
- /*exception exit:*/{
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
- if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
- __Pyx_XGOTREF(__pyx_t_19);
- __Pyx_XGOTREF(__pyx_t_20);
- __Pyx_XGOTREF(__pyx_t_21);
- __Pyx_XGOTREF(__pyx_t_22);
- __Pyx_XGOTREF(__pyx_t_23);
- __Pyx_XGOTREF(__pyx_t_24);
- __pyx_t_11 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
- {
- __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
- }
- __Pyx_XGIVEREF(__pyx_t_22);
- __Pyx_XGIVEREF(__pyx_t_23);
- __Pyx_XGIVEREF(__pyx_t_24);
- __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
- __Pyx_XGIVEREF(__pyx_t_19);
- __Pyx_XGIVEREF(__pyx_t_20);
- __Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
- __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
- __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
- goto __pyx_L28_except_error;
- }
- }
- }
- goto __pyx_L28_except_error;
- /* "fontTools/feaLib/lexer.py":258
- * if len(self.lexers_) >= 5:
- * raise FeatureLibError("Too many recursive includes", fname_location)
- * try: # <<<<<<<<<<<<<<
- * self.lexers_.append(self.make_lexer_(path))
- * except FileNotFoundError as err:
- */
- __pyx_L28_except_error:;
- __Pyx_XGIVEREF(__pyx_t_6);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
- goto __pyx_L1_error;
- __pyx_L33_try_end:;
- }
- /* "fontTools/feaLib/lexer.py":235
- * self.lexers_.pop()
- * continue
- * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
- * fname_type, fname_token, fname_location = lexer.next()
- * if fname_type is not Lexer.FILENAME:
- */
- goto __pyx_L17;
- }
- /* "fontTools/feaLib/lexer.py":263
- * raise IncludedFeaNotFound(fname_token, fname_location) from err
- * else:
- * return (token_type, token, location) # <<<<<<<<<<<<<<
- * raise StopIteration()
- *
- */
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_v_token_type);
- __Pyx_GIVEREF(__pyx_v_token_type);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_token);
- __Pyx_GIVEREF(__pyx_v_token);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
- __Pyx_INCREF(__pyx_v_location);
- __Pyx_GIVEREF(__pyx_v_location);
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- }
- __pyx_L17:;
- __pyx_L3_continue:;
- }
- /* "fontTools/feaLib/lexer.py":264
- * else:
- * return (token_type, token, location)
- * raise StopIteration() # <<<<<<<<<<<<<<
- *
- * @staticmethod
- */
- __pyx_t_9 = NULL;
- __pyx_t_13 = 1;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
- __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_StopIteration)), __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- }
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 264, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":227
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_16);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_lexer);
- __Pyx_XDECREF(__pyx_v_token_type);
- __Pyx_XDECREF(__pyx_v_token);
- __Pyx_XDECREF(__pyx_v_location);
- __Pyx_XDECREF(__pyx_v_fname_type);
- __Pyx_XDECREF(__pyx_v_fname_token);
- __Pyx_XDECREF(__pyx_v_fname_location);
- __Pyx_XDECREF(__pyx_v_path);
- __Pyx_XDECREF(__pyx_v_curpath);
- __Pyx_XDECREF(__pyx_v_err);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":266
- * raise StopIteration()
- *
- * @staticmethod # <<<<<<<<<<<<<<
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"):
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_(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_6feaLib_5lexer_14IncludingLexer_8make_lexer_, "IncludingLexer.make_lexer_(file_or_path)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_ = {"make_lexer_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_(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_file_or_path = 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("make_lexer_ (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_file_or_path,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, 266, __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, 266, __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, "make_lexer_", 0) < (0)) __PYX_ERR(0, 266, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, i); __PYX_ERR(0, 266, __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, 266, __pyx_L3_error)
- }
- __pyx_v_file_or_path = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 266, __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.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(__pyx_self, __pyx_v_file_or_path);
- /* 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_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path) {
- PyObject *__pyx_v_fileobj = NULL;
- int __pyx_v_closing;
- PyObject *__pyx_v_filename = NULL;
- PyObject *__pyx_v_data = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- size_t __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("make_lexer_", 0);
- /* "fontTools/feaLib/lexer.py":268
- * @staticmethod
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
- * fileobj, closing = file_or_path, False
- * else:
- */
- __pyx_t_1 = __Pyx_HasAttr(__pyx_v_file_or_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 268, __pyx_L1_error)
- if (__pyx_t_1) {
- /* "fontTools/feaLib/lexer.py":269
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"):
- * fileobj, closing = file_or_path, False # <<<<<<<<<<<<<<
- * else:
- * filename, closing = file_or_path, True
- */
- __pyx_t_2 = __pyx_v_file_or_path;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = 0;
- __pyx_v_fileobj = __pyx_t_2;
- __pyx_t_2 = 0;
- __pyx_v_closing = __pyx_t_1;
- /* "fontTools/feaLib/lexer.py":268
- * @staticmethod
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
- * fileobj, closing = file_or_path, False
- * else:
- */
- goto __pyx_L3;
- }
- /* "fontTools/feaLib/lexer.py":271
- * fileobj, closing = file_or_path, False
- * else:
- * filename, closing = file_or_path, True # <<<<<<<<<<<<<<
- * fileobj = open(filename, "r", encoding="utf-8-sig")
- * data = fileobj.read()
- */
- /*else*/ {
- __pyx_t_2 = __pyx_v_file_or_path;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = 1;
- __pyx_v_filename = __pyx_t_2;
- __pyx_t_2 = 0;
- __pyx_v_closing = __pyx_t_1;
- /* "fontTools/feaLib/lexer.py":272
- * else:
- * filename, closing = file_or_path, True
- * fileobj = open(filename, "r", encoding="utf-8-sig") # <<<<<<<<<<<<<<
- * data = fileobj.read()
- * filename = getattr(fileobj, "name", None)
- */
- __pyx_t_3 = NULL;
- __pyx_t_4 = 1;
- {
- PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_r};
- __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_kp_u_utf_8_sig, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 272, __pyx_L1_error)
- __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_v_fileobj = __pyx_t_2;
- __pyx_t_2 = 0;
- }
- __pyx_L3:;
- /* "fontTools/feaLib/lexer.py":273
- * filename, closing = file_or_path, True
- * fileobj = open(filename, "r", encoding="utf-8-sig")
- * data = fileobj.read() # <<<<<<<<<<<<<<
- * filename = getattr(fileobj, "name", None)
- * if closing:
- */
- __pyx_t_5 = __pyx_v_fileobj;
- __Pyx_INCREF(__pyx_t_5);
- __pyx_t_4 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_v_data = __pyx_t_2;
- __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":274
- * fileobj = open(filename, "r", encoding="utf-8-sig")
- * data = fileobj.read()
- * filename = getattr(fileobj, "name", None) # <<<<<<<<<<<<<<
- * if closing:
- * fileobj.close()
- */
- __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_fileobj, __pyx_mstate_global->__pyx_n_u_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_2);
- __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":275
- * data = fileobj.read()
- * filename = getattr(fileobj, "name", None)
- * if closing: # <<<<<<<<<<<<<<
- * fileobj.close()
- * return Lexer(data, filename)
- */
- if (__pyx_v_closing) {
- /* "fontTools/feaLib/lexer.py":276
- * filename = getattr(fileobj, "name", None)
- * if closing:
- * fileobj.close() # <<<<<<<<<<<<<<
- * return Lexer(data, filename)
- *
- */
- __pyx_t_5 = __pyx_v_fileobj;
- __Pyx_INCREF(__pyx_t_5);
- __pyx_t_4 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
- __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":275
- * data = fileobj.read()
- * filename = getattr(fileobj, "name", None)
- * if closing: # <<<<<<<<<<<<<<
- * fileobj.close()
- * return Lexer(data, filename)
- */
- }
- /* "fontTools/feaLib/lexer.py":277
- * if closing:
- * fileobj.close()
- * return Lexer(data, filename) # <<<<<<<<<<<<<<
- *
- * def scan_anonymous_block(self, tag):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = 1;
- #if CYTHON_UNPACK_METHODS
- if (unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
- assert(__pyx_t_5);
- PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(__pyx__function);
- __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
- __pyx_t_4 = 0;
- }
- #endif
- {
- PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_filename};
- __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- }
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":266
- * raise StopIteration()
- *
- * @staticmethod # <<<<<<<<<<<<<<
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"):
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_fileobj);
- __Pyx_XDECREF(__pyx_v_filename);
- __Pyx_XDECREF(__pyx_v_data);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":279
- * return Lexer(data, filename)
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * return self.lexers_[-1].scan_anonymous_block(tag)
- *
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block(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_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block, "IncludingLexer.scan_anonymous_block(self, tag)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block = {"scan_anonymous_block", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block(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_tag = 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("scan_anonymous_block (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_tag,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, 279, __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, 279, __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, 279, __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, "scan_anonymous_block", 0) < (0)) __PYX_ERR(0, 279, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 279, __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, 279, __pyx_L3_error)
- values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
- if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- __pyx_v_tag = values[1];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 279, __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.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
- /* 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_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
- 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("scan_anonymous_block", 0);
- /* "fontTools/feaLib/lexer.py":280
- *
- * def scan_anonymous_block(self, tag):
- * return self.lexers_[-1].scan_anonymous_block(tag) # <<<<<<<<<<<<<<
- *
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_2 = __pyx_t_4;
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_5 = 0;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tag};
- __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__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, 280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- }
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":279
- * return Lexer(data, filename)
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * return self.lexers_[-1].scan_anonymous_block(tag)
- *
- */
- /* function exit code */
- __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.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
- /* "fontTools/feaLib/lexer.py":286
- * """Lexer that does not follow `include` statements, emits them as-is."""
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * return next(self.lexers_[0])
- */
- /* Python wrapper */
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__(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_6feaLib_5lexer_17NonIncludingLexer___next__, "NonIncludingLexer.__next__(self)");
- static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__};
- static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__(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("__next__ (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, 286, __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, 286, __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, "__next__", 0) < (0)) __PYX_ERR(0, 286, __pyx_L3_error)
- for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
- if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 286, __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, 286, __pyx_L3_error)
- }
- __pyx_v_self = values[0];
- }
- goto __pyx_L6_skip;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 286, __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.feaLib.lexer.NonIncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(__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_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__next__", 0);
- /* "fontTools/feaLib/lexer.py":287
- *
- * def __next__(self): # Python 3
- * return next(self.lexers_[0]) # <<<<<<<<<<<<<<
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- /* "fontTools/feaLib/lexer.py":286
- * """Lexer that does not follow `include` statements, emits them as-is."""
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * return next(self.lexers_[0])
- */
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("fontTools.feaLib.lexer.NonIncludingLexer.__next__", __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_lexer(PyObject* module); /*proto*/
- static PyModuleDef_Slot __pyx_moduledef_slots[] = {
- {Py_mod_create, (void*)__pyx_pymod_create},
- {Py_mod_exec, (void*)__pyx_pymod_exec_lexer},
- #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,
- "lexer",
- 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_lexer(void) CYTHON_SMALL_CODE; /*proto*/
- __Pyx_PyMODINIT_FUNC PyInit_lexer(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_lexer(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;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- size_t __pyx_t_12;
- 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 'lexer' 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 "lexer" 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_lexer", 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__feaLib__lexer) {
- if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __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.feaLib.lexer")) {
- if (unlikely((PyDict_SetItemString(modules, "fontTools.feaLib.lexer", __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/feaLib/lexer.py":1
- * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
- * from fontTools.feaLib.location import FeatureLibLocation
- * import re
- */
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
- __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_feaLib_error, __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_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
- 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/feaLib/lexer.py":2
- * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
- * from fontTools.feaLib.location import FeatureLibLocation # <<<<<<<<<<<<<<
- * import re
- * import os
- */
- {
- PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibLocation};
- __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_feaLib_location, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __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_FeatureLibLocation};
- __pyx_t_3 = 0; {
- __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2, __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, 2, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- }
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":3
- * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
- * from fontTools.feaLib.location import FeatureLibLocation
- * import re # <<<<<<<<<<<<<<
- * import os
- *
- */
- __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
- __pyx_t_2 = __pyx_t_1;
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_2) < (0)) __PYX_ERR(0, 3, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":4
- * from fontTools.feaLib.location import FeatureLibLocation
- * import re
- * import os # <<<<<<<<<<<<<<
- *
- * try:
- */
- __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
- __pyx_t_2 = __pyx_t_1;
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 4, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":6
- * import os
- *
- * try: # <<<<<<<<<<<<<<
- * import cython
- * except ImportError:
- */
- {
- (void)__pyx_t_1; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */
- /*try:*/ {
- /* "fontTools/feaLib/lexer.py":7
- *
- * try:
- * import cython # <<<<<<<<<<<<<<
- * except ImportError:
- * # if cython not installed, use mock module with no-op decorators and types
- */
- }
- }
- /* "fontTools/feaLib/lexer.py":13
- *
- *
- * class Lexer(object): # <<<<<<<<<<<<<<
- * NUMBER = "NUMBER"
- * HEXADECIMAL = "HEXADECIMAL"
- */
- __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_mstate_global->__pyx_n_u_Lexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[1]) {
- if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 13, __pyx_L1_error)
- }
- /* "fontTools/feaLib/lexer.py":14
- *
- * class Lexer(object):
- * NUMBER = "NUMBER" # <<<<<<<<<<<<<<
- * HEXADECIMAL = "HEXADECIMAL"
- * OCTAL = "OCTAL"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBER, __pyx_mstate_global->__pyx_n_u_NUMBER) < (0)) __PYX_ERR(0, 14, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":15
- * class Lexer(object):
- * NUMBER = "NUMBER"
- * HEXADECIMAL = "HEXADECIMAL" # <<<<<<<<<<<<<<
- * OCTAL = "OCTAL"
- * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL) < (0)) __PYX_ERR(0, 15, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":16
- * NUMBER = "NUMBER"
- * HEXADECIMAL = "HEXADECIMAL"
- * OCTAL = "OCTAL" # <<<<<<<<<<<<<<
- * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
- * FLOAT = "FLOAT"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OCTAL, __pyx_mstate_global->__pyx_n_u_OCTAL) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":17
- * HEXADECIMAL = "HEXADECIMAL"
- * OCTAL = "OCTAL"
- * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL) # <<<<<<<<<<<<<<
- * FLOAT = "FLOAT"
- * STRING = "STRING"
- */
- __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBER);
- if (unlikely(!__pyx_t_8)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NUMBER);
- }
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
- if (unlikely(!__pyx_t_9)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
- }
- if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OCTAL);
- if (unlikely(!__pyx_t_10)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OCTAL);
- }
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBERS, __pyx_t_11) < (0)) __PYX_ERR(0, 17, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":18
- * OCTAL = "OCTAL"
- * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
- * FLOAT = "FLOAT" # <<<<<<<<<<<<<<
- * STRING = "STRING"
- * NAME = "NAME"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FLOAT, __pyx_mstate_global->__pyx_n_u_FLOAT) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":19
- * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
- * FLOAT = "FLOAT"
- * STRING = "STRING" # <<<<<<<<<<<<<<
- * NAME = "NAME"
- * FILENAME = "FILENAME"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_STRING, __pyx_mstate_global->__pyx_n_u_STRING) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":20
- * FLOAT = "FLOAT"
- * STRING = "STRING"
- * NAME = "NAME" # <<<<<<<<<<<<<<
- * FILENAME = "FILENAME"
- * GLYPHCLASS = "GLYPHCLASS"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NAME, __pyx_mstate_global->__pyx_n_u_NAME) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":21
- * STRING = "STRING"
- * NAME = "NAME"
- * FILENAME = "FILENAME" # <<<<<<<<<<<<<<
- * GLYPHCLASS = "GLYPHCLASS"
- * CID = "CID"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FILENAME, __pyx_mstate_global->__pyx_n_u_FILENAME) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":22
- * NAME = "NAME"
- * FILENAME = "FILENAME"
- * GLYPHCLASS = "GLYPHCLASS" # <<<<<<<<<<<<<<
- * CID = "CID"
- * SYMBOL = "SYMBOL"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS) < (0)) __PYX_ERR(0, 22, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":23
- * FILENAME = "FILENAME"
- * GLYPHCLASS = "GLYPHCLASS"
- * CID = "CID" # <<<<<<<<<<<<<<
- * SYMBOL = "SYMBOL"
- * COMMENT = "COMMENT"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CID, __pyx_mstate_global->__pyx_n_u_CID) < (0)) __PYX_ERR(0, 23, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":24
- * GLYPHCLASS = "GLYPHCLASS"
- * CID = "CID"
- * SYMBOL = "SYMBOL" # <<<<<<<<<<<<<<
- * COMMENT = "COMMENT"
- * NEWLINE = "NEWLINE"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SYMBOL, __pyx_mstate_global->__pyx_n_u_SYMBOL) < (0)) __PYX_ERR(0, 24, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":25
- * CID = "CID"
- * SYMBOL = "SYMBOL"
- * COMMENT = "COMMENT" # <<<<<<<<<<<<<<
- * NEWLINE = "NEWLINE"
- * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_COMMENT, __pyx_mstate_global->__pyx_n_u_COMMENT) < (0)) __PYX_ERR(0, 25, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":26
- * SYMBOL = "SYMBOL"
- * COMMENT = "COMMENT"
- * NEWLINE = "NEWLINE" # <<<<<<<<<<<<<<
- * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
- *
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NEWLINE, __pyx_mstate_global->__pyx_n_u_NEWLINE) < (0)) __PYX_ERR(0, 26, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":27
- * COMMENT = "COMMENT"
- * NEWLINE = "NEWLINE"
- * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK" # <<<<<<<<<<<<<<
- *
- * CHAR_WHITESPACE_ = " \t"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":29
- * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
- *
- * CHAR_WHITESPACE_ = " \t" # <<<<<<<<<<<<<<
- * CHAR_NEWLINE_ = "\r\n"
- * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_WHITESPACE, __pyx_mstate_global->__pyx_kp_u__13) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":30
- *
- * CHAR_WHITESPACE_ = " \t"
- * CHAR_NEWLINE_ = "\r\n" # <<<<<<<<<<<<<<
- * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
- * CHAR_DIGIT_ = "0123456789"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE, __pyx_mstate_global->__pyx_kp_u__14) < (0)) __PYX_ERR(0, 30, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":31
- * CHAR_WHITESPACE_ = " \t"
- * CHAR_NEWLINE_ = "\r\n"
- * CHAR_SYMBOL_ = ",;:-+'{}[]<>()=" # <<<<<<<<<<<<<<
- * CHAR_DIGIT_ = "0123456789"
- * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_SYMBOL, __pyx_mstate_global->__pyx_kp_u__15) < (0)) __PYX_ERR(0, 31, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":32
- * CHAR_NEWLINE_ = "\r\n"
- * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
- * CHAR_DIGIT_ = "0123456789" # <<<<<<<<<<<<<<
- * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
- * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT, __pyx_mstate_global->__pyx_kp_u_0123456789) < (0)) __PYX_ERR(0, 32, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":33
- * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
- * CHAR_DIGIT_ = "0123456789"
- * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef" # <<<<<<<<<<<<<<
- * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_HEXDIGIT, __pyx_mstate_global->__pyx_kp_u_0123456789ABCDEFabcdef) < (0)) __PYX_ERR(0, 33, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":34
- * CHAR_DIGIT_ = "0123456789"
- * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
- * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" # <<<<<<<<<<<<<<
- * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
- * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER, __pyx_mstate_global->__pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":35
- * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
- * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\" # <<<<<<<<<<<<<<
- * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
- *
- */
- __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
- if (unlikely(!__pyx_t_11)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
- }
- if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_10 = PyNumber_Add(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u__16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_START, __pyx_t_10) < (0)) __PYX_ERR(0, 35, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "fontTools/feaLib/lexer.py":36
- * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
- * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-" # <<<<<<<<<<<<<<
- *
- * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
- */
- __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
- if (unlikely(!__pyx_t_10)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
- }
- if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
- if (unlikely(!__pyx_t_11)) {
- PyErr_Clear();
- __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
- }
- if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = PyNumber_Add(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION, __pyx_t_11) < (0)) __PYX_ERR(0, 36, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":38
- * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
- *
- * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$") # <<<<<<<<<<<<<<
- *
- * MODE_NORMAL_ = "NORMAL"
- */
- __pyx_t_9 = NULL;
- __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_compile); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_12 = 1;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_A_Za_z_0_9};
- __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- }
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_RE_GLYPHCLASS, __pyx_t_11) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":40
- * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
- *
- * MODE_NORMAL_ = "NORMAL" # <<<<<<<<<<<<<<
- * MODE_FILENAME_ = "FILENAME"
- *
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL, __pyx_mstate_global->__pyx_n_u_NORMAL) < (0)) __PYX_ERR(0, 40, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":41
- *
- * MODE_NORMAL_ = "NORMAL"
- * MODE_FILENAME_ = "FILENAME" # <<<<<<<<<<<<<<
- *
- * def __init__(self, text, filename):
- */
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME, __pyx_mstate_global->__pyx_n_u_FILENAME) < (0)) __PYX_ERR(0, 41, __pyx_L1_error)
- /* "fontTools/feaLib/lexer.py":43
- * MODE_FILENAME_ = "FILENAME"
- *
- * def __init__(self, text, filename): # <<<<<<<<<<<<<<
- * self.filename_ = filename
- * self.line_ = 1
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___init, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":52
- * self.mode_ = Lexer.MODE_NORMAL_
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___iter, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_11) < (0)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":55
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_5next, 0, __pyx_mstate_global->__pyx_n_u_Lexer_next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_3, __pyx_t_11) < (0)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":58
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while True:
- * token_type, token, location = self.next_()
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_7__next__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_11) < (0)) __PYX_ERR(0, 58, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":64
- * return (token_type, token, location)
- *
- * def location_(self): # <<<<<<<<<<<<<<
- * column = self.pos_ - self.line_start_ + 1
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_9location_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_location, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 64, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_location, __pyx_t_11) < (0)) __PYX_ERR(0, 64, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":68
- * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
- *
- * def next_(self): # <<<<<<<<<<<<<<
- * self.scan_over_(Lexer.CHAR_WHITESPACE_)
- * location = self.location_()
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_11next_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_next_2, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_2, __pyx_t_11) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":165
- * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
- *
- * def scan_over_(self, valid): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] in valid:
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_over, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_over, __pyx_t_11) < (0)) __PYX_ERR(0, 165, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":171
- * self.pos_ = p
- *
- * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
- * p = self.pos_
- * while p < self.text_length_ and self.text_[p] not in stop_at:
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_until, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_until, __pyx_t_11) < (0)) __PYX_ERR(0, 171, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":177
- * self.pos_ = p
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * location = self.location_()
- * tag = tag.strip()
- */
- __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_anonymous_block, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 177, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_t_11) < (0)) __PYX_ERR(0, 177, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "fontTools/feaLib/lexer.py":13
- *
- *
- * class Lexer(object): # <<<<<<<<<<<<<<
- * NUMBER = "NUMBER"
- * HEXADECIMAL = "HEXADECIMAL"
- */
- __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
- #endif
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_t_11) < (0)) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":192
- *
- *
- * class IncludingLexer(object): # <<<<<<<<<<<<<<
- * """A Lexer that follows include statements.
- *
- */
- __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_mstate_global->__pyx_n_u_IncludingLexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_kp_u_A_Lexer_that_follows_include_sta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[3]) {
- if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[3]) < 0))) __PYX_ERR(0, 192, __pyx_L1_error)
- }
- /* "fontTools/feaLib/lexer.py":207
- * """
- *
- * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
- * """Initializes an IncludingLexer.
- *
- */
- __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 207, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_includeDir, Py_None) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
- __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___init, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_8, __pyx_t_11);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":221
- * self.includeDir = includeDir
- *
- * def __iter__(self): # <<<<<<<<<<<<<<
- * return self
- *
- */
- __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___iter, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_8) < (0)) __PYX_ERR(0, 221, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":224
- * return self
- *
- * def next(self): # Python 2 # <<<<<<<<<<<<<<
- * return self.__next__()
- *
- */
- __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_5next, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer_next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_3, __pyx_t_8) < (0)) __PYX_ERR(0, 224, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":227
- * return self.__next__()
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * while self.lexers_:
- * lexer = self.lexers_[-1]
- */
- __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_8) < (0)) __PYX_ERR(0, 227, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":266
- * raise StopIteration()
- *
- * @staticmethod # <<<<<<<<<<<<<<
- * def make_lexer_(file_or_path):
- * if hasattr(file_or_path, "read"):
- */
- __pyx_t_11 = NULL;
- __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_IncludingLexer_make_lexer, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
- #endif
- __pyx_t_12 = 1;
- {
- PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
- __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- }
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_t_8) < (0)) __PYX_ERR(0, 266, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":279
- * return Lexer(data, filename)
- *
- * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
- * return self.lexers_[-1].scan_anonymous_block(tag)
- *
- */
- __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer_scan_anonymous_bl, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_t_8) < (0)) __PYX_ERR(0, 279, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "fontTools/feaLib/lexer.py":192
- *
- *
- * class IncludingLexer(object): # <<<<<<<<<<<<<<
- * """A Lexer that follows include statements.
- *
- */
- __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
- PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
- #endif
- if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_t_8) < (0)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "fontTools/feaLib/lexer.py":283
- *
- *
- * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
- * """Lexer that does not follow `include` statements, emits them as-is."""
- *
- */
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IncludingLexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __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, 283, __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, 283, __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, 283, __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_NonIncludingLexer, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_kp_u_Lexer_that_does_not_follow_inclu); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __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, 283, __pyx_L1_error)
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":286
- * """Lexer that does not follow `include` statements, emits them as-is."""
- *
- * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
- * return next(self.lexers_[0])
- */
- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__, 0, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __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_next, __pyx_t_4) < (0)) __PYX_ERR(0, 286, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "fontTools/feaLib/lexer.py":283
- *
- *
- * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
- * """Lexer that does not follow `include` statements, emits them as-is."""
- *
- */
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __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_NonIncludingLexer, __pyx_t_4) < (0)) __PYX_ERR(0, 283, __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/feaLib/lexer.py":1
- * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
- * from fontTools.feaLib.location import FeatureLibLocation
- * import re
- */
- __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_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11);
- if (__pyx_m) {
- if (__pyx_mstate->__pyx_d && stringtab_initialized) {
- __Pyx_AddTraceback("init fontTools.feaLib.lexer", __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.feaLib.lexer");
- }
- __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);
- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 13, __pyx_L1_error)
- __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 266, __pyx_L1_error)
- __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open); if (!__pyx_builtin_open) __PYX_ERR(0, 272, __pyx_L1_error)
- /* 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;
- __pyx_mstate->__pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
- __pyx_mstate->__pyx_umethod_PyList_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
- return 0;
- __pyx_L1_error:;
- return -1;
- }
- /* #### 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/feaLib/lexer.py":13
- *
- *
- * class Lexer(object): # <<<<<<<<<<<<<<
- * NUMBER = "NUMBER"
- * HEXADECIMAL = "HEXADECIMAL"
- */
- __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
- __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
- /* "fontTools/feaLib/lexer.py":192
- *
- *
- * class IncludingLexer(object): # <<<<<<<<<<<<<<
- * """A Lexer that follows include statements.
- *
- */
- __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
- __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
- __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
- #if CYTHON_IMMORTAL_CONSTANTS
- {
- PyObject **table = __pyx_mstate->__pyx_tuple;
- for (Py_ssize_t i=0; i<4; ++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: 11; } index[] = {{1},{1},{10},{22},{415},{18},{28},{29},{18},{25},{45},{32},{79},{66},{29},{27},{24},{1},{4},{0},{2},{2},{15},{9},{10},{1},{1},{1},{1},{1},{1},{1},{1},{1},{10},{4},{4},{9},{52},{15},{11},{14},{12},{23},{16},{13},{12},{16},{3},{7},{8},{5},{15},{18},{10},{11},{19},{14},{23},{23},{23},{26},{19},{35},{5},{14},{14},{14},{15},{10},{11},{26},{16},{17},{14},{12},{4},{7},{6},{6},{7},{17},{26},{5},{20},{13},{6},{6},{6},{18},{17},{18},{5},{7},{6},{7},{8},{7},{4},{7},{7},{8},{3},{11},{15},{12},{8},{9},{7},{14},{11},{10},{22},{22},{25},{8},{6},{10},{7},{10},{8},{13},{5},{5},{8},{4},{5},{7},{5},{5},{11},{9},{8},{8},{11},{5},{8},{13},{5},{10},{15},{4},{8},{8},{5},{4},{9},{6},{4},{2},{1},{4},{3},{4},{11},{12},{1},{2},{4},{6},{20},{10},{11},{4},{12},{10},{5},{5},{12},{7},{6},{5},{3},{3},{8},{4},{5},{12},{5},{10},{5},{6},{2},{140},{91},{46},{46},{1121},{58},{41},{283},{38},{7},{17},{20},{11},{45}};
- #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2542 bytes) */
- const char* const cstring = "BZh91AY&SY\256SP\342\000\000S\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373@@@@@@@@@@@@@\000@\000`\010\371\276\332\353\335\336\3331\321\333\327z5 \241vd\363\320\017\257}\tD$LJ<\320\247\250\007\215O$\323)\3711\220\"\236\232\236\223\364&\247\261LjM\351C\305?R\036\202oR~\2204\217\nyM\212z&\324\022\210\023&\204\302\032&\022x\240\364CQ0!\246\203L\321\003L\000\230F\001\003!\241\210\364OP\006 \323S\024\332Ji\030\324\003\322\036\240\000\r\003M\000\000\000\000\000\0004\000\000\r4\3654d\032dB \t<\244\375&\023\024\363A\023\010\r\014\200\304\030\001\030#F\214&\230\214\230\2320\200\315G\244\025SL\206\0040\312a4\014\010\364&\t\204\304\006F\002a4\304a\030\000&#\000\230\000L\022\232\204\024\332A\r=OA\251\240d\r=L\206i4h\003@\000\003C\023#M\014\021\264#\322\000\006\232e)wm\023\262\t\304A\372\030\242\344\277b\343\343\006\223\212\261\246\217*-A\377\252\252\005\004*\t\273\254\006\310\307L\202A\010\tD$ \001\322\252R\352\366\351\020;\013\316\016\333\325\233\377l`\336\337p\337\337-Fd\266\244\001\250\206\\\020\0212\252*\246q\350\210\364\3140\334fv\235o\001\242\237+\340\204\t\222A(\352\341\211\310d&pA\206j2]\250`\271\204\014@\315Z5\213\rT\210\r\245\233 %-\027@JCI\213\232\310#\336B\252&\224+'\022SJo\262\225Q9\251\230\2114\234\346RY\327\2720B\002\330QD\024p\371;\330\234U\031 Q\232B\216\202*\276y\274@\222\024*\301\226,\346\265^\306@\272\242\006\"\004\217v\370js2N\316<\245\377j\3517\226\361\320\231\304E\325TXi\212\\\260>5e\223~c\344\355\365\326\273\022\010iL\327\030\022\304\262\036\010\372\0265V-\314\241h\275t\245\340@|\315\200q\202=\335\r=\263\r\263\251\t\270\335\031\331\275\277\020=j\216-(\247\314\230\341\3008\253\252;\241\274\341E/\337\345\372\376M)\302\306}\316\326oc\312~\030\276\352\307`\3061\036\026<\356\366\207]\342B\344\253\365\240\354l\336l\301\305\023\237\277\004\255\207\266\2636\331\205\272\367\353\201\214\211G\221\346OI\203\305\326\204\013\nd\326\264g\335s\236F\\\3128\031\301sx\367\337p\243\204Z\373\261\344!Cg=%.F\350)tM#Z\220\022e>\255\236\301\014\207\262I""\241\022o\366\207\277+td8\243\272\304 G\276\036\376!Stq\201\233\033\027A\370q\257\260_\216\353\330\336\010\316z\\Z\363\355{1\364\276ZM[Q\215gU\003\336a\374v-A\255)\026\257\327|I\300\344\311\004!\004\020\272}\304|r\310\341\242ts\275\304u\244\003N\307`i\301\366 \326U~\023\265\010\311-<\035\"\2310L\230&\030&{L\313\244f\265\304\3249\306qp\205\035\2661~\337\374\277\343T\274\022\364\013\3576\353\273C9E\365\235\336~JI'K\372n=Z\264q\215\251\035 u\217\236=\276\347\004\306V\2348O\224\335\224n\363~\221\366\036+\371.4)\311\251\270\006\007w\257'\316\364\344h\342\235\007?]sq\300\353\270\033\2703\260\033$\222A\300V\232H\361\233\222u\006\266\035-\014;Q\250?\221\262\033r\3303\257\211N|\356\025f\3060\214\234\345\223\3456\217\313\306\352\272\332\211\024Tj6\234\366*;U5`d\360\246x}\216\315\330\351^\310;\210\324k\373-\203\\\260m\017\357\3735\232\316\346\326(\035IG\016X@m\352\346u\267`_y\2566\353\327R\253\253W\025\371\035\345\341\315}\211\201\222\275\242\231\355\360\260\"!\020\211\204\341\261p\360Odv\023=\370e\3769J\371;2\257\255\364\\\235\366\331\250\3531{X]\350\237\032s\351U\331\347\014x\226VI\020A\255\275\204\233K\034u\347J2\2253K\300M\024 \2217oi\224\350\306\034\256X6E\"Bj\342\025\347*\221\231\260\016\335\246\235hJ4\005#\251\022\n\220\002\020sGP&X9\000\274\010\200o\241\006Evf\213\035\316\276\273\261\367Y9\370\223b\302,\3010\372~\225\255\021\032\211\003\"C=\246\002\322Bw\241\370\036\221b\314\221\245\00534\2015p\324%\362\363i\336_\025\007!r\223\207\362\335\201I\232~\031@\270\025\250\336K\t\020\317-\210\212\3216\033%9\232+\246)\005\200\310j_\036\212\004\t\256\345\215to\205\010\224\252V\265\333\211\230\312\360\257S\002\365i~d\034\246\271\253*\203?~\014@\241\231/c\032\305\272\353\256\304\321yqv\336R\363\r\305\t\366c\255[D\262\320\217\223\316\2200Q'L=\014\300T\222\021\236\006\215\002@\265\313\271\245\233bv\r\326k\226\0063#*\22671\326E\241;f\234\212\302WTkkZ\310\265\325\217r\321\305\020+c\002\246\"RU\230\032\032\t\351^lU\027\263^1dUe%r\331\306\031\211f,,A\032\3045d\223\265\271\357>\210\250""\3447O\025\370\345\235\224\006\311pq,\273\242C\3671X\260\237\035Z\270\361\225\314B\n@\217\007\313d\nd\234\332\214\3354Tb\364(\214SZ\367\317gIj\276]\216\236\344Lp\217\227\265\325U\227]\004Q.T#\220\323\247\200\320\344\370\252m\tIeh\017VI7\344l\021\026\322\005\264\375yW7\353J\346\350&CK\336\365Ncm\035N[\3031\2257\267f\313\341H\364\032\035f\210\252\204\324\315\233{\216\246~IM\363\301\233\013\216hR=3\004LJ\002\346\210\0244\257G\220\271\262\023\251p\271\232\246\"@V\324\3633\354\311\003\264\026\303F\226\267Zo9\226@\262\266\310\204\350L\n\355\033&^\213\031P[\266\203k\020X\017\33585^\207\215\202M.\324\302\330\320\202*\203$\024\272\267#\025\t\214\007\2647\022b\241\033\210p\352\340\200\372\263\342\310Y\276i\234\254#\323ZN\300\250E\316\200\233C\235\t&\366\321~|c'E\255\"5o$W\177uf\0012\262&\334P\300\306\372\031E\233'\320\210\316\323\245'!]\006H5[\253\\I\317N\310\351\276\360\3467\206\365kE\007\244K\341\266F\305\244\314\003\226dn\2279w\340\300D\205\0339\230\031\350\t^\311v\224A\242H\231\021L\265*\016#+<\022\002\343\274\3117\311dllyL`\327h\033\305_\264Z\316\013b\313pc\022\325\3136V\2246l\330b\275\013\213\351bh\356\344\353\273\252+\276&\354\"\344-\266\212\341\024]okz'{\243N\355|\275(\341\205\005\312\301\254m\350\340^6\261H \314\212Z@\325\202A\223\202(\315D\016\253\246\2722%\200#\207\004\232D1\006\264.\t\004\314\344\n\255\3144\352\n\325\222^\035\256Q\311\312O]\213\0105*2\201\300L\311\230\372\306\356\021\260@\344]\014\251\270\273-\205\031]\210\214\030\033|\226\016\276\360\272\334\266\347B\326\310\375\232i\223\254_\001\310\353y\344\210'\020U\027:\210\235^&\315\266\353IhF\233\362\020\222\\>\264r\377\257\363\222S\352xc:\267\265G\0363\\\263\362\267'\215\3266\033\322\200p z\324K\236\3218\001/|\254CL\246x\020\0021qf,\233\217\364'\270\261\220\177|\240\344\231!Q2\313\372N\325\2130\032R$\001\330l\005\243\271\206\256\326\241\254\226p\230\305\362\243?t8U$\261\200\361n\324\242\354\307R\030\234\200\360\251\353\336\354t\001\222\274\260\234\214\351\036xgm\024T\r\277\316\\\273\206p\356B\317\2434\232""\250\026\373\217\236\376(l\242^\"\321b\257e\037\244\220\035T\332\321\nC\251\254\035\337\370\244T\250+9\332\256L\300\321\374YB\205*\354\362f\032'+\223\253\314\317nvnkL\3665nQ\225\350\332Z`l+n\302\317A\277\225j\325\023\202E\321\235\307\025_#\347#7\246\370\251\333#S\026\234\360}w\360\007\374\215zi\257\302q\376\014o<\311g\235\226\371\251\014\241F\324\333S\230P|,\222\322q\335'\320E\202~^\264\343]\232\352\324v]j\323\306\220W\177V\267\035.k\003\013\010\301t\340\351\334c)M\037W\366\374puX\204\233\352kS\341\202\211\373\026'?:\264\303r\277\362\257M\256/\361\226\331\276\177\362`ma\3142%\213\225\221\333\310\324MBG\204\\\253\245Z\244\214d\355g\350W\305\277\354`a\200\005\027X`4\252\022q4\314\000\202\020\002\010$\207\310~<@\037xfa \351@\304'2\201\325\024\373I\207y'\332-\307\334\332\322\253UC\305\236x|\327\244\345\204\257\032*h*\264`\345z\236\233\320\325\213\n\023\301y\202\301'H\316$\222\211R\217\024\004\274\322\242y\227\005\321\225\0048\004\024`\342N\322\231bH\006Bj\013\352V\010\235\270f\2019(V\303w\204\242TyJ\261\000\253\035\004\344)R%\377\213\271\"\234(HW)\250q\000";
- PyObject *data = __Pyx_DecompressString(cstring, 2542, 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 (2392 bytes) */
- const char* const cstring = "x\332\275\026K[\023\311vP\274\002\023\225H@t\306\231\216\240\210\222h\024Q\300\353\330$\001r\r\t!\301\267\323\323twHK\247;\351\252F\320O?\227,{Y\313^\366\262\227Yf\3112\313,\371\t\376\204{\252:\017^\363\315]\335|I\325\251S\347\375\252\014\334\277\037{\360p\372\321\314\343'\263]\210_\210'\222\213\342\206$+E\236K+;\212\311\341\222\210\271\242\241i\306'\304\251\272\244Y\262\302!,b\245\254\350\030E\007\0068\370\024J\n\227\255(za\267\242pEE\304\226\t\273\252\001iE\221\324\242*\211X5t\237\021\371BeK\341\260\301\330K*\302\206\tD\032g*\"2t4\005\200\006<\333\n\247\226+\206\211\021\207J\206\245\311\334\206\002W\310\320\266\025\031\354\001Q*b2\014SV\3149\337\234X\224K\025\341\n\324\033\226)\201)\206\2169\025q\353\213Y\200\315\262\210\247\350\265\336\325\202\rF\017\004\023\276<\3700.Y5\025\t\254\333e\330\007\321\023,\330\250D4e[\321:\341\241\2163\352\207'\251+\242\251P[\016\2232\332W\ng\350\332.\207\254\n\365\227\213q\267\267U\261M\230P\315IN\324e0\200Q\377\371\216\217\274\025#\237\205\373\221\331\350\373\310\207\273\343\311\035\2104\206\240LLNpb\021C\356X\002t\261\254t\357nO@\000!\002\312)\227'1\233\332n\245\304I\232\210\32019_\271\233h~\2029\245\230eU\207\264\202y\206\276[6,\304mh\206\264\325%\276q\214\020aS\3257\227\216\tG\\\331B\230\223 \373P\016\234Q\3444\005\003\023\324\202\254n\252\030vK\207\034#\t\314\237\342*\212\251\0322\244\235+\201\034E?T\256\262\001\302t\243]\267\334_\255 \376u\250p\2478\245\0142iN\312\234\210\"*\212\246\325\215{4\345\005\303\320\320=\250b\212\320\250\330he\027\220\\Y\324w!\241\222e\"V\230\276T\264\256+mW\245\222h\212\000\231s\334M\363\306\273\013\003\037\270\376\013\003S\363s\221\273\023_\276\276\373\360\364\331\355\311\177\013w\357\314E\377\374\026~/D\001\002\340^\344\217\013c\267'\337?\217F\236\266\232\007=\373\372\036\335\201\357\274\205\213\221'\021\244n\372\335\271\264\234\372\317\213\364J&\273\232[\313\027\326_\276z\375\346\255\337\261\233%\365\343\226V\326\215J\325D\330\332\376\264\263\373\231\317d3oV\262\353ya!\235\215\277\210/\363kB\"""\265\224*\010\014\\N\276>tJ'\013\205\344\232\017g\370\225\244\020\317f\n\251\314:_He3\207\320\371\002\277\326b\311$_\245S\231\244\177\310\277YY\310\246}\370\325r\252\220\314\257\362q\270K%\342\331\225\225d\246\260\230J'\251\204\305t\226/,\372\216B\214\223\246i\230\335c\332\360\207\305R\372\315\352r<\315\347\363`&\237H\306S+|:\345\307\\\006\362\214\201\027\r\250\010\037\005\005\305*\340\350)*\010\252\256bA8\211\206$\235\202\206T\236\244.\213[\212\300\n\341\370\r%?\206B\222\250\013\235V\020X+\260\233\243\006\035\265\343\250z\377\244\265\342 tUu!\341\037\224\3717\3066\010?t\266t\254j\302J6\221\024\332\271\360O\231\354\032\004\227\245\267\225R\037\223Y_YH\256\371k>c\350G}=\201\350x\220\215\027@\234\260\272\273\003\277\204*a!\003\3705\245\270\226\024\272y\315\027\326R\231%\277l\304\n<\037\262\210vuI5\242\320\342\206\205U]A\202\300&\204\260\251`\010U\231\036\001\rA\0240t\232\262!J[\222f \205.`\206dhVY\227\214r\005\206\0314\252@;\022\366\212\210K\262\210E\230\346t\326\010\202lH\202\240\000%5^1\315V\337\321\031x\010\244lt\027\014Sh\303\224\277\275\013\02406>\026\331\241\2351\377\204\215-\245\r\302\263\330\231,Q\177\262D\025Z\366'\260\254\314Nb\333\265 \024-\035\014\207hH\237d6\236YxZ\243\250\373X\264\313LP\221\320\t\246\212\304\rD\243\210\332u\367\321Pu\246\221-H\320T\030\212,\300l\201qi\342\216[]@(\213*[;}\001/\252T*\213;\250\242Q\265e\005\213~\336\204\262!C\270\351fi\024\020\312\246\001\201\207'\200&\327O\206\277\266\213\207\255ta\000M D\230\276\301P!\006\252\320<T\014x$\201]\250\230\n}Q)s\325\0225_\220i*\3607B6\225M\030\314\247\265H\2679\016\265\005R\264\242\000+n\231\003\020LU\321\3220s\212\305\202\276\037\252\004\336\225\014\031\376\262T\004\021\373\217\031]+\310\332\300\342\246 \300_\034L\327\035L\177\014\2000\351\233\270\344\027\005[XQl\213\232*\303b)h\347\365w\276\3317dO\333\237\235`\263\357\342\236d\217\330\325f_`/Mz\3100\021)\370\302\256\222s$\327\354\013\332\243\3442\231&&\245\035\264\317\330\267\200h\324\t9/\335\230\233\360\006j\223\365X\263\357\347\275\207{""\342\336'[\"\301f\340\262}\017\210\007\237\327\317\324o\326\253\007 -e\347}\321\244J\205\234k\014O8\226\313\273\005/\370\235?\000\356\307v\330~\006L\201a\373-\371\346\346\016\002#\366G\347\242+6\001\220I\230\3149\353\356\244\007\232.\201\026\205\304\250\003\217\001?\353,\273<\325\037k\006\206\354\031P\017\024\226\315\333/I\214\272\031\330K\330=\324\311\r0}\334\326\235\204\333\353.za\357\241'\325@_\320\016R\242e\233\377\007\352\315Z\356$u'J\235h\016\332\2756Om\300v\214\236\316\3321\233\3317c\017\001\000\261\211\320\030P\372*\001U!;\001\221\031\201\360\2168\333\356\232kz\227\275\371\232Hc2k\307!-\201A\273\237\006u\320\036 a\272]\"\330\001gCv\222\\sf\334`\363(\3510\371\350\236u\347\274\334\377\312\022 <Yw\302\355\353i\247\352\366y\275\336r\215%f\232%\225\026E\340\322\336.9\013\221\037\034\261\r'\327\270\265T\357\360\203\262+6&1\222p\006\334q\267\350-x[\365\340I\226\305\272x\310\241~_.\325\373\013D\272\307\035\001\367C^\2416R3\353\241z\256\035\004\213\211\035s\327\275\360!\356\237A]\222\226\014\345\037!\310\t3\333\377\345n\200\365\211Z_\375\\=\327<%\214\035\276\253$Dr\244\350,82\330\314\034DP\206OY\251\267-\216Cu\007h6\037\221\213N\021J6\327\272j\206\206\017\340\313\264_w40\255c-\177\272\225\211V\343\344\250\300m\332\021\315\301\220\235\352\006\377\212s\336\251\266\305`\350\271\317\356\220\313\377\235\313\2779\310\r\273\323n\325\353\253\365\326\226\353\311\375\340q\336\244w\222m\324\031rx\247\340\006\335\333\336\270W\252\311\365\343\226w\310\251\3333d\210,:c\214a\334\335\364\3625\260z\024\212\376\215#1\224\350\356x\270\366\244\376h\277\247\315\314\237\242t\330\021\035\014\023c\031R\323_\377;K\217\373\371\177\260\340p\272(\341U\347\216?P\216\327M\253\316}\223\350D\374\006\343+\344\275\254\305j\211\372\371:\332\017\373\351\314\035\014^e\367U\326\0132L\217\231\332\345\332t\r\327g\366/\357\307\332\306\227\\\361\240]e/\000\rS\307 \271\306o\263@<W\317\371\003f\205\260\201\223\262s\255\271C\267,\035\177md#\360+\211\203\256\036\037\265N\302\2243h\207`\002> \005\347:\364\003""\334]j\\\n;Ag\334\331\362\206\274L}\274^\332\027)\341\305=\331\016\373\325\331\347\234\241\225x\2419\370+Yr\346\231\345\261\346P\210\272\265\014-\010ag)\371B\306\240fo\261\3118\006s\006\310W\032\223s\265\2335\253\3167\007\207\354y\262\t\323:\334\014]#\367\334`\343\316\363z\317\217\276\237\202!\373\001\230w\313\351\201\234\204~!\261\203\020\235\031O\235O\320{\2437\3004\261y\365z\343z\024r\234\243\210\033N\322\035\365\202P\245\342\217\300OW\307\000\261\344\306(\353\003\320\177\023z\275\037\252\006\364=\264E\0204\347\344\335\236\216\316\024t\003\230\033\032\005\267\240\253\300\330t\255\007\006\376\340\225\306\225)Hp\350Z\343Z\304\315\271\345\306\374jc\025r6J\002L<D\244\354?\035\375\315\300(9O\276\260\201\306w=\0177\333\304\337\331\244\257~o\017|\026Dp\257\215x\002\226\2565~\237\366x/\327\306\315\022\276\321;\341T\177\204~\352\277\300\036\220^\222\206\331\027d\271\374\035&\365\023(\322\005\227\275\302\031\022\376/\375[\204D";
- PyObject *data = __Pyx_DecompressString(cstring, 2392, 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 (4417 bytes) */
- const char* const bytes = "\n001234567890123456789ABCDEFabcdefA Lexer that follows include statements.\n\n The OpenType feature file specification states that due to\n historical reasons, relative imports should be resolved in this\n order:\n\n 1. If the source font is UFO format, then relative to the UFO's\n font directory\n 2. relative to the top-level include file\n 3. relative to the parent include file\n\n We only support 1 (via includeDir) and 2.\n ^[A-Za-z_0-9.\\-]+$Expected ')' after file nameExpected '(' before file nameExpected file nameExpected glyph class nameExpected '} %s;' to terminate anonymous blockExpected '\"' to terminate stringGlyph class names must consist of letters, digits, underscore, period or hyphenLexer that does not follow `include` statements, emits them as-is.Lib/fontTools/feaLib/lexer.pyToo many recursive includesUnexpected character: %r\"[\r\n] \t\r\n,;:-+'{}[]<>()=_+*:.^~!\\_.+*:^~!/-?\r#()\\@.-<features>}\\s*\\s*;utf-8-sigABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzANONYMOUS_BLOCKCHAR_DIGIT_CHAR_HEXDIGIT_CHAR_LETTER_CHAR_NAME_CONTINUATION_CHAR_NAME_START_CHAR_NEWLINE_CHAR_SYMBOL_CHAR_WHITESPACE_CIDCOMMENTFILENAMEFLOATFeatureLibErrorFeatureLibLocationGLYPHCLASSHEXADECIMALIncludedFeaNotFoundIncludingLexerIncludingLexer.__init__IncludingLexer.__iter__IncludingLexer.__next__IncludingLexer.make_lexer_IncludingLexer.nextIncludingLexer.scan_anonymous_blockLexerLexer.__init__Lexer.__iter__Lexer.__next__Lexer.location_Lexer.nextLexer.next_Lexer.scan_anonymous_blockLexer.scan_over_Lexer.scan_until_MODE_FILENAME_MODE_NORMAL_NAMENEWLINENORMALNUMBERNUMBERSNonIncludingLexerNonIncludingLexer.__next__OCTAL__Pyx_PyDict_NextRefRE_GLYPHCLASSSTRINGSYMBOLappendasyncio.coroutines__class_getitem__cline_in_tracebackcloseclosingcolumncompilecur_charcurpathdatadirname__doc__encodingerrfeaturefilefeaturefilepathfile_or_pathfilenamefilename_fileobjfname_locationfname_tokenfname_typefontTools.feaLib.errorfontTools.feaLib.lexerfontTools.feaLib.locati""on__func__getcwdglyphclassincludeincludeDir__init___is_coroutineisabsitems__iter__joinlexerlexers_limitline_line_start_location_location__main__make_lexer_matchmaxsplit__metaclass__mode___module____mro_entries__name__name____next__next_nextnext_charobjectopenosppathpoppos___prepare____qualname__rrereadregexpscan_anonymous_blockscan_over_scan_until_self__set_name__setdefaultsplitstartstaticmethodstop_atstringstripsubtag__test__texttext_text_length_tokentoken_typevalidvaluesxX\200A\330\010\023\2204\220z\240\021\330\010\016\210c\220\026\220q\330\010\014\210L\230\001\230\025\230a\330\010\014\210K\220q\230\005\230Q\330\010\021\220\030\230\022\2304\230r\240\021\330\010\020\220\002\220&\230\001\230\030\240\024\240V\2501\250D\260\n\270)\3001\330\010\013\2103\210a\210w\220c\230\021\330\014\022\220/\240\021\330\020@\300\002\300%\300q\340\010\014\210I\220S\230\001\230\025\230a\230q\330\010\020\220\005\320\025'\240u\250A\250T\260\021\200A\340\010\013\2107\220!\220>\240\021\330\014\025\220Z\230~\250Q\340\014\026\220j\240\016\250a\330\014\026\220d\230!\230:\240U\250)\2601\330\010\017\210w\220e\2301\330\010\023\2207\230!\2309\240H\250A\330\010\013\2101\330\014\023\2206\230\021\330\010\017\210u\220A\220V\2301\200A\330\010\014\210D\220\001\330\010\016\210b\220\002\220$\220n\240D\250\004\250F\260!\2603\260c\270\021\330\014\021\220\021\330\010\014\210H\220A\200A\330\010\014\210D\220\001\330\010\016\210b\220\002\220$\220n\240D\250\004\250F\260!\2603\260g\270Q\330\014\021\220\021\330\010\014\210H\220A\200A\330\010\014\210K\220q\230\005\230Q\330\010\023\2204\220z\240\021\330\010\020\220\004\220A\330\010\017\210t\2201\330\010\020\220\003\2201\220A\330\010\013\2106\220\023\220A\330\014\022\220-\230q\330\010\023\2204\220q\230\001\330\010\024\220D\230\001\230\026\230r\240\026\240v\250R\250r\260\022\260;\270a\340\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\n\230!\330\014\020\220\017\230t\2401\330\014\024\220E\230\032\2406\250\021\330\010\013\2109\220C\220q\330\014\020""\220\t\230\025\230j\250\003\250:\260Q\330\014\020\220\n\230!\330\014\020\220\017\230t\2401\330\014\024\220E\230\032\2406\250\021\330\010\013\2109\220C\220q\330\014\020\220\014\230A\230U\240!\330\014\024\220E\230\032\2404\240q\250\010\260\004\260H\270A\340\010\013\2104\210w\220c\230\025\230a\330\014\017\210y\230\003\2301\330\020\026\220o\240Q\320&G\300q\330\014\020\220\014\230A\230Q\330\014\027\220t\2301\230D\240\n\250$\250f\260B\260k\300\021\330\014\017\210y\230\003\2301\330\020\026\220o\240Q\320&F\300a\330\014\020\220\t\230\021\330\014\020\220\t\230\025\230a\330\014\024\220E\230\033\240D\250\001\250\026\250r\260\024\260T\270\026\270r\300\024\300Q\340\010\013\2109\220C\220u\230D\240\n\250#\250U\260!\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\026\230s\240!\2404\240q\250\006\250b\260\004\260D\270\010\300\005\300Q\330\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\031\230\024\230Q\230f\240B\240d\250$\250a\330\014\017\210s\220!\220<\230r\240\021\330\020\026\220o\240Q\320&C\3001\330\014\017\210t\2205\230\016\240f\250A\250Q\330\020\026\220o\240Q\330\024\025\340\024\025\340\014\024\220E\230\035\240l\260!\330\010\013\2109\220C\220u\230A\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220D\230\001\230\030\240\024\240Q\330\014\017\210v\220S\230\001\330\020\024\220I\230U\240!\330\014\024\220E\230\027\240\007\240q\330\010\013\2109\220C\220t\2304\230z\250\023\250A\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\036\240s\250!\2504\250q\260\010\270\004\270H\300E\310\021\330\010\013\2109\220C\220t\2304\230z\250\023\250E\260\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\023\240A\240T\250\021\250(\260$\260h\270d\300!\330\010\013\2109\220C\220u\230A\330\014\020\220\013\2301\230E\240\021\330\014\017\210t\2206\230\023\230F\240#\240T\250\021\250$\250g\260S\270\001\330\020\030\230\005\230Y\240c\250\021\250$\250a""\250x\260t\2708\3005\310\001\330\014\020\220\013\2301\230A\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\025\240a\240t\2501\250H\260D\270\t\300\021\330\010\013\2109\220C\220t\2304\230z\250\023\250E\260\021\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\017\210t\2206\230\023\230F\240#\240T\250\021\250$\250g\260S\270\001\330\020\030\230\005\230Y\240c\250\021\250$\250a\250x\260t\2708\3005\310\001\330\014\020\220\013\2301\230A\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\025\240a\240t\2501\250H\260D\270\t\300\021\330\010\013\2109\220C\220u\230A\330\014\020\220\t\230\021\330\014\024\220E\230\031\240*\250A\330\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\014\230A\230Q\330\014\017\210t\2206\230\022\2304\230~\250T\260\024\260V\2701\270D\300\007\300s\310!\330\020\024\220I\230Q\340\020\031\230\022\2304\230q\240\n\250$\250d\260!\2606\270\022\2704\270t\3006\310\022\3101\330\020\030\230\005\230Y\240h\250a\340\020\026\220o\240Q\320&K\3101\330\010\016\210o\230Q\320\0369\270\022\270:\300Q\200A\330\010\014\210M\230\021\330\010\014\210I\220Q\330\010\014\210H\220A\330\010\014\210O\2301\330\010\014\210I\220Q\330\010\014\320\014\034\230C\230q\240\001\330\010\014\210I\220U\230!\200A\330\010\021\220\024\220V\2302\230T\240\035\250b\260\001\330\010\017\320\017!\240\021\240$\240k\260\023\260N\300$\300h\310a\200A\330\010\016\210d\220!\330\014\024\220D\230\010\240\002\240!\330\014\r\330\020\034\230G\240;\250d\260!\2601\330\023\024\330\020\024\220H\230D\240\001\330\020\021\330\014\017\210{\230#\230U\240&\250\004\250F\260#\260Q\330\020\034\230M\320):\270%\270u\300A\330\020\023\220;\230g\240U\250!\330\024\032\230/\250\021\320*@\300\001\360\010\000\021\024\2202\220U\230&\240\001\240\021\330\024\033\2301\340\024\027\220t\230<\240w\250a\330\030\"\240$\240a\330\031\035\320\035.\250g\260Q\330\030\"\240\"\240E\250\030\260\021\260$\260a\360\014\000\031#\240\"\240G\2501\330\024\033\2302\230U\240%\240q\250\t\260\021""\330\020\023\2203\220a\220t\230:\240S\250\001\330\024\032\230/\250\021\320*I\310\021\330\020\021\330\024\030\230\010\240\007\240q\250\004\250L\270\001\270\021\330\020\027\320\027,\250A\330\024\032\320\032-\250Q\250m\320;P\320PQ\340\020\030\230\014\240G\2501\330\010\016\210m\2301\200A\330\010\t\330\014\030\230\007\230{\250$\250f\260A\330\014\017\210{\230#\230U\240!\330\020\030\230\014\240G\2501\200A\330\010\017\210q\200A\330\010\017\210t\2201\220D\230\010\240\001\240\021\200A\330\010\017\210t\2208\2302\230R\320\0374\260A\260Q\200A\330\010\017\210t\2209\230A\320\004'\240q\360\024\000\t\r\210K\220q\230\004\230L\250\001\250\021\330\010\014\320\014\037\230t\2408\2501\250B\250a\330\010\014\210N\230!";
- 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 < 183; i++) {
- Py_ssize_t bytes_length = index[i].length;
- PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
- if (likely(string) && i >= 38) 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 = 183; i < 197; 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 < 197; i++) {
- if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
- __PYX_ERR(0, 1, __pyx_L1_error)
- }
- }
- #if CYTHON_IMMORTAL_CONSTANTS
- {
- PyObject **table = stringtab + 183;
- for (Py_ssize_t i=0; i<14; ++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,8,10,16};
- for (int i = 0; i < 6; 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<6; ++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 : 2;
- unsigned int num_posonly_args : 1;
- unsigned int num_kwonly_args : 1;
- unsigned int nlocals : 4;
- 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 = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_filename};
- __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_M_IQ_HA_O1_IQ_Cq_IU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 52};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
- __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 55};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
- __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_3, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 58};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_token_type, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_location_2};
- __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_fA_U_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column};
- __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_location, __pyx_mstate->__pyx_kp_b_iso88591_A_V2T_b_k_N_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 68};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_limit, __pyx_mstate->__pyx_n_u_cur_char, __pyx_mstate->__pyx_n_u_next_char, __pyx_mstate->__pyx_n_u_glyphclass, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_string};
- __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_2, __pyx_mstate->__pyx_kp_b_iso88591_A_Kq_Q_4z_A_t1_1A_6_A_q_4q_D_r_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_valid, __pyx_mstate->__pyx_n_u_p};
- __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_over, __pyx_mstate->__pyx_kp_b_iso88591_A_D_b_nD_F_3c_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 171};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stop_at, __pyx_mstate->__pyx_n_u_p};
- __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_until, __pyx_mstate->__pyx_kp_b_iso88591_A_D_b_nD_F_3gQ_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_regexp, __pyx_mstate->__pyx_n_u_split};
- __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_anonymous_block, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_c_q_L_a_Kq_Q_4r_V1D_1_3awc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_featurefile, __pyx_mstate->__pyx_n_u_includeDir};
- __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq_L_t81Ba_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 221};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
- __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
- __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_3, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 227};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lexer, __pyx_mstate->__pyx_n_u_token_type, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_fname_type, __pyx_mstate->__pyx_n_u_fname_token, __pyx_mstate->__pyx_n_u_fname_location, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_curpath, __pyx_mstate->__pyx_n_u_err};
- __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_d_D_G_d_1_HD_U_F_Q_M_uA_gU_2U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_or_path, __pyx_mstate->__pyx_n_u_fileobj, __pyx_mstate->__pyx_n_u_closing, __pyx_mstate->__pyx_n_u_filename, __pyx_mstate->__pyx_n_u_data};
- __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_make_lexer, __pyx_mstate->__pyx_kp_b_iso88591_A_7_Z_Q_j_a_d_U_1_we1_7_9HA_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 279};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag};
- __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_anonymous_block, __pyx_mstate->__pyx_kp_b_iso88591_A_t82R_4AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
- }
- {
- const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 286};
- PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
- __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) 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
- /* 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
- /* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
- #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
- /* 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 */
- 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;
- }
- /* 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);
- }
- /* 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);
- }
- /* 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
- /* 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);
- }
- /* 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
- /* 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();
- }
- /* PyLongBinop */
- #if !CYTHON_COMPILING_IN_PYPY
- static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
- return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
- }
- #if CYTHON_USE_PYLONG_INTERNALS
- static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
- CYTHON_MAYBE_UNUSED_VAR(inplace);
- CYTHON_UNUSED_VAR(zerodivision_check);
- const long b = intval;
- long a;
- const PY_LONG_LONG llb = intval;
- PY_LONG_LONG lla;
- if (unlikely(__Pyx_PyLong_IsZero(op1))) {
- return __Pyx_NewRef(op2);
- }
- const int is_positive = __Pyx_PyLong_IsPos(op1);
- const digit* digits = __Pyx_PyLong_Digits(op1);
- const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
- if (likely(size == 1)) {
- a = (long) digits[0];
- if (!is_positive) a *= -1;
- } else {
- switch (size) {
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- }
- return PyLong_Type.tp_as_number->nb_add(op1, op2);
- }
- calculate_long:
- {
- long x;
- x = a + b;
- return PyLong_FromLong(x);
- }
- calculate_long_long:
- {
- PY_LONG_LONG llx;
- llx = lla + llb;
- return PyLong_FromLongLong(llx);
- }
-
- }
- #endif
- static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
- CYTHON_UNUSED_VAR(zerodivision_check);
- const long b = intval;
- double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
- double result;
-
- result = ((double)a) + (double)b;
- return PyFloat_FromDouble(result);
- }
- static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
- CYTHON_MAYBE_UNUSED_VAR(intval);
- CYTHON_UNUSED_VAR(zerodivision_check);
- #if CYTHON_USE_PYLONG_INTERNALS
- if (likely(PyLong_CheckExact(op1))) {
- return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
- }
- #endif
- if (PyFloat_CheckExact(op1)) {
- return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
- }
- return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
- }
- #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;
- }
- /* GetItemInt */
- static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
- PyObject *r;
- if (unlikely(!j)) return NULL;
- r = PyObject_GetItem(o, j);
- Py_DECREF(j);
- return r;
- }
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck, int unsafe_shared) {
- CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
- #if CYTHON_ASSUME_SAFE_SIZE
- Py_ssize_t wrapped_i = i;
- if (wraparound & unlikely(i < 0)) {
- wrapped_i += PyList_GET_SIZE(o);
- }
- if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
- return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
- } else
- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
- return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
- }
- return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
- #else
- (void)wraparound;
- (void)boundscheck;
- return PySequence_GetItem(o, i);
- #endif
- }
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck, int unsafe_shared) {
- CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
- #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- Py_ssize_t wrapped_i = i;
- if (wraparound & unlikely(i < 0)) {
- wrapped_i += PyTuple_GET_SIZE(o);
- }
- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
- return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
- }
- return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
- #else
- (void)wraparound;
- (void)boundscheck;
- return PySequence_GetItem(o, i);
- #endif
- }
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
- int wraparound, int boundscheck, int unsafe_shared) {
- CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
- #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- if (is_list || PyList_CheckExact(o)) {
- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
- if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
- return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
- } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
- return __Pyx_NewRef(PyList_GET_ITEM(o, n));
- }
- } else
- #if !CYTHON_AVOID_BORROWED_REFS
- if (PyTuple_CheckExact(o)) {
- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
- return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
- }
- } else
- #endif
- #endif
- #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
- {
- PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
- PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
- if (!is_list && mm && mm->mp_subscript) {
- PyObject *r, *key = PyLong_FromSsize_t(i);
- if (unlikely(!key)) return NULL;
- r = mm->mp_subscript(o, key);
- Py_DECREF(key);
- return r;
- }
- if (is_list || likely(sm && sm->sq_item)) {
- if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
- Py_ssize_t l = sm->sq_length(o);
- if (likely(l >= 0)) {
- i += l;
- } else {
- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
- return NULL;
- PyErr_Clear();
- }
- }
- return sm->sq_item(o, i);
- }
- }
- #else
- if (is_list || !PyMapping_Check(o)) {
- return PySequence_GetItem(o, i);
- }
- #endif
- (void)wraparound;
- (void)boundscheck;
- return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
- }
- /* ObjectGetItem */
- #if CYTHON_USE_TYPE_SLOTS
- static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
- PyObject *runerr = NULL;
- Py_ssize_t key_value;
- key_value = __Pyx_PyIndex_AsSsize_t(index);
- if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
- return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
- }
- if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
- __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
- PyErr_Clear();
- PyErr_Format(PyExc_IndexError,
- "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
- __Pyx_DECREF_TypeName(index_type_name);
- }
- return NULL;
- }
- static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
- __Pyx_TypeName obj_type_name;
- if (likely(PyType_Check(obj))) {
- PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
- if (!meth) {
- PyErr_Clear();
- } else {
- PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
- Py_DECREF(meth);
- return result;
- }
- }
- obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
- PyErr_Format(PyExc_TypeError,
- "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
- __Pyx_DECREF_TypeName(obj_type_name);
- return NULL;
- }
- static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
- PyTypeObject *tp = Py_TYPE(obj);
- PyMappingMethods *mm = tp->tp_as_mapping;
- PySequenceMethods *sm = tp->tp_as_sequence;
- if (likely(mm && mm->mp_subscript)) {
- return mm->mp_subscript(obj, key);
- }
- if (likely(sm && sm->sq_item)) {
- return __Pyx_PyObject_GetIndex(obj, key);
- }
- return __Pyx_PyObject_GetItem_Slow(obj, key);
- }
- #endif
- /* SliceObject */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
- Py_ssize_t cstart, Py_ssize_t cstop,
- PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
- int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
- __Pyx_TypeName obj_type_name;
- #if CYTHON_USE_TYPE_SLOTS
- PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
- if (likely(mp && mp->mp_subscript))
- #endif
- {
- PyObject* result;
- PyObject *py_slice, *py_start, *py_stop;
- if (_py_slice) {
- py_slice = *_py_slice;
- } else {
- PyObject* owned_start = NULL;
- PyObject* owned_stop = NULL;
- if (_py_start) {
- py_start = *_py_start;
- } else {
- if (has_cstart) {
- owned_start = py_start = PyLong_FromSsize_t(cstart);
- if (unlikely(!py_start)) goto bad;
- } else
- py_start = Py_None;
- }
- if (_py_stop) {
- py_stop = *_py_stop;
- } else {
- if (has_cstop) {
- owned_stop = py_stop = PyLong_FromSsize_t(cstop);
- if (unlikely(!py_stop)) {
- Py_XDECREF(owned_start);
- goto bad;
- }
- } else
- py_stop = Py_None;
- }
- py_slice = PySlice_New(py_start, py_stop, Py_None);
- Py_XDECREF(owned_start);
- Py_XDECREF(owned_stop);
- if (unlikely(!py_slice)) goto bad;
- }
- #if CYTHON_USE_TYPE_SLOTS
- result = mp->mp_subscript(obj, py_slice);
- #else
- result = PyObject_GetItem(obj, py_slice);
- #endif
- if (!_py_slice) {
- Py_DECREF(py_slice);
- }
- return result;
- }
- obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
- PyErr_Format(PyExc_TypeError,
- "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
- __Pyx_DECREF_TypeName(obj_type_name);
- bad:
- return NULL;
- }
- /* PyLongBinop */
- #if !CYTHON_COMPILING_IN_PYPY
- static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
- return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
- }
- #if CYTHON_USE_PYLONG_INTERNALS
- static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
- CYTHON_MAYBE_UNUSED_VAR(inplace);
- CYTHON_UNUSED_VAR(zerodivision_check);
- const long b = intval;
- long a;
- const PY_LONG_LONG llb = intval;
- PY_LONG_LONG lla;
- if (unlikely(__Pyx_PyLong_IsZero(op1))) {
- return PyLong_FromLong(-intval);
- }
- const int is_positive = __Pyx_PyLong_IsPos(op1);
- const digit* digits = __Pyx_PyLong_Digits(op1);
- const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
- if (likely(size == 1)) {
- a = (long) digits[0];
- if (!is_positive) a *= -1;
- } else {
- switch (size) {
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
- if (!is_positive) a *= -1;
- goto calculate_long;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
- if (!is_positive) lla *= -1;
- goto calculate_long_long;
- }
- break;
- }
- return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
- }
- calculate_long:
- {
- long x;
- x = a - b;
- return PyLong_FromLong(x);
- }
- calculate_long_long:
- {
- PY_LONG_LONG llx;
- llx = lla - llb;
- return PyLong_FromLongLong(llx);
- }
-
- }
- #endif
- static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
- CYTHON_UNUSED_VAR(zerodivision_check);
- const long b = intval;
- double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
- double result;
-
- result = ((double)a) - (double)b;
- return PyFloat_FromDouble(result);
- }
- static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
- CYTHON_MAYBE_UNUSED_VAR(intval);
- CYTHON_UNUSED_VAR(zerodivision_check);
- #if CYTHON_USE_PYLONG_INTERNALS
- if (likely(PyLong_CheckExact(op1))) {
- return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
- }
- #endif
- if (PyFloat_CheckExact(op1)) {
- return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
- }
- return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
- }
- #endif
- /* pybytes_as_double (used by pynumber_float) */
- static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
- PyObject *float_value = PyFloat_FromString(obj);
- if (likely(float_value)) {
- double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
- Py_DECREF(float_value);
- return value;
- }
- return (double)-1;
- }
- static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
- int last_was_punctuation = 1;
- int parse_error_found = 0;
- Py_ssize_t i;
- for (i=0; i < length; i++) {
- char chr = start[i];
- int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
- *buffer = chr;
- buffer += (chr != '_');
- parse_error_found |= last_was_punctuation & is_punctuation;
- last_was_punctuation = is_punctuation;
- }
- parse_error_found |= last_was_punctuation;
- *buffer = '\0';
- return unlikely(parse_error_found) ? NULL : buffer;
- }
- static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
- int matches = 1;
- char sign = start[0];
- int is_signed = (sign == '+') | (sign == '-');
- start += is_signed;
- length -= is_signed;
- switch (start[0]) {
- #ifdef Py_NAN
- case 'n':
- case 'N':
- if (unlikely(length != 3)) goto parse_failure;
- matches &= (start[1] == 'a' || start[1] == 'A');
- matches &= (start[2] == 'n' || start[2] == 'N');
- if (unlikely(!matches)) goto parse_failure;
- return (sign == '-') ? -Py_NAN : Py_NAN;
- #endif
- case 'i':
- case 'I':
- if (unlikely(length < 3)) goto parse_failure;
- matches &= (start[1] == 'n' || start[1] == 'N');
- matches &= (start[2] == 'f' || start[2] == 'F');
- if (likely(length == 3 && matches))
- return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
- if (unlikely(length != 8)) goto parse_failure;
- matches &= (start[3] == 'i' || start[3] == 'I');
- matches &= (start[4] == 'n' || start[4] == 'N');
- matches &= (start[5] == 'i' || start[5] == 'I');
- matches &= (start[6] == 't' || start[6] == 'T');
- matches &= (start[7] == 'y' || start[7] == 'Y');
- if (unlikely(!matches)) goto parse_failure;
- return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
- case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
- break;
- default:
- goto parse_failure;
- }
- return 0.0;
- parse_failure:
- return -1.0;
- }
- static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
- return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
- }
- CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
- double value;
- Py_ssize_t i, digits;
- const char *last = start + length;
- char *end;
- while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
- start++;
- while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
- last--;
- length = last - start;
- if (unlikely(length <= 0)) goto fallback;
- value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
- if (unlikely(value == -1.0)) goto fallback;
- if (value != 0.0) return value;
- digits = 0;
- for (i=0; i < length; digits += start[i++] != '_');
- if (likely(digits == length)) {
- value = PyOS_string_to_double(start, &end, NULL);
- } else if (digits < 40) {
- char number[40];
- last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
- if (unlikely(!last)) goto fallback;
- value = PyOS_string_to_double(number, &end, NULL);
- } else {
- char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
- if (unlikely(!number)) goto fallback;
- last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
- if (unlikely(!last)) {
- PyMem_Free(number);
- goto fallback;
- }
- value = PyOS_string_to_double(number, &end, NULL);
- PyMem_Free(number);
- }
- if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
- return value;
- }
- fallback:
- return __Pyx_SlowPyString_AsDouble(obj);
- }
- /* pynumber_float */
- static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
- double val;
- if (PyLong_CheckExact(obj)) {
- #if CYTHON_USE_PYLONG_INTERNALS
- if (likely(__Pyx_PyLong_IsCompact(obj))) {
- val = (double) __Pyx_PyLong_CompactValue(obj);
- goto no_error;
- }
- #endif
- val = PyLong_AsDouble(obj);
- } else if (PyUnicode_CheckExact(obj)) {
- val = __Pyx_PyUnicode_AsDouble(obj);
- } else if (PyBytes_CheckExact(obj)) {
- val = __Pyx_PyBytes_AsDouble(obj);
- } else if (PyByteArray_CheckExact(obj)) {
- val = __Pyx_PyByteArray_AsDouble(obj);
- } else {
- return PyNumber_Float(obj);
- }
- if (unlikely(val == -1 && PyErr_Occurred())) {
- return NULL;
- }
- #if CYTHON_USE_PYLONG_INTERNALS
- no_error:
- #endif
- return PyFloat_FromDouble(val);
- }
- /* PyObjectVectorCallKwBuilder */
- #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
- /* IterNextPlain (used by IterNext) */
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
- if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
- __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next_3);
- return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
- }
- #endif
- static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
- #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
- PyObject *result;
- PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
- if (unlikely(!next)) return NULL;
- result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
- return result;
- #else
- (void)__Pyx_GetBuiltinName; // only for early limited API
- iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
- assert(iternext);
- return iternext(iterator);
- #endif
- }
- /* IterNext */
- static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
- PyObject* exc_type;
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- exc_type = __Pyx_PyErr_CurrentExceptionType();
- if (unlikely(exc_type)) {
- if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
- return NULL;
- __Pyx_PyErr_Clear();
- Py_INCREF(defval);
- return defval;
- }
- if (defval) {
- Py_INCREF(defval);
- return defval;
- }
- __Pyx_PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
- static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
- __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator));
- PyErr_Format(PyExc_TypeError,
- __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
- __Pyx_DECREF_TypeName(iterator_type_name);
- }
- static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
- PyObject* next;
- #if !CYTHON_COMPILING_IN_LIMITED_API
- iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc);
- if (likely(iternext)) {
- next = iternext(iterator);
- if (likely(next))
- return next;
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
- if (unlikely(iternext == &_PyObject_NextNotImplemented))
- return NULL;
- #endif
- } else if (CYTHON_USE_TYPE_SLOTS) {
- __Pyx_PyIter_Next_ErrorNoIterator(iterator);
- return NULL;
- } else
- #endif
- if (unlikely(!PyIter_Check(iterator))) {
- __Pyx_PyIter_Next_ErrorNoIterator(iterator);
- return NULL;
- } else {
- next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator);
- if (likely(next))
- return next;
- }
- return __Pyx_PyIter_Next2Default(defval);
- }
- /* GetTopmostException (used by SaveResetException) */
- #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
- static _PyErr_StackItem *
- __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
- {
- _PyErr_StackItem *exc_info = tstate->exc_info;
- while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
- exc_info->previous_item != NULL)
- {
- exc_info = exc_info->previous_item;
- }
- return exc_info;
- }
- #endif
- /* SaveResetException */
- #if CYTHON_FAST_THREAD_STATE
- static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
- #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
- PyObject *exc_value = exc_info->exc_value;
- if (exc_value == NULL || exc_value == Py_None) {
- *value = NULL;
- *type = NULL;
- *tb = NULL;
- } else {
- *value = exc_value;
- Py_INCREF(*value);
- *type = (PyObject*) Py_TYPE(exc_value);
- Py_INCREF(*type);
- *tb = PyException_GetTraceback(exc_value);
- }
- #elif CYTHON_USE_EXC_INFO_STACK
- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
- *type = exc_info->exc_type;
- *value = exc_info->exc_value;
- *tb = exc_info->exc_traceback;
- Py_XINCREF(*type);
- Py_XINCREF(*value);
- Py_XINCREF(*tb);
- #else
- *type = tstate->exc_type;
- *value = tstate->exc_value;
- *tb = tstate->exc_traceback;
- Py_XINCREF(*type);
- Py_XINCREF(*value);
- Py_XINCREF(*tb);
- #endif
- }
- static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
- #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
- _PyErr_StackItem *exc_info = tstate->exc_info;
- PyObject *tmp_value = exc_info->exc_value;
- exc_info->exc_value = value;
- Py_XDECREF(tmp_value);
- Py_XDECREF(type);
- Py_XDECREF(tb);
- #else
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- #if CYTHON_USE_EXC_INFO_STACK
- _PyErr_StackItem *exc_info = tstate->exc_info;
- tmp_type = exc_info->exc_type;
- tmp_value = exc_info->exc_value;
- tmp_tb = exc_info->exc_traceback;
- exc_info->exc_type = type;
- exc_info->exc_value = value;
- exc_info->exc_traceback = tb;
- #else
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = type;
- tstate->exc_value = value;
- tstate->exc_traceback = tb;
- #endif
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
- #endif
- }
- #endif
- /* GetException */
- #if CYTHON_FAST_THREAD_STATE
- static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
- #else
- static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
- #endif
- {
- PyObject *local_type = NULL, *local_value, *local_tb = NULL;
- #if CYTHON_FAST_THREAD_STATE
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- #if PY_VERSION_HEX >= 0x030C0000
- local_value = tstate->current_exception;
- tstate->current_exception = 0;
- #else
- local_type = tstate->curexc_type;
- local_value = tstate->curexc_value;
- local_tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
- #endif
- #elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
- local_value = PyErr_GetRaisedException();
- #else
- PyErr_Fetch(&local_type, &local_value, &local_tb);
- #endif
- #if __PYX_LIMITED_VERSION_HEX > 0x030C0000
- if (likely(local_value)) {
- local_type = (PyObject*) Py_TYPE(local_value);
- Py_INCREF(local_type);
- local_tb = PyException_GetTraceback(local_value);
- }
- #else
- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
- #if CYTHON_FAST_THREAD_STATE
- if (unlikely(tstate->curexc_type))
- #else
- if (unlikely(PyErr_Occurred()))
- #endif
- goto bad;
- if (local_tb) {
- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
- goto bad;
- }
- #endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
- Py_XINCREF(local_tb);
- Py_XINCREF(local_type);
- Py_XINCREF(local_value);
- *type = local_type;
- *value = local_value;
- *tb = local_tb;
- #if CYTHON_FAST_THREAD_STATE
- #if CYTHON_USE_EXC_INFO_STACK
- {
- _PyErr_StackItem *exc_info = tstate->exc_info;
- #if PY_VERSION_HEX >= 0x030B00a4
- tmp_value = exc_info->exc_value;
- exc_info->exc_value = local_value;
- tmp_type = NULL;
- tmp_tb = NULL;
- Py_XDECREF(local_type);
- Py_XDECREF(local_tb);
- #else
- tmp_type = exc_info->exc_type;
- tmp_value = exc_info->exc_value;
- tmp_tb = exc_info->exc_traceback;
- exc_info->exc_type = local_type;
- exc_info->exc_value = local_value;
- exc_info->exc_traceback = local_tb;
- #endif
- }
- #else
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = local_type;
- tstate->exc_value = local_value;
- tstate->exc_traceback = local_tb;
- #endif
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
- #elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
- PyErr_SetHandledException(local_value);
- Py_XDECREF(local_value);
- Py_XDECREF(local_type);
- Py_XDECREF(local_tb);
- #else
- PyErr_SetExcInfo(local_type, local_value, local_tb);
- #endif
- return 0;
- #if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
- bad:
- *type = 0;
- *value = 0;
- *tb = 0;
- Py_XDECREF(local_type);
- Py_XDECREF(local_value);
- Py_XDECREF(local_tb);
- return -1;
- #endif
- }
- /* PyObjectCallNoArg (used by PyObjectCallMethod0) */
- static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
- PyObject *arg[2] = {NULL, NULL};
- return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
- }
- /* PyObjectGetMethod (used by PyObjectCallMethod0) */
- #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
- static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
- PyObject *attr;
- #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
- __Pyx_TypeName type_name;
- PyTypeObject *tp = Py_TYPE(obj);
- PyObject *descr;
- descrgetfunc f = NULL;
- PyObject **dictptr, *dict;
- int meth_found = 0;
- assert (*method == NULL);
- if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
- attr = __Pyx_PyObject_GetAttrStr(obj, name);
- goto try_unpack;
- }
- if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
- return 0;
- }
- descr = _PyType_Lookup(tp, name);
- if (likely(descr != NULL)) {
- Py_INCREF(descr);
- #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
- if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
- #else
- #ifdef __Pyx_CyFunction_USED
- if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
- #else
- if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
- #endif
- #endif
- {
- meth_found = 1;
- } else {
- f = Py_TYPE(descr)->tp_descr_get;
- if (f != NULL && PyDescr_IsData(descr)) {
- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
- Py_DECREF(descr);
- goto try_unpack;
- }
- }
- }
- dictptr = _PyObject_GetDictPtr(obj);
- if (dictptr != NULL && (dict = *dictptr) != NULL) {
- Py_INCREF(dict);
- attr = __Pyx_PyDict_GetItemStr(dict, name);
- if (attr != NULL) {
- Py_INCREF(attr);
- Py_DECREF(dict);
- Py_XDECREF(descr);
- goto try_unpack;
- }
- Py_DECREF(dict);
- }
- if (meth_found) {
- *method = descr;
- return 1;
- }
- if (f != NULL) {
- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
- Py_DECREF(descr);
- goto try_unpack;
- }
- if (likely(descr != NULL)) {
- *method = descr;
- return 0;
- }
- type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
- PyErr_Format(PyExc_AttributeError,
- "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
- type_name, name);
- __Pyx_DECREF_TypeName(type_name);
- return 0;
- #else
- attr = __Pyx_PyObject_GetAttrStr(obj, name);
- goto try_unpack;
- #endif
- try_unpack:
- #if CYTHON_UNPACK_METHODS
- if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
- PyObject *function = PyMethod_GET_FUNCTION(attr);
- Py_INCREF(function);
- Py_DECREF(attr);
- *method = function;
- return 1;
- }
- #endif
- *method = attr;
- return 0;
- }
- #endif
- /* PyObjectCallMethod0 (used by pop) */
- static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
- #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
- PyObject *args[1] = {obj};
- (void) __Pyx_PyObject_CallOneArg;
- (void) __Pyx_PyObject_CallNoArg;
- return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
- #else
- PyObject *method = NULL, *result = NULL;
- int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
- if (likely(is_method)) {
- result = __Pyx_PyObject_CallOneArg(method, obj);
- Py_DECREF(method);
- return result;
- }
- if (unlikely(!method)) goto bad;
- result = __Pyx_PyObject_CallNoArg(method);
- Py_DECREF(method);
- bad:
- return result;
- #endif
- }
- /* pop */
- static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
- if (__Pyx_IS_TYPE(L, &PySet_Type)) {
- return PySet_Pop(L);
- }
- return __Pyx_PyObject_CallMethod0(L, __pyx_mstate_global->__pyx_n_u_pop);
- }
- #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
- static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
- if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
- __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
- return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
- }
- return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyList_Type_pop, L);
- }
- #endif
- /* PyObjectCall2Args (used by PyObjectCallMethod1) */
- 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);
- }
- /* PyObjectCallMethod1 (used by append) */
- #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
- static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
- PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
- Py_DECREF(method);
- return result;
- }
- #endif
- static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
- #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
- PyObject *args[2] = {obj, arg};
- (void) __Pyx_PyObject_CallOneArg;
- (void) __Pyx_PyObject_Call2Args;
- return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
- #else
- PyObject *method = NULL, *result;
- int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
- if (likely(is_method)) {
- result = __Pyx_PyObject_Call2Args(method, obj, arg);
- Py_DECREF(method);
- return result;
- }
- if (unlikely(!method)) return NULL;
- return __Pyx__PyObject_CallMethod1(method, arg);
- #endif
- }
- /* append */
- static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
- if (likely(PyList_CheckExact(L))) {
- if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
- } else {
- PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x);
- if (unlikely(!retval))
- return -1;
- Py_DECREF(retval);
- }
- return 0;
- }
- /* SwapException */
- #if CYTHON_FAST_THREAD_STATE
- static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
- _PyErr_StackItem *exc_info = tstate->exc_info;
- tmp_value = exc_info->exc_value;
- exc_info->exc_value = *value;
- if (tmp_value == NULL || tmp_value == Py_None) {
- Py_XDECREF(tmp_value);
- tmp_value = NULL;
- tmp_type = NULL;
- tmp_tb = NULL;
- } else {
- tmp_type = (PyObject*) Py_TYPE(tmp_value);
- Py_INCREF(tmp_type);
- #if CYTHON_COMPILING_IN_CPYTHON
- tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
- Py_XINCREF(tmp_tb);
- #else
- tmp_tb = PyException_GetTraceback(tmp_value);
- #endif
- }
- #elif CYTHON_USE_EXC_INFO_STACK
- _PyErr_StackItem *exc_info = tstate->exc_info;
- tmp_type = exc_info->exc_type;
- tmp_value = exc_info->exc_value;
- tmp_tb = exc_info->exc_traceback;
- exc_info->exc_type = *type;
- exc_info->exc_value = *value;
- exc_info->exc_traceback = *tb;
- #else
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = *type;
- tstate->exc_value = *value;
- tstate->exc_traceback = *tb;
- #endif
- *type = tmp_type;
- *value = tmp_value;
- *tb = tmp_tb;
- }
- #else
- static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
- PyErr_SetExcInfo(*type, *value, *tb);
- *type = tmp_type;
- *value = tmp_value;
- *tb = tmp_tb;
- }
- #endif
- /* HasAttr */
- #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
- /* GetAttr3 */
- #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
- static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
- return NULL;
- __Pyx_PyErr_Clear();
- Py_INCREF(d);
- return d;
- }
- #endif
- static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
- PyObject *r;
- #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
- int res = PyObject_GetOptionalAttr(o, n, &r);
- return (res != 0) ? r : __Pyx_NewRef(d);
- #else
- #if CYTHON_USE_TYPE_SLOTS
- if (likely(PyUnicode_Check(n))) {
- r = __Pyx_PyObject_GetAttrStrNoError(o, n);
- if (unlikely(!r) && likely(!PyErr_Occurred())) {
- r = __Pyx_NewRef(d);
- }
- return r;
- }
- #endif
- r = PyObject_GetAttr(o, n);
- return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
- #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__8);
- 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;
- }
- /* 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;
- }
- /* 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
- /* 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
- }
- }
- /* 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__18);
- }
- goto done;
- }
- #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 */
|