ESL_wrap.cpp 190 KB

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