2
0

esl_wrap.cpp 187 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 3.0.2
  4. *
  5. * This file is not intended to be easily readable and contains a number of
  6. * coding conventions designed to improve portability and efficiency. Do not make
  7. * changes to this file unless you know what you are doing--modify the SWIG
  8. * interface file instead.
  9. * ----------------------------------------------------------------------------- */
  10. #define SWIGPYTHON
  11. #define SWIG_PYTHON_THREADS
  12. #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  13. #define SWIG_PYTHON_CLASSIC
  14. #ifdef __cplusplus
  15. /* SwigValueWrapper is described in swig.swg */
  16. template<typename T> class SwigValueWrapper {
  17. struct SwigMovePointer {
  18. T *ptr;
  19. SwigMovePointer(T *p) : ptr(p) { }
  20. ~SwigMovePointer() { delete ptr; }
  21. SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  22. } pointer;
  23. SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  24. SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  25. public:
  26. SwigValueWrapper() : pointer(0) { }
  27. SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  28. operator T&() const { return *pointer.ptr; }
  29. T *operator&() { return pointer.ptr; }
  30. };
  31. template <typename T> T SwigValueInit() {
  32. return T();
  33. }
  34. #endif
  35. /* -----------------------------------------------------------------------------
  36. * This section contains generic SWIG labels for method/variable
  37. * declarations/attributes, and other compiler dependent labels.
  38. * ----------------------------------------------------------------------------- */
  39. /* template workaround for compilers that cannot correctly implement the C++ standard */
  40. #ifndef SWIGTEMPLATEDISAMBIGUATOR
  41. # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  42. # define SWIGTEMPLATEDISAMBIGUATOR template
  43. # elif defined(__HP_aCC)
  44. /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  45. /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  46. # define SWIGTEMPLATEDISAMBIGUATOR template
  47. # else
  48. # define SWIGTEMPLATEDISAMBIGUATOR
  49. # endif
  50. #endif
  51. /* inline attribute */
  52. #ifndef SWIGINLINE
  53. # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  54. # define SWIGINLINE inline
  55. # else
  56. # define SWIGINLINE
  57. # endif
  58. #endif
  59. /* attribute recognised by some compilers to avoid 'unused' warnings */
  60. #ifndef SWIGUNUSED
  61. # if defined(__GNUC__)
  62. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  63. # define SWIGUNUSED __attribute__ ((__unused__))
  64. # else
  65. # define SWIGUNUSED
  66. # endif
  67. # elif defined(__ICC)
  68. # define SWIGUNUSED __attribute__ ((__unused__))
  69. # else
  70. # define SWIGUNUSED
  71. # endif
  72. #endif
  73. #ifndef SWIG_MSC_UNSUPPRESS_4505
  74. # if defined(_MSC_VER)
  75. # pragma warning(disable : 4505) /* unreferenced local function has been removed */
  76. # endif
  77. #endif
  78. #ifndef SWIGUNUSEDPARM
  79. # ifdef __cplusplus
  80. # define SWIGUNUSEDPARM(p)
  81. # else
  82. # define SWIGUNUSEDPARM(p) p SWIGUNUSED
  83. # endif
  84. #endif
  85. /* internal SWIG method */
  86. #ifndef SWIGINTERN
  87. # define SWIGINTERN static SWIGUNUSED
  88. #endif
  89. /* internal inline SWIG method */
  90. #ifndef SWIGINTERNINLINE
  91. # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  92. #endif
  93. /* exporting methods */
  94. #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  95. # ifndef GCC_HASCLASSVISIBILITY
  96. # define GCC_HASCLASSVISIBILITY
  97. # endif
  98. #endif
  99. #ifndef SWIGEXPORT
  100. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  101. # if defined(STATIC_LINKED)
  102. # define SWIGEXPORT
  103. # else
  104. # define SWIGEXPORT __declspec(dllexport)
  105. # endif
  106. # else
  107. # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  108. # define SWIGEXPORT __attribute__ ((visibility("default")))
  109. # else
  110. # define SWIGEXPORT
  111. # endif
  112. # endif
  113. #endif
  114. /* calling conventions for Windows */
  115. #ifndef SWIGSTDCALL
  116. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  117. # define SWIGSTDCALL __stdcall
  118. # else
  119. # define SWIGSTDCALL
  120. # endif
  121. #endif
  122. /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  123. #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  124. # define _CRT_SECURE_NO_DEPRECATE
  125. #endif
  126. /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  127. #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  128. # define _SCL_SECURE_NO_DEPRECATE
  129. #endif
  130. #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
  131. /* Use debug wrappers with the Python release dll */
  132. # undef _DEBUG
  133. # include <Python.h>
  134. # define _DEBUG
  135. #else
  136. # include <Python.h>
  137. #endif
  138. /* -----------------------------------------------------------------------------
  139. * swigrun.swg
  140. *
  141. * This file contains generic C API SWIG runtime support for pointer
  142. * type checking.
  143. * ----------------------------------------------------------------------------- */
  144. /* This should only be incremented when either the layout of swig_type_info changes,
  145. or for whatever reason, the runtime changes incompatibly */
  146. #define SWIG_RUNTIME_VERSION "4"
  147. /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  148. #ifdef SWIG_TYPE_TABLE
  149. # define SWIG_QUOTE_STRING(x) #x
  150. # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  151. # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  152. #else
  153. # define SWIG_TYPE_TABLE_NAME
  154. #endif
  155. /*
  156. You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  157. creating a static or dynamic library from the SWIG runtime code.
  158. In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  159. But only do this if strictly necessary, ie, if you have problems
  160. with your compiler or suchlike.
  161. */
  162. #ifndef SWIGRUNTIME
  163. # define SWIGRUNTIME SWIGINTERN
  164. #endif
  165. #ifndef SWIGRUNTIMEINLINE
  166. # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  167. #endif
  168. /* Generic buffer size */
  169. #ifndef SWIG_BUFFER_SIZE
  170. # define SWIG_BUFFER_SIZE 1024
  171. #endif
  172. /* Flags for pointer conversions */
  173. #define SWIG_POINTER_DISOWN 0x1
  174. #define SWIG_CAST_NEW_MEMORY 0x2
  175. /* Flags for new pointer objects */
  176. #define SWIG_POINTER_OWN 0x1
  177. /*
  178. Flags/methods for returning states.
  179. The SWIG conversion methods, as ConvertPtr, return an integer
  180. that tells if the conversion was successful or not. And if not,
  181. an error code can be returned (see swigerrors.swg for the codes).
  182. Use the following macros/flags to set or process the returning
  183. states.
  184. In old versions of SWIG, code such as the following was usually written:
  185. if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  186. // success code
  187. } else {
  188. //fail code
  189. }
  190. Now you can be more explicit:
  191. int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  192. if (SWIG_IsOK(res)) {
  193. // success code
  194. } else {
  195. // fail code
  196. }
  197. which is the same really, but now you can also do
  198. Type *ptr;
  199. int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  200. if (SWIG_IsOK(res)) {
  201. // success code
  202. if (SWIG_IsNewObj(res) {
  203. ...
  204. delete *ptr;
  205. } else {
  206. ...
  207. }
  208. } else {
  209. // fail code
  210. }
  211. I.e., now SWIG_ConvertPtr can return new objects and you can
  212. identify the case and take care of the deallocation. Of course that
  213. also requires SWIG_ConvertPtr to return new result values, such as
  214. int SWIG_ConvertPtr(obj, ptr,...) {
  215. if (<obj is ok>) {
  216. if (<need new object>) {
  217. *ptr = <ptr to new allocated object>;
  218. return SWIG_NEWOBJ;
  219. } else {
  220. *ptr = <ptr to old object>;
  221. return SWIG_OLDOBJ;
  222. }
  223. } else {
  224. return SWIG_BADOBJ;
  225. }
  226. }
  227. Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  228. more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  229. SWIG errors code.
  230. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  231. allows to return the 'cast rank', for example, if you have this
  232. int food(double)
  233. int fooi(int);
  234. and you call
  235. food(1) // cast rank '1' (1 -> 1.0)
  236. fooi(1) // cast rank '0'
  237. just use the SWIG_AddCast()/SWIG_CheckState()
  238. */
  239. #define SWIG_OK (0)
  240. #define SWIG_ERROR (-1)
  241. #define SWIG_IsOK(r) (r >= 0)
  242. #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  243. /* The CastRankLimit says how many bits are used for the cast rank */
  244. #define SWIG_CASTRANKLIMIT (1 << 8)
  245. /* The NewMask denotes the object was created (using new/malloc) */
  246. #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  247. /* The TmpMask is for in/out typemaps that use temporal objects */
  248. #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  249. /* Simple returning values */
  250. #define SWIG_BADOBJ (SWIG_ERROR)
  251. #define SWIG_OLDOBJ (SWIG_OK)
  252. #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  253. #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  254. /* Check, add and del mask methods */
  255. #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  256. #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  257. #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  258. #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  259. #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  260. #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  261. /* Cast-Rank Mode */
  262. #if defined(SWIG_CASTRANK_MODE)
  263. # ifndef SWIG_TypeRank
  264. # define SWIG_TypeRank unsigned long
  265. # endif
  266. # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  267. # define SWIG_MAXCASTRANK (2)
  268. # endif
  269. # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  270. # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  271. SWIGINTERNINLINE int SWIG_AddCast(int r) {
  272. return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  273. }
  274. SWIGINTERNINLINE int SWIG_CheckState(int r) {
  275. return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  276. }
  277. #else /* no cast-rank mode */
  278. # define SWIG_AddCast(r) (r)
  279. # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  280. #endif
  281. #include <string.h>
  282. #ifdef __cplusplus
  283. extern "C" {
  284. #endif
  285. typedef void *(*swig_converter_func)(void *, int *);
  286. typedef struct swig_type_info *(*swig_dycast_func)(void **);
  287. /* Structure to store information on one type */
  288. typedef struct swig_type_info {
  289. const char *name; /* mangled name of this type */
  290. const char *str; /* human readable name of this type */
  291. swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  292. struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  293. void *clientdata; /* language specific type data */
  294. int owndata; /* flag if the structure owns the clientdata */
  295. } swig_type_info;
  296. /* Structure to store a type and conversion function used for casting */
  297. typedef struct swig_cast_info {
  298. swig_type_info *type; /* pointer to type that is equivalent to this type */
  299. swig_converter_func converter; /* function to cast the void pointers */
  300. struct swig_cast_info *next; /* pointer to next cast in linked list */
  301. struct swig_cast_info *prev; /* pointer to the previous cast */
  302. } swig_cast_info;
  303. /* Structure used to store module information
  304. * Each module generates one structure like this, and the runtime collects
  305. * all of these structures and stores them in a circularly linked list.*/
  306. typedef struct swig_module_info {
  307. swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  308. size_t size; /* Number of types in this module */
  309. struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  310. swig_type_info **type_initial; /* Array of initially generated type structures */
  311. swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  312. void *clientdata; /* Language specific module data */
  313. } swig_module_info;
  314. /*
  315. Compare two type names skipping the space characters, therefore
  316. "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  317. Return 0 when the two name types are equivalent, as in
  318. strncmp, but skipping ' '.
  319. */
  320. SWIGRUNTIME int
  321. SWIG_TypeNameComp(const char *f1, const char *l1,
  322. const char *f2, const char *l2) {
  323. for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  324. while ((*f1 == ' ') && (f1 != l1)) ++f1;
  325. while ((*f2 == ' ') && (f2 != l2)) ++f2;
  326. if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  327. }
  328. return (int)((l1 - f1) - (l2 - f2));
  329. }
  330. /*
  331. Check type equivalence in a name list like <name1>|<name2>|...
  332. Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  333. */
  334. SWIGRUNTIME int
  335. SWIG_TypeCmp(const char *nb, const char *tb) {
  336. int equiv = 1;
  337. const char* te = tb + strlen(tb);
  338. const char* ne = nb;
  339. while (equiv != 0 && *ne) {
  340. for (nb = ne; *ne; ++ne) {
  341. if (*ne == '|') break;
  342. }
  343. equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  344. if (*ne) ++ne;
  345. }
  346. return equiv;
  347. }
  348. /*
  349. Check type equivalence in a name list like <name1>|<name2>|...
  350. Return 0 if not equal, 1 if equal
  351. */
  352. SWIGRUNTIME int
  353. SWIG_TypeEquiv(const char *nb, const char *tb) {
  354. return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  355. }
  356. /*
  357. Check the typename
  358. */
  359. SWIGRUNTIME swig_cast_info *
  360. SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  361. if (ty) {
  362. swig_cast_info *iter = ty->cast;
  363. while (iter) {
  364. if (strcmp(iter->type->name, c) == 0) {
  365. if (iter == ty->cast)
  366. return iter;
  367. /* Move iter to the top of the linked list */
  368. iter->prev->next = iter->next;
  369. if (iter->next)
  370. iter->next->prev = iter->prev;
  371. iter->next = ty->cast;
  372. iter->prev = 0;
  373. if (ty->cast) ty->cast->prev = iter;
  374. ty->cast = iter;
  375. return iter;
  376. }
  377. iter = iter->next;
  378. }
  379. }
  380. return 0;
  381. }
  382. /*
  383. Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  384. */
  385. SWIGRUNTIME swig_cast_info *
  386. SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  387. if (ty) {
  388. swig_cast_info *iter = ty->cast;
  389. while (iter) {
  390. if (iter->type == from) {
  391. if (iter == ty->cast)
  392. return iter;
  393. /* Move iter to the top of the linked list */
  394. iter->prev->next = iter->next;
  395. if (iter->next)
  396. iter->next->prev = iter->prev;
  397. iter->next = ty->cast;
  398. iter->prev = 0;
  399. if (ty->cast) ty->cast->prev = iter;
  400. ty->cast = iter;
  401. return iter;
  402. }
  403. iter = iter->next;
  404. }
  405. }
  406. return 0;
  407. }
  408. /*
  409. Cast a pointer up an inheritance hierarchy
  410. */
  411. SWIGRUNTIMEINLINE void *
  412. SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  413. return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  414. }
  415. /*
  416. Dynamic pointer casting. Down an inheritance hierarchy
  417. */
  418. SWIGRUNTIME swig_type_info *
  419. SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  420. swig_type_info *lastty = ty;
  421. if (!ty || !ty->dcast) return ty;
  422. while (ty && (ty->dcast)) {
  423. ty = (*ty->dcast)(ptr);
  424. if (ty) lastty = ty;
  425. }
  426. return lastty;
  427. }
  428. /*
  429. Return the name associated with this type
  430. */
  431. SWIGRUNTIMEINLINE const char *
  432. SWIG_TypeName(const swig_type_info *ty) {
  433. return ty->name;
  434. }
  435. /*
  436. Return the pretty name associated with this type,
  437. that is an unmangled type name in a form presentable to the user.
  438. */
  439. SWIGRUNTIME const char *
  440. SWIG_TypePrettyName(const swig_type_info *type) {
  441. /* The "str" field contains the equivalent pretty names of the
  442. type, separated by vertical-bar characters. We choose
  443. to print the last name, as it is often (?) the most
  444. specific. */
  445. if (!type) return NULL;
  446. if (type->str != NULL) {
  447. const char *last_name = type->str;
  448. const char *s;
  449. for (s = type->str; *s; s++)
  450. if (*s == '|') last_name = s+1;
  451. return last_name;
  452. }
  453. else
  454. return type->name;
  455. }
  456. /*
  457. Set the clientdata field for a type
  458. */
  459. SWIGRUNTIME void
  460. SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  461. swig_cast_info *cast = ti->cast;
  462. /* if (ti->clientdata == clientdata) return; */
  463. ti->clientdata = clientdata;
  464. while (cast) {
  465. if (!cast->converter) {
  466. swig_type_info *tc = cast->type;
  467. if (!tc->clientdata) {
  468. SWIG_TypeClientData(tc, clientdata);
  469. }
  470. }
  471. cast = cast->next;
  472. }
  473. }
  474. SWIGRUNTIME void
  475. SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  476. SWIG_TypeClientData(ti, clientdata);
  477. ti->owndata = 1;
  478. }
  479. /*
  480. Search for a swig_type_info structure only by mangled name
  481. Search is a O(log #types)
  482. We start searching at module start, and finish searching when start == end.
  483. Note: if start == end at the beginning of the function, we go all the way around
  484. the circular list.
  485. */
  486. SWIGRUNTIME swig_type_info *
  487. SWIG_MangledTypeQueryModule(swig_module_info *start,
  488. swig_module_info *end,
  489. const char *name) {
  490. swig_module_info *iter = start;
  491. do {
  492. if (iter->size) {
  493. size_t l = 0;
  494. size_t r = iter->size - 1;
  495. do {
  496. /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  497. size_t i = (l + r) >> 1;
  498. const char *iname = iter->types[i]->name;
  499. if (iname) {
  500. int compare = strcmp(name, iname);
  501. if (compare == 0) {
  502. return iter->types[i];
  503. } else if (compare < 0) {
  504. if (i) {
  505. r = i - 1;
  506. } else {
  507. break;
  508. }
  509. } else if (compare > 0) {
  510. l = i + 1;
  511. }
  512. } else {
  513. break; /* should never happen */
  514. }
  515. } while (l <= r);
  516. }
  517. iter = iter->next;
  518. } while (iter != end);
  519. return 0;
  520. }
  521. /*
  522. Search for a swig_type_info structure for either a mangled name or a human readable name.
  523. It first searches the mangled names of the types, which is a O(log #types)
  524. If a type is not found it then searches the human readable names, which is O(#types).
  525. We start searching at module start, and finish searching when start == end.
  526. Note: if start == end at the beginning of the function, we go all the way around
  527. the circular list.
  528. */
  529. SWIGRUNTIME swig_type_info *
  530. SWIG_TypeQueryModule(swig_module_info *start,
  531. swig_module_info *end,
  532. const char *name) {
  533. /* STEP 1: Search the name field using binary search */
  534. swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  535. if (ret) {
  536. return ret;
  537. } else {
  538. /* STEP 2: If the type hasn't been found, do a complete search
  539. of the str field (the human readable name) */
  540. swig_module_info *iter = start;
  541. do {
  542. size_t i = 0;
  543. for (; i < iter->size; ++i) {
  544. if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  545. return iter->types[i];
  546. }
  547. iter = iter->next;
  548. } while (iter != end);
  549. }
  550. /* neither found a match */
  551. return 0;
  552. }
  553. /*
  554. Pack binary data into a string
  555. */
  556. SWIGRUNTIME char *
  557. SWIG_PackData(char *c, void *ptr, size_t sz) {
  558. static const char hex[17] = "0123456789abcdef";
  559. const unsigned char *u = (unsigned char *) ptr;
  560. const unsigned char *eu = u + sz;
  561. for (; u != eu; ++u) {
  562. unsigned char uu = *u;
  563. *(c++) = hex[(uu & 0xf0) >> 4];
  564. *(c++) = hex[uu & 0xf];
  565. }
  566. return c;
  567. }
  568. /*
  569. Unpack binary data from a string
  570. */
  571. SWIGRUNTIME const char *
  572. SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  573. unsigned char *u = (unsigned char *) ptr;
  574. const unsigned char *eu = u + sz;
  575. for (; u != eu; ++u) {
  576. char d = *(c++);
  577. unsigned char uu;
  578. if ((d >= '0') && (d <= '9'))
  579. uu = ((d - '0') << 4);
  580. else if ((d >= 'a') && (d <= 'f'))
  581. uu = ((d - ('a'-10)) << 4);
  582. else
  583. return (char *) 0;
  584. d = *(c++);
  585. if ((d >= '0') && (d <= '9'))
  586. uu |= (d - '0');
  587. else if ((d >= 'a') && (d <= 'f'))
  588. uu |= (d - ('a'-10));
  589. else
  590. return (char *) 0;
  591. *u = uu;
  592. }
  593. return c;
  594. }
  595. /*
  596. Pack 'void *' into a string buffer.
  597. */
  598. SWIGRUNTIME char *
  599. SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  600. char *r = buff;
  601. if ((2*sizeof(void *) + 2) > bsz) return 0;
  602. *(r++) = '_';
  603. r = SWIG_PackData(r,&ptr,sizeof(void *));
  604. if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  605. strcpy(r,name);
  606. return buff;
  607. }
  608. SWIGRUNTIME const char *
  609. SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  610. if (*c != '_') {
  611. if (strcmp(c,"NULL") == 0) {
  612. *ptr = (void *) 0;
  613. return name;
  614. } else {
  615. return 0;
  616. }
  617. }
  618. return SWIG_UnpackData(++c,ptr,sizeof(void *));
  619. }
  620. SWIGRUNTIME char *
  621. SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  622. char *r = buff;
  623. size_t lname = (name ? strlen(name) : 0);
  624. if ((2*sz + 2 + lname) > bsz) return 0;
  625. *(r++) = '_';
  626. r = SWIG_PackData(r,ptr,sz);
  627. if (lname) {
  628. strncpy(r,name,lname+1);
  629. } else {
  630. *r = 0;
  631. }
  632. return buff;
  633. }
  634. SWIGRUNTIME const char *
  635. SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  636. if (*c != '_') {
  637. if (strcmp(c,"NULL") == 0) {
  638. memset(ptr,0,sz);
  639. return name;
  640. } else {
  641. return 0;
  642. }
  643. }
  644. return SWIG_UnpackData(++c,ptr,sz);
  645. }
  646. #ifdef __cplusplus
  647. }
  648. #endif
  649. /* Errors in SWIG */
  650. #define SWIG_UnknownError -1
  651. #define SWIG_IOError -2
  652. #define SWIG_RuntimeError -3
  653. #define SWIG_IndexError -4
  654. #define SWIG_TypeError -5
  655. #define SWIG_DivisionByZero -6
  656. #define SWIG_OverflowError -7
  657. #define SWIG_SyntaxError -8
  658. #define SWIG_ValueError -9
  659. #define SWIG_SystemError -10
  660. #define SWIG_AttributeError -11
  661. #define SWIG_MemoryError -12
  662. #define SWIG_NullReferenceError -13
  663. /* Compatibility macros for Python 3 */
  664. #if PY_VERSION_HEX >= 0x03000000
  665. #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  666. #define PyInt_Check(x) PyLong_Check(x)
  667. #define PyInt_AsLong(x) PyLong_AsLong(x)
  668. #define PyInt_FromLong(x) PyLong_FromLong(x)
  669. #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  670. #define PyString_Check(name) PyBytes_Check(name)
  671. #define PyString_FromString(x) PyUnicode_FromString(x)
  672. #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  673. #define PyString_AsString(str) PyBytes_AsString(str)
  674. #define PyString_Size(str) PyBytes_Size(str)
  675. #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  676. #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  677. #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  678. #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  679. #endif
  680. #ifndef Py_TYPE
  681. # define Py_TYPE(op) ((op)->ob_type)
  682. #endif
  683. /* SWIG APIs for compatibility of both Python 2 & 3 */
  684. #if PY_VERSION_HEX >= 0x03000000
  685. # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  686. #else
  687. # define SWIG_Python_str_FromFormat PyString_FromFormat
  688. #endif
  689. /* Warning: This function will allocate a new string in Python 3,
  690. * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  691. */
  692. SWIGINTERN char*
  693. SWIG_Python_str_AsChar(PyObject *str)
  694. {
  695. #if PY_VERSION_HEX >= 0x03000000
  696. char *cstr;
  697. char *newstr;
  698. Py_ssize_t len;
  699. str = PyUnicode_AsUTF8String(str);
  700. PyBytes_AsStringAndSize(str, &cstr, &len);
  701. newstr = (char *) malloc(len+1);
  702. memcpy(newstr, cstr, len+1);
  703. Py_XDECREF(str);
  704. return newstr;
  705. #else
  706. return PyString_AsString(str);
  707. #endif
  708. }
  709. #if PY_VERSION_HEX >= 0x03000000
  710. # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  711. #else
  712. # define SWIG_Python_str_DelForPy3(x)
  713. #endif
  714. SWIGINTERN PyObject*
  715. SWIG_Python_str_FromChar(const char *c)
  716. {
  717. #if PY_VERSION_HEX >= 0x03000000
  718. return PyUnicode_FromString(c);
  719. #else
  720. return PyString_FromString(c);
  721. #endif
  722. }
  723. /* Add PyOS_snprintf for old Pythons */
  724. #if PY_VERSION_HEX < 0x02020000
  725. # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
  726. # define PyOS_snprintf _snprintf
  727. # else
  728. # define PyOS_snprintf snprintf
  729. # endif
  730. #endif
  731. /* A crude PyString_FromFormat implementation for old Pythons */
  732. #if PY_VERSION_HEX < 0x02020000
  733. #ifndef SWIG_PYBUFFER_SIZE
  734. # define SWIG_PYBUFFER_SIZE 1024
  735. #endif
  736. static PyObject *
  737. PyString_FromFormat(const char *fmt, ...) {
  738. va_list ap;
  739. char buf[SWIG_PYBUFFER_SIZE * 2];
  740. int res;
  741. va_start(ap, fmt);
  742. res = vsnprintf(buf, sizeof(buf), fmt, ap);
  743. va_end(ap);
  744. return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
  745. }
  746. #endif
  747. /* Add PyObject_Del for old Pythons */
  748. #if PY_VERSION_HEX < 0x01060000
  749. # define PyObject_Del(op) PyMem_DEL((op))
  750. #endif
  751. #ifndef PyObject_DEL
  752. # define PyObject_DEL PyObject_Del
  753. #endif
  754. /* A crude PyExc_StopIteration exception for old Pythons */
  755. #if PY_VERSION_HEX < 0x02020000
  756. # ifndef PyExc_StopIteration
  757. # define PyExc_StopIteration PyExc_RuntimeError
  758. # endif
  759. # ifndef PyObject_GenericGetAttr
  760. # define PyObject_GenericGetAttr 0
  761. # endif
  762. #endif
  763. /* Py_NotImplemented is defined in 2.1 and up. */
  764. #if PY_VERSION_HEX < 0x02010000
  765. # ifndef Py_NotImplemented
  766. # define Py_NotImplemented PyExc_RuntimeError
  767. # endif
  768. #endif
  769. /* A crude PyString_AsStringAndSize implementation for old Pythons */
  770. #if PY_VERSION_HEX < 0x02010000
  771. # ifndef PyString_AsStringAndSize
  772. # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
  773. # endif
  774. #endif
  775. /* PySequence_Size for old Pythons */
  776. #if PY_VERSION_HEX < 0x02000000
  777. # ifndef PySequence_Size
  778. # define PySequence_Size PySequence_Length
  779. # endif
  780. #endif
  781. /* PyBool_FromLong for old Pythons */
  782. #if PY_VERSION_HEX < 0x02030000
  783. static
  784. PyObject *PyBool_FromLong(long ok)
  785. {
  786. PyObject *result = ok ? Py_True : Py_False;
  787. Py_INCREF(result);
  788. return result;
  789. }
  790. #endif
  791. /* Py_ssize_t for old Pythons */
  792. /* This code is as recommended by: */
  793. /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
  794. #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
  795. typedef int Py_ssize_t;
  796. # define PY_SSIZE_T_MAX INT_MAX
  797. # define PY_SSIZE_T_MIN INT_MIN
  798. typedef inquiry lenfunc;
  799. typedef intargfunc ssizeargfunc;
  800. typedef intintargfunc ssizessizeargfunc;
  801. typedef intobjargproc ssizeobjargproc;
  802. typedef intintobjargproc ssizessizeobjargproc;
  803. typedef getreadbufferproc readbufferproc;
  804. typedef getwritebufferproc writebufferproc;
  805. typedef getsegcountproc segcountproc;
  806. typedef getcharbufferproc charbufferproc;
  807. static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
  808. {
  809. long result = 0;
  810. PyObject *i = PyNumber_Int(x);
  811. if (i) {
  812. result = PyInt_AsLong(i);
  813. Py_DECREF(i);
  814. }
  815. return result;
  816. }
  817. #endif
  818. #if PY_VERSION_HEX < 0x02050000
  819. #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
  820. #endif
  821. #if PY_VERSION_HEX < 0x02040000
  822. #define Py_VISIT(op) \
  823. do { \
  824. if (op) { \
  825. int vret = visit((op), arg); \
  826. if (vret) \
  827. return vret; \
  828. } \
  829. } while (0)
  830. #endif
  831. #if PY_VERSION_HEX < 0x02030000
  832. typedef struct {
  833. PyTypeObject type;
  834. PyNumberMethods as_number;
  835. PyMappingMethods as_mapping;
  836. PySequenceMethods as_sequence;
  837. PyBufferProcs as_buffer;
  838. PyObject *name, *slots;
  839. } PyHeapTypeObject;
  840. #endif
  841. #if PY_VERSION_HEX < 0x02030000
  842. typedef destructor freefunc;
  843. #endif
  844. #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
  845. (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
  846. (PY_MAJOR_VERSION > 3))
  847. # define SWIGPY_USE_CAPSULE
  848. # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  849. #endif
  850. #if PY_VERSION_HEX < 0x03020000
  851. #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  852. #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  853. #endif
  854. /* -----------------------------------------------------------------------------
  855. * error manipulation
  856. * ----------------------------------------------------------------------------- */
  857. SWIGRUNTIME PyObject*
  858. SWIG_Python_ErrorType(int code) {
  859. PyObject* type = 0;
  860. switch(code) {
  861. case SWIG_MemoryError:
  862. type = PyExc_MemoryError;
  863. break;
  864. case SWIG_IOError:
  865. type = PyExc_IOError;
  866. break;
  867. case SWIG_RuntimeError:
  868. type = PyExc_RuntimeError;
  869. break;
  870. case SWIG_IndexError:
  871. type = PyExc_IndexError;
  872. break;
  873. case SWIG_TypeError:
  874. type = PyExc_TypeError;
  875. break;
  876. case SWIG_DivisionByZero:
  877. type = PyExc_ZeroDivisionError;
  878. break;
  879. case SWIG_OverflowError:
  880. type = PyExc_OverflowError;
  881. break;
  882. case SWIG_SyntaxError:
  883. type = PyExc_SyntaxError;
  884. break;
  885. case SWIG_ValueError:
  886. type = PyExc_ValueError;
  887. break;
  888. case SWIG_SystemError:
  889. type = PyExc_SystemError;
  890. break;
  891. case SWIG_AttributeError:
  892. type = PyExc_AttributeError;
  893. break;
  894. default:
  895. type = PyExc_RuntimeError;
  896. }
  897. return type;
  898. }
  899. SWIGRUNTIME void
  900. SWIG_Python_AddErrorMsg(const char* mesg)
  901. {
  902. PyObject *type = 0;
  903. PyObject *value = 0;
  904. PyObject *traceback = 0;
  905. if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  906. if (value) {
  907. char *tmp;
  908. PyObject *old_str = PyObject_Str(value);
  909. PyErr_Clear();
  910. Py_XINCREF(type);
  911. PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  912. SWIG_Python_str_DelForPy3(tmp);
  913. Py_DECREF(old_str);
  914. Py_DECREF(value);
  915. } else {
  916. PyErr_SetString(PyExc_RuntimeError, mesg);
  917. }
  918. }
  919. #if defined(SWIG_PYTHON_NO_THREADS)
  920. # if defined(SWIG_PYTHON_THREADS)
  921. # undef SWIG_PYTHON_THREADS
  922. # endif
  923. #endif
  924. #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  925. # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  926. # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
  927. # define SWIG_PYTHON_USE_GIL
  928. # endif
  929. # endif
  930. # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  931. # ifndef SWIG_PYTHON_INITIALIZE_THREADS
  932. # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  933. # endif
  934. # ifdef __cplusplus /* C++ code */
  935. class SWIG_Python_Thread_Block {
  936. bool status;
  937. PyGILState_STATE state;
  938. public:
  939. void end() { if (status) { PyGILState_Release(state); status = false;} }
  940. SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  941. ~SWIG_Python_Thread_Block() { end(); }
  942. };
  943. class SWIG_Python_Thread_Allow {
  944. bool status;
  945. PyThreadState *save;
  946. public:
  947. void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  948. SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  949. ~SWIG_Python_Thread_Allow() { end(); }
  950. };
  951. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  952. # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  953. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  954. # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  955. # else /* C code */
  956. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  957. # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  958. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  959. # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  960. # endif
  961. # else /* Old thread way, not implemented, user must provide it */
  962. # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  963. # define SWIG_PYTHON_INITIALIZE_THREADS
  964. # endif
  965. # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  966. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  967. # endif
  968. # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  969. # define SWIG_PYTHON_THREAD_END_BLOCK
  970. # endif
  971. # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  972. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  973. # endif
  974. # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  975. # define SWIG_PYTHON_THREAD_END_ALLOW
  976. # endif
  977. # endif
  978. #else /* No thread support */
  979. # define SWIG_PYTHON_INITIALIZE_THREADS
  980. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  981. # define SWIG_PYTHON_THREAD_END_BLOCK
  982. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  983. # define SWIG_PYTHON_THREAD_END_ALLOW
  984. #endif
  985. /* -----------------------------------------------------------------------------
  986. * Python API portion that goes into the runtime
  987. * ----------------------------------------------------------------------------- */
  988. #ifdef __cplusplus
  989. extern "C" {
  990. #endif
  991. /* -----------------------------------------------------------------------------
  992. * Constant declarations
  993. * ----------------------------------------------------------------------------- */
  994. /* Constant Types */
  995. #define SWIG_PY_POINTER 4
  996. #define SWIG_PY_BINARY 5
  997. /* Constant information structure */
  998. typedef struct swig_const_info {
  999. int type;
  1000. char *name;
  1001. long lvalue;
  1002. double dvalue;
  1003. void *pvalue;
  1004. swig_type_info **ptype;
  1005. } swig_const_info;
  1006. /* -----------------------------------------------------------------------------
  1007. * Wrapper of PyInstanceMethod_New() used in Python 3
  1008. * It is exported to the generated module, used for -fastproxy
  1009. * ----------------------------------------------------------------------------- */
  1010. #if PY_VERSION_HEX >= 0x03000000
  1011. SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
  1012. {
  1013. return PyInstanceMethod_New(func);
  1014. }
  1015. #else
  1016. SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
  1017. {
  1018. return NULL;
  1019. }
  1020. #endif
  1021. #ifdef __cplusplus
  1022. }
  1023. #endif
  1024. /* -----------------------------------------------------------------------------
  1025. * pyrun.swg
  1026. *
  1027. * This file contains the runtime support for Python modules
  1028. * and includes code for managing global variables and pointer
  1029. * type checking.
  1030. *
  1031. * ----------------------------------------------------------------------------- */
  1032. /* Common SWIG API */
  1033. /* for raw pointers */
  1034. #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  1035. #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  1036. #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  1037. #ifdef SWIGPYTHON_BUILTIN
  1038. #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  1039. #else
  1040. #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  1041. #endif
  1042. #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  1043. #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  1044. #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  1045. #define swig_owntype int
  1046. /* for raw packed data */
  1047. #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  1048. #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  1049. /* for class or struct pointers */
  1050. #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  1051. #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  1052. /* for C or C++ function pointers */
  1053. #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  1054. #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  1055. /* for C++ member pointers, ie, member methods */
  1056. #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  1057. #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  1058. /* Runtime API */
  1059. #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  1060. #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  1061. #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  1062. #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  1063. #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  1064. #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  1065. #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  1066. #define SWIG_fail goto fail
  1067. /* Runtime API implementation */
  1068. /* Error manipulation */
  1069. SWIGINTERN void
  1070. SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  1071. SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  1072. PyErr_SetObject(errtype, obj);
  1073. Py_DECREF(obj);
  1074. SWIG_PYTHON_THREAD_END_BLOCK;
  1075. }
  1076. SWIGINTERN void
  1077. SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  1078. SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  1079. PyErr_SetString(errtype, msg);
  1080. SWIG_PYTHON_THREAD_END_BLOCK;
  1081. }
  1082. #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  1083. /* Set a constant value */
  1084. #if defined(SWIGPYTHON_BUILTIN)
  1085. SWIGINTERN void
  1086. SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  1087. PyObject *s = PyString_InternFromString(key);
  1088. PyList_Append(seq, s);
  1089. Py_DECREF(s);
  1090. }
  1091. SWIGINTERN void
  1092. SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  1093. #if PY_VERSION_HEX < 0x02030000
  1094. PyDict_SetItemString(d, (char *)name, obj);
  1095. #else
  1096. PyDict_SetItemString(d, name, obj);
  1097. #endif
  1098. Py_DECREF(obj);
  1099. if (public_interface)
  1100. SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  1101. }
  1102. #else
  1103. SWIGINTERN void
  1104. SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  1105. #if PY_VERSION_HEX < 0x02030000
  1106. PyDict_SetItemString(d, (char *)name, obj);
  1107. #else
  1108. PyDict_SetItemString(d, name, obj);
  1109. #endif
  1110. Py_DECREF(obj);
  1111. }
  1112. #endif
  1113. /* Append a value to the result obj */
  1114. SWIGINTERN PyObject*
  1115. SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  1116. #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  1117. if (!result) {
  1118. result = obj;
  1119. } else if (result == Py_None) {
  1120. Py_DECREF(result);
  1121. result = obj;
  1122. } else {
  1123. if (!PyList_Check(result)) {
  1124. PyObject *o2 = result;
  1125. result = PyList_New(1);
  1126. PyList_SetItem(result, 0, o2);
  1127. }
  1128. PyList_Append(result,obj);
  1129. Py_DECREF(obj);
  1130. }
  1131. return result;
  1132. #else
  1133. PyObject* o2;
  1134. PyObject* o3;
  1135. if (!result) {
  1136. result = obj;
  1137. } else if (result == Py_None) {
  1138. Py_DECREF(result);
  1139. result = obj;
  1140. } else {
  1141. if (!PyTuple_Check(result)) {
  1142. o2 = result;
  1143. result = PyTuple_New(1);
  1144. PyTuple_SET_ITEM(result, 0, o2);
  1145. }
  1146. o3 = PyTuple_New(1);
  1147. PyTuple_SET_ITEM(o3, 0, obj);
  1148. o2 = result;
  1149. result = PySequence_Concat(o2, o3);
  1150. Py_DECREF(o2);
  1151. Py_DECREF(o3);
  1152. }
  1153. return result;
  1154. #endif
  1155. }
  1156. /* Unpack the argument tuple */
  1157. SWIGINTERN int
  1158. SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  1159. {
  1160. if (!args) {
  1161. if (!min && !max) {
  1162. return 1;
  1163. } else {
  1164. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  1165. name, (min == max ? "" : "at least "), (int)min);
  1166. return 0;
  1167. }
  1168. }
  1169. if (!PyTuple_Check(args)) {
  1170. if (min <= 1 && max >= 1) {
  1171. int i;
  1172. objs[0] = args;
  1173. for (i = 1; i < max; ++i) {
  1174. objs[i] = 0;
  1175. }
  1176. return 2;
  1177. }
  1178. PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  1179. return 0;
  1180. } else {
  1181. Py_ssize_t l = PyTuple_GET_SIZE(args);
  1182. if (l < min) {
  1183. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  1184. name, (min == max ? "" : "at least "), (int)min, (int)l);
  1185. return 0;
  1186. } else if (l > max) {
  1187. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  1188. name, (min == max ? "" : "at most "), (int)max, (int)l);
  1189. return 0;
  1190. } else {
  1191. int i;
  1192. for (i = 0; i < l; ++i) {
  1193. objs[i] = PyTuple_GET_ITEM(args, i);
  1194. }
  1195. for (; l < max; ++l) {
  1196. objs[l] = 0;
  1197. }
  1198. return i + 1;
  1199. }
  1200. }
  1201. }
  1202. /* A functor is a function object with one single object argument */
  1203. #if PY_VERSION_HEX >= 0x02020000
  1204. #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  1205. #else
  1206. #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
  1207. #endif
  1208. /*
  1209. Helper for static pointer initialization for both C and C++ code, for example
  1210. static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  1211. */
  1212. #ifdef __cplusplus
  1213. #define SWIG_STATIC_POINTER(var) var
  1214. #else
  1215. #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  1216. #endif
  1217. /* -----------------------------------------------------------------------------
  1218. * Pointer declarations
  1219. * ----------------------------------------------------------------------------- */
  1220. /* Flags for new pointer objects */
  1221. #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  1222. #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  1223. #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  1224. #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  1225. #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  1226. #ifdef __cplusplus
  1227. extern "C" {
  1228. #endif
  1229. /* How to access Py_None */
  1230. #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  1231. # ifndef SWIG_PYTHON_NO_BUILD_NONE
  1232. # ifndef SWIG_PYTHON_BUILD_NONE
  1233. # define SWIG_PYTHON_BUILD_NONE
  1234. # endif
  1235. # endif
  1236. #endif
  1237. #ifdef SWIG_PYTHON_BUILD_NONE
  1238. # ifdef Py_None
  1239. # undef Py_None
  1240. # define Py_None SWIG_Py_None()
  1241. # endif
  1242. SWIGRUNTIMEINLINE PyObject *
  1243. _SWIG_Py_None(void)
  1244. {
  1245. PyObject *none = Py_BuildValue((char*)"");
  1246. Py_DECREF(none);
  1247. return none;
  1248. }
  1249. SWIGRUNTIME PyObject *
  1250. SWIG_Py_None(void)
  1251. {
  1252. static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  1253. return none;
  1254. }
  1255. #endif
  1256. /* The python void return value */
  1257. SWIGRUNTIMEINLINE PyObject *
  1258. SWIG_Py_Void(void)
  1259. {
  1260. PyObject *none = Py_None;
  1261. Py_INCREF(none);
  1262. return none;
  1263. }
  1264. /* SwigPyClientData */
  1265. typedef struct {
  1266. PyObject *klass;
  1267. PyObject *newraw;
  1268. PyObject *newargs;
  1269. PyObject *destroy;
  1270. int delargs;
  1271. int implicitconv;
  1272. PyTypeObject *pytype;
  1273. } SwigPyClientData;
  1274. SWIGRUNTIMEINLINE int
  1275. SWIG_Python_CheckImplicit(swig_type_info *ty)
  1276. {
  1277. SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  1278. return data ? data->implicitconv : 0;
  1279. }
  1280. SWIGRUNTIMEINLINE PyObject *
  1281. SWIG_Python_ExceptionType(swig_type_info *desc) {
  1282. SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  1283. PyObject *klass = data ? data->klass : 0;
  1284. return (klass ? klass : PyExc_RuntimeError);
  1285. }
  1286. SWIGRUNTIME SwigPyClientData *
  1287. SwigPyClientData_New(PyObject* obj)
  1288. {
  1289. if (!obj) {
  1290. return 0;
  1291. } else {
  1292. SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  1293. /* the klass element */
  1294. data->klass = obj;
  1295. Py_INCREF(data->klass);
  1296. /* the newraw method and newargs arguments used to create a new raw instance */
  1297. if (PyClass_Check(obj)) {
  1298. data->newraw = 0;
  1299. data->newargs = obj;
  1300. Py_INCREF(obj);
  1301. } else {
  1302. #if (PY_VERSION_HEX < 0x02020000)
  1303. data->newraw = 0;
  1304. #else
  1305. data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
  1306. #endif
  1307. if (data->newraw) {
  1308. Py_INCREF(data->newraw);
  1309. data->newargs = PyTuple_New(1);
  1310. PyTuple_SetItem(data->newargs, 0, obj);
  1311. } else {
  1312. data->newargs = obj;
  1313. }
  1314. Py_INCREF(data->newargs);
  1315. }
  1316. /* the destroy method, aka as the C++ delete method */
  1317. data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
  1318. if (PyErr_Occurred()) {
  1319. PyErr_Clear();
  1320. data->destroy = 0;
  1321. }
  1322. if (data->destroy) {
  1323. int flags;
  1324. Py_INCREF(data->destroy);
  1325. flags = PyCFunction_GET_FLAGS(data->destroy);
  1326. #ifdef METH_O
  1327. data->delargs = !(flags & (METH_O));
  1328. #else
  1329. data->delargs = 0;
  1330. #endif
  1331. } else {
  1332. data->delargs = 0;
  1333. }
  1334. data->implicitconv = 0;
  1335. data->pytype = 0;
  1336. return data;
  1337. }
  1338. }
  1339. SWIGRUNTIME void
  1340. SwigPyClientData_Del(SwigPyClientData *data) {
  1341. Py_XDECREF(data->newraw);
  1342. Py_XDECREF(data->newargs);
  1343. Py_XDECREF(data->destroy);
  1344. }
  1345. /* =============== SwigPyObject =====================*/
  1346. typedef struct {
  1347. PyObject_HEAD
  1348. void *ptr;
  1349. swig_type_info *ty;
  1350. int own;
  1351. PyObject *next;
  1352. #ifdef SWIGPYTHON_BUILTIN
  1353. PyObject *dict;
  1354. #endif
  1355. } SwigPyObject;
  1356. SWIGRUNTIME PyObject *
  1357. SwigPyObject_long(SwigPyObject *v)
  1358. {
  1359. return PyLong_FromVoidPtr(v->ptr);
  1360. }
  1361. SWIGRUNTIME PyObject *
  1362. SwigPyObject_format(const char* fmt, SwigPyObject *v)
  1363. {
  1364. PyObject *res = NULL;
  1365. PyObject *args = PyTuple_New(1);
  1366. if (args) {
  1367. if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  1368. PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  1369. if (ofmt) {
  1370. #if PY_VERSION_HEX >= 0x03000000
  1371. res = PyUnicode_Format(ofmt,args);
  1372. #else
  1373. res = PyString_Format(ofmt,args);
  1374. #endif
  1375. Py_DECREF(ofmt);
  1376. }
  1377. Py_DECREF(args);
  1378. }
  1379. }
  1380. return res;
  1381. }
  1382. SWIGRUNTIME PyObject *
  1383. SwigPyObject_oct(SwigPyObject *v)
  1384. {
  1385. return SwigPyObject_format("%o",v);
  1386. }
  1387. SWIGRUNTIME PyObject *
  1388. SwigPyObject_hex(SwigPyObject *v)
  1389. {
  1390. return SwigPyObject_format("%x",v);
  1391. }
  1392. SWIGRUNTIME PyObject *
  1393. #ifdef METH_NOARGS
  1394. SwigPyObject_repr(SwigPyObject *v)
  1395. #else
  1396. SwigPyObject_repr(SwigPyObject *v, PyObject *args)
  1397. #endif
  1398. {
  1399. const char *name = SWIG_TypePrettyName(v->ty);
  1400. PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  1401. if (v->next) {
  1402. # ifdef METH_NOARGS
  1403. PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  1404. # else
  1405. PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
  1406. # endif
  1407. # if PY_VERSION_HEX >= 0x03000000
  1408. PyObject *joined = PyUnicode_Concat(repr, nrep);
  1409. Py_DecRef(repr);
  1410. Py_DecRef(nrep);
  1411. repr = joined;
  1412. # else
  1413. PyString_ConcatAndDel(&repr,nrep);
  1414. # endif
  1415. }
  1416. return repr;
  1417. }
  1418. SWIGRUNTIME int
  1419. SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  1420. {
  1421. void *i = v->ptr;
  1422. void *j = w->ptr;
  1423. return (i < j) ? -1 : ((i > j) ? 1 : 0);
  1424. }
  1425. /* Added for Python 3.x, would it also be useful for Python 2.x? */
  1426. SWIGRUNTIME PyObject*
  1427. SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  1428. {
  1429. PyObject* res;
  1430. if( op != Py_EQ && op != Py_NE ) {
  1431. Py_INCREF(Py_NotImplemented);
  1432. return Py_NotImplemented;
  1433. }
  1434. res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  1435. return res;
  1436. }
  1437. SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  1438. #ifdef SWIGPYTHON_BUILTIN
  1439. static swig_type_info *SwigPyObject_stype = 0;
  1440. SWIGRUNTIME PyTypeObject*
  1441. SwigPyObject_type(void) {
  1442. SwigPyClientData *cd;
  1443. assert(SwigPyObject_stype);
  1444. cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  1445. assert(cd);
  1446. assert(cd->pytype);
  1447. return cd->pytype;
  1448. }
  1449. #else
  1450. SWIGRUNTIME PyTypeObject*
  1451. SwigPyObject_type(void) {
  1452. static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  1453. return type;
  1454. }
  1455. #endif
  1456. SWIGRUNTIMEINLINE int
  1457. SwigPyObject_Check(PyObject *op) {
  1458. #ifdef SWIGPYTHON_BUILTIN
  1459. PyTypeObject *target_tp = SwigPyObject_type();
  1460. if (PyType_IsSubtype(op->ob_type, target_tp))
  1461. return 1;
  1462. return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  1463. #else
  1464. return (Py_TYPE(op) == SwigPyObject_type())
  1465. || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  1466. #endif
  1467. }
  1468. SWIGRUNTIME PyObject *
  1469. SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  1470. SWIGRUNTIME void
  1471. SwigPyObject_dealloc(PyObject *v)
  1472. {
  1473. SwigPyObject *sobj = (SwigPyObject *) v;
  1474. PyObject *next = sobj->next;
  1475. if (sobj->own == SWIG_POINTER_OWN) {
  1476. swig_type_info *ty = sobj->ty;
  1477. SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  1478. PyObject *destroy = data ? data->destroy : 0;
  1479. if (destroy) {
  1480. /* destroy is always a VARARGS method */
  1481. PyObject *res;
  1482. if (data->delargs) {
  1483. /* we need to create a temporary object to carry the destroy operation */
  1484. PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  1485. res = SWIG_Python_CallFunctor(destroy, tmp);
  1486. Py_DECREF(tmp);
  1487. } else {
  1488. PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  1489. PyObject *mself = PyCFunction_GET_SELF(destroy);
  1490. res = ((*meth)(mself, v));
  1491. }
  1492. Py_XDECREF(res);
  1493. }
  1494. #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  1495. else {
  1496. const char *name = SWIG_TypePrettyName(ty);
  1497. printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  1498. }
  1499. #endif
  1500. }
  1501. Py_XDECREF(next);
  1502. PyObject_DEL(v);
  1503. }
  1504. SWIGRUNTIME PyObject*
  1505. SwigPyObject_append(PyObject* v, PyObject* next)
  1506. {
  1507. SwigPyObject *sobj = (SwigPyObject *) v;
  1508. #ifndef METH_O
  1509. PyObject *tmp = 0;
  1510. if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  1511. next = tmp;
  1512. #endif
  1513. if (!SwigPyObject_Check(next)) {
  1514. return NULL;
  1515. }
  1516. sobj->next = next;
  1517. Py_INCREF(next);
  1518. return SWIG_Py_Void();
  1519. }
  1520. SWIGRUNTIME PyObject*
  1521. #ifdef METH_NOARGS
  1522. SwigPyObject_next(PyObject* v)
  1523. #else
  1524. SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1525. #endif
  1526. {
  1527. SwigPyObject *sobj = (SwigPyObject *) v;
  1528. if (sobj->next) {
  1529. Py_INCREF(sobj->next);
  1530. return sobj->next;
  1531. } else {
  1532. return SWIG_Py_Void();
  1533. }
  1534. }
  1535. SWIGINTERN PyObject*
  1536. #ifdef METH_NOARGS
  1537. SwigPyObject_disown(PyObject *v)
  1538. #else
  1539. SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1540. #endif
  1541. {
  1542. SwigPyObject *sobj = (SwigPyObject *)v;
  1543. sobj->own = 0;
  1544. return SWIG_Py_Void();
  1545. }
  1546. SWIGINTERN PyObject*
  1547. #ifdef METH_NOARGS
  1548. SwigPyObject_acquire(PyObject *v)
  1549. #else
  1550. SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1551. #endif
  1552. {
  1553. SwigPyObject *sobj = (SwigPyObject *)v;
  1554. sobj->own = SWIG_POINTER_OWN;
  1555. return SWIG_Py_Void();
  1556. }
  1557. SWIGINTERN PyObject*
  1558. SwigPyObject_own(PyObject *v, PyObject *args)
  1559. {
  1560. PyObject *val = 0;
  1561. #if (PY_VERSION_HEX < 0x02020000)
  1562. if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
  1563. #elif (PY_VERSION_HEX < 0x02050000)
  1564. if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
  1565. #else
  1566. if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
  1567. #endif
  1568. {
  1569. return NULL;
  1570. }
  1571. else
  1572. {
  1573. SwigPyObject *sobj = (SwigPyObject *)v;
  1574. PyObject *obj = PyBool_FromLong(sobj->own);
  1575. if (val) {
  1576. #ifdef METH_NOARGS
  1577. if (PyObject_IsTrue(val)) {
  1578. SwigPyObject_acquire(v);
  1579. } else {
  1580. SwigPyObject_disown(v);
  1581. }
  1582. #else
  1583. if (PyObject_IsTrue(val)) {
  1584. SwigPyObject_acquire(v,args);
  1585. } else {
  1586. SwigPyObject_disown(v,args);
  1587. }
  1588. #endif
  1589. }
  1590. return obj;
  1591. }
  1592. }
  1593. #ifdef METH_O
  1594. static PyMethodDef
  1595. swigobject_methods[] = {
  1596. {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
  1597. {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
  1598. {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  1599. {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
  1600. {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
  1601. {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
  1602. {0, 0, 0, 0}
  1603. };
  1604. #else
  1605. static PyMethodDef
  1606. swigobject_methods[] = {
  1607. {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
  1608. {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
  1609. {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  1610. {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
  1611. {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
  1612. {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
  1613. {0, 0, 0, 0}
  1614. };
  1615. #endif
  1616. #if PY_VERSION_HEX < 0x02020000
  1617. SWIGINTERN PyObject *
  1618. SwigPyObject_getattr(SwigPyObject *sobj,char *name)
  1619. {
  1620. return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
  1621. }
  1622. #endif
  1623. SWIGRUNTIME PyTypeObject*
  1624. SwigPyObject_TypeOnce(void) {
  1625. static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  1626. static PyNumberMethods SwigPyObject_as_number = {
  1627. (binaryfunc)0, /*nb_add*/
  1628. (binaryfunc)0, /*nb_subtract*/
  1629. (binaryfunc)0, /*nb_multiply*/
  1630. /* nb_divide removed in Python 3 */
  1631. #if PY_VERSION_HEX < 0x03000000
  1632. (binaryfunc)0, /*nb_divide*/
  1633. #endif
  1634. (binaryfunc)0, /*nb_remainder*/
  1635. (binaryfunc)0, /*nb_divmod*/
  1636. (ternaryfunc)0,/*nb_power*/
  1637. (unaryfunc)0, /*nb_negative*/
  1638. (unaryfunc)0, /*nb_positive*/
  1639. (unaryfunc)0, /*nb_absolute*/
  1640. (inquiry)0, /*nb_nonzero*/
  1641. 0, /*nb_invert*/
  1642. 0, /*nb_lshift*/
  1643. 0, /*nb_rshift*/
  1644. 0, /*nb_and*/
  1645. 0, /*nb_xor*/
  1646. 0, /*nb_or*/
  1647. #if PY_VERSION_HEX < 0x03000000
  1648. 0, /*nb_coerce*/
  1649. #endif
  1650. (unaryfunc)SwigPyObject_long, /*nb_int*/
  1651. #if PY_VERSION_HEX < 0x03000000
  1652. (unaryfunc)SwigPyObject_long, /*nb_long*/
  1653. #else
  1654. 0, /*nb_reserved*/
  1655. #endif
  1656. (unaryfunc)0, /*nb_float*/
  1657. #if PY_VERSION_HEX < 0x03000000
  1658. (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  1659. (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  1660. #endif
  1661. #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  1662. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  1663. #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
  1664. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  1665. #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
  1666. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
  1667. #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
  1668. 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
  1669. #endif
  1670. };
  1671. static PyTypeObject swigpyobject_type;
  1672. static int type_init = 0;
  1673. if (!type_init) {
  1674. const PyTypeObject tmp = {
  1675. /* PyObject header changed in Python 3 */
  1676. #if PY_VERSION_HEX >= 0x03000000
  1677. PyVarObject_HEAD_INIT(NULL, 0)
  1678. #else
  1679. PyObject_HEAD_INIT(NULL)
  1680. 0, /* ob_size */
  1681. #endif
  1682. (char *)"SwigPyObject", /* tp_name */
  1683. sizeof(SwigPyObject), /* tp_basicsize */
  1684. 0, /* tp_itemsize */
  1685. (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  1686. 0, /* tp_print */
  1687. #if PY_VERSION_HEX < 0x02020000
  1688. (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
  1689. #else
  1690. (getattrfunc)0, /* tp_getattr */
  1691. #endif
  1692. (setattrfunc)0, /* tp_setattr */
  1693. #if PY_VERSION_HEX >= 0x03000000
  1694. 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  1695. #else
  1696. (cmpfunc)SwigPyObject_compare, /* tp_compare */
  1697. #endif
  1698. (reprfunc)SwigPyObject_repr, /* tp_repr */
  1699. &SwigPyObject_as_number, /* tp_as_number */
  1700. 0, /* tp_as_sequence */
  1701. 0, /* tp_as_mapping */
  1702. (hashfunc)0, /* tp_hash */
  1703. (ternaryfunc)0, /* tp_call */
  1704. 0, /* tp_str */
  1705. PyObject_GenericGetAttr, /* tp_getattro */
  1706. 0, /* tp_setattro */
  1707. 0, /* tp_as_buffer */
  1708. Py_TPFLAGS_DEFAULT, /* tp_flags */
  1709. swigobject_doc, /* tp_doc */
  1710. 0, /* tp_traverse */
  1711. 0, /* tp_clear */
  1712. (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  1713. 0, /* tp_weaklistoffset */
  1714. #if PY_VERSION_HEX >= 0x02020000
  1715. 0, /* tp_iter */
  1716. 0, /* tp_iternext */
  1717. swigobject_methods, /* tp_methods */
  1718. 0, /* tp_members */
  1719. 0, /* tp_getset */
  1720. 0, /* tp_base */
  1721. 0, /* tp_dict */
  1722. 0, /* tp_descr_get */
  1723. 0, /* tp_descr_set */
  1724. 0, /* tp_dictoffset */
  1725. 0, /* tp_init */
  1726. 0, /* tp_alloc */
  1727. 0, /* tp_new */
  1728. 0, /* tp_free */
  1729. 0, /* tp_is_gc */
  1730. 0, /* tp_bases */
  1731. 0, /* tp_mro */
  1732. 0, /* tp_cache */
  1733. 0, /* tp_subclasses */
  1734. 0, /* tp_weaklist */
  1735. #endif
  1736. #if PY_VERSION_HEX >= 0x02030000
  1737. 0, /* tp_del */
  1738. #endif
  1739. #if PY_VERSION_HEX >= 0x02060000
  1740. 0, /* tp_version */
  1741. #endif
  1742. #ifdef COUNT_ALLOCS
  1743. 0,0,0,0 /* tp_alloc -> tp_next */
  1744. #endif
  1745. };
  1746. swigpyobject_type = tmp;
  1747. type_init = 1;
  1748. #if PY_VERSION_HEX < 0x02020000
  1749. swigpyobject_type.ob_type = &PyType_Type;
  1750. #else
  1751. if (PyType_Ready(&swigpyobject_type) < 0)
  1752. return NULL;
  1753. #endif
  1754. }
  1755. return &swigpyobject_type;
  1756. }
  1757. SWIGRUNTIME PyObject *
  1758. SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  1759. {
  1760. SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  1761. if (sobj) {
  1762. sobj->ptr = ptr;
  1763. sobj->ty = ty;
  1764. sobj->own = own;
  1765. sobj->next = 0;
  1766. }
  1767. return (PyObject *)sobj;
  1768. }
  1769. /* -----------------------------------------------------------------------------
  1770. * Implements a simple Swig Packed type, and use it instead of string
  1771. * ----------------------------------------------------------------------------- */
  1772. typedef struct {
  1773. PyObject_HEAD
  1774. void *pack;
  1775. swig_type_info *ty;
  1776. size_t size;
  1777. } SwigPyPacked;
  1778. SWIGRUNTIME int
  1779. SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
  1780. {
  1781. char result[SWIG_BUFFER_SIZE];
  1782. fputs("<Swig Packed ", fp);
  1783. if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  1784. fputs("at ", fp);
  1785. fputs(result, fp);
  1786. }
  1787. fputs(v->ty->name,fp);
  1788. fputs(">", fp);
  1789. return 0;
  1790. }
  1791. SWIGRUNTIME PyObject *
  1792. SwigPyPacked_repr(SwigPyPacked *v)
  1793. {
  1794. char result[SWIG_BUFFER_SIZE];
  1795. if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  1796. return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  1797. } else {
  1798. return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  1799. }
  1800. }
  1801. SWIGRUNTIME PyObject *
  1802. SwigPyPacked_str(SwigPyPacked *v)
  1803. {
  1804. char result[SWIG_BUFFER_SIZE];
  1805. if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  1806. return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  1807. } else {
  1808. return SWIG_Python_str_FromChar(v->ty->name);
  1809. }
  1810. }
  1811. SWIGRUNTIME int
  1812. SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  1813. {
  1814. size_t i = v->size;
  1815. size_t j = w->size;
  1816. int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  1817. return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
  1818. }
  1819. SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  1820. SWIGRUNTIME PyTypeObject*
  1821. SwigPyPacked_type(void) {
  1822. static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  1823. return type;
  1824. }
  1825. SWIGRUNTIMEINLINE int
  1826. SwigPyPacked_Check(PyObject *op) {
  1827. return ((op)->ob_type == SwigPyPacked_TypeOnce())
  1828. || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  1829. }
  1830. SWIGRUNTIME void
  1831. SwigPyPacked_dealloc(PyObject *v)
  1832. {
  1833. if (SwigPyPacked_Check(v)) {
  1834. SwigPyPacked *sobj = (SwigPyPacked *) v;
  1835. free(sobj->pack);
  1836. }
  1837. PyObject_DEL(v);
  1838. }
  1839. SWIGRUNTIME PyTypeObject*
  1840. SwigPyPacked_TypeOnce(void) {
  1841. static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  1842. static PyTypeObject swigpypacked_type;
  1843. static int type_init = 0;
  1844. if (!type_init) {
  1845. const PyTypeObject tmp = {
  1846. /* PyObject header changed in Python 3 */
  1847. #if PY_VERSION_HEX>=0x03000000
  1848. PyVarObject_HEAD_INIT(NULL, 0)
  1849. #else
  1850. PyObject_HEAD_INIT(NULL)
  1851. 0, /* ob_size */
  1852. #endif
  1853. (char *)"SwigPyPacked", /* tp_name */
  1854. sizeof(SwigPyPacked), /* tp_basicsize */
  1855. 0, /* tp_itemsize */
  1856. (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  1857. (printfunc)SwigPyPacked_print, /* tp_print */
  1858. (getattrfunc)0, /* tp_getattr */
  1859. (setattrfunc)0, /* tp_setattr */
  1860. #if PY_VERSION_HEX>=0x03000000
  1861. 0, /* tp_reserved in 3.0.1 */
  1862. #else
  1863. (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  1864. #endif
  1865. (reprfunc)SwigPyPacked_repr, /* tp_repr */
  1866. 0, /* tp_as_number */
  1867. 0, /* tp_as_sequence */
  1868. 0, /* tp_as_mapping */
  1869. (hashfunc)0, /* tp_hash */
  1870. (ternaryfunc)0, /* tp_call */
  1871. (reprfunc)SwigPyPacked_str, /* tp_str */
  1872. PyObject_GenericGetAttr, /* tp_getattro */
  1873. 0, /* tp_setattro */
  1874. 0, /* tp_as_buffer */
  1875. Py_TPFLAGS_DEFAULT, /* tp_flags */
  1876. swigpacked_doc, /* tp_doc */
  1877. 0, /* tp_traverse */
  1878. 0, /* tp_clear */
  1879. 0, /* tp_richcompare */
  1880. 0, /* tp_weaklistoffset */
  1881. #if PY_VERSION_HEX >= 0x02020000
  1882. 0, /* tp_iter */
  1883. 0, /* tp_iternext */
  1884. 0, /* tp_methods */
  1885. 0, /* tp_members */
  1886. 0, /* tp_getset */
  1887. 0, /* tp_base */
  1888. 0, /* tp_dict */
  1889. 0, /* tp_descr_get */
  1890. 0, /* tp_descr_set */
  1891. 0, /* tp_dictoffset */
  1892. 0, /* tp_init */
  1893. 0, /* tp_alloc */
  1894. 0, /* tp_new */
  1895. 0, /* tp_free */
  1896. 0, /* tp_is_gc */
  1897. 0, /* tp_bases */
  1898. 0, /* tp_mro */
  1899. 0, /* tp_cache */
  1900. 0, /* tp_subclasses */
  1901. 0, /* tp_weaklist */
  1902. #endif
  1903. #if PY_VERSION_HEX >= 0x02030000
  1904. 0, /* tp_del */
  1905. #endif
  1906. #if PY_VERSION_HEX >= 0x02060000
  1907. 0, /* tp_version */
  1908. #endif
  1909. #ifdef COUNT_ALLOCS
  1910. 0,0,0,0 /* tp_alloc -> tp_next */
  1911. #endif
  1912. };
  1913. swigpypacked_type = tmp;
  1914. type_init = 1;
  1915. #if PY_VERSION_HEX < 0x02020000
  1916. swigpypacked_type.ob_type = &PyType_Type;
  1917. #else
  1918. if (PyType_Ready(&swigpypacked_type) < 0)
  1919. return NULL;
  1920. #endif
  1921. }
  1922. return &swigpypacked_type;
  1923. }
  1924. SWIGRUNTIME PyObject *
  1925. SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  1926. {
  1927. SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  1928. if (sobj) {
  1929. void *pack = malloc(size);
  1930. if (pack) {
  1931. memcpy(pack, ptr, size);
  1932. sobj->pack = pack;
  1933. sobj->ty = ty;
  1934. sobj->size = size;
  1935. } else {
  1936. PyObject_DEL((PyObject *) sobj);
  1937. sobj = 0;
  1938. }
  1939. }
  1940. return (PyObject *) sobj;
  1941. }
  1942. SWIGRUNTIME swig_type_info *
  1943. SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  1944. {
  1945. if (SwigPyPacked_Check(obj)) {
  1946. SwigPyPacked *sobj = (SwigPyPacked *)obj;
  1947. if (sobj->size != size) return 0;
  1948. memcpy(ptr, sobj->pack, size);
  1949. return sobj->ty;
  1950. } else {
  1951. return 0;
  1952. }
  1953. }
  1954. /* -----------------------------------------------------------------------------
  1955. * pointers/data manipulation
  1956. * ----------------------------------------------------------------------------- */
  1957. SWIGRUNTIMEINLINE PyObject *
  1958. _SWIG_This(void)
  1959. {
  1960. return SWIG_Python_str_FromChar("this");
  1961. }
  1962. static PyObject *swig_this = NULL;
  1963. SWIGRUNTIME PyObject *
  1964. SWIG_This(void)
  1965. {
  1966. if (swig_this == NULL)
  1967. swig_this = _SWIG_This();
  1968. return swig_this;
  1969. }
  1970. /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  1971. /* TODO: I don't know how to implement the fast getset in Python 3 right now */
  1972. #if PY_VERSION_HEX>=0x03000000
  1973. #define SWIG_PYTHON_SLOW_GETSET_THIS
  1974. #endif
  1975. SWIGRUNTIME SwigPyObject *
  1976. SWIG_Python_GetSwigThis(PyObject *pyobj)
  1977. {
  1978. PyObject *obj;
  1979. if (SwigPyObject_Check(pyobj))
  1980. return (SwigPyObject *) pyobj;
  1981. #ifdef SWIGPYTHON_BUILTIN
  1982. (void)obj;
  1983. # ifdef PyWeakref_CheckProxy
  1984. if (PyWeakref_CheckProxy(pyobj)) {
  1985. pyobj = PyWeakref_GET_OBJECT(pyobj);
  1986. if (pyobj && SwigPyObject_Check(pyobj))
  1987. return (SwigPyObject*) pyobj;
  1988. }
  1989. # endif
  1990. return NULL;
  1991. #else
  1992. obj = 0;
  1993. #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  1994. if (PyInstance_Check(pyobj)) {
  1995. obj = _PyInstance_Lookup(pyobj, SWIG_This());
  1996. } else {
  1997. PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  1998. if (dictptr != NULL) {
  1999. PyObject *dict = *dictptr;
  2000. obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  2001. } else {
  2002. #ifdef PyWeakref_CheckProxy
  2003. if (PyWeakref_CheckProxy(pyobj)) {
  2004. PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  2005. return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  2006. }
  2007. #endif
  2008. obj = PyObject_GetAttr(pyobj,SWIG_This());
  2009. if (obj) {
  2010. Py_DECREF(obj);
  2011. } else {
  2012. if (PyErr_Occurred()) PyErr_Clear();
  2013. return 0;
  2014. }
  2015. }
  2016. }
  2017. #else
  2018. obj = PyObject_GetAttr(pyobj,SWIG_This());
  2019. if (obj) {
  2020. Py_DECREF(obj);
  2021. } else {
  2022. if (PyErr_Occurred()) PyErr_Clear();
  2023. return 0;
  2024. }
  2025. #endif
  2026. if (obj && !SwigPyObject_Check(obj)) {
  2027. /* a PyObject is called 'this', try to get the 'real this'
  2028. SwigPyObject from it */
  2029. return SWIG_Python_GetSwigThis(obj);
  2030. }
  2031. return (SwigPyObject *)obj;
  2032. #endif
  2033. }
  2034. /* Acquire a pointer value */
  2035. SWIGRUNTIME int
  2036. SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  2037. if (own == SWIG_POINTER_OWN) {
  2038. SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  2039. if (sobj) {
  2040. int oldown = sobj->own;
  2041. sobj->own = own;
  2042. return oldown;
  2043. }
  2044. }
  2045. return 0;
  2046. }
  2047. /* Convert a pointer value */
  2048. SWIGRUNTIME int
  2049. SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  2050. int res;
  2051. SwigPyObject *sobj;
  2052. int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
  2053. if (!obj)
  2054. return SWIG_ERROR;
  2055. if (obj == Py_None && !implicit_conv) {
  2056. if (ptr)
  2057. *ptr = 0;
  2058. return SWIG_OK;
  2059. }
  2060. res = SWIG_ERROR;
  2061. sobj = SWIG_Python_GetSwigThis(obj);
  2062. if (own)
  2063. *own = 0;
  2064. while (sobj) {
  2065. void *vptr = sobj->ptr;
  2066. if (ty) {
  2067. swig_type_info *to = sobj->ty;
  2068. if (to == ty) {
  2069. /* no type cast needed */
  2070. if (ptr) *ptr = vptr;
  2071. break;
  2072. } else {
  2073. swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  2074. if (!tc) {
  2075. sobj = (SwigPyObject *)sobj->next;
  2076. } else {
  2077. if (ptr) {
  2078. int newmemory = 0;
  2079. *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  2080. if (newmemory == SWIG_CAST_NEW_MEMORY) {
  2081. assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  2082. if (own)
  2083. *own = *own | SWIG_CAST_NEW_MEMORY;
  2084. }
  2085. }
  2086. break;
  2087. }
  2088. }
  2089. } else {
  2090. if (ptr) *ptr = vptr;
  2091. break;
  2092. }
  2093. }
  2094. if (sobj) {
  2095. if (own)
  2096. *own = *own | sobj->own;
  2097. if (flags & SWIG_POINTER_DISOWN) {
  2098. sobj->own = 0;
  2099. }
  2100. res = SWIG_OK;
  2101. } else {
  2102. if (implicit_conv) {
  2103. SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  2104. if (data && !data->implicitconv) {
  2105. PyObject *klass = data->klass;
  2106. if (klass) {
  2107. PyObject *impconv;
  2108. data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  2109. impconv = SWIG_Python_CallFunctor(klass, obj);
  2110. data->implicitconv = 0;
  2111. if (PyErr_Occurred()) {
  2112. PyErr_Clear();
  2113. impconv = 0;
  2114. }
  2115. if (impconv) {
  2116. SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  2117. if (iobj) {
  2118. void *vptr;
  2119. res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  2120. if (SWIG_IsOK(res)) {
  2121. if (ptr) {
  2122. *ptr = vptr;
  2123. /* transfer the ownership to 'ptr' */
  2124. iobj->own = 0;
  2125. res = SWIG_AddCast(res);
  2126. res = SWIG_AddNewMask(res);
  2127. } else {
  2128. res = SWIG_AddCast(res);
  2129. }
  2130. }
  2131. }
  2132. Py_DECREF(impconv);
  2133. }
  2134. }
  2135. }
  2136. }
  2137. if (!SWIG_IsOK(res) && obj == Py_None) {
  2138. if (ptr)
  2139. *ptr = 0;
  2140. if (PyErr_Occurred())
  2141. PyErr_Clear();
  2142. res = SWIG_OK;
  2143. }
  2144. }
  2145. return res;
  2146. }
  2147. /* Convert a function ptr value */
  2148. SWIGRUNTIME int
  2149. SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  2150. if (!PyCFunction_Check(obj)) {
  2151. return SWIG_ConvertPtr(obj, ptr, ty, 0);
  2152. } else {
  2153. void *vptr = 0;
  2154. /* here we get the method pointer for callbacks */
  2155. const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  2156. const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  2157. if (desc)
  2158. desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  2159. if (!desc)
  2160. return SWIG_ERROR;
  2161. if (ty) {
  2162. swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
  2163. if (tc) {
  2164. int newmemory = 0;
  2165. *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  2166. assert(!newmemory); /* newmemory handling not yet implemented */
  2167. } else {
  2168. return SWIG_ERROR;
  2169. }
  2170. } else {
  2171. *ptr = vptr;
  2172. }
  2173. return SWIG_OK;
  2174. }
  2175. }
  2176. /* Convert a packed value value */
  2177. SWIGRUNTIME int
  2178. SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  2179. swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  2180. if (!to) return SWIG_ERROR;
  2181. if (ty) {
  2182. if (to != ty) {
  2183. /* check type cast? */
  2184. swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  2185. if (!tc) return SWIG_ERROR;
  2186. }
  2187. }
  2188. return SWIG_OK;
  2189. }
  2190. /* -----------------------------------------------------------------------------
  2191. * Create a new pointer object
  2192. * ----------------------------------------------------------------------------- */
  2193. /*
  2194. Create a new instance object, without calling __init__, and set the
  2195. 'this' attribute.
  2196. */
  2197. SWIGRUNTIME PyObject*
  2198. SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  2199. {
  2200. #if (PY_VERSION_HEX >= 0x02020000)
  2201. PyObject *inst = 0;
  2202. PyObject *newraw = data->newraw;
  2203. if (newraw) {
  2204. inst = PyObject_Call(newraw, data->newargs, NULL);
  2205. if (inst) {
  2206. #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  2207. PyObject **dictptr = _PyObject_GetDictPtr(inst);
  2208. if (dictptr != NULL) {
  2209. PyObject *dict = *dictptr;
  2210. if (dict == NULL) {
  2211. dict = PyDict_New();
  2212. *dictptr = dict;
  2213. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2214. }
  2215. }
  2216. #else
  2217. PyObject *key = SWIG_This();
  2218. PyObject_SetAttr(inst, key, swig_this);
  2219. #endif
  2220. }
  2221. } else {
  2222. #if PY_VERSION_HEX >= 0x03000000
  2223. inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
  2224. if (inst) {
  2225. PyObject_SetAttr(inst, SWIG_This(), swig_this);
  2226. Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  2227. }
  2228. #else
  2229. PyObject *dict = PyDict_New();
  2230. if (dict) {
  2231. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2232. inst = PyInstance_NewRaw(data->newargs, dict);
  2233. Py_DECREF(dict);
  2234. }
  2235. #endif
  2236. }
  2237. return inst;
  2238. #else
  2239. #if (PY_VERSION_HEX >= 0x02010000)
  2240. PyObject *inst = 0;
  2241. PyObject *dict = PyDict_New();
  2242. if (dict) {
  2243. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2244. inst = PyInstance_NewRaw(data->newargs, dict);
  2245. Py_DECREF(dict);
  2246. }
  2247. return (PyObject *) inst;
  2248. #else
  2249. PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  2250. if (inst == NULL) {
  2251. return NULL;
  2252. }
  2253. inst->in_class = (PyClassObject *)data->newargs;
  2254. Py_INCREF(inst->in_class);
  2255. inst->in_dict = PyDict_New();
  2256. if (inst->in_dict == NULL) {
  2257. Py_DECREF(inst);
  2258. return NULL;
  2259. }
  2260. #ifdef Py_TPFLAGS_HAVE_WEAKREFS
  2261. inst->in_weakreflist = NULL;
  2262. #endif
  2263. #ifdef Py_TPFLAGS_GC
  2264. PyObject_GC_Init(inst);
  2265. #endif
  2266. PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  2267. return (PyObject *) inst;
  2268. #endif
  2269. #endif
  2270. }
  2271. SWIGRUNTIME void
  2272. SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  2273. {
  2274. PyObject *dict;
  2275. #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  2276. PyObject **dictptr = _PyObject_GetDictPtr(inst);
  2277. if (dictptr != NULL) {
  2278. dict = *dictptr;
  2279. if (dict == NULL) {
  2280. dict = PyDict_New();
  2281. *dictptr = dict;
  2282. }
  2283. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2284. return;
  2285. }
  2286. #endif
  2287. dict = PyObject_GetAttrString(inst, (char*)"__dict__");
  2288. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2289. Py_DECREF(dict);
  2290. }
  2291. SWIGINTERN PyObject *
  2292. SWIG_Python_InitShadowInstance(PyObject *args) {
  2293. PyObject *obj[2];
  2294. if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  2295. return NULL;
  2296. } else {
  2297. SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  2298. if (sthis) {
  2299. SwigPyObject_append((PyObject*) sthis, obj[1]);
  2300. } else {
  2301. SWIG_Python_SetSwigThis(obj[0], obj[1]);
  2302. }
  2303. return SWIG_Py_Void();
  2304. }
  2305. }
  2306. /* Create a new pointer object */
  2307. SWIGRUNTIME PyObject *
  2308. SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  2309. SwigPyClientData *clientdata;
  2310. PyObject * robj;
  2311. int own;
  2312. if (!ptr)
  2313. return SWIG_Py_Void();
  2314. clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  2315. own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  2316. if (clientdata && clientdata->pytype) {
  2317. SwigPyObject *newobj;
  2318. if (flags & SWIG_BUILTIN_TP_INIT) {
  2319. newobj = (SwigPyObject*) self;
  2320. if (newobj->ptr) {
  2321. PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  2322. while (newobj->next)
  2323. newobj = (SwigPyObject *) newobj->next;
  2324. newobj->next = next_self;
  2325. newobj = (SwigPyObject *)next_self;
  2326. }
  2327. } else {
  2328. newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  2329. }
  2330. if (newobj) {
  2331. newobj->ptr = ptr;
  2332. newobj->ty = type;
  2333. newobj->own = own;
  2334. newobj->next = 0;
  2335. #ifdef SWIGPYTHON_BUILTIN
  2336. newobj->dict = 0;
  2337. #endif
  2338. return (PyObject*) newobj;
  2339. }
  2340. return SWIG_Py_Void();
  2341. }
  2342. assert(!(flags & SWIG_BUILTIN_TP_INIT));
  2343. robj = SwigPyObject_New(ptr, type, own);
  2344. if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  2345. PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  2346. Py_DECREF(robj);
  2347. robj = inst;
  2348. }
  2349. return robj;
  2350. }
  2351. /* Create a new packed object */
  2352. SWIGRUNTIMEINLINE PyObject *
  2353. SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  2354. return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  2355. }
  2356. /* -----------------------------------------------------------------------------*
  2357. * Get type list
  2358. * -----------------------------------------------------------------------------*/
  2359. #ifdef SWIG_LINK_RUNTIME
  2360. void *SWIG_ReturnGlobalTypeList(void *);
  2361. #endif
  2362. SWIGRUNTIME swig_module_info *
  2363. SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  2364. static void *type_pointer = (void *)0;
  2365. /* first check if module already created */
  2366. if (!type_pointer) {
  2367. #ifdef SWIG_LINK_RUNTIME
  2368. type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  2369. #else
  2370. # ifdef SWIGPY_USE_CAPSULE
  2371. type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  2372. # else
  2373. type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
  2374. (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
  2375. # endif
  2376. if (PyErr_Occurred()) {
  2377. PyErr_Clear();
  2378. type_pointer = (void *)0;
  2379. }
  2380. #endif
  2381. }
  2382. return (swig_module_info *) type_pointer;
  2383. }
  2384. #if PY_MAJOR_VERSION < 2
  2385. /* PyModule_AddObject function was introduced in Python 2.0. The following function
  2386. is copied out of Python/modsupport.c in python version 2.3.4 */
  2387. SWIGINTERN int
  2388. PyModule_AddObject(PyObject *m, char *name, PyObject *o)
  2389. {
  2390. PyObject *dict;
  2391. if (!PyModule_Check(m)) {
  2392. PyErr_SetString(PyExc_TypeError,
  2393. "PyModule_AddObject() needs module as first arg");
  2394. return SWIG_ERROR;
  2395. }
  2396. if (!o) {
  2397. PyErr_SetString(PyExc_TypeError,
  2398. "PyModule_AddObject() needs non-NULL value");
  2399. return SWIG_ERROR;
  2400. }
  2401. dict = PyModule_GetDict(m);
  2402. if (dict == NULL) {
  2403. /* Internal error -- modules must have a dict! */
  2404. PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
  2405. PyModule_GetName(m));
  2406. return SWIG_ERROR;
  2407. }
  2408. if (PyDict_SetItemString(dict, name, o))
  2409. return SWIG_ERROR;
  2410. Py_DECREF(o);
  2411. return SWIG_OK;
  2412. }
  2413. #endif
  2414. SWIGRUNTIME void
  2415. #ifdef SWIGPY_USE_CAPSULE
  2416. SWIG_Python_DestroyModule(PyObject *obj)
  2417. #else
  2418. SWIG_Python_DestroyModule(void *vptr)
  2419. #endif
  2420. {
  2421. #ifdef SWIGPY_USE_CAPSULE
  2422. swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  2423. #else
  2424. swig_module_info *swig_module = (swig_module_info *) vptr;
  2425. #endif
  2426. swig_type_info **types = swig_module->types;
  2427. size_t i;
  2428. for (i =0; i < swig_module->size; ++i) {
  2429. swig_type_info *ty = types[i];
  2430. if (ty->owndata) {
  2431. SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  2432. if (data) SwigPyClientData_Del(data);
  2433. }
  2434. }
  2435. Py_DECREF(SWIG_This());
  2436. swig_this = NULL;
  2437. }
  2438. SWIGRUNTIME void
  2439. SWIG_Python_SetModule(swig_module_info *swig_module) {
  2440. #if PY_VERSION_HEX >= 0x03000000
  2441. /* Add a dummy module object into sys.modules */
  2442. PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  2443. #else
  2444. static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  2445. PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  2446. #endif
  2447. #ifdef SWIGPY_USE_CAPSULE
  2448. PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  2449. if (pointer && module) {
  2450. PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  2451. } else {
  2452. Py_XDECREF(pointer);
  2453. }
  2454. #else
  2455. PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  2456. if (pointer && module) {
  2457. PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  2458. } else {
  2459. Py_XDECREF(pointer);
  2460. }
  2461. #endif
  2462. }
  2463. /* The python cached type query */
  2464. SWIGRUNTIME PyObject *
  2465. SWIG_Python_TypeCache(void) {
  2466. static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  2467. return cache;
  2468. }
  2469. SWIGRUNTIME swig_type_info *
  2470. SWIG_Python_TypeQuery(const char *type)
  2471. {
  2472. PyObject *cache = SWIG_Python_TypeCache();
  2473. PyObject *key = SWIG_Python_str_FromChar(type);
  2474. PyObject *obj = PyDict_GetItem(cache, key);
  2475. swig_type_info *descriptor;
  2476. if (obj) {
  2477. #ifdef SWIGPY_USE_CAPSULE
  2478. descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  2479. #else
  2480. descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
  2481. #endif
  2482. } else {
  2483. swig_module_info *swig_module = SWIG_GetModule(0);
  2484. descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  2485. if (descriptor) {
  2486. #ifdef SWIGPY_USE_CAPSULE
  2487. obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  2488. #else
  2489. obj = PyCObject_FromVoidPtr(descriptor, NULL);
  2490. #endif
  2491. PyDict_SetItem(cache, key, obj);
  2492. Py_DECREF(obj);
  2493. }
  2494. }
  2495. Py_DECREF(key);
  2496. return descriptor;
  2497. }
  2498. /*
  2499. For backward compatibility only
  2500. */
  2501. #define SWIG_POINTER_EXCEPTION 0
  2502. #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  2503. #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  2504. SWIGRUNTIME int
  2505. SWIG_Python_AddErrMesg(const char* mesg, int infront)
  2506. {
  2507. if (PyErr_Occurred()) {
  2508. PyObject *type = 0;
  2509. PyObject *value = 0;
  2510. PyObject *traceback = 0;
  2511. PyErr_Fetch(&type, &value, &traceback);
  2512. if (value) {
  2513. char *tmp;
  2514. PyObject *old_str = PyObject_Str(value);
  2515. Py_XINCREF(type);
  2516. PyErr_Clear();
  2517. if (infront) {
  2518. PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
  2519. } else {
  2520. PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
  2521. }
  2522. SWIG_Python_str_DelForPy3(tmp);
  2523. Py_DECREF(old_str);
  2524. }
  2525. return 1;
  2526. } else {
  2527. return 0;
  2528. }
  2529. }
  2530. SWIGRUNTIME int
  2531. SWIG_Python_ArgFail(int argnum)
  2532. {
  2533. if (PyErr_Occurred()) {
  2534. /* add information about failing argument */
  2535. char mesg[256];
  2536. PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  2537. return SWIG_Python_AddErrMesg(mesg, 1);
  2538. } else {
  2539. return 0;
  2540. }
  2541. }
  2542. SWIGRUNTIMEINLINE const char *
  2543. SwigPyObject_GetDesc(PyObject *self)
  2544. {
  2545. SwigPyObject *v = (SwigPyObject *)self;
  2546. swig_type_info *ty = v ? v->ty : 0;
  2547. return ty ? ty->str : "";
  2548. }
  2549. SWIGRUNTIME void
  2550. SWIG_Python_TypeError(const char *type, PyObject *obj)
  2551. {
  2552. if (type) {
  2553. #if defined(SWIG_COBJECT_TYPES)
  2554. if (obj && SwigPyObject_Check(obj)) {
  2555. const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  2556. if (otype) {
  2557. PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  2558. type, otype);
  2559. return;
  2560. }
  2561. } else
  2562. #endif
  2563. {
  2564. const char *otype = (obj ? obj->ob_type->tp_name : 0);
  2565. if (otype) {
  2566. PyObject *str = PyObject_Str(obj);
  2567. const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  2568. if (cstr) {
  2569. PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  2570. type, otype, cstr);
  2571. SWIG_Python_str_DelForPy3(cstr);
  2572. } else {
  2573. PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  2574. type, otype);
  2575. }
  2576. Py_XDECREF(str);
  2577. return;
  2578. }
  2579. }
  2580. PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  2581. } else {
  2582. PyErr_Format(PyExc_TypeError, "unexpected type is received");
  2583. }
  2584. }
  2585. /* Convert a pointer value, signal an exception on a type mismatch */
  2586. SWIGRUNTIME void *
  2587. SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  2588. void *result;
  2589. if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  2590. PyErr_Clear();
  2591. #if SWIG_POINTER_EXCEPTION
  2592. if (flags) {
  2593. SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  2594. SWIG_Python_ArgFail(argnum);
  2595. }
  2596. #endif
  2597. }
  2598. return result;
  2599. }
  2600. #ifdef SWIGPYTHON_BUILTIN
  2601. SWIGRUNTIME int
  2602. SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  2603. PyTypeObject *tp = obj->ob_type;
  2604. PyObject *descr;
  2605. PyObject *encoded_name;
  2606. descrsetfunc f;
  2607. int res = -1;
  2608. # ifdef Py_USING_UNICODE
  2609. if (PyString_Check(name)) {
  2610. name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  2611. if (!name)
  2612. return -1;
  2613. } else if (!PyUnicode_Check(name))
  2614. # else
  2615. if (!PyString_Check(name))
  2616. # endif
  2617. {
  2618. PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  2619. return -1;
  2620. } else {
  2621. Py_INCREF(name);
  2622. }
  2623. if (!tp->tp_dict) {
  2624. if (PyType_Ready(tp) < 0)
  2625. goto done;
  2626. }
  2627. descr = _PyType_Lookup(tp, name);
  2628. f = NULL;
  2629. if (descr != NULL)
  2630. f = descr->ob_type->tp_descr_set;
  2631. if (!f) {
  2632. if (PyString_Check(name)) {
  2633. encoded_name = name;
  2634. Py_INCREF(name);
  2635. } else {
  2636. encoded_name = PyUnicode_AsUTF8String(name);
  2637. }
  2638. PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  2639. Py_DECREF(encoded_name);
  2640. } else {
  2641. res = f(descr, obj, value);
  2642. }
  2643. done:
  2644. Py_DECREF(name);
  2645. return res;
  2646. }
  2647. #endif
  2648. #ifdef __cplusplus
  2649. }
  2650. #endif
  2651. #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  2652. #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  2653. /* -------- TYPES TABLE (BEGIN) -------- */
  2654. #define SWIGTYPE_p_ESLconnection swig_types[0]
  2655. #define SWIGTYPE_p_ESLevent swig_types[1]
  2656. #define SWIGTYPE_p_char swig_types[2]
  2657. #define SWIGTYPE_p_esl_event_t swig_types[3]
  2658. #define SWIGTYPE_p_esl_priority_t swig_types[4]
  2659. static swig_type_info *swig_types[6];
  2660. static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
  2661. #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  2662. #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  2663. /* -------- TYPES TABLE (END) -------- */
  2664. #if (PY_VERSION_HEX <= 0x02000000)
  2665. # if !defined(SWIG_PYTHON_CLASSIC)
  2666. # error "This python version requires swig to be run with the '-classic' option"
  2667. # endif
  2668. #endif
  2669. /*-----------------------------------------------
  2670. @(target):= _ESL.so
  2671. ------------------------------------------------*/
  2672. #if PY_VERSION_HEX >= 0x03000000
  2673. # define SWIG_init PyInit__ESL
  2674. #else
  2675. # define SWIG_init init_ESL
  2676. #endif
  2677. #define SWIG_name "_ESL"
  2678. #define SWIGVERSION 0x030002
  2679. #define SWIG_VERSION SWIGVERSION
  2680. #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  2681. #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  2682. #include <stdexcept>
  2683. namespace swig {
  2684. class SwigPtr_PyObject {
  2685. protected:
  2686. PyObject *_obj;
  2687. public:
  2688. SwigPtr_PyObject() :_obj(0)
  2689. {
  2690. }
  2691. SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
  2692. {
  2693. Py_XINCREF(_obj);
  2694. }
  2695. SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
  2696. {
  2697. if (initial_ref) {
  2698. Py_XINCREF(_obj);
  2699. }
  2700. }
  2701. SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
  2702. {
  2703. Py_XINCREF(item._obj);
  2704. Py_XDECREF(_obj);
  2705. _obj = item._obj;
  2706. return *this;
  2707. }
  2708. ~SwigPtr_PyObject()
  2709. {
  2710. Py_XDECREF(_obj);
  2711. }
  2712. operator PyObject *() const
  2713. {
  2714. return _obj;
  2715. }
  2716. PyObject *operator->() const
  2717. {
  2718. return _obj;
  2719. }
  2720. };
  2721. }
  2722. namespace swig {
  2723. struct SwigVar_PyObject : SwigPtr_PyObject {
  2724. SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
  2725. SwigVar_PyObject & operator = (PyObject* obj)
  2726. {
  2727. Py_XDECREF(_obj);
  2728. _obj = obj;
  2729. return *this;
  2730. }
  2731. };
  2732. }
  2733. #include "esl.h"
  2734. #include "esl_oop.h"
  2735. SWIGINTERN swig_type_info*
  2736. SWIG_pchar_descriptor(void)
  2737. {
  2738. static int init = 0;
  2739. static swig_type_info* info = 0;
  2740. if (!init) {
  2741. info = SWIG_TypeQuery("_p_char");
  2742. init = 1;
  2743. }
  2744. return info;
  2745. }
  2746. SWIGINTERN int
  2747. SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  2748. {
  2749. #if PY_VERSION_HEX>=0x03000000
  2750. if (PyUnicode_Check(obj))
  2751. #else
  2752. if (PyString_Check(obj))
  2753. #endif
  2754. {
  2755. char *cstr; Py_ssize_t len;
  2756. #if PY_VERSION_HEX>=0x03000000
  2757. if (!alloc && cptr) {
  2758. /* We can't allow converting without allocation, since the internal
  2759. representation of string in Python 3 is UCS-2/UCS-4 but we require
  2760. a UTF-8 representation.
  2761. TODO(bhy) More detailed explanation */
  2762. return SWIG_RuntimeError;
  2763. }
  2764. obj = PyUnicode_AsUTF8String(obj);
  2765. PyBytes_AsStringAndSize(obj, &cstr, &len);
  2766. if(alloc) *alloc = SWIG_NEWOBJ;
  2767. #else
  2768. PyString_AsStringAndSize(obj, &cstr, &len);
  2769. #endif
  2770. if (cptr) {
  2771. if (alloc) {
  2772. /*
  2773. In python the user should not be able to modify the inner
  2774. string representation. To warranty that, if you define
  2775. SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
  2776. buffer is always returned.
  2777. The default behavior is just to return the pointer value,
  2778. so, be careful.
  2779. */
  2780. #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
  2781. if (*alloc != SWIG_OLDOBJ)
  2782. #else
  2783. if (*alloc == SWIG_NEWOBJ)
  2784. #endif
  2785. {
  2786. *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
  2787. *alloc = SWIG_NEWOBJ;
  2788. }
  2789. else {
  2790. *cptr = cstr;
  2791. *alloc = SWIG_OLDOBJ;
  2792. }
  2793. } else {
  2794. #if PY_VERSION_HEX>=0x03000000
  2795. assert(0); /* Should never reach here in Python 3 */
  2796. #endif
  2797. *cptr = SWIG_Python_str_AsChar(obj);
  2798. }
  2799. }
  2800. if (psize) *psize = len + 1;
  2801. #if PY_VERSION_HEX>=0x03000000
  2802. Py_XDECREF(obj);
  2803. #endif
  2804. return SWIG_OK;
  2805. } else {
  2806. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  2807. if (pchar_descriptor) {
  2808. void* vptr = 0;
  2809. if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  2810. if (cptr) *cptr = (char *) vptr;
  2811. if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  2812. if (alloc) *alloc = SWIG_OLDOBJ;
  2813. return SWIG_OK;
  2814. }
  2815. }
  2816. }
  2817. return SWIG_TypeError;
  2818. }
  2819. SWIGINTERNINLINE PyObject *
  2820. SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  2821. {
  2822. if (carray) {
  2823. if (size > INT_MAX) {
  2824. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  2825. return pchar_descriptor ?
  2826. SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
  2827. } else {
  2828. #if PY_VERSION_HEX >= 0x03000000
  2829. #if PY_VERSION_HEX >= 0x03010000
  2830. return PyUnicode_DecodeUTF8(carray, static_cast< int >(size), "surrogateescape");
  2831. #else
  2832. return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
  2833. #endif
  2834. #else
  2835. return PyString_FromStringAndSize(carray, static_cast< int >(size));
  2836. #endif
  2837. }
  2838. } else {
  2839. return SWIG_Py_Void();
  2840. }
  2841. }
  2842. SWIGINTERNINLINE PyObject *
  2843. SWIG_FromCharPtr(const char *cptr)
  2844. {
  2845. return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  2846. }
  2847. #include <limits.h>
  2848. #if !defined(SWIG_NO_LLONG_MAX)
  2849. # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  2850. # define LLONG_MAX __LONG_LONG_MAX__
  2851. # define LLONG_MIN (-LLONG_MAX - 1LL)
  2852. # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  2853. # endif
  2854. #endif
  2855. SWIGINTERN int
  2856. SWIG_AsVal_double (PyObject *obj, double *val)
  2857. {
  2858. int res = SWIG_TypeError;
  2859. if (PyFloat_Check(obj)) {
  2860. if (val) *val = PyFloat_AsDouble(obj);
  2861. return SWIG_OK;
  2862. } else if (PyInt_Check(obj)) {
  2863. if (val) *val = PyInt_AsLong(obj);
  2864. return SWIG_OK;
  2865. } else if (PyLong_Check(obj)) {
  2866. double v = PyLong_AsDouble(obj);
  2867. if (!PyErr_Occurred()) {
  2868. if (val) *val = v;
  2869. return SWIG_OK;
  2870. } else {
  2871. PyErr_Clear();
  2872. }
  2873. }
  2874. #ifdef SWIG_PYTHON_CAST_MODE
  2875. {
  2876. int dispatch = 0;
  2877. double d = PyFloat_AsDouble(obj);
  2878. if (!PyErr_Occurred()) {
  2879. if (val) *val = d;
  2880. return SWIG_AddCast(SWIG_OK);
  2881. } else {
  2882. PyErr_Clear();
  2883. }
  2884. if (!dispatch) {
  2885. long v = PyLong_AsLong(obj);
  2886. if (!PyErr_Occurred()) {
  2887. if (val) *val = v;
  2888. return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
  2889. } else {
  2890. PyErr_Clear();
  2891. }
  2892. }
  2893. }
  2894. #endif
  2895. return res;
  2896. }
  2897. #include <float.h>
  2898. #include <math.h>
  2899. SWIGINTERNINLINE int
  2900. SWIG_CanCastAsInteger(double *d, double min, double max) {
  2901. double x = *d;
  2902. if ((min <= x && x <= max)) {
  2903. double fx = floor(x);
  2904. double cx = ceil(x);
  2905. double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  2906. if ((errno == EDOM) || (errno == ERANGE)) {
  2907. errno = 0;
  2908. } else {
  2909. double summ, reps, diff;
  2910. if (rd < x) {
  2911. diff = x - rd;
  2912. } else if (rd > x) {
  2913. diff = rd - x;
  2914. } else {
  2915. return 1;
  2916. }
  2917. summ = rd + x;
  2918. reps = diff/summ;
  2919. if (reps < 8*DBL_EPSILON) {
  2920. *d = rd;
  2921. return 1;
  2922. }
  2923. }
  2924. }
  2925. return 0;
  2926. }
  2927. SWIGINTERN int
  2928. SWIG_AsVal_long (PyObject *obj, long* val)
  2929. {
  2930. if (PyInt_Check(obj)) {
  2931. if (val) *val = PyInt_AsLong(obj);
  2932. return SWIG_OK;
  2933. } else if (PyLong_Check(obj)) {
  2934. long v = PyLong_AsLong(obj);
  2935. if (!PyErr_Occurred()) {
  2936. if (val) *val = v;
  2937. return SWIG_OK;
  2938. } else {
  2939. PyErr_Clear();
  2940. }
  2941. }
  2942. #ifdef SWIG_PYTHON_CAST_MODE
  2943. {
  2944. int dispatch = 0;
  2945. long v = PyInt_AsLong(obj);
  2946. if (!PyErr_Occurred()) {
  2947. if (val) *val = v;
  2948. return SWIG_AddCast(SWIG_OK);
  2949. } else {
  2950. PyErr_Clear();
  2951. }
  2952. if (!dispatch) {
  2953. double d;
  2954. int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  2955. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  2956. if (val) *val = (long)(d);
  2957. return res;
  2958. }
  2959. }
  2960. }
  2961. #endif
  2962. return SWIG_TypeError;
  2963. }
  2964. SWIGINTERN int
  2965. SWIG_AsVal_int (PyObject * obj, int *val)
  2966. {
  2967. long v;
  2968. int res = SWIG_AsVal_long (obj, &v);
  2969. if (SWIG_IsOK(res)) {
  2970. if ((v < INT_MIN || v > INT_MAX)) {
  2971. return SWIG_OverflowError;
  2972. } else {
  2973. if (val) *val = static_cast< int >(v);
  2974. }
  2975. }
  2976. return res;
  2977. }
  2978. SWIGINTERNINLINE PyObject*
  2979. SWIG_From_int (int value)
  2980. {
  2981. return PyInt_FromLong((long) value);
  2982. }
  2983. SWIGINTERNINLINE PyObject*
  2984. SWIG_From_bool (bool value)
  2985. {
  2986. return PyBool_FromLong(value ? 1 : 0);
  2987. }
  2988. #ifdef __cplusplus
  2989. extern "C" {
  2990. #endif
  2991. SWIGINTERN PyObject *_wrap_ESLevent_event_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2992. PyObject *resultobj = 0;
  2993. ESLevent *arg1 = (ESLevent *) 0 ;
  2994. esl_event_t *arg2 = (esl_event_t *) 0 ;
  2995. void *argp1 = 0 ;
  2996. int res1 = 0 ;
  2997. void *argp2 = 0 ;
  2998. int res2 = 0 ;
  2999. PyObject * obj0 = 0 ;
  3000. PyObject * obj1 = 0 ;
  3001. if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_event_set",&obj0,&obj1)) SWIG_fail;
  3002. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3003. if (!SWIG_IsOK(res1)) {
  3004. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_set" "', argument " "1"" of type '" "ESLevent *""'");
  3005. }
  3006. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3007. res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_esl_event_t, SWIG_POINTER_DISOWN | 0 );
  3008. if (!SWIG_IsOK(res2)) {
  3009. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_event_set" "', argument " "2"" of type '" "esl_event_t *""'");
  3010. }
  3011. arg2 = reinterpret_cast< esl_event_t * >(argp2);
  3012. {
  3013. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3014. if (arg1) (arg1)->event = arg2;
  3015. SWIG_PYTHON_THREAD_END_ALLOW;
  3016. }
  3017. resultobj = SWIG_Py_Void();
  3018. return resultobj;
  3019. fail:
  3020. return NULL;
  3021. }
  3022. SWIGINTERN PyObject *_wrap_ESLevent_event_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3023. PyObject *resultobj = 0;
  3024. ESLevent *arg1 = (ESLevent *) 0 ;
  3025. void *argp1 = 0 ;
  3026. int res1 = 0 ;
  3027. PyObject * obj0 = 0 ;
  3028. esl_event_t *result = 0 ;
  3029. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_event_get",&obj0)) SWIG_fail;
  3030. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3031. if (!SWIG_IsOK(res1)) {
  3032. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_get" "', argument " "1"" of type '" "ESLevent *""'");
  3033. }
  3034. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3035. {
  3036. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3037. result = (esl_event_t *) ((arg1)->event);
  3038. SWIG_PYTHON_THREAD_END_ALLOW;
  3039. }
  3040. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_esl_event_t, 0 | 0 );
  3041. return resultobj;
  3042. fail:
  3043. return NULL;
  3044. }
  3045. SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3046. PyObject *resultobj = 0;
  3047. ESLevent *arg1 = (ESLevent *) 0 ;
  3048. char *arg2 = (char *) 0 ;
  3049. void *argp1 = 0 ;
  3050. int res1 = 0 ;
  3051. int res2 ;
  3052. char *buf2 = 0 ;
  3053. int alloc2 = 0 ;
  3054. PyObject * obj0 = 0 ;
  3055. PyObject * obj1 = 0 ;
  3056. if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_serialized_string_set",&obj0,&obj1)) SWIG_fail;
  3057. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3058. if (!SWIG_IsOK(res1)) {
  3059. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_set" "', argument " "1"" of type '" "ESLevent *""'");
  3060. }
  3061. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3062. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3063. if (!SWIG_IsOK(res2)) {
  3064. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialized_string_set" "', argument " "2"" of type '" "char *""'");
  3065. }
  3066. arg2 = reinterpret_cast< char * >(buf2);
  3067. {
  3068. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3069. if (arg1->serialized_string) delete[] arg1->serialized_string;
  3070. if (arg2) {
  3071. size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
  3072. arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
  3073. } else {
  3074. arg1->serialized_string = 0;
  3075. }
  3076. SWIG_PYTHON_THREAD_END_ALLOW;
  3077. }
  3078. resultobj = SWIG_Py_Void();
  3079. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3080. return resultobj;
  3081. fail:
  3082. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3083. return NULL;
  3084. }
  3085. SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3086. PyObject *resultobj = 0;
  3087. ESLevent *arg1 = (ESLevent *) 0 ;
  3088. void *argp1 = 0 ;
  3089. int res1 = 0 ;
  3090. PyObject * obj0 = 0 ;
  3091. char *result = 0 ;
  3092. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_serialized_string_get",&obj0)) SWIG_fail;
  3093. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3094. if (!SWIG_IsOK(res1)) {
  3095. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_get" "', argument " "1"" of type '" "ESLevent *""'");
  3096. }
  3097. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3098. {
  3099. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3100. result = (char *) ((arg1)->serialized_string);
  3101. SWIG_PYTHON_THREAD_END_ALLOW;
  3102. }
  3103. resultobj = SWIG_FromCharPtr((const char *)result);
  3104. return resultobj;
  3105. fail:
  3106. return NULL;
  3107. }
  3108. SWIGINTERN PyObject *_wrap_ESLevent_mine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3109. PyObject *resultobj = 0;
  3110. ESLevent *arg1 = (ESLevent *) 0 ;
  3111. int arg2 ;
  3112. void *argp1 = 0 ;
  3113. int res1 = 0 ;
  3114. int val2 ;
  3115. int ecode2 = 0 ;
  3116. PyObject * obj0 = 0 ;
  3117. PyObject * obj1 = 0 ;
  3118. if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_mine_set",&obj0,&obj1)) SWIG_fail;
  3119. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3120. if (!SWIG_IsOK(res1)) {
  3121. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_set" "', argument " "1"" of type '" "ESLevent *""'");
  3122. }
  3123. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3124. ecode2 = SWIG_AsVal_int(obj1, &val2);
  3125. if (!SWIG_IsOK(ecode2)) {
  3126. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLevent_mine_set" "', argument " "2"" of type '" "int""'");
  3127. }
  3128. arg2 = static_cast< int >(val2);
  3129. {
  3130. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3131. if (arg1) (arg1)->mine = arg2;
  3132. SWIG_PYTHON_THREAD_END_ALLOW;
  3133. }
  3134. resultobj = SWIG_Py_Void();
  3135. return resultobj;
  3136. fail:
  3137. return NULL;
  3138. }
  3139. SWIGINTERN PyObject *_wrap_ESLevent_mine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3140. PyObject *resultobj = 0;
  3141. ESLevent *arg1 = (ESLevent *) 0 ;
  3142. void *argp1 = 0 ;
  3143. int res1 = 0 ;
  3144. PyObject * obj0 = 0 ;
  3145. int result;
  3146. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_mine_get",&obj0)) SWIG_fail;
  3147. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3148. if (!SWIG_IsOK(res1)) {
  3149. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_get" "', argument " "1"" of type '" "ESLevent *""'");
  3150. }
  3151. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3152. {
  3153. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3154. result = (int) ((arg1)->mine);
  3155. SWIG_PYTHON_THREAD_END_ALLOW;
  3156. }
  3157. resultobj = SWIG_From_int(static_cast< int >(result));
  3158. return resultobj;
  3159. fail:
  3160. return NULL;
  3161. }
  3162. SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3163. PyObject *resultobj = 0;
  3164. char *arg1 = (char *) 0 ;
  3165. char *arg2 = (char *) NULL ;
  3166. int res1 ;
  3167. char *buf1 = 0 ;
  3168. int alloc1 = 0 ;
  3169. int res2 ;
  3170. char *buf2 = 0 ;
  3171. int alloc2 = 0 ;
  3172. PyObject * obj0 = 0 ;
  3173. PyObject * obj1 = 0 ;
  3174. ESLevent *result = 0 ;
  3175. if (!PyArg_ParseTuple(args,(char *)"O|O:new_ESLevent",&obj0,&obj1)) SWIG_fail;
  3176. res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  3177. if (!SWIG_IsOK(res1)) {
  3178. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "char const *""'");
  3179. }
  3180. arg1 = reinterpret_cast< char * >(buf1);
  3181. if (obj1) {
  3182. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3183. if (!SWIG_IsOK(res2)) {
  3184. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "char const *""'");
  3185. }
  3186. arg2 = reinterpret_cast< char * >(buf2);
  3187. }
  3188. {
  3189. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3190. result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);
  3191. SWIG_PYTHON_THREAD_END_ALLOW;
  3192. }
  3193. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 );
  3194. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3195. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3196. return resultobj;
  3197. fail:
  3198. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3199. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3200. return NULL;
  3201. }
  3202. SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3203. PyObject *resultobj = 0;
  3204. esl_event_t *arg1 = (esl_event_t *) 0 ;
  3205. int arg2 = (int) 0 ;
  3206. void *argp1 = 0 ;
  3207. int res1 = 0 ;
  3208. int val2 ;
  3209. int ecode2 = 0 ;
  3210. PyObject * obj0 = 0 ;
  3211. PyObject * obj1 = 0 ;
  3212. ESLevent *result = 0 ;
  3213. if (!PyArg_ParseTuple(args,(char *)"O|O:new_ESLevent",&obj0,&obj1)) SWIG_fail;
  3214. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_esl_event_t, 0 | 0 );
  3215. if (!SWIG_IsOK(res1)) {
  3216. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "esl_event_t *""'");
  3217. }
  3218. arg1 = reinterpret_cast< esl_event_t * >(argp1);
  3219. if (obj1) {
  3220. ecode2 = SWIG_AsVal_int(obj1, &val2);
  3221. if (!SWIG_IsOK(ecode2)) {
  3222. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "int""'");
  3223. }
  3224. arg2 = static_cast< int >(val2);
  3225. }
  3226. {
  3227. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3228. result = (ESLevent *)new ESLevent(arg1,arg2);
  3229. SWIG_PYTHON_THREAD_END_ALLOW;
  3230. }
  3231. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 );
  3232. return resultobj;
  3233. fail:
  3234. return NULL;
  3235. }
  3236. SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3237. PyObject *resultobj = 0;
  3238. ESLevent *arg1 = (ESLevent *) 0 ;
  3239. void *argp1 = 0 ;
  3240. int res1 = 0 ;
  3241. PyObject * obj0 = 0 ;
  3242. ESLevent *result = 0 ;
  3243. if (!PyArg_ParseTuple(args,(char *)"O:new_ESLevent",&obj0)) SWIG_fail;
  3244. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3245. if (!SWIG_IsOK(res1)) {
  3246. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  3247. }
  3248. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3249. {
  3250. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3251. result = (ESLevent *)new ESLevent(arg1);
  3252. SWIG_PYTHON_THREAD_END_ALLOW;
  3253. }
  3254. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 );
  3255. return resultobj;
  3256. fail:
  3257. return NULL;
  3258. }
  3259. SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) {
  3260. int argc;
  3261. PyObject *argv[3];
  3262. int ii;
  3263. if (!PyTuple_Check(args)) SWIG_fail;
  3264. argc = args ? (int)PyObject_Length(args) : 0;
  3265. for (ii = 0; (ii < 2) && (ii < argc); ii++) {
  3266. argv[ii] = PyTuple_GET_ITEM(args,ii);
  3267. }
  3268. if ((argc >= 1) && (argc <= 2)) {
  3269. int _v;
  3270. void *vptr = 0;
  3271. int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_esl_event_t, 0);
  3272. _v = SWIG_CheckState(res);
  3273. if (_v) {
  3274. if (argc <= 1) {
  3275. return _wrap_new_ESLevent__SWIG_1(self, args);
  3276. }
  3277. {
  3278. int res = SWIG_AsVal_int(argv[1], NULL);
  3279. _v = SWIG_CheckState(res);
  3280. }
  3281. if (_v) {
  3282. return _wrap_new_ESLevent__SWIG_1(self, args);
  3283. }
  3284. }
  3285. }
  3286. if (argc == 1) {
  3287. int _v;
  3288. void *vptr = 0;
  3289. int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ESLevent, 0);
  3290. _v = SWIG_CheckState(res);
  3291. if (_v) {
  3292. return _wrap_new_ESLevent__SWIG_2(self, args);
  3293. }
  3294. }
  3295. if ((argc >= 1) && (argc <= 2)) {
  3296. int _v;
  3297. int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  3298. _v = SWIG_CheckState(res);
  3299. if (_v) {
  3300. if (argc <= 1) {
  3301. return _wrap_new_ESLevent__SWIG_0(self, args);
  3302. }
  3303. int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  3304. _v = SWIG_CheckState(res);
  3305. if (_v) {
  3306. return _wrap_new_ESLevent__SWIG_0(self, args);
  3307. }
  3308. }
  3309. }
  3310. fail:
  3311. SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESLevent'.\n"
  3312. " Possible C/C++ prototypes are:\n"
  3313. " ESLevent::ESLevent(char const *,char const *)\n"
  3314. " ESLevent::ESLevent(esl_event_t *,int)\n"
  3315. " ESLevent::ESLevent(ESLevent *)\n");
  3316. return 0;
  3317. }
  3318. SWIGINTERN PyObject *_wrap_delete_ESLevent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3319. PyObject *resultobj = 0;
  3320. ESLevent *arg1 = (ESLevent *) 0 ;
  3321. void *argp1 = 0 ;
  3322. int res1 = 0 ;
  3323. PyObject * obj0 = 0 ;
  3324. if (!PyArg_ParseTuple(args,(char *)"O:delete_ESLevent",&obj0)) SWIG_fail;
  3325. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, SWIG_POINTER_DISOWN | 0 );
  3326. if (!SWIG_IsOK(res1)) {
  3327. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  3328. }
  3329. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3330. {
  3331. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3332. delete arg1;
  3333. SWIG_PYTHON_THREAD_END_ALLOW;
  3334. }
  3335. resultobj = SWIG_Py_Void();
  3336. return resultobj;
  3337. fail:
  3338. return NULL;
  3339. }
  3340. SWIGINTERN PyObject *_wrap_ESLevent_serialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3341. PyObject *resultobj = 0;
  3342. ESLevent *arg1 = (ESLevent *) 0 ;
  3343. char *arg2 = (char *) NULL ;
  3344. void *argp1 = 0 ;
  3345. int res1 = 0 ;
  3346. int res2 ;
  3347. char *buf2 = 0 ;
  3348. int alloc2 = 0 ;
  3349. PyObject * obj0 = 0 ;
  3350. PyObject * obj1 = 0 ;
  3351. char *result = 0 ;
  3352. if (!PyArg_ParseTuple(args,(char *)"O|O:ESLevent_serialize",&obj0,&obj1)) SWIG_fail;
  3353. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3354. if (!SWIG_IsOK(res1)) {
  3355. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialize" "', argument " "1"" of type '" "ESLevent *""'");
  3356. }
  3357. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3358. if (obj1) {
  3359. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3360. if (!SWIG_IsOK(res2)) {
  3361. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialize" "', argument " "2"" of type '" "char const *""'");
  3362. }
  3363. arg2 = reinterpret_cast< char * >(buf2);
  3364. }
  3365. {
  3366. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3367. result = (char *)(arg1)->serialize((char const *)arg2);
  3368. SWIG_PYTHON_THREAD_END_ALLOW;
  3369. }
  3370. resultobj = SWIG_FromCharPtr((const char *)result);
  3371. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3372. return resultobj;
  3373. fail:
  3374. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3375. return NULL;
  3376. }
  3377. SWIGINTERN PyObject *_wrap_ESLevent_setPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3378. PyObject *resultobj = 0;
  3379. ESLevent *arg1 = (ESLevent *) 0 ;
  3380. esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
  3381. void *argp1 = 0 ;
  3382. int res1 = 0 ;
  3383. void *argp2 ;
  3384. int res2 = 0 ;
  3385. PyObject * obj0 = 0 ;
  3386. PyObject * obj1 = 0 ;
  3387. bool result;
  3388. if (!PyArg_ParseTuple(args,(char *)"O|O:ESLevent_setPriority",&obj0,&obj1)) SWIG_fail;
  3389. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3390. if (!SWIG_IsOK(res1)) {
  3391. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_setPriority" "', argument " "1"" of type '" "ESLevent *""'");
  3392. }
  3393. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3394. if (obj1) {
  3395. {
  3396. res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_esl_priority_t, 0 | 0);
  3397. if (!SWIG_IsOK(res2)) {
  3398. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  3399. }
  3400. if (!argp2) {
  3401. SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  3402. } else {
  3403. esl_priority_t * temp = reinterpret_cast< esl_priority_t * >(argp2);
  3404. arg2 = *temp;
  3405. if (SWIG_IsNewObj(res2)) delete temp;
  3406. }
  3407. }
  3408. }
  3409. {
  3410. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3411. result = (bool)(arg1)->setPriority(arg2);
  3412. SWIG_PYTHON_THREAD_END_ALLOW;
  3413. }
  3414. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3415. return resultobj;
  3416. fail:
  3417. return NULL;
  3418. }
  3419. SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3420. PyObject *resultobj = 0;
  3421. ESLevent *arg1 = (ESLevent *) 0 ;
  3422. char *arg2 = (char *) 0 ;
  3423. int arg3 = (int) -1 ;
  3424. void *argp1 = 0 ;
  3425. int res1 = 0 ;
  3426. int res2 ;
  3427. char *buf2 = 0 ;
  3428. int alloc2 = 0 ;
  3429. int val3 ;
  3430. int ecode3 = 0 ;
  3431. PyObject * obj0 = 0 ;
  3432. PyObject * obj1 = 0 ;
  3433. PyObject * obj2 = 0 ;
  3434. char *result = 0 ;
  3435. if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLevent_getHeader",&obj0,&obj1,&obj2)) SWIG_fail;
  3436. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3437. if (!SWIG_IsOK(res1)) {
  3438. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3439. }
  3440. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3441. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3442. if (!SWIG_IsOK(res2)) {
  3443. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
  3444. }
  3445. arg2 = reinterpret_cast< char * >(buf2);
  3446. if (obj2) {
  3447. ecode3 = SWIG_AsVal_int(obj2, &val3);
  3448. if (!SWIG_IsOK(ecode3)) {
  3449. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
  3450. }
  3451. arg3 = static_cast< int >(val3);
  3452. }
  3453. {
  3454. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3455. result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
  3456. SWIG_PYTHON_THREAD_END_ALLOW;
  3457. }
  3458. resultobj = SWIG_FromCharPtr((const char *)result);
  3459. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3460. return resultobj;
  3461. fail:
  3462. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3463. return NULL;
  3464. }
  3465. SWIGINTERN PyObject *_wrap_ESLevent_getBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3466. PyObject *resultobj = 0;
  3467. ESLevent *arg1 = (ESLevent *) 0 ;
  3468. void *argp1 = 0 ;
  3469. int res1 = 0 ;
  3470. PyObject * obj0 = 0 ;
  3471. char *result = 0 ;
  3472. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_getBody",&obj0)) SWIG_fail;
  3473. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3474. if (!SWIG_IsOK(res1)) {
  3475. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getBody" "', argument " "1"" of type '" "ESLevent *""'");
  3476. }
  3477. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3478. {
  3479. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3480. result = (char *)(arg1)->getBody();
  3481. SWIG_PYTHON_THREAD_END_ALLOW;
  3482. }
  3483. resultobj = SWIG_FromCharPtr((const char *)result);
  3484. return resultobj;
  3485. fail:
  3486. return NULL;
  3487. }
  3488. SWIGINTERN PyObject *_wrap_ESLevent_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3489. PyObject *resultobj = 0;
  3490. ESLevent *arg1 = (ESLevent *) 0 ;
  3491. void *argp1 = 0 ;
  3492. int res1 = 0 ;
  3493. PyObject * obj0 = 0 ;
  3494. char *result = 0 ;
  3495. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_getType",&obj0)) SWIG_fail;
  3496. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3497. if (!SWIG_IsOK(res1)) {
  3498. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getType" "', argument " "1"" of type '" "ESLevent *""'");
  3499. }
  3500. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3501. {
  3502. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3503. result = (char *)(arg1)->getType();
  3504. SWIG_PYTHON_THREAD_END_ALLOW;
  3505. }
  3506. resultobj = SWIG_FromCharPtr((const char *)result);
  3507. return resultobj;
  3508. fail:
  3509. return NULL;
  3510. }
  3511. SWIGINTERN PyObject *_wrap_ESLevent_addBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3512. PyObject *resultobj = 0;
  3513. ESLevent *arg1 = (ESLevent *) 0 ;
  3514. char *arg2 = (char *) 0 ;
  3515. void *argp1 = 0 ;
  3516. int res1 = 0 ;
  3517. int res2 ;
  3518. char *buf2 = 0 ;
  3519. int alloc2 = 0 ;
  3520. PyObject * obj0 = 0 ;
  3521. PyObject * obj1 = 0 ;
  3522. bool result;
  3523. if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_addBody",&obj0,&obj1)) SWIG_fail;
  3524. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3525. if (!SWIG_IsOK(res1)) {
  3526. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addBody" "', argument " "1"" of type '" "ESLevent *""'");
  3527. }
  3528. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3529. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3530. if (!SWIG_IsOK(res2)) {
  3531. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addBody" "', argument " "2"" of type '" "char const *""'");
  3532. }
  3533. arg2 = reinterpret_cast< char * >(buf2);
  3534. {
  3535. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3536. result = (bool)(arg1)->addBody((char const *)arg2);
  3537. SWIG_PYTHON_THREAD_END_ALLOW;
  3538. }
  3539. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3540. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3541. return resultobj;
  3542. fail:
  3543. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3544. return NULL;
  3545. }
  3546. SWIGINTERN PyObject *_wrap_ESLevent_addHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3547. PyObject *resultobj = 0;
  3548. ESLevent *arg1 = (ESLevent *) 0 ;
  3549. char *arg2 = (char *) 0 ;
  3550. char *arg3 = (char *) 0 ;
  3551. void *argp1 = 0 ;
  3552. int res1 = 0 ;
  3553. int res2 ;
  3554. char *buf2 = 0 ;
  3555. int alloc2 = 0 ;
  3556. int res3 ;
  3557. char *buf3 = 0 ;
  3558. int alloc3 = 0 ;
  3559. PyObject * obj0 = 0 ;
  3560. PyObject * obj1 = 0 ;
  3561. PyObject * obj2 = 0 ;
  3562. bool result;
  3563. if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_addHeader",&obj0,&obj1,&obj2)) SWIG_fail;
  3564. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3565. if (!SWIG_IsOK(res1)) {
  3566. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3567. }
  3568. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3569. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3570. if (!SWIG_IsOK(res2)) {
  3571. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addHeader" "', argument " "2"" of type '" "char const *""'");
  3572. }
  3573. arg2 = reinterpret_cast< char * >(buf2);
  3574. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3575. if (!SWIG_IsOK(res3)) {
  3576. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_addHeader" "', argument " "3"" of type '" "char const *""'");
  3577. }
  3578. arg3 = reinterpret_cast< char * >(buf3);
  3579. {
  3580. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3581. result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
  3582. SWIG_PYTHON_THREAD_END_ALLOW;
  3583. }
  3584. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3585. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3586. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3587. return resultobj;
  3588. fail:
  3589. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3590. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3591. return NULL;
  3592. }
  3593. SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3594. PyObject *resultobj = 0;
  3595. ESLevent *arg1 = (ESLevent *) 0 ;
  3596. char *arg2 = (char *) 0 ;
  3597. char *arg3 = (char *) 0 ;
  3598. void *argp1 = 0 ;
  3599. int res1 = 0 ;
  3600. int res2 ;
  3601. char *buf2 = 0 ;
  3602. int alloc2 = 0 ;
  3603. int res3 ;
  3604. char *buf3 = 0 ;
  3605. int alloc3 = 0 ;
  3606. PyObject * obj0 = 0 ;
  3607. PyObject * obj1 = 0 ;
  3608. PyObject * obj2 = 0 ;
  3609. bool result;
  3610. if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_pushHeader",&obj0,&obj1,&obj2)) SWIG_fail;
  3611. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3612. if (!SWIG_IsOK(res1)) {
  3613. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3614. }
  3615. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3616. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3617. if (!SWIG_IsOK(res2)) {
  3618. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
  3619. }
  3620. arg2 = reinterpret_cast< char * >(buf2);
  3621. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3622. if (!SWIG_IsOK(res3)) {
  3623. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
  3624. }
  3625. arg3 = reinterpret_cast< char * >(buf3);
  3626. {
  3627. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3628. result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
  3629. SWIG_PYTHON_THREAD_END_ALLOW;
  3630. }
  3631. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3632. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3633. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3634. return resultobj;
  3635. fail:
  3636. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3637. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3638. return NULL;
  3639. }
  3640. SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3641. PyObject *resultobj = 0;
  3642. ESLevent *arg1 = (ESLevent *) 0 ;
  3643. char *arg2 = (char *) 0 ;
  3644. char *arg3 = (char *) 0 ;
  3645. void *argp1 = 0 ;
  3646. int res1 = 0 ;
  3647. int res2 ;
  3648. char *buf2 = 0 ;
  3649. int alloc2 = 0 ;
  3650. int res3 ;
  3651. char *buf3 = 0 ;
  3652. int alloc3 = 0 ;
  3653. PyObject * obj0 = 0 ;
  3654. PyObject * obj1 = 0 ;
  3655. PyObject * obj2 = 0 ;
  3656. bool result;
  3657. if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_unshiftHeader",&obj0,&obj1,&obj2)) SWIG_fail;
  3658. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3659. if (!SWIG_IsOK(res1)) {
  3660. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3661. }
  3662. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3663. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3664. if (!SWIG_IsOK(res2)) {
  3665. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
  3666. }
  3667. arg2 = reinterpret_cast< char * >(buf2);
  3668. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3669. if (!SWIG_IsOK(res3)) {
  3670. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
  3671. }
  3672. arg3 = reinterpret_cast< char * >(buf3);
  3673. {
  3674. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3675. result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
  3676. SWIG_PYTHON_THREAD_END_ALLOW;
  3677. }
  3678. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3679. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3680. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3681. return resultobj;
  3682. fail:
  3683. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3684. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3685. return NULL;
  3686. }
  3687. SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3688. PyObject *resultobj = 0;
  3689. ESLevent *arg1 = (ESLevent *) 0 ;
  3690. char *arg2 = (char *) 0 ;
  3691. void *argp1 = 0 ;
  3692. int res1 = 0 ;
  3693. int res2 ;
  3694. char *buf2 = 0 ;
  3695. int alloc2 = 0 ;
  3696. PyObject * obj0 = 0 ;
  3697. PyObject * obj1 = 0 ;
  3698. bool result;
  3699. if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_delHeader",&obj0,&obj1)) SWIG_fail;
  3700. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3701. if (!SWIG_IsOK(res1)) {
  3702. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_delHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3703. }
  3704. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3705. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3706. if (!SWIG_IsOK(res2)) {
  3707. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_delHeader" "', argument " "2"" of type '" "char const *""'");
  3708. }
  3709. arg2 = reinterpret_cast< char * >(buf2);
  3710. {
  3711. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3712. result = (bool)(arg1)->delHeader((char const *)arg2);
  3713. SWIG_PYTHON_THREAD_END_ALLOW;
  3714. }
  3715. resultobj = SWIG_From_bool(static_cast< bool >(result));
  3716. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3717. return resultobj;
  3718. fail:
  3719. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3720. return NULL;
  3721. }
  3722. SWIGINTERN PyObject *_wrap_ESLevent_firstHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3723. PyObject *resultobj = 0;
  3724. ESLevent *arg1 = (ESLevent *) 0 ;
  3725. void *argp1 = 0 ;
  3726. int res1 = 0 ;
  3727. PyObject * obj0 = 0 ;
  3728. char *result = 0 ;
  3729. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_firstHeader",&obj0)) SWIG_fail;
  3730. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3731. if (!SWIG_IsOK(res1)) {
  3732. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_firstHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3733. }
  3734. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3735. {
  3736. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3737. result = (char *)(arg1)->firstHeader();
  3738. SWIG_PYTHON_THREAD_END_ALLOW;
  3739. }
  3740. resultobj = SWIG_FromCharPtr((const char *)result);
  3741. return resultobj;
  3742. fail:
  3743. return NULL;
  3744. }
  3745. SWIGINTERN PyObject *_wrap_ESLevent_nextHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3746. PyObject *resultobj = 0;
  3747. ESLevent *arg1 = (ESLevent *) 0 ;
  3748. void *argp1 = 0 ;
  3749. int res1 = 0 ;
  3750. PyObject * obj0 = 0 ;
  3751. char *result = 0 ;
  3752. if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_nextHeader",&obj0)) SWIG_fail;
  3753. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  3754. if (!SWIG_IsOK(res1)) {
  3755. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_nextHeader" "', argument " "1"" of type '" "ESLevent *""'");
  3756. }
  3757. arg1 = reinterpret_cast< ESLevent * >(argp1);
  3758. {
  3759. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3760. result = (char *)(arg1)->nextHeader();
  3761. SWIG_PYTHON_THREAD_END_ALLOW;
  3762. }
  3763. resultobj = SWIG_FromCharPtr((const char *)result);
  3764. return resultobj;
  3765. fail:
  3766. return NULL;
  3767. }
  3768. SWIGINTERN PyObject *ESLevent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3769. PyObject *obj;
  3770. if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  3771. SWIG_TypeNewClientData(SWIGTYPE_p_ESLevent, SWIG_NewClientData(obj));
  3772. return SWIG_Py_Void();
  3773. }
  3774. SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3775. PyObject *resultobj = 0;
  3776. char *arg1 = (char *) 0 ;
  3777. int arg2 ;
  3778. char *arg3 = (char *) 0 ;
  3779. char *arg4 = (char *) 0 ;
  3780. int res1 ;
  3781. char *buf1 = 0 ;
  3782. int alloc1 = 0 ;
  3783. int val2 ;
  3784. int ecode2 = 0 ;
  3785. int res3 ;
  3786. char *buf3 = 0 ;
  3787. int alloc3 = 0 ;
  3788. int res4 ;
  3789. char *buf4 = 0 ;
  3790. int alloc4 = 0 ;
  3791. PyObject * obj0 = 0 ;
  3792. PyObject * obj1 = 0 ;
  3793. PyObject * obj2 = 0 ;
  3794. PyObject * obj3 = 0 ;
  3795. ESLconnection *result = 0 ;
  3796. if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ESLconnection",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  3797. res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  3798. if (!SWIG_IsOK(res1)) {
  3799. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  3800. }
  3801. arg1 = reinterpret_cast< char * >(buf1);
  3802. ecode2 = SWIG_AsVal_int(obj1, &val2);
  3803. if (!SWIG_IsOK(ecode2)) {
  3804. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
  3805. }
  3806. arg2 = static_cast< int >(val2);
  3807. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3808. if (!SWIG_IsOK(res3)) {
  3809. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  3810. }
  3811. arg3 = reinterpret_cast< char * >(buf3);
  3812. res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  3813. if (!SWIG_IsOK(res4)) {
  3814. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
  3815. }
  3816. arg4 = reinterpret_cast< char * >(buf4);
  3817. {
  3818. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3819. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
  3820. SWIG_PYTHON_THREAD_END_ALLOW;
  3821. }
  3822. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
  3823. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3824. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3825. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3826. return resultobj;
  3827. fail:
  3828. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3829. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3830. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3831. return NULL;
  3832. }
  3833. SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3834. PyObject *resultobj = 0;
  3835. char *arg1 = (char *) 0 ;
  3836. int arg2 ;
  3837. char *arg3 = (char *) 0 ;
  3838. int res1 ;
  3839. char *buf1 = 0 ;
  3840. int alloc1 = 0 ;
  3841. int val2 ;
  3842. int ecode2 = 0 ;
  3843. int res3 ;
  3844. char *buf3 = 0 ;
  3845. int alloc3 = 0 ;
  3846. PyObject * obj0 = 0 ;
  3847. PyObject * obj1 = 0 ;
  3848. PyObject * obj2 = 0 ;
  3849. ESLconnection *result = 0 ;
  3850. if (!PyArg_ParseTuple(args,(char *)"OOO:new_ESLconnection",&obj0,&obj1,&obj2)) SWIG_fail;
  3851. res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  3852. if (!SWIG_IsOK(res1)) {
  3853. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  3854. }
  3855. arg1 = reinterpret_cast< char * >(buf1);
  3856. ecode2 = SWIG_AsVal_int(obj1, &val2);
  3857. if (!SWIG_IsOK(ecode2)) {
  3858. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
  3859. }
  3860. arg2 = static_cast< int >(val2);
  3861. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3862. if (!SWIG_IsOK(res3)) {
  3863. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  3864. }
  3865. arg3 = reinterpret_cast< char * >(buf3);
  3866. {
  3867. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3868. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
  3869. SWIG_PYTHON_THREAD_END_ALLOW;
  3870. }
  3871. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
  3872. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3873. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3874. return resultobj;
  3875. fail:
  3876. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3877. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3878. return NULL;
  3879. }
  3880. SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3881. PyObject *resultobj = 0;
  3882. char *arg1 = (char *) 0 ;
  3883. char *arg2 = (char *) 0 ;
  3884. char *arg3 = (char *) 0 ;
  3885. char *arg4 = (char *) 0 ;
  3886. int res1 ;
  3887. char *buf1 = 0 ;
  3888. int alloc1 = 0 ;
  3889. int res2 ;
  3890. char *buf2 = 0 ;
  3891. int alloc2 = 0 ;
  3892. int res3 ;
  3893. char *buf3 = 0 ;
  3894. int alloc3 = 0 ;
  3895. int res4 ;
  3896. char *buf4 = 0 ;
  3897. int alloc4 = 0 ;
  3898. PyObject * obj0 = 0 ;
  3899. PyObject * obj1 = 0 ;
  3900. PyObject * obj2 = 0 ;
  3901. PyObject * obj3 = 0 ;
  3902. ESLconnection *result = 0 ;
  3903. if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ESLconnection",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  3904. res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  3905. if (!SWIG_IsOK(res1)) {
  3906. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  3907. }
  3908. arg1 = reinterpret_cast< char * >(buf1);
  3909. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3910. if (!SWIG_IsOK(res2)) {
  3911. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  3912. }
  3913. arg2 = reinterpret_cast< char * >(buf2);
  3914. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3915. if (!SWIG_IsOK(res3)) {
  3916. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  3917. }
  3918. arg3 = reinterpret_cast< char * >(buf3);
  3919. res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  3920. if (!SWIG_IsOK(res4)) {
  3921. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
  3922. }
  3923. arg4 = reinterpret_cast< char * >(buf4);
  3924. {
  3925. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3926. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  3927. SWIG_PYTHON_THREAD_END_ALLOW;
  3928. }
  3929. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
  3930. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3931. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3932. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3933. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3934. return resultobj;
  3935. fail:
  3936. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3937. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3938. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3939. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3940. return NULL;
  3941. }
  3942. SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3943. PyObject *resultobj = 0;
  3944. char *arg1 = (char *) 0 ;
  3945. char *arg2 = (char *) 0 ;
  3946. char *arg3 = (char *) 0 ;
  3947. int res1 ;
  3948. char *buf1 = 0 ;
  3949. int alloc1 = 0 ;
  3950. int res2 ;
  3951. char *buf2 = 0 ;
  3952. int alloc2 = 0 ;
  3953. int res3 ;
  3954. char *buf3 = 0 ;
  3955. int alloc3 = 0 ;
  3956. PyObject * obj0 = 0 ;
  3957. PyObject * obj1 = 0 ;
  3958. PyObject * obj2 = 0 ;
  3959. ESLconnection *result = 0 ;
  3960. if (!PyArg_ParseTuple(args,(char *)"OOO:new_ESLconnection",&obj0,&obj1,&obj2)) SWIG_fail;
  3961. res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  3962. if (!SWIG_IsOK(res1)) {
  3963. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  3964. }
  3965. arg1 = reinterpret_cast< char * >(buf1);
  3966. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  3967. if (!SWIG_IsOK(res2)) {
  3968. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  3969. }
  3970. arg2 = reinterpret_cast< char * >(buf2);
  3971. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  3972. if (!SWIG_IsOK(res3)) {
  3973. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  3974. }
  3975. arg3 = reinterpret_cast< char * >(buf3);
  3976. {
  3977. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  3978. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
  3979. SWIG_PYTHON_THREAD_END_ALLOW;
  3980. }
  3981. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
  3982. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3983. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3984. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3985. return resultobj;
  3986. fail:
  3987. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  3988. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3989. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3990. return NULL;
  3991. }
  3992. SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3993. PyObject *resultobj = 0;
  3994. int arg1 ;
  3995. int val1 ;
  3996. int ecode1 = 0 ;
  3997. PyObject * obj0 = 0 ;
  3998. ESLconnection *result = 0 ;
  3999. if (!PyArg_ParseTuple(args,(char *)"O:new_ESLconnection",&obj0)) SWIG_fail;
  4000. ecode1 = SWIG_AsVal_int(obj0, &val1);
  4001. if (!SWIG_IsOK(ecode1)) {
  4002. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "int""'");
  4003. }
  4004. arg1 = static_cast< int >(val1);
  4005. {
  4006. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4007. result = (ESLconnection *)new ESLconnection(arg1);
  4008. SWIG_PYTHON_THREAD_END_ALLOW;
  4009. }
  4010. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 );
  4011. return resultobj;
  4012. fail:
  4013. return NULL;
  4014. }
  4015. SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
  4016. int argc;
  4017. PyObject *argv[5];
  4018. int ii;
  4019. if (!PyTuple_Check(args)) SWIG_fail;
  4020. argc = args ? (int)PyObject_Length(args) : 0;
  4021. for (ii = 0; (ii < 4) && (ii < argc); ii++) {
  4022. argv[ii] = PyTuple_GET_ITEM(args,ii);
  4023. }
  4024. if (argc == 1) {
  4025. int _v;
  4026. {
  4027. int res = SWIG_AsVal_int(argv[0], NULL);
  4028. _v = SWIG_CheckState(res);
  4029. }
  4030. if (_v) {
  4031. return _wrap_new_ESLconnection__SWIG_4(self, args);
  4032. }
  4033. }
  4034. if (argc == 3) {
  4035. int _v;
  4036. int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  4037. _v = SWIG_CheckState(res);
  4038. if (_v) {
  4039. {
  4040. int res = SWIG_AsVal_int(argv[1], NULL);
  4041. _v = SWIG_CheckState(res);
  4042. }
  4043. if (_v) {
  4044. int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
  4045. _v = SWIG_CheckState(res);
  4046. if (_v) {
  4047. return _wrap_new_ESLconnection__SWIG_1(self, args);
  4048. }
  4049. }
  4050. }
  4051. }
  4052. if (argc == 3) {
  4053. int _v;
  4054. int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  4055. _v = SWIG_CheckState(res);
  4056. if (_v) {
  4057. int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  4058. _v = SWIG_CheckState(res);
  4059. if (_v) {
  4060. int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
  4061. _v = SWIG_CheckState(res);
  4062. if (_v) {
  4063. return _wrap_new_ESLconnection__SWIG_3(self, args);
  4064. }
  4065. }
  4066. }
  4067. }
  4068. if (argc == 4) {
  4069. int _v;
  4070. int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  4071. _v = SWIG_CheckState(res);
  4072. if (_v) {
  4073. {
  4074. int res = SWIG_AsVal_int(argv[1], NULL);
  4075. _v = SWIG_CheckState(res);
  4076. }
  4077. if (_v) {
  4078. int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
  4079. _v = SWIG_CheckState(res);
  4080. if (_v) {
  4081. int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
  4082. _v = SWIG_CheckState(res);
  4083. if (_v) {
  4084. return _wrap_new_ESLconnection__SWIG_0(self, args);
  4085. }
  4086. }
  4087. }
  4088. }
  4089. }
  4090. if (argc == 4) {
  4091. int _v;
  4092. int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
  4093. _v = SWIG_CheckState(res);
  4094. if (_v) {
  4095. int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
  4096. _v = SWIG_CheckState(res);
  4097. if (_v) {
  4098. int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
  4099. _v = SWIG_CheckState(res);
  4100. if (_v) {
  4101. int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
  4102. _v = SWIG_CheckState(res);
  4103. if (_v) {
  4104. return _wrap_new_ESLconnection__SWIG_2(self, args);
  4105. }
  4106. }
  4107. }
  4108. }
  4109. }
  4110. fail:
  4111. SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESLconnection'.\n"
  4112. " Possible C/C++ prototypes are:\n"
  4113. " ESLconnection::ESLconnection(char const *,int const,char const *,char const *)\n"
  4114. " ESLconnection::ESLconnection(char const *,int const,char const *)\n"
  4115. " ESLconnection::ESLconnection(char const *,char const *,char const *,char const *)\n"
  4116. " ESLconnection::ESLconnection(char const *,char const *,char const *)\n"
  4117. " ESLconnection::ESLconnection(int)\n");
  4118. return 0;
  4119. }
  4120. SWIGINTERN PyObject *_wrap_delete_ESLconnection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4121. PyObject *resultobj = 0;
  4122. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4123. void *argp1 = 0 ;
  4124. int res1 = 0 ;
  4125. PyObject * obj0 = 0 ;
  4126. if (!PyArg_ParseTuple(args,(char *)"O:delete_ESLconnection",&obj0)) SWIG_fail;
  4127. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, SWIG_POINTER_DISOWN | 0 );
  4128. if (!SWIG_IsOK(res1)) {
  4129. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLconnection" "', argument " "1"" of type '" "ESLconnection *""'");
  4130. }
  4131. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4132. {
  4133. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4134. delete arg1;
  4135. SWIG_PYTHON_THREAD_END_ALLOW;
  4136. }
  4137. resultobj = SWIG_Py_Void();
  4138. return resultobj;
  4139. fail:
  4140. return NULL;
  4141. }
  4142. SWIGINTERN PyObject *_wrap_ESLconnection_socketDescriptor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4143. PyObject *resultobj = 0;
  4144. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4145. void *argp1 = 0 ;
  4146. int res1 = 0 ;
  4147. PyObject * obj0 = 0 ;
  4148. int result;
  4149. if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_socketDescriptor",&obj0)) SWIG_fail;
  4150. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4151. if (!SWIG_IsOK(res1)) {
  4152. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_socketDescriptor" "', argument " "1"" of type '" "ESLconnection *""'");
  4153. }
  4154. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4155. {
  4156. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4157. result = (int)(arg1)->socketDescriptor();
  4158. SWIG_PYTHON_THREAD_END_ALLOW;
  4159. }
  4160. resultobj = SWIG_From_int(static_cast< int >(result));
  4161. return resultobj;
  4162. fail:
  4163. return NULL;
  4164. }
  4165. SWIGINTERN PyObject *_wrap_ESLconnection_connected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4166. PyObject *resultobj = 0;
  4167. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4168. void *argp1 = 0 ;
  4169. int res1 = 0 ;
  4170. PyObject * obj0 = 0 ;
  4171. int result;
  4172. if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_connected",&obj0)) SWIG_fail;
  4173. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4174. if (!SWIG_IsOK(res1)) {
  4175. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_connected" "', argument " "1"" of type '" "ESLconnection *""'");
  4176. }
  4177. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4178. {
  4179. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4180. result = (int)(arg1)->connected();
  4181. SWIG_PYTHON_THREAD_END_ALLOW;
  4182. }
  4183. resultobj = SWIG_From_int(static_cast< int >(result));
  4184. return resultobj;
  4185. fail:
  4186. return NULL;
  4187. }
  4188. SWIGINTERN PyObject *_wrap_ESLconnection_getInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4189. PyObject *resultobj = 0;
  4190. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4191. void *argp1 = 0 ;
  4192. int res1 = 0 ;
  4193. PyObject * obj0 = 0 ;
  4194. ESLevent *result = 0 ;
  4195. if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_getInfo",&obj0)) SWIG_fail;
  4196. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4197. if (!SWIG_IsOK(res1)) {
  4198. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_getInfo" "', argument " "1"" of type '" "ESLconnection *""'");
  4199. }
  4200. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4201. {
  4202. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4203. result = (ESLevent *)(arg1)->getInfo();
  4204. SWIG_PYTHON_THREAD_END_ALLOW;
  4205. }
  4206. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4207. return resultobj;
  4208. fail:
  4209. return NULL;
  4210. }
  4211. SWIGINTERN PyObject *_wrap_ESLconnection_send(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4212. PyObject *resultobj = 0;
  4213. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4214. char *arg2 = (char *) 0 ;
  4215. void *argp1 = 0 ;
  4216. int res1 = 0 ;
  4217. int res2 ;
  4218. char *buf2 = 0 ;
  4219. int alloc2 = 0 ;
  4220. PyObject * obj0 = 0 ;
  4221. PyObject * obj1 = 0 ;
  4222. int result;
  4223. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_send",&obj0,&obj1)) SWIG_fail;
  4224. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4225. if (!SWIG_IsOK(res1)) {
  4226. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_send" "', argument " "1"" of type '" "ESLconnection *""'");
  4227. }
  4228. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4229. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4230. if (!SWIG_IsOK(res2)) {
  4231. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_send" "', argument " "2"" of type '" "char const *""'");
  4232. }
  4233. arg2 = reinterpret_cast< char * >(buf2);
  4234. {
  4235. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4236. result = (int)(arg1)->send((char const *)arg2);
  4237. SWIG_PYTHON_THREAD_END_ALLOW;
  4238. }
  4239. resultobj = SWIG_From_int(static_cast< int >(result));
  4240. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4241. return resultobj;
  4242. fail:
  4243. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4244. return NULL;
  4245. }
  4246. SWIGINTERN PyObject *_wrap_ESLconnection_sendRecv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4247. PyObject *resultobj = 0;
  4248. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4249. char *arg2 = (char *) 0 ;
  4250. void *argp1 = 0 ;
  4251. int res1 = 0 ;
  4252. int res2 ;
  4253. char *buf2 = 0 ;
  4254. int alloc2 = 0 ;
  4255. PyObject * obj0 = 0 ;
  4256. PyObject * obj1 = 0 ;
  4257. ESLevent *result = 0 ;
  4258. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_sendRecv",&obj0,&obj1)) SWIG_fail;
  4259. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4260. if (!SWIG_IsOK(res1)) {
  4261. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendRecv" "', argument " "1"" of type '" "ESLconnection *""'");
  4262. }
  4263. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4264. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4265. if (!SWIG_IsOK(res2)) {
  4266. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendRecv" "', argument " "2"" of type '" "char const *""'");
  4267. }
  4268. arg2 = reinterpret_cast< char * >(buf2);
  4269. {
  4270. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4271. result = (ESLevent *)(arg1)->sendRecv((char const *)arg2);
  4272. SWIG_PYTHON_THREAD_END_ALLOW;
  4273. }
  4274. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4275. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4276. return resultobj;
  4277. fail:
  4278. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4279. return NULL;
  4280. }
  4281. SWIGINTERN PyObject *_wrap_ESLconnection_api(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4282. PyObject *resultobj = 0;
  4283. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4284. char *arg2 = (char *) 0 ;
  4285. char *arg3 = (char *) NULL ;
  4286. void *argp1 = 0 ;
  4287. int res1 = 0 ;
  4288. int res2 ;
  4289. char *buf2 = 0 ;
  4290. int alloc2 = 0 ;
  4291. int res3 ;
  4292. char *buf3 = 0 ;
  4293. int alloc3 = 0 ;
  4294. PyObject * obj0 = 0 ;
  4295. PyObject * obj1 = 0 ;
  4296. PyObject * obj2 = 0 ;
  4297. ESLevent *result = 0 ;
  4298. if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_api",&obj0,&obj1,&obj2)) SWIG_fail;
  4299. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4300. if (!SWIG_IsOK(res1)) {
  4301. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
  4302. }
  4303. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4304. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4305. if (!SWIG_IsOK(res2)) {
  4306. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
  4307. }
  4308. arg2 = reinterpret_cast< char * >(buf2);
  4309. if (obj2) {
  4310. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4311. if (!SWIG_IsOK(res3)) {
  4312. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
  4313. }
  4314. arg3 = reinterpret_cast< char * >(buf3);
  4315. }
  4316. {
  4317. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4318. result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
  4319. SWIG_PYTHON_THREAD_END_ALLOW;
  4320. }
  4321. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4322. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4323. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4324. return resultobj;
  4325. fail:
  4326. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4327. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4328. return NULL;
  4329. }
  4330. SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4331. PyObject *resultobj = 0;
  4332. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4333. char *arg2 = (char *) 0 ;
  4334. char *arg3 = (char *) NULL ;
  4335. char *arg4 = (char *) NULL ;
  4336. void *argp1 = 0 ;
  4337. int res1 = 0 ;
  4338. int res2 ;
  4339. char *buf2 = 0 ;
  4340. int alloc2 = 0 ;
  4341. int res3 ;
  4342. char *buf3 = 0 ;
  4343. int alloc3 = 0 ;
  4344. int res4 ;
  4345. char *buf4 = 0 ;
  4346. int alloc4 = 0 ;
  4347. PyObject * obj0 = 0 ;
  4348. PyObject * obj1 = 0 ;
  4349. PyObject * obj2 = 0 ;
  4350. PyObject * obj3 = 0 ;
  4351. ESLevent *result = 0 ;
  4352. if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_bgapi",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  4353. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4354. if (!SWIG_IsOK(res1)) {
  4355. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
  4356. }
  4357. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4358. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4359. if (!SWIG_IsOK(res2)) {
  4360. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
  4361. }
  4362. arg2 = reinterpret_cast< char * >(buf2);
  4363. if (obj2) {
  4364. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4365. if (!SWIG_IsOK(res3)) {
  4366. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
  4367. }
  4368. arg3 = reinterpret_cast< char * >(buf3);
  4369. }
  4370. if (obj3) {
  4371. res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  4372. if (!SWIG_IsOK(res4)) {
  4373. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_bgapi" "', argument " "4"" of type '" "char const *""'");
  4374. }
  4375. arg4 = reinterpret_cast< char * >(buf4);
  4376. }
  4377. {
  4378. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4379. result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
  4380. SWIG_PYTHON_THREAD_END_ALLOW;
  4381. }
  4382. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4383. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4384. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4385. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4386. return resultobj;
  4387. fail:
  4388. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4389. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4390. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4391. return NULL;
  4392. }
  4393. SWIGINTERN PyObject *_wrap_ESLconnection_sendEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4394. PyObject *resultobj = 0;
  4395. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4396. ESLevent *arg2 = (ESLevent *) 0 ;
  4397. void *argp1 = 0 ;
  4398. int res1 = 0 ;
  4399. void *argp2 = 0 ;
  4400. int res2 = 0 ;
  4401. PyObject * obj0 = 0 ;
  4402. PyObject * obj1 = 0 ;
  4403. ESLevent *result = 0 ;
  4404. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_sendEvent",&obj0,&obj1)) SWIG_fail;
  4405. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4406. if (!SWIG_IsOK(res1)) {
  4407. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  4408. }
  4409. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4410. res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  4411. if (!SWIG_IsOK(res2)) {
  4412. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendEvent" "', argument " "2"" of type '" "ESLevent *""'");
  4413. }
  4414. arg2 = reinterpret_cast< ESLevent * >(argp2);
  4415. {
  4416. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4417. result = (ESLevent *)(arg1)->sendEvent(arg2);
  4418. SWIG_PYTHON_THREAD_END_ALLOW;
  4419. }
  4420. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4421. return resultobj;
  4422. fail:
  4423. return NULL;
  4424. }
  4425. SWIGINTERN PyObject *_wrap_ESLconnection_sendMSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4426. PyObject *resultobj = 0;
  4427. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4428. ESLevent *arg2 = (ESLevent *) 0 ;
  4429. char *arg3 = (char *) NULL ;
  4430. void *argp1 = 0 ;
  4431. int res1 = 0 ;
  4432. void *argp2 = 0 ;
  4433. int res2 = 0 ;
  4434. int res3 ;
  4435. char *buf3 = 0 ;
  4436. int alloc3 = 0 ;
  4437. PyObject * obj0 = 0 ;
  4438. PyObject * obj1 = 0 ;
  4439. PyObject * obj2 = 0 ;
  4440. int result;
  4441. if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_sendMSG",&obj0,&obj1,&obj2)) SWIG_fail;
  4442. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4443. if (!SWIG_IsOK(res1)) {
  4444. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendMSG" "', argument " "1"" of type '" "ESLconnection *""'");
  4445. }
  4446. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4447. res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  4448. if (!SWIG_IsOK(res2)) {
  4449. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendMSG" "', argument " "2"" of type '" "ESLevent *""'");
  4450. }
  4451. arg2 = reinterpret_cast< ESLevent * >(argp2);
  4452. if (obj2) {
  4453. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4454. if (!SWIG_IsOK(res3)) {
  4455. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_sendMSG" "', argument " "3"" of type '" "char const *""'");
  4456. }
  4457. arg3 = reinterpret_cast< char * >(buf3);
  4458. }
  4459. {
  4460. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4461. result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
  4462. SWIG_PYTHON_THREAD_END_ALLOW;
  4463. }
  4464. resultobj = SWIG_From_int(static_cast< int >(result));
  4465. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4466. return resultobj;
  4467. fail:
  4468. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4469. return NULL;
  4470. }
  4471. SWIGINTERN PyObject *_wrap_ESLconnection_recvEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4472. PyObject *resultobj = 0;
  4473. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4474. void *argp1 = 0 ;
  4475. int res1 = 0 ;
  4476. PyObject * obj0 = 0 ;
  4477. ESLevent *result = 0 ;
  4478. if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_recvEvent",&obj0)) SWIG_fail;
  4479. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4480. if (!SWIG_IsOK(res1)) {
  4481. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  4482. }
  4483. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4484. {
  4485. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4486. result = (ESLevent *)(arg1)->recvEvent();
  4487. SWIG_PYTHON_THREAD_END_ALLOW;
  4488. }
  4489. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4490. return resultobj;
  4491. fail:
  4492. return NULL;
  4493. }
  4494. SWIGINTERN PyObject *_wrap_ESLconnection_recvEventTimed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4495. PyObject *resultobj = 0;
  4496. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4497. int arg2 ;
  4498. void *argp1 = 0 ;
  4499. int res1 = 0 ;
  4500. int val2 ;
  4501. int ecode2 = 0 ;
  4502. PyObject * obj0 = 0 ;
  4503. PyObject * obj1 = 0 ;
  4504. ESLevent *result = 0 ;
  4505. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_recvEventTimed",&obj0,&obj1)) SWIG_fail;
  4506. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4507. if (!SWIG_IsOK(res1)) {
  4508. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEventTimed" "', argument " "1"" of type '" "ESLconnection *""'");
  4509. }
  4510. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4511. ecode2 = SWIG_AsVal_int(obj1, &val2);
  4512. if (!SWIG_IsOK(ecode2)) {
  4513. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLconnection_recvEventTimed" "', argument " "2"" of type '" "int""'");
  4514. }
  4515. arg2 = static_cast< int >(val2);
  4516. {
  4517. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4518. result = (ESLevent *)(arg1)->recvEventTimed(arg2);
  4519. SWIG_PYTHON_THREAD_END_ALLOW;
  4520. }
  4521. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4522. return resultobj;
  4523. fail:
  4524. return NULL;
  4525. }
  4526. SWIGINTERN PyObject *_wrap_ESLconnection_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4527. PyObject *resultobj = 0;
  4528. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4529. char *arg2 = (char *) 0 ;
  4530. char *arg3 = (char *) 0 ;
  4531. void *argp1 = 0 ;
  4532. int res1 = 0 ;
  4533. int res2 ;
  4534. char *buf2 = 0 ;
  4535. int alloc2 = 0 ;
  4536. int res3 ;
  4537. char *buf3 = 0 ;
  4538. int alloc3 = 0 ;
  4539. PyObject * obj0 = 0 ;
  4540. PyObject * obj1 = 0 ;
  4541. PyObject * obj2 = 0 ;
  4542. ESLevent *result = 0 ;
  4543. if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_filter",&obj0,&obj1,&obj2)) SWIG_fail;
  4544. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4545. if (!SWIG_IsOK(res1)) {
  4546. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_filter" "', argument " "1"" of type '" "ESLconnection *""'");
  4547. }
  4548. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4549. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4550. if (!SWIG_IsOK(res2)) {
  4551. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_filter" "', argument " "2"" of type '" "char const *""'");
  4552. }
  4553. arg2 = reinterpret_cast< char * >(buf2);
  4554. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4555. if (!SWIG_IsOK(res3)) {
  4556. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_filter" "', argument " "3"" of type '" "char const *""'");
  4557. }
  4558. arg3 = reinterpret_cast< char * >(buf3);
  4559. {
  4560. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4561. result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3);
  4562. SWIG_PYTHON_THREAD_END_ALLOW;
  4563. }
  4564. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4565. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4566. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4567. return resultobj;
  4568. fail:
  4569. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4570. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4571. return NULL;
  4572. }
  4573. SWIGINTERN PyObject *_wrap_ESLconnection_events(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4574. PyObject *resultobj = 0;
  4575. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4576. char *arg2 = (char *) 0 ;
  4577. char *arg3 = (char *) 0 ;
  4578. void *argp1 = 0 ;
  4579. int res1 = 0 ;
  4580. int res2 ;
  4581. char *buf2 = 0 ;
  4582. int alloc2 = 0 ;
  4583. int res3 ;
  4584. char *buf3 = 0 ;
  4585. int alloc3 = 0 ;
  4586. PyObject * obj0 = 0 ;
  4587. PyObject * obj1 = 0 ;
  4588. PyObject * obj2 = 0 ;
  4589. int result;
  4590. if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_events",&obj0,&obj1,&obj2)) SWIG_fail;
  4591. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4592. if (!SWIG_IsOK(res1)) {
  4593. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_events" "', argument " "1"" of type '" "ESLconnection *""'");
  4594. }
  4595. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4596. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4597. if (!SWIG_IsOK(res2)) {
  4598. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_events" "', argument " "2"" of type '" "char const *""'");
  4599. }
  4600. arg2 = reinterpret_cast< char * >(buf2);
  4601. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4602. if (!SWIG_IsOK(res3)) {
  4603. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_events" "', argument " "3"" of type '" "char const *""'");
  4604. }
  4605. arg3 = reinterpret_cast< char * >(buf3);
  4606. {
  4607. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4608. result = (int)(arg1)->events((char const *)arg2,(char const *)arg3);
  4609. SWIG_PYTHON_THREAD_END_ALLOW;
  4610. }
  4611. resultobj = SWIG_From_int(static_cast< int >(result));
  4612. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4613. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4614. return resultobj;
  4615. fail:
  4616. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4617. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4618. return NULL;
  4619. }
  4620. SWIGINTERN PyObject *_wrap_ESLconnection_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4621. PyObject *resultobj = 0;
  4622. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4623. char *arg2 = (char *) 0 ;
  4624. char *arg3 = (char *) NULL ;
  4625. char *arg4 = (char *) NULL ;
  4626. void *argp1 = 0 ;
  4627. int res1 = 0 ;
  4628. int res2 ;
  4629. char *buf2 = 0 ;
  4630. int alloc2 = 0 ;
  4631. int res3 ;
  4632. char *buf3 = 0 ;
  4633. int alloc3 = 0 ;
  4634. int res4 ;
  4635. char *buf4 = 0 ;
  4636. int alloc4 = 0 ;
  4637. PyObject * obj0 = 0 ;
  4638. PyObject * obj1 = 0 ;
  4639. PyObject * obj2 = 0 ;
  4640. PyObject * obj3 = 0 ;
  4641. ESLevent *result = 0 ;
  4642. if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_execute",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  4643. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4644. if (!SWIG_IsOK(res1)) {
  4645. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_execute" "', argument " "1"" of type '" "ESLconnection *""'");
  4646. }
  4647. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4648. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4649. if (!SWIG_IsOK(res2)) {
  4650. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_execute" "', argument " "2"" of type '" "char const *""'");
  4651. }
  4652. arg2 = reinterpret_cast< char * >(buf2);
  4653. if (obj2) {
  4654. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4655. if (!SWIG_IsOK(res3)) {
  4656. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_execute" "', argument " "3"" of type '" "char const *""'");
  4657. }
  4658. arg3 = reinterpret_cast< char * >(buf3);
  4659. }
  4660. if (obj3) {
  4661. res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  4662. if (!SWIG_IsOK(res4)) {
  4663. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_execute" "', argument " "4"" of type '" "char const *""'");
  4664. }
  4665. arg4 = reinterpret_cast< char * >(buf4);
  4666. }
  4667. {
  4668. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4669. result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
  4670. SWIG_PYTHON_THREAD_END_ALLOW;
  4671. }
  4672. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4673. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4674. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4675. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4676. return resultobj;
  4677. fail:
  4678. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4679. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4680. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4681. return NULL;
  4682. }
  4683. SWIGINTERN PyObject *_wrap_ESLconnection_executeAsync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4684. PyObject *resultobj = 0;
  4685. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4686. char *arg2 = (char *) 0 ;
  4687. char *arg3 = (char *) NULL ;
  4688. char *arg4 = (char *) NULL ;
  4689. void *argp1 = 0 ;
  4690. int res1 = 0 ;
  4691. int res2 ;
  4692. char *buf2 = 0 ;
  4693. int alloc2 = 0 ;
  4694. int res3 ;
  4695. char *buf3 = 0 ;
  4696. int alloc3 = 0 ;
  4697. int res4 ;
  4698. char *buf4 = 0 ;
  4699. int alloc4 = 0 ;
  4700. PyObject * obj0 = 0 ;
  4701. PyObject * obj1 = 0 ;
  4702. PyObject * obj2 = 0 ;
  4703. PyObject * obj3 = 0 ;
  4704. ESLevent *result = 0 ;
  4705. if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_executeAsync",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  4706. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4707. if (!SWIG_IsOK(res1)) {
  4708. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_executeAsync" "', argument " "1"" of type '" "ESLconnection *""'");
  4709. }
  4710. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4711. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4712. if (!SWIG_IsOK(res2)) {
  4713. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_executeAsync" "', argument " "2"" of type '" "char const *""'");
  4714. }
  4715. arg2 = reinterpret_cast< char * >(buf2);
  4716. if (obj2) {
  4717. res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  4718. if (!SWIG_IsOK(res3)) {
  4719. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_executeAsync" "', argument " "3"" of type '" "char const *""'");
  4720. }
  4721. arg3 = reinterpret_cast< char * >(buf3);
  4722. }
  4723. if (obj3) {
  4724. res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  4725. if (!SWIG_IsOK(res4)) {
  4726. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_executeAsync" "', argument " "4"" of type '" "char const *""'");
  4727. }
  4728. arg4 = reinterpret_cast< char * >(buf4);
  4729. }
  4730. {
  4731. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4732. result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
  4733. SWIG_PYTHON_THREAD_END_ALLOW;
  4734. }
  4735. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 );
  4736. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4737. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4738. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4739. return resultobj;
  4740. fail:
  4741. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4742. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  4743. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  4744. return NULL;
  4745. }
  4746. SWIGINTERN PyObject *_wrap_ESLconnection_setAsyncExecute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4747. PyObject *resultobj = 0;
  4748. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4749. char *arg2 = (char *) 0 ;
  4750. void *argp1 = 0 ;
  4751. int res1 = 0 ;
  4752. int res2 ;
  4753. char *buf2 = 0 ;
  4754. int alloc2 = 0 ;
  4755. PyObject * obj0 = 0 ;
  4756. PyObject * obj1 = 0 ;
  4757. int result;
  4758. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_setAsyncExecute",&obj0,&obj1)) SWIG_fail;
  4759. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4760. if (!SWIG_IsOK(res1)) {
  4761. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setAsyncExecute" "', argument " "1"" of type '" "ESLconnection *""'");
  4762. }
  4763. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4764. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4765. if (!SWIG_IsOK(res2)) {
  4766. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setAsyncExecute" "', argument " "2"" of type '" "char const *""'");
  4767. }
  4768. arg2 = reinterpret_cast< char * >(buf2);
  4769. {
  4770. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4771. result = (int)(arg1)->setAsyncExecute((char const *)arg2);
  4772. SWIG_PYTHON_THREAD_END_ALLOW;
  4773. }
  4774. resultobj = SWIG_From_int(static_cast< int >(result));
  4775. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4776. return resultobj;
  4777. fail:
  4778. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4779. return NULL;
  4780. }
  4781. SWIGINTERN PyObject *_wrap_ESLconnection_setEventLock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4782. PyObject *resultobj = 0;
  4783. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4784. char *arg2 = (char *) 0 ;
  4785. void *argp1 = 0 ;
  4786. int res1 = 0 ;
  4787. int res2 ;
  4788. char *buf2 = 0 ;
  4789. int alloc2 = 0 ;
  4790. PyObject * obj0 = 0 ;
  4791. PyObject * obj1 = 0 ;
  4792. int result;
  4793. if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_setEventLock",&obj0,&obj1)) SWIG_fail;
  4794. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4795. if (!SWIG_IsOK(res1)) {
  4796. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setEventLock" "', argument " "1"" of type '" "ESLconnection *""'");
  4797. }
  4798. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4799. res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  4800. if (!SWIG_IsOK(res2)) {
  4801. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setEventLock" "', argument " "2"" of type '" "char const *""'");
  4802. }
  4803. arg2 = reinterpret_cast< char * >(buf2);
  4804. {
  4805. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4806. result = (int)(arg1)->setEventLock((char const *)arg2);
  4807. SWIG_PYTHON_THREAD_END_ALLOW;
  4808. }
  4809. resultobj = SWIG_From_int(static_cast< int >(result));
  4810. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4811. return resultobj;
  4812. fail:
  4813. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  4814. return NULL;
  4815. }
  4816. SWIGINTERN PyObject *_wrap_ESLconnection_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4817. PyObject *resultobj = 0;
  4818. ESLconnection *arg1 = (ESLconnection *) 0 ;
  4819. void *argp1 = 0 ;
  4820. int res1 = 0 ;
  4821. PyObject * obj0 = 0 ;
  4822. int result;
  4823. if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_disconnect",&obj0)) SWIG_fail;
  4824. res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  4825. if (!SWIG_IsOK(res1)) {
  4826. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_disconnect" "', argument " "1"" of type '" "ESLconnection *""'");
  4827. }
  4828. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  4829. {
  4830. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4831. result = (int)(arg1)->disconnect();
  4832. SWIG_PYTHON_THREAD_END_ALLOW;
  4833. }
  4834. resultobj = SWIG_From_int(static_cast< int >(result));
  4835. return resultobj;
  4836. fail:
  4837. return NULL;
  4838. }
  4839. SWIGINTERN PyObject *ESLconnection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4840. PyObject *obj;
  4841. if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  4842. SWIG_TypeNewClientData(SWIGTYPE_p_ESLconnection, SWIG_NewClientData(obj));
  4843. return SWIG_Py_Void();
  4844. }
  4845. SWIGINTERN PyObject *_wrap_eslSetLogLevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4846. PyObject *resultobj = 0;
  4847. int arg1 ;
  4848. int val1 ;
  4849. int ecode1 = 0 ;
  4850. PyObject * obj0 = 0 ;
  4851. if (!PyArg_ParseTuple(args,(char *)"O:eslSetLogLevel",&obj0)) SWIG_fail;
  4852. ecode1 = SWIG_AsVal_int(obj0, &val1);
  4853. if (!SWIG_IsOK(ecode1)) {
  4854. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "eslSetLogLevel" "', argument " "1"" of type '" "int""'");
  4855. }
  4856. arg1 = static_cast< int >(val1);
  4857. {
  4858. SWIG_PYTHON_THREAD_BEGIN_ALLOW;
  4859. eslSetLogLevel(arg1);
  4860. SWIG_PYTHON_THREAD_END_ALLOW;
  4861. }
  4862. resultobj = SWIG_Py_Void();
  4863. return resultobj;
  4864. fail:
  4865. return NULL;
  4866. }
  4867. static PyMethodDef SwigMethods[] = {
  4868. { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
  4869. { (char *)"ESLevent_event_set", _wrap_ESLevent_event_set, METH_VARARGS, NULL},
  4870. { (char *)"ESLevent_event_get", _wrap_ESLevent_event_get, METH_VARARGS, NULL},
  4871. { (char *)"ESLevent_serialized_string_set", _wrap_ESLevent_serialized_string_set, METH_VARARGS, NULL},
  4872. { (char *)"ESLevent_serialized_string_get", _wrap_ESLevent_serialized_string_get, METH_VARARGS, NULL},
  4873. { (char *)"ESLevent_mine_set", _wrap_ESLevent_mine_set, METH_VARARGS, NULL},
  4874. { (char *)"ESLevent_mine_get", _wrap_ESLevent_mine_get, METH_VARARGS, NULL},
  4875. { (char *)"new_ESLevent", _wrap_new_ESLevent, METH_VARARGS, NULL},
  4876. { (char *)"delete_ESLevent", _wrap_delete_ESLevent, METH_VARARGS, NULL},
  4877. { (char *)"ESLevent_serialize", _wrap_ESLevent_serialize, METH_VARARGS, NULL},
  4878. { (char *)"ESLevent_setPriority", _wrap_ESLevent_setPriority, METH_VARARGS, NULL},
  4879. { (char *)"ESLevent_getHeader", _wrap_ESLevent_getHeader, METH_VARARGS, NULL},
  4880. { (char *)"ESLevent_getBody", _wrap_ESLevent_getBody, METH_VARARGS, NULL},
  4881. { (char *)"ESLevent_getType", _wrap_ESLevent_getType, METH_VARARGS, NULL},
  4882. { (char *)"ESLevent_addBody", _wrap_ESLevent_addBody, METH_VARARGS, NULL},
  4883. { (char *)"ESLevent_addHeader", _wrap_ESLevent_addHeader, METH_VARARGS, NULL},
  4884. { (char *)"ESLevent_pushHeader", _wrap_ESLevent_pushHeader, METH_VARARGS, NULL},
  4885. { (char *)"ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader, METH_VARARGS, NULL},
  4886. { (char *)"ESLevent_delHeader", _wrap_ESLevent_delHeader, METH_VARARGS, NULL},
  4887. { (char *)"ESLevent_firstHeader", _wrap_ESLevent_firstHeader, METH_VARARGS, NULL},
  4888. { (char *)"ESLevent_nextHeader", _wrap_ESLevent_nextHeader, METH_VARARGS, NULL},
  4889. { (char *)"ESLevent_swigregister", ESLevent_swigregister, METH_VARARGS, NULL},
  4890. { (char *)"new_ESLconnection", _wrap_new_ESLconnection, METH_VARARGS, NULL},
  4891. { (char *)"delete_ESLconnection", _wrap_delete_ESLconnection, METH_VARARGS, NULL},
  4892. { (char *)"ESLconnection_socketDescriptor", _wrap_ESLconnection_socketDescriptor, METH_VARARGS, NULL},
  4893. { (char *)"ESLconnection_connected", _wrap_ESLconnection_connected, METH_VARARGS, NULL},
  4894. { (char *)"ESLconnection_getInfo", _wrap_ESLconnection_getInfo, METH_VARARGS, NULL},
  4895. { (char *)"ESLconnection_send", _wrap_ESLconnection_send, METH_VARARGS, NULL},
  4896. { (char *)"ESLconnection_sendRecv", _wrap_ESLconnection_sendRecv, METH_VARARGS, NULL},
  4897. { (char *)"ESLconnection_api", _wrap_ESLconnection_api, METH_VARARGS, NULL},
  4898. { (char *)"ESLconnection_bgapi", _wrap_ESLconnection_bgapi, METH_VARARGS, NULL},
  4899. { (char *)"ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent, METH_VARARGS, NULL},
  4900. { (char *)"ESLconnection_sendMSG", _wrap_ESLconnection_sendMSG, METH_VARARGS, NULL},
  4901. { (char *)"ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent, METH_VARARGS, NULL},
  4902. { (char *)"ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed, METH_VARARGS, NULL},
  4903. { (char *)"ESLconnection_filter", _wrap_ESLconnection_filter, METH_VARARGS, NULL},
  4904. { (char *)"ESLconnection_events", _wrap_ESLconnection_events, METH_VARARGS, NULL},
  4905. { (char *)"ESLconnection_execute", _wrap_ESLconnection_execute, METH_VARARGS, NULL},
  4906. { (char *)"ESLconnection_executeAsync", _wrap_ESLconnection_executeAsync, METH_VARARGS, NULL},
  4907. { (char *)"ESLconnection_setAsyncExecute", _wrap_ESLconnection_setAsyncExecute, METH_VARARGS, NULL},
  4908. { (char *)"ESLconnection_setEventLock", _wrap_ESLconnection_setEventLock, METH_VARARGS, NULL},
  4909. { (char *)"ESLconnection_disconnect", _wrap_ESLconnection_disconnect, METH_VARARGS, NULL},
  4910. { (char *)"ESLconnection_swigregister", ESLconnection_swigregister, METH_VARARGS, NULL},
  4911. { (char *)"eslSetLogLevel", _wrap_eslSetLogLevel, METH_VARARGS, NULL},
  4912. { NULL, NULL, 0, NULL }
  4913. };
  4914. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  4915. static swig_type_info _swigt__p_ESLconnection = {"_p_ESLconnection", "ESLconnection *", 0, 0, (void*)0, 0};
  4916. static swig_type_info _swigt__p_ESLevent = {"_p_ESLevent", "ESLevent *", 0, 0, (void*)0, 0};
  4917. static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  4918. static swig_type_info _swigt__p_esl_event_t = {"_p_esl_event_t", "esl_event_t *", 0, 0, (void*)0, 0};
  4919. static swig_type_info _swigt__p_esl_priority_t = {"_p_esl_priority_t", "esl_priority_t *", 0, 0, (void*)0, 0};
  4920. static swig_type_info *swig_type_initial[] = {
  4921. &_swigt__p_ESLconnection,
  4922. &_swigt__p_ESLevent,
  4923. &_swigt__p_char,
  4924. &_swigt__p_esl_event_t,
  4925. &_swigt__p_esl_priority_t,
  4926. };
  4927. static swig_cast_info _swigc__p_ESLconnection[] = { {&_swigt__p_ESLconnection, 0, 0, 0},{0, 0, 0, 0}};
  4928. static swig_cast_info _swigc__p_ESLevent[] = { {&_swigt__p_ESLevent, 0, 0, 0},{0, 0, 0, 0}};
  4929. static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  4930. static swig_cast_info _swigc__p_esl_event_t[] = { {&_swigt__p_esl_event_t, 0, 0, 0},{0, 0, 0, 0}};
  4931. static swig_cast_info _swigc__p_esl_priority_t[] = { {&_swigt__p_esl_priority_t, 0, 0, 0},{0, 0, 0, 0}};
  4932. static swig_cast_info *swig_cast_initial[] = {
  4933. _swigc__p_ESLconnection,
  4934. _swigc__p_ESLevent,
  4935. _swigc__p_char,
  4936. _swigc__p_esl_event_t,
  4937. _swigc__p_esl_priority_t,
  4938. };
  4939. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  4940. static swig_const_info swig_const_table[] = {
  4941. {0, 0, 0, 0.0, 0, 0}};
  4942. #ifdef __cplusplus
  4943. }
  4944. #endif
  4945. /* -----------------------------------------------------------------------------
  4946. * Type initialization:
  4947. * This problem is tough by the requirement that no dynamic
  4948. * memory is used. Also, since swig_type_info structures store pointers to
  4949. * swig_cast_info structures and swig_cast_info structures store pointers back
  4950. * to swig_type_info structures, we need some lookup code at initialization.
  4951. * The idea is that swig generates all the structures that are needed.
  4952. * The runtime then collects these partially filled structures.
  4953. * The SWIG_InitializeModule function takes these initial arrays out of
  4954. * swig_module, and does all the lookup, filling in the swig_module.types
  4955. * array with the correct data and linking the correct swig_cast_info
  4956. * structures together.
  4957. *
  4958. * The generated swig_type_info structures are assigned statically to an initial
  4959. * array. We just loop through that array, and handle each type individually.
  4960. * First we lookup if this type has been already loaded, and if so, use the
  4961. * loaded structure instead of the generated one. Then we have to fill in the
  4962. * cast linked list. The cast data is initially stored in something like a
  4963. * two-dimensional array. Each row corresponds to a type (there are the same
  4964. * number of rows as there are in the swig_type_initial array). Each entry in
  4965. * a column is one of the swig_cast_info structures for that type.
  4966. * The cast_initial array is actually an array of arrays, because each row has
  4967. * a variable number of columns. So to actually build the cast linked list,
  4968. * we find the array of casts associated with the type, and loop through it
  4969. * adding the casts to the list. The one last trick we need to do is making
  4970. * sure the type pointer in the swig_cast_info struct is correct.
  4971. *
  4972. * First off, we lookup the cast->type name to see if it is already loaded.
  4973. * There are three cases to handle:
  4974. * 1) If the cast->type has already been loaded AND the type we are adding
  4975. * casting info to has not been loaded (it is in this module), THEN we
  4976. * replace the cast->type pointer with the type pointer that has already
  4977. * been loaded.
  4978. * 2) If BOTH types (the one we are adding casting info to, and the
  4979. * cast->type) are loaded, THEN the cast info has already been loaded by
  4980. * the previous module so we just ignore it.
  4981. * 3) Finally, if cast->type has not already been loaded, then we add that
  4982. * swig_cast_info to the linked list (because the cast->type) pointer will
  4983. * be correct.
  4984. * ----------------------------------------------------------------------------- */
  4985. #ifdef __cplusplus
  4986. extern "C" {
  4987. #if 0
  4988. } /* c-mode */
  4989. #endif
  4990. #endif
  4991. #if 0
  4992. #define SWIGRUNTIME_DEBUG
  4993. #endif
  4994. SWIGRUNTIME void
  4995. SWIG_InitializeModule(void *clientdata) {
  4996. size_t i;
  4997. swig_module_info *module_head, *iter;
  4998. int found, init;
  4999. /* check to see if the circular list has been setup, if not, set it up */
  5000. if (swig_module.next==0) {
  5001. /* Initialize the swig_module */
  5002. swig_module.type_initial = swig_type_initial;
  5003. swig_module.cast_initial = swig_cast_initial;
  5004. swig_module.next = &swig_module;
  5005. init = 1;
  5006. } else {
  5007. init = 0;
  5008. }
  5009. /* Try and load any already created modules */
  5010. module_head = SWIG_GetModule(clientdata);
  5011. if (!module_head) {
  5012. /* This is the first module loaded for this interpreter */
  5013. /* so set the swig module into the interpreter */
  5014. SWIG_SetModule(clientdata, &swig_module);
  5015. module_head = &swig_module;
  5016. } else {
  5017. /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  5018. found=0;
  5019. iter=module_head;
  5020. do {
  5021. if (iter==&swig_module) {
  5022. found=1;
  5023. break;
  5024. }
  5025. iter=iter->next;
  5026. } while (iter!= module_head);
  5027. /* if the is found in the list, then all is done and we may leave */
  5028. if (found) return;
  5029. /* otherwise we must add out module into the list */
  5030. swig_module.next = module_head->next;
  5031. module_head->next = &swig_module;
  5032. }
  5033. /* When multiple interpreters are used, a module could have already been initialized in
  5034. a different interpreter, but not yet have a pointer in this interpreter.
  5035. In this case, we do not want to continue adding types... everything should be
  5036. set up already */
  5037. if (init == 0) return;
  5038. /* Now work on filling in swig_module.types */
  5039. #ifdef SWIGRUNTIME_DEBUG
  5040. printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  5041. #endif
  5042. for (i = 0; i < swig_module.size; ++i) {
  5043. swig_type_info *type = 0;
  5044. swig_type_info *ret;
  5045. swig_cast_info *cast;
  5046. #ifdef SWIGRUNTIME_DEBUG
  5047. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  5048. #endif
  5049. /* if there is another module already loaded */
  5050. if (swig_module.next != &swig_module) {
  5051. type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  5052. }
  5053. if (type) {
  5054. /* Overwrite clientdata field */
  5055. #ifdef SWIGRUNTIME_DEBUG
  5056. printf("SWIG_InitializeModule: found type %s\n", type->name);
  5057. #endif
  5058. if (swig_module.type_initial[i]->clientdata) {
  5059. type->clientdata = swig_module.type_initial[i]->clientdata;
  5060. #ifdef SWIGRUNTIME_DEBUG
  5061. printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  5062. #endif
  5063. }
  5064. } else {
  5065. type = swig_module.type_initial[i];
  5066. }
  5067. /* Insert casting types */
  5068. cast = swig_module.cast_initial[i];
  5069. while (cast->type) {
  5070. /* Don't need to add information already in the list */
  5071. ret = 0;
  5072. #ifdef SWIGRUNTIME_DEBUG
  5073. printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  5074. #endif
  5075. if (swig_module.next != &swig_module) {
  5076. ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  5077. #ifdef SWIGRUNTIME_DEBUG
  5078. if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  5079. #endif
  5080. }
  5081. if (ret) {
  5082. if (type == swig_module.type_initial[i]) {
  5083. #ifdef SWIGRUNTIME_DEBUG
  5084. printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  5085. #endif
  5086. cast->type = ret;
  5087. ret = 0;
  5088. } else {
  5089. /* Check for casting already in the list */
  5090. swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  5091. #ifdef SWIGRUNTIME_DEBUG
  5092. if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  5093. #endif
  5094. if (!ocast) ret = 0;
  5095. }
  5096. }
  5097. if (!ret) {
  5098. #ifdef SWIGRUNTIME_DEBUG
  5099. printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  5100. #endif
  5101. if (type->cast) {
  5102. type->cast->prev = cast;
  5103. cast->next = type->cast;
  5104. }
  5105. type->cast = cast;
  5106. }
  5107. cast++;
  5108. }
  5109. /* Set entry in modules->types array equal to the type */
  5110. swig_module.types[i] = type;
  5111. }
  5112. swig_module.types[i] = 0;
  5113. #ifdef SWIGRUNTIME_DEBUG
  5114. printf("**** SWIG_InitializeModule: Cast List ******\n");
  5115. for (i = 0; i < swig_module.size; ++i) {
  5116. int j = 0;
  5117. swig_cast_info *cast = swig_module.cast_initial[i];
  5118. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  5119. while (cast->type) {
  5120. printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  5121. cast++;
  5122. ++j;
  5123. }
  5124. printf("---- Total casts: %d\n",j);
  5125. }
  5126. printf("**** SWIG_InitializeModule: Cast List ******\n");
  5127. #endif
  5128. }
  5129. /* This function will propagate the clientdata field of type to
  5130. * any new swig_type_info structures that have been added into the list
  5131. * of equivalent types. It is like calling
  5132. * SWIG_TypeClientData(type, clientdata) a second time.
  5133. */
  5134. SWIGRUNTIME void
  5135. SWIG_PropagateClientData(void) {
  5136. size_t i;
  5137. swig_cast_info *equiv;
  5138. static int init_run = 0;
  5139. if (init_run) return;
  5140. init_run = 1;
  5141. for (i = 0; i < swig_module.size; i++) {
  5142. if (swig_module.types[i]->clientdata) {
  5143. equiv = swig_module.types[i]->cast;
  5144. while (equiv) {
  5145. if (!equiv->converter) {
  5146. if (equiv->type && !equiv->type->clientdata)
  5147. SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  5148. }
  5149. equiv = equiv->next;
  5150. }
  5151. }
  5152. }
  5153. }
  5154. #ifdef __cplusplus
  5155. #if 0
  5156. {
  5157. /* c-mode */
  5158. #endif
  5159. }
  5160. #endif
  5161. #ifdef __cplusplus
  5162. extern "C" {
  5163. #endif
  5164. /* Python-specific SWIG API */
  5165. #define SWIG_newvarlink() SWIG_Python_newvarlink()
  5166. #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  5167. #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  5168. /* -----------------------------------------------------------------------------
  5169. * global variable support code.
  5170. * ----------------------------------------------------------------------------- */
  5171. typedef struct swig_globalvar {
  5172. char *name; /* Name of global variable */
  5173. PyObject *(*get_attr)(void); /* Return the current value */
  5174. int (*set_attr)(PyObject *); /* Set the value */
  5175. struct swig_globalvar *next;
  5176. } swig_globalvar;
  5177. typedef struct swig_varlinkobject {
  5178. PyObject_HEAD
  5179. swig_globalvar *vars;
  5180. } swig_varlinkobject;
  5181. SWIGINTERN PyObject *
  5182. swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  5183. #if PY_VERSION_HEX >= 0x03000000
  5184. return PyUnicode_InternFromString("<Swig global variables>");
  5185. #else
  5186. return PyString_FromString("<Swig global variables>");
  5187. #endif
  5188. }
  5189. SWIGINTERN PyObject *
  5190. swig_varlink_str(swig_varlinkobject *v) {
  5191. #if PY_VERSION_HEX >= 0x03000000
  5192. PyObject *str = PyUnicode_InternFromString("(");
  5193. PyObject *tail;
  5194. PyObject *joined;
  5195. swig_globalvar *var;
  5196. for (var = v->vars; var; var=var->next) {
  5197. tail = PyUnicode_FromString(var->name);
  5198. joined = PyUnicode_Concat(str, tail);
  5199. Py_DecRef(str);
  5200. Py_DecRef(tail);
  5201. str = joined;
  5202. if (var->next) {
  5203. tail = PyUnicode_InternFromString(", ");
  5204. joined = PyUnicode_Concat(str, tail);
  5205. Py_DecRef(str);
  5206. Py_DecRef(tail);
  5207. str = joined;
  5208. }
  5209. }
  5210. tail = PyUnicode_InternFromString(")");
  5211. joined = PyUnicode_Concat(str, tail);
  5212. Py_DecRef(str);
  5213. Py_DecRef(tail);
  5214. str = joined;
  5215. #else
  5216. PyObject *str = PyString_FromString("(");
  5217. swig_globalvar *var;
  5218. for (var = v->vars; var; var=var->next) {
  5219. PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  5220. if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  5221. }
  5222. PyString_ConcatAndDel(&str,PyString_FromString(")"));
  5223. #endif
  5224. return str;
  5225. }
  5226. SWIGINTERN int
  5227. swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
  5228. char *tmp;
  5229. PyObject *str = swig_varlink_str(v);
  5230. fprintf(fp,"Swig global variables ");
  5231. fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
  5232. SWIG_Python_str_DelForPy3(tmp);
  5233. Py_DECREF(str);
  5234. return 0;
  5235. }
  5236. SWIGINTERN void
  5237. swig_varlink_dealloc(swig_varlinkobject *v) {
  5238. swig_globalvar *var = v->vars;
  5239. while (var) {
  5240. swig_globalvar *n = var->next;
  5241. free(var->name);
  5242. free(var);
  5243. var = n;
  5244. }
  5245. }
  5246. SWIGINTERN PyObject *
  5247. swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  5248. PyObject *res = NULL;
  5249. swig_globalvar *var = v->vars;
  5250. while (var) {
  5251. if (strcmp(var->name,n) == 0) {
  5252. res = (*var->get_attr)();
  5253. break;
  5254. }
  5255. var = var->next;
  5256. }
  5257. if (res == NULL && !PyErr_Occurred()) {
  5258. PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  5259. }
  5260. return res;
  5261. }
  5262. SWIGINTERN int
  5263. swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  5264. int res = 1;
  5265. swig_globalvar *var = v->vars;
  5266. while (var) {
  5267. if (strcmp(var->name,n) == 0) {
  5268. res = (*var->set_attr)(p);
  5269. break;
  5270. }
  5271. var = var->next;
  5272. }
  5273. if (res == 1 && !PyErr_Occurred()) {
  5274. PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  5275. }
  5276. return res;
  5277. }
  5278. SWIGINTERN PyTypeObject*
  5279. swig_varlink_type(void) {
  5280. static char varlink__doc__[] = "Swig var link object";
  5281. static PyTypeObject varlink_type;
  5282. static int type_init = 0;
  5283. if (!type_init) {
  5284. const PyTypeObject tmp = {
  5285. /* PyObject header changed in Python 3 */
  5286. #if PY_VERSION_HEX >= 0x03000000
  5287. PyVarObject_HEAD_INIT(NULL, 0)
  5288. #else
  5289. PyObject_HEAD_INIT(NULL)
  5290. 0, /* ob_size */
  5291. #endif
  5292. (char *)"swigvarlink", /* tp_name */
  5293. sizeof(swig_varlinkobject), /* tp_basicsize */
  5294. 0, /* tp_itemsize */
  5295. (destructor) swig_varlink_dealloc, /* tp_dealloc */
  5296. (printfunc) swig_varlink_print, /* tp_print */
  5297. (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  5298. (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  5299. 0, /* tp_compare */
  5300. (reprfunc) swig_varlink_repr, /* tp_repr */
  5301. 0, /* tp_as_number */
  5302. 0, /* tp_as_sequence */
  5303. 0, /* tp_as_mapping */
  5304. 0, /* tp_hash */
  5305. 0, /* tp_call */
  5306. (reprfunc) swig_varlink_str, /* tp_str */
  5307. 0, /* tp_getattro */
  5308. 0, /* tp_setattro */
  5309. 0, /* tp_as_buffer */
  5310. 0, /* tp_flags */
  5311. varlink__doc__, /* tp_doc */
  5312. 0, /* tp_traverse */
  5313. 0, /* tp_clear */
  5314. 0, /* tp_richcompare */
  5315. 0, /* tp_weaklistoffset */
  5316. #if PY_VERSION_HEX >= 0x02020000
  5317. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  5318. #endif
  5319. #if PY_VERSION_HEX >= 0x02030000
  5320. 0, /* tp_del */
  5321. #endif
  5322. #if PY_VERSION_HEX >= 0x02060000
  5323. 0, /* tp_version */
  5324. #endif
  5325. #ifdef COUNT_ALLOCS
  5326. 0,0,0,0 /* tp_alloc -> tp_next */
  5327. #endif
  5328. };
  5329. varlink_type = tmp;
  5330. type_init = 1;
  5331. #if PY_VERSION_HEX < 0x02020000
  5332. varlink_type.ob_type = &PyType_Type;
  5333. #else
  5334. if (PyType_Ready(&varlink_type) < 0)
  5335. return NULL;
  5336. #endif
  5337. }
  5338. return &varlink_type;
  5339. }
  5340. /* Create a variable linking object for use later */
  5341. SWIGINTERN PyObject *
  5342. SWIG_Python_newvarlink(void) {
  5343. swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  5344. if (result) {
  5345. result->vars = 0;
  5346. }
  5347. return ((PyObject*) result);
  5348. }
  5349. SWIGINTERN void
  5350. SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  5351. swig_varlinkobject *v = (swig_varlinkobject *) p;
  5352. swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  5353. if (gv) {
  5354. size_t size = strlen(name)+1;
  5355. gv->name = (char *)malloc(size);
  5356. if (gv->name) {
  5357. strncpy(gv->name,name,size);
  5358. gv->get_attr = get_attr;
  5359. gv->set_attr = set_attr;
  5360. gv->next = v->vars;
  5361. }
  5362. }
  5363. v->vars = gv;
  5364. }
  5365. SWIGINTERN PyObject *
  5366. SWIG_globals(void) {
  5367. static PyObject *_SWIG_globals = 0;
  5368. if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
  5369. return _SWIG_globals;
  5370. }
  5371. /* -----------------------------------------------------------------------------
  5372. * constants/methods manipulation
  5373. * ----------------------------------------------------------------------------- */
  5374. /* Install Constants */
  5375. SWIGINTERN void
  5376. SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  5377. PyObject *obj = 0;
  5378. size_t i;
  5379. for (i = 0; constants[i].type; ++i) {
  5380. switch(constants[i].type) {
  5381. case SWIG_PY_POINTER:
  5382. obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  5383. break;
  5384. case SWIG_PY_BINARY:
  5385. obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  5386. break;
  5387. default:
  5388. obj = 0;
  5389. break;
  5390. }
  5391. if (obj) {
  5392. PyDict_SetItemString(d, constants[i].name, obj);
  5393. Py_DECREF(obj);
  5394. }
  5395. }
  5396. }
  5397. /* -----------------------------------------------------------------------------*/
  5398. /* Fix SwigMethods to carry the callback ptrs when needed */
  5399. /* -----------------------------------------------------------------------------*/
  5400. SWIGINTERN void
  5401. SWIG_Python_FixMethods(PyMethodDef *methods,
  5402. swig_const_info *const_table,
  5403. swig_type_info **types,
  5404. swig_type_info **types_initial) {
  5405. size_t i;
  5406. for (i = 0; methods[i].ml_name; ++i) {
  5407. const char *c = methods[i].ml_doc;
  5408. if (c && (c = strstr(c, "swig_ptr: "))) {
  5409. int j;
  5410. swig_const_info *ci = 0;
  5411. const char *name = c + 10;
  5412. for (j = 0; const_table[j].type; ++j) {
  5413. if (strncmp(const_table[j].name, name,
  5414. strlen(const_table[j].name)) == 0) {
  5415. ci = &(const_table[j]);
  5416. break;
  5417. }
  5418. }
  5419. if (ci) {
  5420. void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  5421. if (ptr) {
  5422. size_t shift = (ci->ptype) - types;
  5423. swig_type_info *ty = types_initial[shift];
  5424. size_t ldoc = (c - methods[i].ml_doc);
  5425. size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  5426. char *ndoc = (char*)malloc(ldoc + lptr + 10);
  5427. if (ndoc) {
  5428. char *buff = ndoc;
  5429. strncpy(buff, methods[i].ml_doc, ldoc);
  5430. buff += ldoc;
  5431. strncpy(buff, "swig_ptr: ", 10);
  5432. buff += 10;
  5433. SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  5434. methods[i].ml_doc = ndoc;
  5435. }
  5436. }
  5437. }
  5438. }
  5439. }
  5440. }
  5441. #ifdef __cplusplus
  5442. }
  5443. #endif
  5444. /* -----------------------------------------------------------------------------*
  5445. * Partial Init method
  5446. * -----------------------------------------------------------------------------*/
  5447. #ifdef __cplusplus
  5448. extern "C"
  5449. #endif
  5450. SWIGEXPORT
  5451. #if PY_VERSION_HEX >= 0x03000000
  5452. PyObject*
  5453. #else
  5454. void
  5455. #endif
  5456. SWIG_init(void) {
  5457. PyObject *m, *d, *md;
  5458. #if PY_VERSION_HEX >= 0x03000000
  5459. static struct PyModuleDef SWIG_module = {
  5460. # if PY_VERSION_HEX >= 0x03020000
  5461. PyModuleDef_HEAD_INIT,
  5462. # else
  5463. {
  5464. PyObject_HEAD_INIT(NULL)
  5465. NULL, /* m_init */
  5466. 0, /* m_index */
  5467. NULL, /* m_copy */
  5468. },
  5469. # endif
  5470. (char *) SWIG_name,
  5471. NULL,
  5472. -1,
  5473. SwigMethods,
  5474. NULL,
  5475. NULL,
  5476. NULL,
  5477. NULL
  5478. };
  5479. #endif
  5480. #if defined(SWIGPYTHON_BUILTIN)
  5481. static SwigPyClientData SwigPyObject_clientdata = {
  5482. 0, 0, 0, 0, 0, 0, 0
  5483. };
  5484. static PyGetSetDef this_getset_def = {
  5485. (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  5486. };
  5487. static SwigPyGetSet thisown_getset_closure = {
  5488. (PyCFunction) SwigPyObject_own,
  5489. (PyCFunction) SwigPyObject_own
  5490. };
  5491. static PyGetSetDef thisown_getset_def = {
  5492. (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  5493. };
  5494. PyObject *metatype_args;
  5495. PyTypeObject *builtin_pytype;
  5496. int builtin_base_count;
  5497. swig_type_info *builtin_basetype;
  5498. PyObject *tuple;
  5499. PyGetSetDescrObject *static_getset;
  5500. PyTypeObject *metatype;
  5501. SwigPyClientData *cd;
  5502. PyObject *public_interface, *public_symbol;
  5503. PyObject *this_descr;
  5504. PyObject *thisown_descr;
  5505. int i;
  5506. (void)builtin_pytype;
  5507. (void)builtin_base_count;
  5508. (void)builtin_basetype;
  5509. (void)tuple;
  5510. (void)static_getset;
  5511. /* metatype is used to implement static member variables. */
  5512. metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  5513. assert(metatype_args);
  5514. metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  5515. assert(metatype);
  5516. Py_DECREF(metatype_args);
  5517. metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  5518. assert(PyType_Ready(metatype) >= 0);
  5519. #endif
  5520. /* Fix SwigMethods to carry the callback ptrs when needed */
  5521. SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  5522. #if PY_VERSION_HEX >= 0x03000000
  5523. m = PyModule_Create(&SWIG_module);
  5524. #else
  5525. m = Py_InitModule((char *) SWIG_name, SwigMethods);
  5526. #endif
  5527. md = d = PyModule_GetDict(m);
  5528. (void)md;
  5529. SWIG_InitializeModule(0);
  5530. #ifdef SWIGPYTHON_BUILTIN
  5531. SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  5532. assert(SwigPyObject_stype);
  5533. cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  5534. if (!cd) {
  5535. SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  5536. SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  5537. } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
  5538. PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  5539. # if PY_VERSION_HEX >= 0x03000000
  5540. return NULL;
  5541. # else
  5542. return;
  5543. # endif
  5544. }
  5545. /* All objects have a 'this' attribute */
  5546. this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  5547. (void)this_descr;
  5548. /* All objects have a 'thisown' attribute */
  5549. thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  5550. (void)thisown_descr;
  5551. public_interface = PyList_New(0);
  5552. public_symbol = 0;
  5553. (void)public_symbol;
  5554. PyDict_SetItemString(md, "__all__", public_interface);
  5555. Py_DECREF(public_interface);
  5556. for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  5557. SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  5558. for (i = 0; swig_const_table[i].name != 0; ++i)
  5559. SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  5560. #endif
  5561. SWIG_InstallConstants(d,swig_const_table);
  5562. /* Initialize threading */
  5563. SWIG_PYTHON_INITIALIZE_THREADS;
  5564. #if PY_VERSION_HEX >= 0x03000000
  5565. return m;
  5566. #else
  5567. return;
  5568. #endif
  5569. }