2
0

esl_wrap.cpp 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 1.3.35
  4. *
  5. * This file is not intended to be easily readable and contains a number of
  6. * coding conventions designed to improve portability and efficiency. Do not make
  7. * changes to this file unless you know what you are doing--modify the SWIG
  8. * interface file instead.
  9. * ----------------------------------------------------------------------------- */
  10. #define SWIGPERL
  11. #define SWIG_CASTRANK_MODE
  12. #ifdef __cplusplus
  13. template<typename T> class SwigValueWrapper {
  14. T *tt;
  15. public:
  16. SwigValueWrapper() : tt(0) { }
  17. SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
  18. SwigValueWrapper(const T& t) : tt(new T(t)) { }
  19. ~SwigValueWrapper() { delete tt; }
  20. SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
  21. operator T&() const { return *tt; }
  22. T *operator&() { return tt; }
  23. private:
  24. SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  25. };
  26. template <typename T> T SwigValueInit() {
  27. return T();
  28. }
  29. #endif
  30. /* -----------------------------------------------------------------------------
  31. * This section contains generic SWIG labels for method/variable
  32. * declarations/attributes, and other compiler dependent labels.
  33. * ----------------------------------------------------------------------------- */
  34. /* template workaround for compilers that cannot correctly implement the C++ standard */
  35. #ifndef SWIGTEMPLATEDISAMBIGUATOR
  36. # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  37. # define SWIGTEMPLATEDISAMBIGUATOR template
  38. # elif defined(__HP_aCC)
  39. /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  40. /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  41. # define SWIGTEMPLATEDISAMBIGUATOR template
  42. # else
  43. # define SWIGTEMPLATEDISAMBIGUATOR
  44. # endif
  45. #endif
  46. /* inline attribute */
  47. #ifndef SWIGINLINE
  48. # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  49. # define SWIGINLINE inline
  50. # else
  51. # define SWIGINLINE
  52. # endif
  53. #endif
  54. /* attribute recognised by some compilers to avoid 'unused' warnings */
  55. #ifndef SWIGUNUSED
  56. # if defined(__GNUC__)
  57. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  58. # define SWIGUNUSED __attribute__ ((__unused__))
  59. # else
  60. # define SWIGUNUSED
  61. # endif
  62. # elif defined(__ICC)
  63. # define SWIGUNUSED __attribute__ ((__unused__))
  64. # else
  65. # define SWIGUNUSED
  66. # endif
  67. #endif
  68. #ifndef SWIGUNUSEDPARM
  69. # ifdef __cplusplus
  70. # define SWIGUNUSEDPARM(p)
  71. # else
  72. # define SWIGUNUSEDPARM(p) p SWIGUNUSED
  73. # endif
  74. #endif
  75. /* internal SWIG method */
  76. #ifndef SWIGINTERN
  77. # define SWIGINTERN static SWIGUNUSED
  78. #endif
  79. /* internal inline SWIG method */
  80. #ifndef SWIGINTERNINLINE
  81. # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  82. #endif
  83. /* exporting methods */
  84. #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  85. # ifndef GCC_HASCLASSVISIBILITY
  86. # define GCC_HASCLASSVISIBILITY
  87. # endif
  88. #endif
  89. #ifndef SWIGEXPORT
  90. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  91. # if defined(STATIC_LINKED)
  92. # define SWIGEXPORT
  93. # else
  94. # define SWIGEXPORT __declspec(dllexport)
  95. # endif
  96. # else
  97. # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  98. # define SWIGEXPORT __attribute__ ((visibility("default")))
  99. # else
  100. # define SWIGEXPORT
  101. # endif
  102. # endif
  103. #endif
  104. /* calling conventions for Windows */
  105. #ifndef SWIGSTDCALL
  106. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  107. # define SWIGSTDCALL __stdcall
  108. # else
  109. # define SWIGSTDCALL
  110. # endif
  111. #endif
  112. /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  113. #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  114. # define _CRT_SECURE_NO_DEPRECATE
  115. #endif
  116. /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  117. #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  118. # define _SCL_SECURE_NO_DEPRECATE
  119. #endif
  120. /* -----------------------------------------------------------------------------
  121. * swigrun.swg
  122. *
  123. * This file contains generic CAPI SWIG runtime support for pointer
  124. * type checking.
  125. * ----------------------------------------------------------------------------- */
  126. /* This should only be incremented when either the layout of swig_type_info changes,
  127. or for whatever reason, the runtime changes incompatibly */
  128. #define SWIG_RUNTIME_VERSION "4"
  129. /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  130. #ifdef SWIG_TYPE_TABLE
  131. # define SWIG_QUOTE_STRING(x) #x
  132. # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  133. # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  134. #else
  135. # define SWIG_TYPE_TABLE_NAME
  136. #endif
  137. /*
  138. You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  139. creating a static or dynamic library from the swig runtime code.
  140. In 99.9% of the cases, swig just needs to declare them as 'static'.
  141. But only do this if is strictly necessary, ie, if you have problems
  142. with your compiler or so.
  143. */
  144. #ifndef SWIGRUNTIME
  145. # define SWIGRUNTIME SWIGINTERN
  146. #endif
  147. #ifndef SWIGRUNTIMEINLINE
  148. # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  149. #endif
  150. /* Generic buffer size */
  151. #ifndef SWIG_BUFFER_SIZE
  152. # define SWIG_BUFFER_SIZE 1024
  153. #endif
  154. /* Flags for pointer conversions */
  155. #define SWIG_POINTER_DISOWN 0x1
  156. #define SWIG_CAST_NEW_MEMORY 0x2
  157. /* Flags for new pointer objects */
  158. #define SWIG_POINTER_OWN 0x1
  159. /*
  160. Flags/methods for returning states.
  161. The swig conversion methods, as ConvertPtr, return and integer
  162. that tells if the conversion was successful or not. And if not,
  163. an error code can be returned (see swigerrors.swg for the codes).
  164. Use the following macros/flags to set or process the returning
  165. states.
  166. In old swig versions, you usually write code as:
  167. if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  168. // success code
  169. } else {
  170. //fail code
  171. }
  172. Now you can be more explicit as:
  173. int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  174. if (SWIG_IsOK(res)) {
  175. // success code
  176. } else {
  177. // fail code
  178. }
  179. that seems to be the same, but now you can also do
  180. Type *ptr;
  181. int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  182. if (SWIG_IsOK(res)) {
  183. // success code
  184. if (SWIG_IsNewObj(res) {
  185. ...
  186. delete *ptr;
  187. } else {
  188. ...
  189. }
  190. } else {
  191. // fail code
  192. }
  193. I.e., now SWIG_ConvertPtr can return new objects and you can
  194. identify the case and take care of the deallocation. Of course that
  195. requires also to SWIG_ConvertPtr to return new result values, as
  196. int SWIG_ConvertPtr(obj, ptr,...) {
  197. if (<obj is ok>) {
  198. if (<need new object>) {
  199. *ptr = <ptr to new allocated object>;
  200. return SWIG_NEWOBJ;
  201. } else {
  202. *ptr = <ptr to old object>;
  203. return SWIG_OLDOBJ;
  204. }
  205. } else {
  206. return SWIG_BADOBJ;
  207. }
  208. }
  209. Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  210. more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  211. swig errors code.
  212. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  213. allows to return the 'cast rank', for example, if you have this
  214. int food(double)
  215. int fooi(int);
  216. and you call
  217. food(1) // cast rank '1' (1 -> 1.0)
  218. fooi(1) // cast rank '0'
  219. just use the SWIG_AddCast()/SWIG_CheckState()
  220. */
  221. #define SWIG_OK (0)
  222. #define SWIG_ERROR (-1)
  223. #define SWIG_IsOK(r) (r >= 0)
  224. #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  225. /* The CastRankLimit says how many bits are used for the cast rank */
  226. #define SWIG_CASTRANKLIMIT (1 << 8)
  227. /* The NewMask denotes the object was created (using new/malloc) */
  228. #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  229. /* The TmpMask is for in/out typemaps that use temporal objects */
  230. #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  231. /* Simple returning values */
  232. #define SWIG_BADOBJ (SWIG_ERROR)
  233. #define SWIG_OLDOBJ (SWIG_OK)
  234. #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  235. #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  236. /* Check, add and del mask methods */
  237. #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  238. #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  239. #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  240. #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  241. #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  242. #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  243. /* Cast-Rank Mode */
  244. #if defined(SWIG_CASTRANK_MODE)
  245. # ifndef SWIG_TypeRank
  246. # define SWIG_TypeRank unsigned long
  247. # endif
  248. # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  249. # define SWIG_MAXCASTRANK (2)
  250. # endif
  251. # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  252. # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  253. SWIGINTERNINLINE int SWIG_AddCast(int r) {
  254. return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  255. }
  256. SWIGINTERNINLINE int SWIG_CheckState(int r) {
  257. return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  258. }
  259. #else /* no cast-rank mode */
  260. # define SWIG_AddCast
  261. # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  262. #endif
  263. #include <string.h>
  264. #ifdef __cplusplus
  265. extern "C" {
  266. #endif
  267. typedef void *(*swig_converter_func)(void *, int *);
  268. typedef struct swig_type_info *(*swig_dycast_func)(void **);
  269. /* Structure to store information on one type */
  270. typedef struct swig_type_info {
  271. const char *name; /* mangled name of this type */
  272. const char *str; /* human readable name of this type */
  273. swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  274. struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  275. void *clientdata; /* language specific type data */
  276. int owndata; /* flag if the structure owns the clientdata */
  277. } swig_type_info;
  278. /* Structure to store a type and conversion function used for casting */
  279. typedef struct swig_cast_info {
  280. swig_type_info *type; /* pointer to type that is equivalent to this type */
  281. swig_converter_func converter; /* function to cast the void pointers */
  282. struct swig_cast_info *next; /* pointer to next cast in linked list */
  283. struct swig_cast_info *prev; /* pointer to the previous cast */
  284. } swig_cast_info;
  285. /* Structure used to store module information
  286. * Each module generates one structure like this, and the runtime collects
  287. * all of these structures and stores them in a circularly linked list.*/
  288. typedef struct swig_module_info {
  289. swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  290. size_t size; /* Number of types in this module */
  291. struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  292. swig_type_info **type_initial; /* Array of initially generated type structures */
  293. swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  294. void *clientdata; /* Language specific module data */
  295. } swig_module_info;
  296. /*
  297. Compare two type names skipping the space characters, therefore
  298. "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  299. Return 0 when the two name types are equivalent, as in
  300. strncmp, but skipping ' '.
  301. */
  302. SWIGRUNTIME int
  303. SWIG_TypeNameComp(const char *f1, const char *l1,
  304. const char *f2, const char *l2) {
  305. for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  306. while ((*f1 == ' ') && (f1 != l1)) ++f1;
  307. while ((*f2 == ' ') && (f2 != l2)) ++f2;
  308. if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  309. }
  310. return (int)((l1 - f1) - (l2 - f2));
  311. }
  312. /*
  313. Check type equivalence in a name list like <name1>|<name2>|...
  314. Return 0 if not equal, 1 if equal
  315. */
  316. SWIGRUNTIME int
  317. SWIG_TypeEquiv(const char *nb, const char *tb) {
  318. int equiv = 0;
  319. const char* te = tb + strlen(tb);
  320. const char* ne = nb;
  321. while (!equiv && *ne) {
  322. for (nb = ne; *ne; ++ne) {
  323. if (*ne == '|') break;
  324. }
  325. equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
  326. if (*ne) ++ne;
  327. }
  328. return equiv;
  329. }
  330. /*
  331. Check type equivalence in a name list like <name1>|<name2>|...
  332. Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  333. */
  334. SWIGRUNTIME int
  335. SWIG_TypeCompare(const char *nb, const char *tb) {
  336. int equiv = 0;
  337. const char* te = tb + strlen(tb);
  338. const char* ne = nb;
  339. while (!equiv && *ne) {
  340. for (nb = ne; *ne; ++ne) {
  341. if (*ne == '|') break;
  342. }
  343. equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
  344. if (*ne) ++ne;
  345. }
  346. return equiv;
  347. }
  348. /* think of this as a c++ template<> or a scheme macro */
  349. #define SWIG_TypeCheck_Template(comparison, ty) \
  350. if (ty) { \
  351. swig_cast_info *iter = ty->cast; \
  352. while (iter) { \
  353. if (comparison) { \
  354. if (iter == ty->cast) return iter; \
  355. /* Move iter to the top of the linked list */ \
  356. iter->prev->next = iter->next; \
  357. if (iter->next) \
  358. iter->next->prev = iter->prev; \
  359. iter->next = ty->cast; \
  360. iter->prev = 0; \
  361. if (ty->cast) ty->cast->prev = iter; \
  362. ty->cast = iter; \
  363. return iter; \
  364. } \
  365. iter = iter->next; \
  366. } \
  367. } \
  368. return 0
  369. /*
  370. Check the typename
  371. */
  372. SWIGRUNTIME swig_cast_info *
  373. SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  374. SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
  375. }
  376. /* Same as previous function, except strcmp is replaced with a pointer comparison */
  377. SWIGRUNTIME swig_cast_info *
  378. SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
  379. SWIG_TypeCheck_Template(iter->type == from, into);
  380. }
  381. /*
  382. Cast a pointer up an inheritance hierarchy
  383. */
  384. SWIGRUNTIMEINLINE void *
  385. SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  386. return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  387. }
  388. /*
  389. Dynamic pointer casting. Down an inheritance hierarchy
  390. */
  391. SWIGRUNTIME swig_type_info *
  392. SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  393. swig_type_info *lastty = ty;
  394. if (!ty || !ty->dcast) return ty;
  395. while (ty && (ty->dcast)) {
  396. ty = (*ty->dcast)(ptr);
  397. if (ty) lastty = ty;
  398. }
  399. return lastty;
  400. }
  401. /*
  402. Return the name associated with this type
  403. */
  404. SWIGRUNTIMEINLINE const char *
  405. SWIG_TypeName(const swig_type_info *ty) {
  406. return ty->name;
  407. }
  408. /*
  409. Return the pretty name associated with this type,
  410. that is an unmangled type name in a form presentable to the user.
  411. */
  412. SWIGRUNTIME const char *
  413. SWIG_TypePrettyName(const swig_type_info *type) {
  414. /* The "str" field contains the equivalent pretty names of the
  415. type, separated by vertical-bar characters. We choose
  416. to print the last name, as it is often (?) the most
  417. specific. */
  418. if (!type) return NULL;
  419. if (type->str != NULL) {
  420. const char *last_name = type->str;
  421. const char *s;
  422. for (s = type->str; *s; s++)
  423. if (*s == '|') last_name = s+1;
  424. return last_name;
  425. }
  426. else
  427. return type->name;
  428. }
  429. /*
  430. Set the clientdata field for a type
  431. */
  432. SWIGRUNTIME void
  433. SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  434. swig_cast_info *cast = ti->cast;
  435. /* if (ti->clientdata == clientdata) return; */
  436. ti->clientdata = clientdata;
  437. while (cast) {
  438. if (!cast->converter) {
  439. swig_type_info *tc = cast->type;
  440. if (!tc->clientdata) {
  441. SWIG_TypeClientData(tc, clientdata);
  442. }
  443. }
  444. cast = cast->next;
  445. }
  446. }
  447. SWIGRUNTIME void
  448. SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  449. SWIG_TypeClientData(ti, clientdata);
  450. ti->owndata = 1;
  451. }
  452. /*
  453. Search for a swig_type_info structure only by mangled name
  454. Search is a O(log #types)
  455. We start searching at module start, and finish searching when start == end.
  456. Note: if start == end at the beginning of the function, we go all the way around
  457. the circular list.
  458. */
  459. SWIGRUNTIME swig_type_info *
  460. SWIG_MangledTypeQueryModule(swig_module_info *start,
  461. swig_module_info *end,
  462. const char *name) {
  463. swig_module_info *iter = start;
  464. do {
  465. if (iter->size) {
  466. register size_t l = 0;
  467. register size_t r = iter->size - 1;
  468. do {
  469. /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  470. register size_t i = (l + r) >> 1;
  471. const char *iname = iter->types[i]->name;
  472. if (iname) {
  473. register int compare = strcmp(name, iname);
  474. if (compare == 0) {
  475. return iter->types[i];
  476. } else if (compare < 0) {
  477. if (i) {
  478. r = i - 1;
  479. } else {
  480. break;
  481. }
  482. } else if (compare > 0) {
  483. l = i + 1;
  484. }
  485. } else {
  486. break; /* should never happen */
  487. }
  488. } while (l <= r);
  489. }
  490. iter = iter->next;
  491. } while (iter != end);
  492. return 0;
  493. }
  494. /*
  495. Search for a swig_type_info structure for either a mangled name or a human readable name.
  496. It first searches the mangled names of the types, which is a O(log #types)
  497. If a type is not found it then searches the human readable names, which is O(#types).
  498. We start searching at module start, and finish searching when start == end.
  499. Note: if start == end at the beginning of the function, we go all the way around
  500. the circular list.
  501. */
  502. SWIGRUNTIME swig_type_info *
  503. SWIG_TypeQueryModule(swig_module_info *start,
  504. swig_module_info *end,
  505. const char *name) {
  506. /* STEP 1: Search the name field using binary search */
  507. swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  508. if (ret) {
  509. return ret;
  510. } else {
  511. /* STEP 2: If the type hasn't been found, do a complete search
  512. of the str field (the human readable name) */
  513. swig_module_info *iter = start;
  514. do {
  515. register size_t i = 0;
  516. for (; i < iter->size; ++i) {
  517. if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  518. return iter->types[i];
  519. }
  520. iter = iter->next;
  521. } while (iter != end);
  522. }
  523. /* neither found a match */
  524. return 0;
  525. }
  526. /*
  527. Pack binary data into a string
  528. */
  529. SWIGRUNTIME char *
  530. SWIG_PackData(char *c, void *ptr, size_t sz) {
  531. static const char hex[17] = "0123456789abcdef";
  532. register const unsigned char *u = (unsigned char *) ptr;
  533. register const unsigned char *eu = u + sz;
  534. for (; u != eu; ++u) {
  535. register unsigned char uu = *u;
  536. *(c++) = hex[(uu & 0xf0) >> 4];
  537. *(c++) = hex[uu & 0xf];
  538. }
  539. return c;
  540. }
  541. /*
  542. Unpack binary data from a string
  543. */
  544. SWIGRUNTIME const char *
  545. SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  546. register unsigned char *u = (unsigned char *) ptr;
  547. register const unsigned char *eu = u + sz;
  548. for (; u != eu; ++u) {
  549. register char d = *(c++);
  550. register unsigned char uu;
  551. if ((d >= '0') && (d <= '9'))
  552. uu = ((d - '0') << 4);
  553. else if ((d >= 'a') && (d <= 'f'))
  554. uu = ((d - ('a'-10)) << 4);
  555. else
  556. return (char *) 0;
  557. d = *(c++);
  558. if ((d >= '0') && (d <= '9'))
  559. uu |= (d - '0');
  560. else if ((d >= 'a') && (d <= 'f'))
  561. uu |= (d - ('a'-10));
  562. else
  563. return (char *) 0;
  564. *u = uu;
  565. }
  566. return c;
  567. }
  568. /*
  569. Pack 'void *' into a string buffer.
  570. */
  571. SWIGRUNTIME char *
  572. SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  573. char *r = buff;
  574. if ((2*sizeof(void *) + 2) > bsz) return 0;
  575. *(r++) = '_';
  576. r = SWIG_PackData(r,&ptr,sizeof(void *));
  577. if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  578. strcpy(r,name);
  579. return buff;
  580. }
  581. SWIGRUNTIME const char *
  582. SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  583. if (*c != '_') {
  584. if (strcmp(c,"NULL") == 0) {
  585. *ptr = (void *) 0;
  586. return name;
  587. } else {
  588. return 0;
  589. }
  590. }
  591. return SWIG_UnpackData(++c,ptr,sizeof(void *));
  592. }
  593. SWIGRUNTIME char *
  594. SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  595. char *r = buff;
  596. size_t lname = (name ? strlen(name) : 0);
  597. if ((2*sz + 2 + lname) > bsz) return 0;
  598. *(r++) = '_';
  599. r = SWIG_PackData(r,ptr,sz);
  600. if (lname) {
  601. strncpy(r,name,lname+1);
  602. } else {
  603. *r = 0;
  604. }
  605. return buff;
  606. }
  607. SWIGRUNTIME const char *
  608. SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  609. if (*c != '_') {
  610. if (strcmp(c,"NULL") == 0) {
  611. memset(ptr,0,sz);
  612. return name;
  613. } else {
  614. return 0;
  615. }
  616. }
  617. return SWIG_UnpackData(++c,ptr,sz);
  618. }
  619. #ifdef __cplusplus
  620. }
  621. #endif
  622. /* Errors in SWIG */
  623. #define SWIG_UnknownError -1
  624. #define SWIG_IOError -2
  625. #define SWIG_RuntimeError -3
  626. #define SWIG_IndexError -4
  627. #define SWIG_TypeError -5
  628. #define SWIG_DivisionByZero -6
  629. #define SWIG_OverflowError -7
  630. #define SWIG_SyntaxError -8
  631. #define SWIG_ValueError -9
  632. #define SWIG_SystemError -10
  633. #define SWIG_AttributeError -11
  634. #define SWIG_MemoryError -12
  635. #define SWIG_NullReferenceError -13
  636. #ifdef __cplusplus
  637. /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
  638. #include <math.h>
  639. #include <stdlib.h>
  640. extern "C" {
  641. #endif
  642. #include "EXTERN.h"
  643. #include "perl.h"
  644. #include "XSUB.h"
  645. /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
  646. /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
  647. #ifndef PERL_REVISION
  648. # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
  649. # define PERL_PATCHLEVEL_H_IMPLICIT
  650. # include <patchlevel.h>
  651. # endif
  652. # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
  653. # include <could_not_find_Perl_patchlevel.h>
  654. # endif
  655. # ifndef PERL_REVISION
  656. # define PERL_REVISION (5)
  657. # define PERL_VERSION PATCHLEVEL
  658. # define PERL_SUBVERSION SUBVERSION
  659. # endif
  660. #endif
  661. #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
  662. #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
  663. #endif
  664. #ifndef SvIOK_UV
  665. # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
  666. #endif
  667. #ifndef SvUOK
  668. # define SvUOK(sv) SvIOK_UV(sv)
  669. #endif
  670. #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
  671. # define PL_sv_undef sv_undef
  672. # define PL_na na
  673. # define PL_errgv errgv
  674. # define PL_sv_no sv_no
  675. # define PL_sv_yes sv_yes
  676. # define PL_markstack_ptr markstack_ptr
  677. #endif
  678. #ifndef IVSIZE
  679. # ifdef LONGSIZE
  680. # define IVSIZE LONGSIZE
  681. # else
  682. # define IVSIZE 4 /* A bold guess, but the best we can make. */
  683. # endif
  684. #endif
  685. #ifndef INT2PTR
  686. # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
  687. # define PTRV UV
  688. # define INT2PTR(any,d) (any)(d)
  689. # else
  690. # if PTRSIZE == LONGSIZE
  691. # define PTRV unsigned long
  692. # else
  693. # define PTRV unsigned
  694. # endif
  695. # define INT2PTR(any,d) (any)(PTRV)(d)
  696. # endif
  697. # define NUM2PTR(any,d) (any)(PTRV)(d)
  698. # define PTR2IV(p) INT2PTR(IV,p)
  699. # define PTR2UV(p) INT2PTR(UV,p)
  700. # define PTR2NV(p) NUM2PTR(NV,p)
  701. # if PTRSIZE == LONGSIZE
  702. # define PTR2ul(p) (unsigned long)(p)
  703. # else
  704. # define PTR2ul(p) INT2PTR(unsigned long,p)
  705. # endif
  706. #endif /* !INT2PTR */
  707. #ifndef SvPV_nolen
  708. # define SvPV_nolen(x) SvPV(x,PL_na)
  709. #endif
  710. #ifndef get_sv
  711. # define get_sv perl_get_sv
  712. #endif
  713. #ifndef ERRSV
  714. # define ERRSV get_sv("@",FALSE)
  715. #endif
  716. #ifndef pTHX_
  717. #define pTHX_
  718. #endif
  719. #include <string.h>
  720. #ifdef __cplusplus
  721. }
  722. #endif
  723. /* -----------------------------------------------------------------------------
  724. * error manipulation
  725. * ----------------------------------------------------------------------------- */
  726. SWIGINTERN const char*
  727. SWIG_Perl_ErrorType(int code) {
  728. const char* type = 0;
  729. switch(code) {
  730. case SWIG_MemoryError:
  731. type = "MemoryError";
  732. break;
  733. case SWIG_IOError:
  734. type = "IOError";
  735. break;
  736. case SWIG_RuntimeError:
  737. type = "RuntimeError";
  738. break;
  739. case SWIG_IndexError:
  740. type = "IndexError";
  741. break;
  742. case SWIG_TypeError:
  743. type = "TypeError";
  744. break;
  745. case SWIG_DivisionByZero:
  746. type = "ZeroDivisionError";
  747. break;
  748. case SWIG_OverflowError:
  749. type = "OverflowError";
  750. break;
  751. case SWIG_SyntaxError:
  752. type = "SyntaxError";
  753. break;
  754. case SWIG_ValueError:
  755. type = "ValueError";
  756. break;
  757. case SWIG_SystemError:
  758. type = "SystemError";
  759. break;
  760. case SWIG_AttributeError:
  761. type = "AttributeError";
  762. break;
  763. default:
  764. type = "RuntimeError";
  765. }
  766. return type;
  767. }
  768. /* -----------------------------------------------------------------------------
  769. * perlrun.swg
  770. *
  771. * This file contains the runtime support for Perl modules
  772. * and includes code for managing global variables and pointer
  773. * type checking.
  774. * ----------------------------------------------------------------------------- */
  775. #ifdef PERL_OBJECT
  776. #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
  777. #define SWIG_PERL_OBJECT_CALL pPerl,
  778. #else
  779. #define SWIG_PERL_OBJECT_DECL
  780. #define SWIG_PERL_OBJECT_CALL
  781. #endif
  782. /* Common SWIG API */
  783. /* for raw pointers */
  784. #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
  785. #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
  786. /* for raw packed data */
  787. #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
  788. #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
  789. /* for class or struct pointers */
  790. #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  791. #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  792. /* for C or C++ function pointers */
  793. #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
  794. #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
  795. /* for C++ member pointers, ie, member methods */
  796. #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
  797. #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
  798. /* Runtime API */
  799. #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
  800. #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
  801. /* Error manipulation */
  802. #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
  803. #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
  804. #define SWIG_fail goto fail
  805. /* Perl-specific SWIG API */
  806. #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
  807. #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
  808. #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
  809. #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
  810. #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
  811. #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
  812. #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
  813. /* -----------------------------------------------------------------------------
  814. * pointers/data manipulation
  815. * ----------------------------------------------------------------------------- */
  816. /* For backward compatibility only */
  817. #define SWIG_POINTER_EXCEPTION 0
  818. #ifdef __cplusplus
  819. extern "C" {
  820. #endif
  821. #define SWIG_OWNER SWIG_POINTER_OWN
  822. #define SWIG_SHADOW SWIG_OWNER << 1
  823. #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
  824. /* SWIG Perl macros */
  825. /* Macro to declare an XS function */
  826. #ifndef XSPROTO
  827. # define XSPROTO(name) void name(pTHX_ CV* cv)
  828. #endif
  829. /* Macro to call an XS function */
  830. #ifdef PERL_OBJECT
  831. # define SWIG_CALLXS(_name) _name(cv,pPerl)
  832. #else
  833. # ifndef MULTIPLICITY
  834. # define SWIG_CALLXS(_name) _name(cv)
  835. # else
  836. # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
  837. # endif
  838. #endif
  839. #ifdef PERL_OBJECT
  840. #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
  841. #ifdef __cplusplus
  842. extern "C" {
  843. #endif
  844. typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
  845. #ifdef __cplusplus
  846. }
  847. #endif
  848. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  849. #define SWIGCLASS_STATIC
  850. #else /* PERL_OBJECT */
  851. #define MAGIC_PPERL
  852. #define SWIGCLASS_STATIC static SWIGUNUSED
  853. #ifndef MULTIPLICITY
  854. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  855. #ifdef __cplusplus
  856. extern "C" {
  857. #endif
  858. typedef int (*SwigMagicFunc)(SV *, MAGIC *);
  859. #ifdef __cplusplus
  860. }
  861. #endif
  862. #else /* MULTIPLICITY */
  863. #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
  864. #ifdef __cplusplus
  865. extern "C" {
  866. #endif
  867. typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
  868. #ifdef __cplusplus
  869. }
  870. #endif
  871. #endif /* MULTIPLICITY */
  872. #endif /* PERL_OBJECT */
  873. /* Workaround for bug in perl 5.6.x croak and earlier */
  874. #if (PERL_VERSION < 8)
  875. # ifdef PERL_OBJECT
  876. # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
  877. static void SWIG_Perl_croak_null(CPerlObj *pPerl)
  878. # else
  879. static void SWIG_croak_null()
  880. # endif
  881. {
  882. SV *err=ERRSV;
  883. # if (PERL_VERSION < 6)
  884. croak("%_", err);
  885. # else
  886. if (SvOK(err) && !SvROK(err)) croak("%_", err);
  887. croak(Nullch);
  888. # endif
  889. }
  890. #else
  891. # define SWIG_croak_null() croak(Nullch)
  892. #endif
  893. /*
  894. Define how strict is the cast between strings and integers/doubles
  895. when overloading between these types occurs.
  896. The default is making it as strict as possible by using SWIG_AddCast
  897. when needed.
  898. You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
  899. disable the SWIG_AddCast, making the casting between string and
  900. numbers less strict.
  901. In the end, we try to solve the overloading between strings and
  902. numerical types in the more natural way, but if you can avoid it,
  903. well, avoid it using %rename, for example.
  904. */
  905. #ifndef SWIG_PERL_NO_STRICT_STR2NUM
  906. # ifndef SWIG_PERL_STRICT_STR2NUM
  907. # define SWIG_PERL_STRICT_STR2NUM
  908. # endif
  909. #endif
  910. #ifdef SWIG_PERL_STRICT_STR2NUM
  911. /* string takes precedence */
  912. #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
  913. #else
  914. /* number takes precedence */
  915. #define SWIG_Str2NumCast(x) x
  916. #endif
  917. #include <stdlib.h>
  918. SWIGRUNTIME const char *
  919. SWIG_Perl_TypeProxyName(const swig_type_info *type) {
  920. if (!type) return NULL;
  921. if (type->clientdata != NULL) {
  922. return (const char*) type->clientdata;
  923. }
  924. else {
  925. return type->name;
  926. }
  927. }
  928. SWIGRUNTIME swig_cast_info *
  929. SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
  930. SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0))
  931. || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
  932. }
  933. /* Function for getting a pointer value */
  934. SWIGRUNTIME int
  935. SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  936. swig_cast_info *tc;
  937. void *voidptr = (void *)0;
  938. SV *tsv = 0;
  939. /* If magical, apply more magic */
  940. if (SvGMAGICAL(sv))
  941. mg_get(sv);
  942. /* Check to see if this is an object */
  943. if (sv_isobject(sv)) {
  944. IV tmp = 0;
  945. tsv = (SV*) SvRV(sv);
  946. if ((SvTYPE(tsv) == SVt_PVHV)) {
  947. MAGIC *mg;
  948. if (SvMAGICAL(tsv)) {
  949. mg = mg_find(tsv,'P');
  950. if (mg) {
  951. sv = mg->mg_obj;
  952. if (sv_isobject(sv)) {
  953. tsv = (SV*)SvRV(sv);
  954. tmp = SvIV(tsv);
  955. }
  956. }
  957. } else {
  958. return SWIG_ERROR;
  959. }
  960. } else {
  961. tmp = SvIV(tsv);
  962. }
  963. voidptr = INT2PTR(void *,tmp);
  964. } else if (! SvOK(sv)) { /* Check for undef */
  965. *(ptr) = (void *) 0;
  966. return SWIG_OK;
  967. } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
  968. if (!SvROK(sv)) {
  969. *(ptr) = (void *) 0;
  970. return SWIG_OK;
  971. } else {
  972. return SWIG_ERROR;
  973. }
  974. } else { /* Don't know what it is */
  975. return SWIG_ERROR;
  976. }
  977. if (_t) {
  978. /* Now see if the types match */
  979. char *_c = HvNAME(SvSTASH(SvRV(sv)));
  980. tc = SWIG_TypeProxyCheck(_c,_t);
  981. if (!tc) {
  982. return SWIG_ERROR;
  983. }
  984. {
  985. int newmemory = 0;
  986. *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
  987. assert(!newmemory); /* newmemory handling not yet implemented */
  988. }
  989. } else {
  990. *ptr = voidptr;
  991. }
  992. /*
  993. * DISOWN implementation: we need a perl guru to check this one.
  994. */
  995. if (tsv && (flags & SWIG_POINTER_DISOWN)) {
  996. /*
  997. * almost copy paste code from below SWIG_POINTER_OWN setting
  998. */
  999. SV *obj = sv;
  1000. HV *stash = SvSTASH(SvRV(obj));
  1001. GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE);
  1002. if (isGV(gv)) {
  1003. HV *hv = GvHVn(gv);
  1004. /*
  1005. * To set ownership (see below), a newSViv(1) entry is added.
  1006. * Hence, to remove ownership, we delete the entry.
  1007. */
  1008. if (hv_exists_ent(hv, obj, 0)) {
  1009. hv_delete_ent(hv, obj, 0, 0);
  1010. }
  1011. }
  1012. }
  1013. return SWIG_OK;
  1014. }
  1015. SWIGRUNTIME void
  1016. SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  1017. if (ptr && (flags & SWIG_SHADOW)) {
  1018. SV *self;
  1019. SV *obj=newSV(0);
  1020. HV *hash=newHV();
  1021. HV *stash;
  1022. sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
  1023. stash=SvSTASH(SvRV(obj));
  1024. if (flags & SWIG_POINTER_OWN) {
  1025. HV *hv;
  1026. GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
  1027. if (!isGV(gv))
  1028. gv_init(gv, stash, "OWNER", 5, FALSE);
  1029. hv=GvHVn(gv);
  1030. hv_store_ent(hv, obj, newSViv(1), 0);
  1031. }
  1032. sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
  1033. SvREFCNT_dec(obj);
  1034. self=newRV_noinc((SV *)hash);
  1035. sv_setsv(sv, self);
  1036. SvREFCNT_dec((SV *)self);
  1037. sv_bless(sv, stash);
  1038. }
  1039. else {
  1040. sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
  1041. }
  1042. }
  1043. SWIGRUNTIMEINLINE SV *
  1044. SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  1045. SV *result = sv_newmortal();
  1046. SWIG_MakePtr(result, ptr, t, flags);
  1047. return result;
  1048. }
  1049. SWIGRUNTIME void
  1050. SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  1051. char result[1024];
  1052. char *r = result;
  1053. if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
  1054. *(r++) = '_';
  1055. r = SWIG_PackData(r,ptr,sz);
  1056. strcpy(r,SWIG_Perl_TypeProxyName(type));
  1057. sv_setpv(sv, result);
  1058. }
  1059. SWIGRUNTIME SV *
  1060. SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
  1061. SV *result = sv_newmortal();
  1062. SWIG_Perl_MakePackedObj(result, ptr, sz, type);
  1063. return result;
  1064. }
  1065. /* Convert a packed value value */
  1066. SWIGRUNTIME int
  1067. SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
  1068. swig_cast_info *tc;
  1069. const char *c = 0;
  1070. if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
  1071. c = SvPV_nolen(obj);
  1072. /* Pointer values must start with leading underscore */
  1073. if (*c != '_') return SWIG_ERROR;
  1074. c++;
  1075. c = SWIG_UnpackData(c,ptr,sz);
  1076. if (ty) {
  1077. tc = SWIG_TypeCheck(c,ty);
  1078. if (!tc) return SWIG_ERROR;
  1079. }
  1080. return SWIG_OK;
  1081. }
  1082. /* Macros for low-level exception handling */
  1083. #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
  1084. typedef XSPROTO(SwigPerlWrapper);
  1085. typedef SwigPerlWrapper *SwigPerlWrapperPtr;
  1086. /* Structure for command table */
  1087. typedef struct {
  1088. const char *name;
  1089. SwigPerlWrapperPtr wrapper;
  1090. } swig_command_info;
  1091. /* Information for constant table */
  1092. #define SWIG_INT 1
  1093. #define SWIG_FLOAT 2
  1094. #define SWIG_STRING 3
  1095. #define SWIG_POINTER 4
  1096. #define SWIG_BINARY 5
  1097. /* Constant information structure */
  1098. typedef struct swig_constant_info {
  1099. int type;
  1100. const char *name;
  1101. long lvalue;
  1102. double dvalue;
  1103. void *pvalue;
  1104. swig_type_info **ptype;
  1105. } swig_constant_info;
  1106. /* Structure for variable table */
  1107. typedef struct {
  1108. const char *name;
  1109. SwigMagicFunc set;
  1110. SwigMagicFunc get;
  1111. swig_type_info **type;
  1112. } swig_variable_info;
  1113. /* Magic variable code */
  1114. #ifndef PERL_OBJECT
  1115. #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
  1116. #ifndef MULTIPLICITY
  1117. SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
  1118. #else
  1119. SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
  1120. #endif
  1121. #else
  1122. # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
  1123. SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
  1124. #endif
  1125. {
  1126. MAGIC *mg;
  1127. sv_magic(sv,sv,'U',(char *) name,strlen(name));
  1128. mg = mg_find(sv,'U');
  1129. mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  1130. mg->mg_virtual->svt_get = (SwigMagicFunc) get;
  1131. mg->mg_virtual->svt_set = (SwigMagicFunc) set;
  1132. mg->mg_virtual->svt_len = 0;
  1133. mg->mg_virtual->svt_clear = 0;
  1134. mg->mg_virtual->svt_free = 0;
  1135. }
  1136. SWIGRUNTIME swig_module_info *
  1137. SWIG_Perl_GetModule(void) {
  1138. static void *type_pointer = (void *)0;
  1139. SV *pointer;
  1140. /* first check if pointer already created */
  1141. if (!type_pointer) {
  1142. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
  1143. if (pointer && SvOK(pointer)) {
  1144. type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
  1145. }
  1146. }
  1147. return (swig_module_info *) type_pointer;
  1148. }
  1149. SWIGRUNTIME void
  1150. SWIG_Perl_SetModule(swig_module_info *module) {
  1151. SV *pointer;
  1152. /* create a new pointer */
  1153. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
  1154. sv_setiv(pointer, PTR2IV(module));
  1155. }
  1156. #ifdef __cplusplus
  1157. }
  1158. #endif
  1159. /* Workaround perl5 global namespace pollution. Note that undefining library
  1160. * functions like fopen will not solve the problem on all platforms as fopen
  1161. * might be a macro on Windows but not necessarily on other operating systems. */
  1162. #ifdef do_open
  1163. #undef do_open
  1164. #endif
  1165. #ifdef do_close
  1166. #undef do_close
  1167. #endif
  1168. #ifdef scalar
  1169. #undef scalar
  1170. #endif
  1171. #ifdef list
  1172. #undef list
  1173. #endif
  1174. #ifdef apply
  1175. #undef apply
  1176. #endif
  1177. #ifdef convert
  1178. #undef convert
  1179. #endif
  1180. #ifdef Error
  1181. #undef Error
  1182. #endif
  1183. #ifdef form
  1184. #undef form
  1185. #endif
  1186. #ifdef vform
  1187. #undef vform
  1188. #endif
  1189. #ifdef LABEL
  1190. #undef LABEL
  1191. #endif
  1192. #ifdef METHOD
  1193. #undef METHOD
  1194. #endif
  1195. #ifdef Move
  1196. #undef Move
  1197. #endif
  1198. #ifdef yylex
  1199. #undef yylex
  1200. #endif
  1201. #ifdef yyparse
  1202. #undef yyparse
  1203. #endif
  1204. #ifdef yyerror
  1205. #undef yyerror
  1206. #endif
  1207. #ifdef invert
  1208. #undef invert
  1209. #endif
  1210. #ifdef ref
  1211. #undef ref
  1212. #endif
  1213. #ifdef read
  1214. #undef read
  1215. #endif
  1216. #ifdef write
  1217. #undef write
  1218. #endif
  1219. #ifdef eof
  1220. #undef eof
  1221. #endif
  1222. #ifdef bool
  1223. #undef bool
  1224. #endif
  1225. #ifdef close
  1226. #undef close
  1227. #endif
  1228. #ifdef rewind
  1229. #undef rewind
  1230. #endif
  1231. #ifdef free
  1232. #undef free
  1233. #endif
  1234. #ifdef malloc
  1235. #undef malloc
  1236. #endif
  1237. #ifdef calloc
  1238. #undef calloc
  1239. #endif
  1240. #ifdef Stat
  1241. #undef Stat
  1242. #endif
  1243. #ifdef check
  1244. #undef check
  1245. #endif
  1246. #ifdef seekdir
  1247. #undef seekdir
  1248. #endif
  1249. #ifdef open
  1250. #undef open
  1251. #endif
  1252. #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  1253. #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  1254. /* -------- TYPES TABLE (BEGIN) -------- */
  1255. #define SWIGTYPE_p_ESLconnection swig_types[0]
  1256. #define SWIGTYPE_p_ESLevent swig_types[1]
  1257. #define SWIGTYPE_p_char swig_types[2]
  1258. #define SWIGTYPE_p_esl_event_t swig_types[3]
  1259. #define SWIGTYPE_p_esl_priority_t swig_types[4]
  1260. static swig_type_info *swig_types[6];
  1261. static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
  1262. #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  1263. #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  1264. /* -------- TYPES TABLE (END) -------- */
  1265. #define SWIG_init boot_ESL
  1266. #define SWIG_name "ESLc::boot_ESL"
  1267. #define SWIG_prefix "ESLc::"
  1268. #define SWIGVERSION 0x010335
  1269. #define SWIG_VERSION SWIGVERSION
  1270. #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  1271. #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  1272. #include <stdexcept>
  1273. #ifdef __cplusplus
  1274. extern "C"
  1275. #endif
  1276. #ifndef PERL_OBJECT
  1277. #ifndef MULTIPLICITY
  1278. SWIGEXPORT void SWIG_init (CV* cv);
  1279. #else
  1280. SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
  1281. #endif
  1282. #else
  1283. SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
  1284. #endif
  1285. #include "esl.h"
  1286. #include "esl_oop.h"
  1287. SWIGINTERN swig_type_info*
  1288. SWIG_pchar_descriptor(void)
  1289. {
  1290. static int init = 0;
  1291. static swig_type_info* info = 0;
  1292. if (!init) {
  1293. info = SWIG_TypeQuery("_p_char");
  1294. init = 1;
  1295. }
  1296. return info;
  1297. }
  1298. SWIGINTERN int
  1299. SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
  1300. {
  1301. if (SvPOK(obj)) {
  1302. STRLEN len = 0;
  1303. char *cstr = SvPV(obj, len);
  1304. size_t size = len + 1;
  1305. if (cptr) {
  1306. if (alloc) {
  1307. if (*alloc == SWIG_NEWOBJ) {
  1308. *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
  1309. } else {
  1310. *cptr = cstr;
  1311. *alloc = SWIG_OLDOBJ;
  1312. }
  1313. }
  1314. }
  1315. if (psize) *psize = size;
  1316. return SWIG_OK;
  1317. } else {
  1318. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  1319. if (pchar_descriptor) {
  1320. char* vptr = 0;
  1321. if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
  1322. if (cptr) *cptr = vptr;
  1323. if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
  1324. if (alloc) *alloc = SWIG_OLDOBJ;
  1325. return SWIG_OK;
  1326. }
  1327. }
  1328. }
  1329. return SWIG_TypeError;
  1330. }
  1331. SWIGINTERNINLINE SV *
  1332. SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  1333. {
  1334. SV *obj = sv_newmortal();
  1335. if (carray) {
  1336. sv_setpvn(obj, carray, size);
  1337. } else {
  1338. sv_setsv(obj, &PL_sv_undef);
  1339. }
  1340. return obj;
  1341. }
  1342. SWIGINTERNINLINE SV *
  1343. SWIG_FromCharPtr(const char *cptr)
  1344. {
  1345. return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  1346. }
  1347. #include <limits.h>
  1348. #if !defined(SWIG_NO_LLONG_MAX)
  1349. # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  1350. # define LLONG_MAX __LONG_LONG_MAX__
  1351. # define LLONG_MIN (-LLONG_MAX - 1LL)
  1352. # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  1353. # endif
  1354. #endif
  1355. SWIGINTERN int
  1356. SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
  1357. {
  1358. if (SvNIOK(obj)) {
  1359. if (val) *val = SvNV(obj);
  1360. return SWIG_OK;
  1361. } else if (SvIOK(obj)) {
  1362. if (val) *val = (double) SvIV(obj);
  1363. return SWIG_AddCast(SWIG_OK);
  1364. } else {
  1365. const char *nptr = SvPV_nolen(obj);
  1366. if (nptr) {
  1367. char *endptr;
  1368. double v = strtod(nptr, &endptr);
  1369. if (errno == ERANGE) {
  1370. errno = 0;
  1371. return SWIG_OverflowError;
  1372. } else {
  1373. if (*endptr == '\0') {
  1374. if (val) *val = v;
  1375. return SWIG_Str2NumCast(SWIG_OK);
  1376. }
  1377. }
  1378. }
  1379. }
  1380. return SWIG_TypeError;
  1381. }
  1382. #include <float.h>
  1383. #include <math.h>
  1384. SWIGINTERNINLINE int
  1385. SWIG_CanCastAsInteger(double *d, double min, double max) {
  1386. double x = *d;
  1387. if ((min <= x && x <= max)) {
  1388. double fx = floor(x);
  1389. double cx = ceil(x);
  1390. double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  1391. if ((errno == EDOM) || (errno == ERANGE)) {
  1392. errno = 0;
  1393. } else {
  1394. double summ, reps, diff;
  1395. if (rd < x) {
  1396. diff = x - rd;
  1397. } else if (rd > x) {
  1398. diff = rd - x;
  1399. } else {
  1400. return 1;
  1401. }
  1402. summ = rd + x;
  1403. reps = diff/summ;
  1404. if (reps < 8*DBL_EPSILON) {
  1405. *d = rd;
  1406. return 1;
  1407. }
  1408. }
  1409. }
  1410. return 0;
  1411. }
  1412. SWIGINTERN int
  1413. SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
  1414. {
  1415. if (SvIOK(obj)) {
  1416. if (val) *val = SvIV(obj);
  1417. return SWIG_OK;
  1418. } else {
  1419. int dispatch = 0;
  1420. const char *nptr = SvPV_nolen(obj);
  1421. if (nptr) {
  1422. char *endptr;
  1423. long v;
  1424. errno = 0;
  1425. v = strtol(nptr, &endptr,0);
  1426. if (errno == ERANGE) {
  1427. errno = 0;
  1428. return SWIG_OverflowError;
  1429. } else {
  1430. if (*endptr == '\0') {
  1431. if (val) *val = v;
  1432. return SWIG_Str2NumCast(SWIG_OK);
  1433. }
  1434. }
  1435. }
  1436. if (!dispatch) {
  1437. double d;
  1438. int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
  1439. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  1440. if (val) *val = (long)(d);
  1441. return res;
  1442. }
  1443. }
  1444. }
  1445. return SWIG_TypeError;
  1446. }
  1447. SWIGINTERN int
  1448. SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
  1449. {
  1450. long v;
  1451. int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  1452. if (SWIG_IsOK(res)) {
  1453. if ((v < INT_MIN || v > INT_MAX)) {
  1454. return SWIG_OverflowError;
  1455. } else {
  1456. if (val) *val = static_cast< int >(v);
  1457. }
  1458. }
  1459. return res;
  1460. }
  1461. SWIGINTERNINLINE SV *
  1462. SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
  1463. {
  1464. SV *obj = sv_newmortal();
  1465. sv_setiv(obj, (IV) value);
  1466. return obj;
  1467. }
  1468. SWIGINTERNINLINE SV *
  1469. SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
  1470. {
  1471. return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
  1472. }
  1473. SWIGINTERNINLINE SV *
  1474. SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
  1475. {
  1476. SV *obj = sv_newmortal();
  1477. if (value) {
  1478. sv_setsv(obj, &PL_sv_yes);
  1479. } else {
  1480. sv_setsv(obj, &PL_sv_no);
  1481. }
  1482. return obj;
  1483. }
  1484. #ifdef __cplusplus
  1485. extern "C" {
  1486. #endif
  1487. #ifdef PERL_OBJECT
  1488. #define MAGIC_CLASS _wrap_ESL_var::
  1489. class _wrap_ESL_var : public CPerlObj {
  1490. public:
  1491. #else
  1492. #define MAGIC_CLASS
  1493. #endif
  1494. SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
  1495. MAGIC_PPERL
  1496. croak("Value is read-only.");
  1497. return 0;
  1498. }
  1499. #ifdef PERL_OBJECT
  1500. };
  1501. #endif
  1502. #ifdef __cplusplus
  1503. }
  1504. #endif
  1505. #ifdef __cplusplus
  1506. extern "C" {
  1507. #endif
  1508. XS(_wrap_ESLevent_event_set) {
  1509. {
  1510. ESLevent *arg1 = (ESLevent *) 0 ;
  1511. esl_event_t *arg2 = (esl_event_t *) 0 ;
  1512. void *argp1 = 0 ;
  1513. int res1 = 0 ;
  1514. void *argp2 = 0 ;
  1515. int res2 = 0 ;
  1516. int argvi = 0;
  1517. dXSARGS;
  1518. if ((items < 2) || (items > 2)) {
  1519. SWIG_croak("Usage: ESLevent_event_set(self,event);");
  1520. }
  1521. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1522. if (!SWIG_IsOK(res1)) {
  1523. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_set" "', argument " "1"" of type '" "ESLevent *""'");
  1524. }
  1525. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1526. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_esl_event_t, SWIG_POINTER_DISOWN | 0 );
  1527. if (!SWIG_IsOK(res2)) {
  1528. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_event_set" "', argument " "2"" of type '" "esl_event_t *""'");
  1529. }
  1530. arg2 = reinterpret_cast< esl_event_t * >(argp2);
  1531. if (arg1) (arg1)->event = arg2;
  1532. XSRETURN(argvi);
  1533. fail:
  1534. SWIG_croak_null();
  1535. }
  1536. }
  1537. XS(_wrap_ESLevent_event_get) {
  1538. {
  1539. ESLevent *arg1 = (ESLevent *) 0 ;
  1540. esl_event_t *result = 0 ;
  1541. void *argp1 = 0 ;
  1542. int res1 = 0 ;
  1543. int argvi = 0;
  1544. dXSARGS;
  1545. if ((items < 1) || (items > 1)) {
  1546. SWIG_croak("Usage: ESLevent_event_get(self);");
  1547. }
  1548. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1549. if (!SWIG_IsOK(res1)) {
  1550. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_get" "', argument " "1"" of type '" "ESLevent *""'");
  1551. }
  1552. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1553. result = (esl_event_t *) ((arg1)->event);
  1554. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_esl_event_t, 0 | 0); argvi++ ;
  1555. XSRETURN(argvi);
  1556. fail:
  1557. SWIG_croak_null();
  1558. }
  1559. }
  1560. XS(_wrap_ESLevent_serialized_string_set) {
  1561. {
  1562. ESLevent *arg1 = (ESLevent *) 0 ;
  1563. char *arg2 = (char *) 0 ;
  1564. void *argp1 = 0 ;
  1565. int res1 = 0 ;
  1566. int res2 ;
  1567. char *buf2 = 0 ;
  1568. int alloc2 = 0 ;
  1569. int argvi = 0;
  1570. dXSARGS;
  1571. if ((items < 2) || (items > 2)) {
  1572. SWIG_croak("Usage: ESLevent_serialized_string_set(self,serialized_string);");
  1573. }
  1574. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1575. if (!SWIG_IsOK(res1)) {
  1576. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_set" "', argument " "1"" of type '" "ESLevent *""'");
  1577. }
  1578. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1579. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1580. if (!SWIG_IsOK(res2)) {
  1581. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialized_string_set" "', argument " "2"" of type '" "char *""'");
  1582. }
  1583. arg2 = reinterpret_cast< char * >(buf2);
  1584. if (arg1->serialized_string) delete[] arg1->serialized_string;
  1585. if (arg2) {
  1586. size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
  1587. arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
  1588. } else {
  1589. arg1->serialized_string = 0;
  1590. }
  1591. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1592. XSRETURN(argvi);
  1593. fail:
  1594. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1595. SWIG_croak_null();
  1596. }
  1597. }
  1598. XS(_wrap_ESLevent_serialized_string_get) {
  1599. {
  1600. ESLevent *arg1 = (ESLevent *) 0 ;
  1601. char *result = 0 ;
  1602. void *argp1 = 0 ;
  1603. int res1 = 0 ;
  1604. int argvi = 0;
  1605. dXSARGS;
  1606. if ((items < 1) || (items > 1)) {
  1607. SWIG_croak("Usage: ESLevent_serialized_string_get(self);");
  1608. }
  1609. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1610. if (!SWIG_IsOK(res1)) {
  1611. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_get" "', argument " "1"" of type '" "ESLevent *""'");
  1612. }
  1613. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1614. result = (char *) ((arg1)->serialized_string);
  1615. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  1616. XSRETURN(argvi);
  1617. fail:
  1618. SWIG_croak_null();
  1619. }
  1620. }
  1621. XS(_wrap_ESLevent_mine_set) {
  1622. {
  1623. ESLevent *arg1 = (ESLevent *) 0 ;
  1624. int arg2 ;
  1625. void *argp1 = 0 ;
  1626. int res1 = 0 ;
  1627. int val2 ;
  1628. int ecode2 = 0 ;
  1629. int argvi = 0;
  1630. dXSARGS;
  1631. if ((items < 2) || (items > 2)) {
  1632. SWIG_croak("Usage: ESLevent_mine_set(self,mine);");
  1633. }
  1634. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1635. if (!SWIG_IsOK(res1)) {
  1636. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_set" "', argument " "1"" of type '" "ESLevent *""'");
  1637. }
  1638. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1639. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  1640. if (!SWIG_IsOK(ecode2)) {
  1641. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLevent_mine_set" "', argument " "2"" of type '" "int""'");
  1642. }
  1643. arg2 = static_cast< int >(val2);
  1644. if (arg1) (arg1)->mine = arg2;
  1645. XSRETURN(argvi);
  1646. fail:
  1647. SWIG_croak_null();
  1648. }
  1649. }
  1650. XS(_wrap_ESLevent_mine_get) {
  1651. {
  1652. ESLevent *arg1 = (ESLevent *) 0 ;
  1653. int result;
  1654. void *argp1 = 0 ;
  1655. int res1 = 0 ;
  1656. int argvi = 0;
  1657. dXSARGS;
  1658. if ((items < 1) || (items > 1)) {
  1659. SWIG_croak("Usage: ESLevent_mine_get(self);");
  1660. }
  1661. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1662. if (!SWIG_IsOK(res1)) {
  1663. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_get" "', argument " "1"" of type '" "ESLevent *""'");
  1664. }
  1665. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1666. result = (int) ((arg1)->mine);
  1667. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  1668. XSRETURN(argvi);
  1669. fail:
  1670. SWIG_croak_null();
  1671. }
  1672. }
  1673. XS(_wrap_new_ESLevent__SWIG_0) {
  1674. {
  1675. char *arg1 = (char *) 0 ;
  1676. char *arg2 = (char *) NULL ;
  1677. ESLevent *result = 0 ;
  1678. int res1 ;
  1679. char *buf1 = 0 ;
  1680. int alloc1 = 0 ;
  1681. int res2 ;
  1682. char *buf2 = 0 ;
  1683. int alloc2 = 0 ;
  1684. int argvi = 0;
  1685. dXSARGS;
  1686. if ((items < 1) || (items > 2)) {
  1687. SWIG_croak("Usage: new_ESLevent(type,subclass_name);");
  1688. }
  1689. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  1690. if (!SWIG_IsOK(res1)) {
  1691. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "char const *""'");
  1692. }
  1693. arg1 = reinterpret_cast< char * >(buf1);
  1694. if (items > 1) {
  1695. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1696. if (!SWIG_IsOK(res2)) {
  1697. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "char const *""'");
  1698. }
  1699. arg2 = reinterpret_cast< char * >(buf2);
  1700. }
  1701. result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);
  1702. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1703. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  1704. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1705. XSRETURN(argvi);
  1706. fail:
  1707. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  1708. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1709. SWIG_croak_null();
  1710. }
  1711. }
  1712. XS(_wrap_new_ESLevent__SWIG_1) {
  1713. {
  1714. esl_event_t *arg1 = (esl_event_t *) 0 ;
  1715. int arg2 = (int) 0 ;
  1716. ESLevent *result = 0 ;
  1717. void *argp1 = 0 ;
  1718. int res1 = 0 ;
  1719. int val2 ;
  1720. int ecode2 = 0 ;
  1721. int argvi = 0;
  1722. dXSARGS;
  1723. if ((items < 1) || (items > 2)) {
  1724. SWIG_croak("Usage: new_ESLevent(wrap_me,free_me);");
  1725. }
  1726. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_esl_event_t, 0 | 0 );
  1727. if (!SWIG_IsOK(res1)) {
  1728. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "esl_event_t *""'");
  1729. }
  1730. arg1 = reinterpret_cast< esl_event_t * >(argp1);
  1731. if (items > 1) {
  1732. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  1733. if (!SWIG_IsOK(ecode2)) {
  1734. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "int""'");
  1735. }
  1736. arg2 = static_cast< int >(val2);
  1737. }
  1738. result = (ESLevent *)new ESLevent(arg1,arg2);
  1739. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1740. XSRETURN(argvi);
  1741. fail:
  1742. SWIG_croak_null();
  1743. }
  1744. }
  1745. XS(_wrap_new_ESLevent__SWIG_2) {
  1746. {
  1747. ESLevent *arg1 = (ESLevent *) 0 ;
  1748. ESLevent *result = 0 ;
  1749. void *argp1 = 0 ;
  1750. int res1 = 0 ;
  1751. int argvi = 0;
  1752. dXSARGS;
  1753. if ((items < 1) || (items > 1)) {
  1754. SWIG_croak("Usage: new_ESLevent(me);");
  1755. }
  1756. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1757. if (!SWIG_IsOK(res1)) {
  1758. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  1759. }
  1760. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1761. result = (ESLevent *)new ESLevent(arg1);
  1762. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1763. XSRETURN(argvi);
  1764. fail:
  1765. SWIG_croak_null();
  1766. }
  1767. }
  1768. XS(_wrap_new_ESLevent) {
  1769. dXSARGS;
  1770. {
  1771. unsigned long _index = 0;
  1772. SWIG_TypeRank _rank = 0;
  1773. if ((items >= 1) && (items <= 2)) {
  1774. SWIG_TypeRank _ranki = 0;
  1775. SWIG_TypeRank _rankm = 0;
  1776. SWIG_TypeRank _pi = 1;
  1777. int _v = 0;
  1778. {
  1779. void *vptr = 0;
  1780. int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_esl_event_t, 0);
  1781. _v = SWIG_CheckState(res);
  1782. }
  1783. if (!_v) goto check_1;
  1784. _ranki += _v*_pi;
  1785. _rankm += _pi;
  1786. _pi *= SWIG_MAXCASTRANK;
  1787. if (items > 1) {
  1788. {
  1789. {
  1790. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
  1791. _v = SWIG_CheckState(res);
  1792. }
  1793. }
  1794. if (!_v) goto check_1;
  1795. _ranki += _v*_pi;
  1796. _rankm += _pi;
  1797. _pi *= SWIG_MAXCASTRANK;
  1798. }
  1799. if (!_index || (_ranki < _rank)) {
  1800. _rank = _ranki; _index = 1;
  1801. if (_rank == _rankm) goto dispatch;
  1802. }
  1803. }
  1804. check_1:
  1805. if (items == 1) {
  1806. SWIG_TypeRank _ranki = 0;
  1807. SWIG_TypeRank _rankm = 0;
  1808. SWIG_TypeRank _pi = 1;
  1809. int _v = 0;
  1810. {
  1811. void *vptr = 0;
  1812. int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ESLevent, 0);
  1813. _v = SWIG_CheckState(res);
  1814. }
  1815. if (!_v) goto check_2;
  1816. _ranki += _v*_pi;
  1817. _rankm += _pi;
  1818. _pi *= SWIG_MAXCASTRANK;
  1819. if (!_index || (_ranki < _rank)) {
  1820. _rank = _ranki; _index = 2;
  1821. if (_rank == _rankm) goto dispatch;
  1822. }
  1823. }
  1824. check_2:
  1825. if ((items >= 1) && (items <= 2)) {
  1826. SWIG_TypeRank _ranki = 0;
  1827. SWIG_TypeRank _rankm = 0;
  1828. SWIG_TypeRank _pi = 1;
  1829. int _v = 0;
  1830. {
  1831. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  1832. _v = SWIG_CheckState(res);
  1833. }
  1834. if (!_v) goto check_3;
  1835. _ranki += _v*_pi;
  1836. _rankm += _pi;
  1837. _pi *= SWIG_MAXCASTRANK;
  1838. if (items > 1) {
  1839. {
  1840. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  1841. _v = SWIG_CheckState(res);
  1842. }
  1843. if (!_v) goto check_3;
  1844. _ranki += _v*_pi;
  1845. _rankm += _pi;
  1846. _pi *= SWIG_MAXCASTRANK;
  1847. }
  1848. if (!_index || (_ranki < _rank)) {
  1849. _rank = _ranki; _index = 3;
  1850. if (_rank == _rankm) goto dispatch;
  1851. }
  1852. }
  1853. check_3:
  1854. dispatch:
  1855. switch(_index) {
  1856. case 1:
  1857. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_1); return;
  1858. case 2:
  1859. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_2); return;
  1860. case 3:
  1861. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_0); return;
  1862. }
  1863. }
  1864. croak("No matching function for overloaded 'new_ESLevent'");
  1865. XSRETURN(0);
  1866. }
  1867. XS(_wrap_delete_ESLevent) {
  1868. {
  1869. ESLevent *arg1 = (ESLevent *) 0 ;
  1870. void *argp1 = 0 ;
  1871. int res1 = 0 ;
  1872. int argvi = 0;
  1873. dXSARGS;
  1874. if ((items < 1) || (items > 1)) {
  1875. SWIG_croak("Usage: delete_ESLevent(self);");
  1876. }
  1877. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, SWIG_POINTER_DISOWN | 0 );
  1878. if (!SWIG_IsOK(res1)) {
  1879. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  1880. }
  1881. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1882. delete arg1;
  1883. XSRETURN(argvi);
  1884. fail:
  1885. SWIG_croak_null();
  1886. }
  1887. }
  1888. XS(_wrap_ESLevent_serialize) {
  1889. {
  1890. ESLevent *arg1 = (ESLevent *) 0 ;
  1891. char *arg2 = (char *) NULL ;
  1892. char *result = 0 ;
  1893. void *argp1 = 0 ;
  1894. int res1 = 0 ;
  1895. int res2 ;
  1896. char *buf2 = 0 ;
  1897. int alloc2 = 0 ;
  1898. int argvi = 0;
  1899. dXSARGS;
  1900. if ((items < 1) || (items > 2)) {
  1901. SWIG_croak("Usage: ESLevent_serialize(self,format);");
  1902. }
  1903. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1904. if (!SWIG_IsOK(res1)) {
  1905. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialize" "', argument " "1"" of type '" "ESLevent *""'");
  1906. }
  1907. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1908. if (items > 1) {
  1909. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1910. if (!SWIG_IsOK(res2)) {
  1911. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialize" "', argument " "2"" of type '" "char const *""'");
  1912. }
  1913. arg2 = reinterpret_cast< char * >(buf2);
  1914. }
  1915. result = (char *)(arg1)->serialize((char const *)arg2);
  1916. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  1917. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1918. XSRETURN(argvi);
  1919. fail:
  1920. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1921. SWIG_croak_null();
  1922. }
  1923. }
  1924. XS(_wrap_ESLevent_setPriority) {
  1925. {
  1926. ESLevent *arg1 = (ESLevent *) 0 ;
  1927. esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
  1928. bool result;
  1929. void *argp1 = 0 ;
  1930. int res1 = 0 ;
  1931. void *argp2 ;
  1932. int res2 = 0 ;
  1933. int argvi = 0;
  1934. dXSARGS;
  1935. if ((items < 1) || (items > 2)) {
  1936. SWIG_croak("Usage: ESLevent_setPriority(self,priority);");
  1937. }
  1938. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1939. if (!SWIG_IsOK(res1)) {
  1940. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_setPriority" "', argument " "1"" of type '" "ESLevent *""'");
  1941. }
  1942. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1943. if (items > 1) {
  1944. {
  1945. res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_esl_priority_t, 0 );
  1946. if (!SWIG_IsOK(res2)) {
  1947. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  1948. }
  1949. if (!argp2) {
  1950. SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  1951. } else {
  1952. arg2 = *(reinterpret_cast< esl_priority_t * >(argp2));
  1953. }
  1954. }
  1955. }
  1956. result = (bool)(arg1)->setPriority(arg2);
  1957. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  1958. XSRETURN(argvi);
  1959. fail:
  1960. SWIG_croak_null();
  1961. }
  1962. }
  1963. XS(_wrap_ESLevent_getHeader) {
  1964. {
  1965. ESLevent *arg1 = (ESLevent *) 0 ;
  1966. char *arg2 = (char *) 0 ;
  1967. int arg3 = (int) -1 ;
  1968. char *result = 0 ;
  1969. void *argp1 = 0 ;
  1970. int res1 = 0 ;
  1971. int res2 ;
  1972. char *buf2 = 0 ;
  1973. int alloc2 = 0 ;
  1974. int val3 ;
  1975. int ecode3 = 0 ;
  1976. int argvi = 0;
  1977. dXSARGS;
  1978. if ((items < 2) || (items > 3)) {
  1979. SWIG_croak("Usage: ESLevent_getHeader(self,header_name,idx);");
  1980. }
  1981. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1982. if (!SWIG_IsOK(res1)) {
  1983. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getHeader" "', argument " "1"" of type '" "ESLevent *""'");
  1984. }
  1985. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1986. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1987. if (!SWIG_IsOK(res2)) {
  1988. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
  1989. }
  1990. arg2 = reinterpret_cast< char * >(buf2);
  1991. if (items > 2) {
  1992. ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
  1993. if (!SWIG_IsOK(ecode3)) {
  1994. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
  1995. }
  1996. arg3 = static_cast< int >(val3);
  1997. }
  1998. result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
  1999. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2000. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2001. XSRETURN(argvi);
  2002. fail:
  2003. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2004. SWIG_croak_null();
  2005. }
  2006. }
  2007. XS(_wrap_ESLevent_getBody) {
  2008. {
  2009. ESLevent *arg1 = (ESLevent *) 0 ;
  2010. char *result = 0 ;
  2011. void *argp1 = 0 ;
  2012. int res1 = 0 ;
  2013. int argvi = 0;
  2014. dXSARGS;
  2015. if ((items < 1) || (items > 1)) {
  2016. SWIG_croak("Usage: ESLevent_getBody(self);");
  2017. }
  2018. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2019. if (!SWIG_IsOK(res1)) {
  2020. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getBody" "', argument " "1"" of type '" "ESLevent *""'");
  2021. }
  2022. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2023. result = (char *)(arg1)->getBody();
  2024. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2025. XSRETURN(argvi);
  2026. fail:
  2027. SWIG_croak_null();
  2028. }
  2029. }
  2030. XS(_wrap_ESLevent_getType) {
  2031. {
  2032. ESLevent *arg1 = (ESLevent *) 0 ;
  2033. char *result = 0 ;
  2034. void *argp1 = 0 ;
  2035. int res1 = 0 ;
  2036. int argvi = 0;
  2037. dXSARGS;
  2038. if ((items < 1) || (items > 1)) {
  2039. SWIG_croak("Usage: ESLevent_getType(self);");
  2040. }
  2041. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2042. if (!SWIG_IsOK(res1)) {
  2043. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getType" "', argument " "1"" of type '" "ESLevent *""'");
  2044. }
  2045. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2046. result = (char *)(arg1)->getType();
  2047. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2048. XSRETURN(argvi);
  2049. fail:
  2050. SWIG_croak_null();
  2051. }
  2052. }
  2053. XS(_wrap_ESLevent_addBody) {
  2054. {
  2055. ESLevent *arg1 = (ESLevent *) 0 ;
  2056. char *arg2 = (char *) 0 ;
  2057. bool result;
  2058. void *argp1 = 0 ;
  2059. int res1 = 0 ;
  2060. int res2 ;
  2061. char *buf2 = 0 ;
  2062. int alloc2 = 0 ;
  2063. int argvi = 0;
  2064. dXSARGS;
  2065. if ((items < 2) || (items > 2)) {
  2066. SWIG_croak("Usage: ESLevent_addBody(self,value);");
  2067. }
  2068. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2069. if (!SWIG_IsOK(res1)) {
  2070. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addBody" "', argument " "1"" of type '" "ESLevent *""'");
  2071. }
  2072. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2073. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2074. if (!SWIG_IsOK(res2)) {
  2075. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addBody" "', argument " "2"" of type '" "char const *""'");
  2076. }
  2077. arg2 = reinterpret_cast< char * >(buf2);
  2078. result = (bool)(arg1)->addBody((char const *)arg2);
  2079. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2080. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2081. XSRETURN(argvi);
  2082. fail:
  2083. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2084. SWIG_croak_null();
  2085. }
  2086. }
  2087. XS(_wrap_ESLevent_addHeader) {
  2088. {
  2089. ESLevent *arg1 = (ESLevent *) 0 ;
  2090. char *arg2 = (char *) 0 ;
  2091. char *arg3 = (char *) 0 ;
  2092. bool result;
  2093. void *argp1 = 0 ;
  2094. int res1 = 0 ;
  2095. int res2 ;
  2096. char *buf2 = 0 ;
  2097. int alloc2 = 0 ;
  2098. int res3 ;
  2099. char *buf3 = 0 ;
  2100. int alloc3 = 0 ;
  2101. int argvi = 0;
  2102. dXSARGS;
  2103. if ((items < 3) || (items > 3)) {
  2104. SWIG_croak("Usage: ESLevent_addHeader(self,header_name,value);");
  2105. }
  2106. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2107. if (!SWIG_IsOK(res1)) {
  2108. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2109. }
  2110. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2111. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2112. if (!SWIG_IsOK(res2)) {
  2113. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addHeader" "', argument " "2"" of type '" "char const *""'");
  2114. }
  2115. arg2 = reinterpret_cast< char * >(buf2);
  2116. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2117. if (!SWIG_IsOK(res3)) {
  2118. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_addHeader" "', argument " "3"" of type '" "char const *""'");
  2119. }
  2120. arg3 = reinterpret_cast< char * >(buf3);
  2121. result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
  2122. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2123. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2124. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2125. XSRETURN(argvi);
  2126. fail:
  2127. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2128. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2129. SWIG_croak_null();
  2130. }
  2131. }
  2132. XS(_wrap_ESLevent_pushHeader) {
  2133. {
  2134. ESLevent *arg1 = (ESLevent *) 0 ;
  2135. char *arg2 = (char *) 0 ;
  2136. char *arg3 = (char *) 0 ;
  2137. bool result;
  2138. void *argp1 = 0 ;
  2139. int res1 = 0 ;
  2140. int res2 ;
  2141. char *buf2 = 0 ;
  2142. int alloc2 = 0 ;
  2143. int res3 ;
  2144. char *buf3 = 0 ;
  2145. int alloc3 = 0 ;
  2146. int argvi = 0;
  2147. dXSARGS;
  2148. if ((items < 3) || (items > 3)) {
  2149. SWIG_croak("Usage: ESLevent_pushHeader(self,header_name,value);");
  2150. }
  2151. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2152. if (!SWIG_IsOK(res1)) {
  2153. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2154. }
  2155. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2156. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2157. if (!SWIG_IsOK(res2)) {
  2158. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
  2159. }
  2160. arg2 = reinterpret_cast< char * >(buf2);
  2161. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2162. if (!SWIG_IsOK(res3)) {
  2163. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
  2164. }
  2165. arg3 = reinterpret_cast< char * >(buf3);
  2166. result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
  2167. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2168. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2169. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2170. XSRETURN(argvi);
  2171. fail:
  2172. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2173. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2174. SWIG_croak_null();
  2175. }
  2176. }
  2177. XS(_wrap_ESLevent_unshiftHeader) {
  2178. {
  2179. ESLevent *arg1 = (ESLevent *) 0 ;
  2180. char *arg2 = (char *) 0 ;
  2181. char *arg3 = (char *) 0 ;
  2182. bool result;
  2183. void *argp1 = 0 ;
  2184. int res1 = 0 ;
  2185. int res2 ;
  2186. char *buf2 = 0 ;
  2187. int alloc2 = 0 ;
  2188. int res3 ;
  2189. char *buf3 = 0 ;
  2190. int alloc3 = 0 ;
  2191. int argvi = 0;
  2192. dXSARGS;
  2193. if ((items < 3) || (items > 3)) {
  2194. SWIG_croak("Usage: ESLevent_unshiftHeader(self,header_name,value);");
  2195. }
  2196. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2197. if (!SWIG_IsOK(res1)) {
  2198. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2199. }
  2200. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2201. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2202. if (!SWIG_IsOK(res2)) {
  2203. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
  2204. }
  2205. arg2 = reinterpret_cast< char * >(buf2);
  2206. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2207. if (!SWIG_IsOK(res3)) {
  2208. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
  2209. }
  2210. arg3 = reinterpret_cast< char * >(buf3);
  2211. result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
  2212. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2213. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2214. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2215. XSRETURN(argvi);
  2216. fail:
  2217. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2218. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2219. SWIG_croak_null();
  2220. }
  2221. }
  2222. XS(_wrap_ESLevent_delHeader) {
  2223. {
  2224. ESLevent *arg1 = (ESLevent *) 0 ;
  2225. char *arg2 = (char *) 0 ;
  2226. bool result;
  2227. void *argp1 = 0 ;
  2228. int res1 = 0 ;
  2229. int res2 ;
  2230. char *buf2 = 0 ;
  2231. int alloc2 = 0 ;
  2232. int argvi = 0;
  2233. dXSARGS;
  2234. if ((items < 2) || (items > 2)) {
  2235. SWIG_croak("Usage: ESLevent_delHeader(self,header_name);");
  2236. }
  2237. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2238. if (!SWIG_IsOK(res1)) {
  2239. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_delHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2240. }
  2241. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2242. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2243. if (!SWIG_IsOK(res2)) {
  2244. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_delHeader" "', argument " "2"" of type '" "char const *""'");
  2245. }
  2246. arg2 = reinterpret_cast< char * >(buf2);
  2247. result = (bool)(arg1)->delHeader((char const *)arg2);
  2248. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2249. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2250. XSRETURN(argvi);
  2251. fail:
  2252. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2253. SWIG_croak_null();
  2254. }
  2255. }
  2256. XS(_wrap_ESLevent_firstHeader) {
  2257. {
  2258. ESLevent *arg1 = (ESLevent *) 0 ;
  2259. char *result = 0 ;
  2260. void *argp1 = 0 ;
  2261. int res1 = 0 ;
  2262. int argvi = 0;
  2263. dXSARGS;
  2264. if ((items < 1) || (items > 1)) {
  2265. SWIG_croak("Usage: ESLevent_firstHeader(self);");
  2266. }
  2267. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2268. if (!SWIG_IsOK(res1)) {
  2269. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_firstHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2270. }
  2271. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2272. result = (char *)(arg1)->firstHeader();
  2273. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2274. XSRETURN(argvi);
  2275. fail:
  2276. SWIG_croak_null();
  2277. }
  2278. }
  2279. XS(_wrap_ESLevent_nextHeader) {
  2280. {
  2281. ESLevent *arg1 = (ESLevent *) 0 ;
  2282. char *result = 0 ;
  2283. void *argp1 = 0 ;
  2284. int res1 = 0 ;
  2285. int argvi = 0;
  2286. dXSARGS;
  2287. if ((items < 1) || (items > 1)) {
  2288. SWIG_croak("Usage: ESLevent_nextHeader(self);");
  2289. }
  2290. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2291. if (!SWIG_IsOK(res1)) {
  2292. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_nextHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2293. }
  2294. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2295. result = (char *)(arg1)->nextHeader();
  2296. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2297. XSRETURN(argvi);
  2298. fail:
  2299. SWIG_croak_null();
  2300. }
  2301. }
  2302. XS(_wrap_new_ESLconnection__SWIG_0) {
  2303. {
  2304. char *arg1 = (char *) 0 ;
  2305. int arg2 ;
  2306. char *arg3 = (char *) 0 ;
  2307. char *arg4 = (char *) 0 ;
  2308. ESLconnection *result = 0 ;
  2309. int res1 ;
  2310. char *buf1 = 0 ;
  2311. int alloc1 = 0 ;
  2312. int val2 ;
  2313. int ecode2 = 0 ;
  2314. int res3 ;
  2315. char *buf3 = 0 ;
  2316. int alloc3 = 0 ;
  2317. int res4 ;
  2318. char *buf4 = 0 ;
  2319. int alloc4 = 0 ;
  2320. int argvi = 0;
  2321. dXSARGS;
  2322. if ((items < 4) || (items > 4)) {
  2323. SWIG_croak("Usage: new_ESLconnection(host,port,user,password);");
  2324. }
  2325. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2326. if (!SWIG_IsOK(res1)) {
  2327. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2328. }
  2329. arg1 = reinterpret_cast< char * >(buf1);
  2330. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  2331. if (!SWIG_IsOK(ecode2)) {
  2332. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
  2333. }
  2334. arg2 = static_cast< int >(val2);
  2335. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2336. if (!SWIG_IsOK(res3)) {
  2337. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2338. }
  2339. arg3 = reinterpret_cast< char * >(buf3);
  2340. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  2341. if (!SWIG_IsOK(res4)) {
  2342. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
  2343. }
  2344. arg4 = reinterpret_cast< char * >(buf4);
  2345. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
  2346. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2347. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2348. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2349. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2350. XSRETURN(argvi);
  2351. fail:
  2352. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2353. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2354. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2355. SWIG_croak_null();
  2356. }
  2357. }
  2358. XS(_wrap_new_ESLconnection__SWIG_1) {
  2359. {
  2360. char *arg1 = (char *) 0 ;
  2361. int arg2 ;
  2362. char *arg3 = (char *) 0 ;
  2363. ESLconnection *result = 0 ;
  2364. int res1 ;
  2365. char *buf1 = 0 ;
  2366. int alloc1 = 0 ;
  2367. int val2 ;
  2368. int ecode2 = 0 ;
  2369. int res3 ;
  2370. char *buf3 = 0 ;
  2371. int alloc3 = 0 ;
  2372. int argvi = 0;
  2373. dXSARGS;
  2374. if ((items < 3) || (items > 3)) {
  2375. SWIG_croak("Usage: new_ESLconnection(host,port,password);");
  2376. }
  2377. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2378. if (!SWIG_IsOK(res1)) {
  2379. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2380. }
  2381. arg1 = reinterpret_cast< char * >(buf1);
  2382. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  2383. if (!SWIG_IsOK(ecode2)) {
  2384. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "int""'");
  2385. }
  2386. arg2 = static_cast< int >(val2);
  2387. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2388. if (!SWIG_IsOK(res3)) {
  2389. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2390. }
  2391. arg3 = reinterpret_cast< char * >(buf3);
  2392. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
  2393. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2394. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2395. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2396. XSRETURN(argvi);
  2397. fail:
  2398. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2399. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2400. SWIG_croak_null();
  2401. }
  2402. }
  2403. XS(_wrap_new_ESLconnection__SWIG_2) {
  2404. {
  2405. char *arg1 = (char *) 0 ;
  2406. char *arg2 = (char *) 0 ;
  2407. char *arg3 = (char *) 0 ;
  2408. char *arg4 = (char *) 0 ;
  2409. ESLconnection *result = 0 ;
  2410. int res1 ;
  2411. char *buf1 = 0 ;
  2412. int alloc1 = 0 ;
  2413. int res2 ;
  2414. char *buf2 = 0 ;
  2415. int alloc2 = 0 ;
  2416. int res3 ;
  2417. char *buf3 = 0 ;
  2418. int alloc3 = 0 ;
  2419. int res4 ;
  2420. char *buf4 = 0 ;
  2421. int alloc4 = 0 ;
  2422. int argvi = 0;
  2423. dXSARGS;
  2424. if ((items < 4) || (items > 4)) {
  2425. SWIG_croak("Usage: new_ESLconnection(host,port,user,password);");
  2426. }
  2427. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2428. if (!SWIG_IsOK(res1)) {
  2429. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2430. }
  2431. arg1 = reinterpret_cast< char * >(buf1);
  2432. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2433. if (!SWIG_IsOK(res2)) {
  2434. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  2435. }
  2436. arg2 = reinterpret_cast< char * >(buf2);
  2437. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2438. if (!SWIG_IsOK(res3)) {
  2439. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2440. }
  2441. arg3 = reinterpret_cast< char * >(buf3);
  2442. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  2443. if (!SWIG_IsOK(res4)) {
  2444. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
  2445. }
  2446. arg4 = reinterpret_cast< char * >(buf4);
  2447. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  2448. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2449. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2450. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2451. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2452. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2453. XSRETURN(argvi);
  2454. fail:
  2455. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2456. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2457. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2458. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2459. SWIG_croak_null();
  2460. }
  2461. }
  2462. XS(_wrap_new_ESLconnection__SWIG_3) {
  2463. {
  2464. char *arg1 = (char *) 0 ;
  2465. char *arg2 = (char *) 0 ;
  2466. char *arg3 = (char *) 0 ;
  2467. ESLconnection *result = 0 ;
  2468. int res1 ;
  2469. char *buf1 = 0 ;
  2470. int alloc1 = 0 ;
  2471. int res2 ;
  2472. char *buf2 = 0 ;
  2473. int alloc2 = 0 ;
  2474. int res3 ;
  2475. char *buf3 = 0 ;
  2476. int alloc3 = 0 ;
  2477. int argvi = 0;
  2478. dXSARGS;
  2479. if ((items < 3) || (items > 3)) {
  2480. SWIG_croak("Usage: new_ESLconnection(host,port,password);");
  2481. }
  2482. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2483. if (!SWIG_IsOK(res1)) {
  2484. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2485. }
  2486. arg1 = reinterpret_cast< char * >(buf1);
  2487. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2488. if (!SWIG_IsOK(res2)) {
  2489. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  2490. }
  2491. arg2 = reinterpret_cast< char * >(buf2);
  2492. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2493. if (!SWIG_IsOK(res3)) {
  2494. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2495. }
  2496. arg3 = reinterpret_cast< char * >(buf3);
  2497. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
  2498. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2499. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2500. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2501. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2502. XSRETURN(argvi);
  2503. fail:
  2504. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2505. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2506. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2507. SWIG_croak_null();
  2508. }
  2509. }
  2510. XS(_wrap_new_ESLconnection__SWIG_4) {
  2511. {
  2512. int arg1 ;
  2513. ESLconnection *result = 0 ;
  2514. int val1 ;
  2515. int ecode1 = 0 ;
  2516. int argvi = 0;
  2517. dXSARGS;
  2518. if ((items < 1) || (items > 1)) {
  2519. SWIG_croak("Usage: new_ESLconnection(socket);");
  2520. }
  2521. ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
  2522. if (!SWIG_IsOK(ecode1)) {
  2523. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "int""'");
  2524. }
  2525. arg1 = static_cast< int >(val1);
  2526. result = (ESLconnection *)new ESLconnection(arg1);
  2527. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2528. XSRETURN(argvi);
  2529. fail:
  2530. SWIG_croak_null();
  2531. }
  2532. }
  2533. XS(_wrap_new_ESLconnection) {
  2534. dXSARGS;
  2535. {
  2536. unsigned long _index = 0;
  2537. SWIG_TypeRank _rank = 0;
  2538. if (items == 1) {
  2539. SWIG_TypeRank _ranki = 0;
  2540. SWIG_TypeRank _rankm = 0;
  2541. SWIG_TypeRank _pi = 1;
  2542. int _v = 0;
  2543. {
  2544. {
  2545. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
  2546. _v = SWIG_CheckState(res);
  2547. }
  2548. }
  2549. if (!_v) goto check_1;
  2550. _ranki += _v*_pi;
  2551. _rankm += _pi;
  2552. _pi *= SWIG_MAXCASTRANK;
  2553. if (!_index || (_ranki < _rank)) {
  2554. _rank = _ranki; _index = 1;
  2555. if (_rank == _rankm) goto dispatch;
  2556. }
  2557. }
  2558. check_1:
  2559. if (items == 3) {
  2560. SWIG_TypeRank _ranki = 0;
  2561. SWIG_TypeRank _rankm = 0;
  2562. SWIG_TypeRank _pi = 1;
  2563. int _v = 0;
  2564. {
  2565. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2566. _v = SWIG_CheckState(res);
  2567. }
  2568. if (!_v) goto check_2;
  2569. _ranki += _v*_pi;
  2570. _rankm += _pi;
  2571. _pi *= SWIG_MAXCASTRANK;
  2572. {
  2573. {
  2574. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
  2575. _v = SWIG_CheckState(res);
  2576. }
  2577. }
  2578. if (!_v) goto check_2;
  2579. _ranki += _v*_pi;
  2580. _rankm += _pi;
  2581. _pi *= SWIG_MAXCASTRANK;
  2582. {
  2583. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2584. _v = SWIG_CheckState(res);
  2585. }
  2586. if (!_v) goto check_2;
  2587. _ranki += _v*_pi;
  2588. _rankm += _pi;
  2589. _pi *= SWIG_MAXCASTRANK;
  2590. if (!_index || (_ranki < _rank)) {
  2591. _rank = _ranki; _index = 2;
  2592. if (_rank == _rankm) goto dispatch;
  2593. }
  2594. }
  2595. check_2:
  2596. if (items == 3) {
  2597. SWIG_TypeRank _ranki = 0;
  2598. SWIG_TypeRank _rankm = 0;
  2599. SWIG_TypeRank _pi = 1;
  2600. int _v = 0;
  2601. {
  2602. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2603. _v = SWIG_CheckState(res);
  2604. }
  2605. if (!_v) goto check_3;
  2606. _ranki += _v*_pi;
  2607. _rankm += _pi;
  2608. _pi *= SWIG_MAXCASTRANK;
  2609. {
  2610. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  2611. _v = SWIG_CheckState(res);
  2612. }
  2613. if (!_v) goto check_3;
  2614. _ranki += _v*_pi;
  2615. _rankm += _pi;
  2616. _pi *= SWIG_MAXCASTRANK;
  2617. {
  2618. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2619. _v = SWIG_CheckState(res);
  2620. }
  2621. if (!_v) goto check_3;
  2622. _ranki += _v*_pi;
  2623. _rankm += _pi;
  2624. _pi *= SWIG_MAXCASTRANK;
  2625. if (!_index || (_ranki < _rank)) {
  2626. _rank = _ranki; _index = 3;
  2627. if (_rank == _rankm) goto dispatch;
  2628. }
  2629. }
  2630. check_3:
  2631. if (items == 4) {
  2632. SWIG_TypeRank _ranki = 0;
  2633. SWIG_TypeRank _rankm = 0;
  2634. SWIG_TypeRank _pi = 1;
  2635. int _v = 0;
  2636. {
  2637. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2638. _v = SWIG_CheckState(res);
  2639. }
  2640. if (!_v) goto check_4;
  2641. _ranki += _v*_pi;
  2642. _rankm += _pi;
  2643. _pi *= SWIG_MAXCASTRANK;
  2644. {
  2645. {
  2646. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
  2647. _v = SWIG_CheckState(res);
  2648. }
  2649. }
  2650. if (!_v) goto check_4;
  2651. _ranki += _v*_pi;
  2652. _rankm += _pi;
  2653. _pi *= SWIG_MAXCASTRANK;
  2654. {
  2655. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2656. _v = SWIG_CheckState(res);
  2657. }
  2658. if (!_v) goto check_4;
  2659. _ranki += _v*_pi;
  2660. _rankm += _pi;
  2661. _pi *= SWIG_MAXCASTRANK;
  2662. {
  2663. int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
  2664. _v = SWIG_CheckState(res);
  2665. }
  2666. if (!_v) goto check_4;
  2667. _ranki += _v*_pi;
  2668. _rankm += _pi;
  2669. _pi *= SWIG_MAXCASTRANK;
  2670. if (!_index || (_ranki < _rank)) {
  2671. _rank = _ranki; _index = 4;
  2672. if (_rank == _rankm) goto dispatch;
  2673. }
  2674. }
  2675. check_4:
  2676. if (items == 4) {
  2677. SWIG_TypeRank _ranki = 0;
  2678. SWIG_TypeRank _rankm = 0;
  2679. SWIG_TypeRank _pi = 1;
  2680. int _v = 0;
  2681. {
  2682. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2683. _v = SWIG_CheckState(res);
  2684. }
  2685. if (!_v) goto check_5;
  2686. _ranki += _v*_pi;
  2687. _rankm += _pi;
  2688. _pi *= SWIG_MAXCASTRANK;
  2689. {
  2690. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  2691. _v = SWIG_CheckState(res);
  2692. }
  2693. if (!_v) goto check_5;
  2694. _ranki += _v*_pi;
  2695. _rankm += _pi;
  2696. _pi *= SWIG_MAXCASTRANK;
  2697. {
  2698. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2699. _v = SWIG_CheckState(res);
  2700. }
  2701. if (!_v) goto check_5;
  2702. _ranki += _v*_pi;
  2703. _rankm += _pi;
  2704. _pi *= SWIG_MAXCASTRANK;
  2705. {
  2706. int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
  2707. _v = SWIG_CheckState(res);
  2708. }
  2709. if (!_v) goto check_5;
  2710. _ranki += _v*_pi;
  2711. _rankm += _pi;
  2712. _pi *= SWIG_MAXCASTRANK;
  2713. if (!_index || (_ranki < _rank)) {
  2714. _rank = _ranki; _index = 5;
  2715. if (_rank == _rankm) goto dispatch;
  2716. }
  2717. }
  2718. check_5:
  2719. dispatch:
  2720. switch(_index) {
  2721. case 1:
  2722. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_4); return;
  2723. case 2:
  2724. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return;
  2725. case 3:
  2726. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_3); return;
  2727. case 4:
  2728. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return;
  2729. case 5:
  2730. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return;
  2731. }
  2732. }
  2733. croak("No matching function for overloaded 'new_ESLconnection'");
  2734. XSRETURN(0);
  2735. }
  2736. XS(_wrap_delete_ESLconnection) {
  2737. {
  2738. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2739. void *argp1 = 0 ;
  2740. int res1 = 0 ;
  2741. int argvi = 0;
  2742. dXSARGS;
  2743. if ((items < 1) || (items > 1)) {
  2744. SWIG_croak("Usage: delete_ESLconnection(self);");
  2745. }
  2746. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, SWIG_POINTER_DISOWN | 0 );
  2747. if (!SWIG_IsOK(res1)) {
  2748. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLconnection" "', argument " "1"" of type '" "ESLconnection *""'");
  2749. }
  2750. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2751. delete arg1;
  2752. XSRETURN(argvi);
  2753. fail:
  2754. SWIG_croak_null();
  2755. }
  2756. }
  2757. XS(_wrap_ESLconnection_socketDescriptor) {
  2758. {
  2759. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2760. int result;
  2761. void *argp1 = 0 ;
  2762. int res1 = 0 ;
  2763. int argvi = 0;
  2764. dXSARGS;
  2765. if ((items < 1) || (items > 1)) {
  2766. SWIG_croak("Usage: ESLconnection_socketDescriptor(self);");
  2767. }
  2768. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2769. if (!SWIG_IsOK(res1)) {
  2770. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_socketDescriptor" "', argument " "1"" of type '" "ESLconnection *""'");
  2771. }
  2772. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2773. result = (int)(arg1)->socketDescriptor();
  2774. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2775. XSRETURN(argvi);
  2776. fail:
  2777. SWIG_croak_null();
  2778. }
  2779. }
  2780. XS(_wrap_ESLconnection_connected) {
  2781. {
  2782. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2783. int result;
  2784. void *argp1 = 0 ;
  2785. int res1 = 0 ;
  2786. int argvi = 0;
  2787. dXSARGS;
  2788. if ((items < 1) || (items > 1)) {
  2789. SWIG_croak("Usage: ESLconnection_connected(self);");
  2790. }
  2791. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2792. if (!SWIG_IsOK(res1)) {
  2793. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_connected" "', argument " "1"" of type '" "ESLconnection *""'");
  2794. }
  2795. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2796. result = (int)(arg1)->connected();
  2797. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2798. XSRETURN(argvi);
  2799. fail:
  2800. SWIG_croak_null();
  2801. }
  2802. }
  2803. XS(_wrap_ESLconnection_getInfo) {
  2804. {
  2805. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2806. ESLevent *result = 0 ;
  2807. void *argp1 = 0 ;
  2808. int res1 = 0 ;
  2809. int argvi = 0;
  2810. dXSARGS;
  2811. if ((items < 1) || (items > 1)) {
  2812. SWIG_croak("Usage: ESLconnection_getInfo(self);");
  2813. }
  2814. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2815. if (!SWIG_IsOK(res1)) {
  2816. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_getInfo" "', argument " "1"" of type '" "ESLconnection *""'");
  2817. }
  2818. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2819. result = (ESLevent *)(arg1)->getInfo();
  2820. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2821. XSRETURN(argvi);
  2822. fail:
  2823. SWIG_croak_null();
  2824. }
  2825. }
  2826. XS(_wrap_ESLconnection_send) {
  2827. {
  2828. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2829. char *arg2 = (char *) 0 ;
  2830. int result;
  2831. void *argp1 = 0 ;
  2832. int res1 = 0 ;
  2833. int res2 ;
  2834. char *buf2 = 0 ;
  2835. int alloc2 = 0 ;
  2836. int argvi = 0;
  2837. dXSARGS;
  2838. if ((items < 2) || (items > 2)) {
  2839. SWIG_croak("Usage: ESLconnection_send(self,cmd);");
  2840. }
  2841. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2842. if (!SWIG_IsOK(res1)) {
  2843. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_send" "', argument " "1"" of type '" "ESLconnection *""'");
  2844. }
  2845. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2846. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2847. if (!SWIG_IsOK(res2)) {
  2848. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_send" "', argument " "2"" of type '" "char const *""'");
  2849. }
  2850. arg2 = reinterpret_cast< char * >(buf2);
  2851. result = (int)(arg1)->send((char const *)arg2);
  2852. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2853. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2854. XSRETURN(argvi);
  2855. fail:
  2856. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2857. SWIG_croak_null();
  2858. }
  2859. }
  2860. XS(_wrap_ESLconnection_sendRecv) {
  2861. {
  2862. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2863. char *arg2 = (char *) 0 ;
  2864. ESLevent *result = 0 ;
  2865. void *argp1 = 0 ;
  2866. int res1 = 0 ;
  2867. int res2 ;
  2868. char *buf2 = 0 ;
  2869. int alloc2 = 0 ;
  2870. int argvi = 0;
  2871. dXSARGS;
  2872. if ((items < 2) || (items > 2)) {
  2873. SWIG_croak("Usage: ESLconnection_sendRecv(self,cmd);");
  2874. }
  2875. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2876. if (!SWIG_IsOK(res1)) {
  2877. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendRecv" "', argument " "1"" of type '" "ESLconnection *""'");
  2878. }
  2879. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2880. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2881. if (!SWIG_IsOK(res2)) {
  2882. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendRecv" "', argument " "2"" of type '" "char const *""'");
  2883. }
  2884. arg2 = reinterpret_cast< char * >(buf2);
  2885. result = (ESLevent *)(arg1)->sendRecv((char const *)arg2);
  2886. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2887. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2888. XSRETURN(argvi);
  2889. fail:
  2890. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2891. SWIG_croak_null();
  2892. }
  2893. }
  2894. XS(_wrap_ESLconnection_api) {
  2895. {
  2896. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2897. char *arg2 = (char *) 0 ;
  2898. char *arg3 = (char *) NULL ;
  2899. ESLevent *result = 0 ;
  2900. void *argp1 = 0 ;
  2901. int res1 = 0 ;
  2902. int res2 ;
  2903. char *buf2 = 0 ;
  2904. int alloc2 = 0 ;
  2905. int res3 ;
  2906. char *buf3 = 0 ;
  2907. int alloc3 = 0 ;
  2908. int argvi = 0;
  2909. dXSARGS;
  2910. if ((items < 2) || (items > 3)) {
  2911. SWIG_croak("Usage: ESLconnection_api(self,cmd,arg);");
  2912. }
  2913. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2914. if (!SWIG_IsOK(res1)) {
  2915. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
  2916. }
  2917. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2918. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2919. if (!SWIG_IsOK(res2)) {
  2920. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
  2921. }
  2922. arg2 = reinterpret_cast< char * >(buf2);
  2923. if (items > 2) {
  2924. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2925. if (!SWIG_IsOK(res3)) {
  2926. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
  2927. }
  2928. arg3 = reinterpret_cast< char * >(buf3);
  2929. }
  2930. result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
  2931. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2932. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2933. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2934. XSRETURN(argvi);
  2935. fail:
  2936. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2937. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2938. SWIG_croak_null();
  2939. }
  2940. }
  2941. XS(_wrap_ESLconnection_bgapi) {
  2942. {
  2943. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2944. char *arg2 = (char *) 0 ;
  2945. char *arg3 = (char *) NULL ;
  2946. char *arg4 = (char *) NULL ;
  2947. ESLevent *result = 0 ;
  2948. void *argp1 = 0 ;
  2949. int res1 = 0 ;
  2950. int res2 ;
  2951. char *buf2 = 0 ;
  2952. int alloc2 = 0 ;
  2953. int res3 ;
  2954. char *buf3 = 0 ;
  2955. int alloc3 = 0 ;
  2956. int res4 ;
  2957. char *buf4 = 0 ;
  2958. int alloc4 = 0 ;
  2959. int argvi = 0;
  2960. dXSARGS;
  2961. if ((items < 2) || (items > 4)) {
  2962. SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg,job_uuid);");
  2963. }
  2964. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2965. if (!SWIG_IsOK(res1)) {
  2966. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
  2967. }
  2968. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2969. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2970. if (!SWIG_IsOK(res2)) {
  2971. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
  2972. }
  2973. arg2 = reinterpret_cast< char * >(buf2);
  2974. if (items > 2) {
  2975. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2976. if (!SWIG_IsOK(res3)) {
  2977. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
  2978. }
  2979. arg3 = reinterpret_cast< char * >(buf3);
  2980. }
  2981. if (items > 3) {
  2982. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  2983. if (!SWIG_IsOK(res4)) {
  2984. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_bgapi" "', argument " "4"" of type '" "char const *""'");
  2985. }
  2986. arg4 = reinterpret_cast< char * >(buf4);
  2987. }
  2988. result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
  2989. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2990. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2991. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2992. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2993. XSRETURN(argvi);
  2994. fail:
  2995. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2996. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2997. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2998. SWIG_croak_null();
  2999. }
  3000. }
  3001. XS(_wrap_ESLconnection_sendEvent) {
  3002. {
  3003. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3004. ESLevent *arg2 = (ESLevent *) 0 ;
  3005. ESLevent *result = 0 ;
  3006. void *argp1 = 0 ;
  3007. int res1 = 0 ;
  3008. void *argp2 = 0 ;
  3009. int res2 = 0 ;
  3010. int argvi = 0;
  3011. dXSARGS;
  3012. if ((items < 2) || (items > 2)) {
  3013. SWIG_croak("Usage: ESLconnection_sendEvent(self,send_me);");
  3014. }
  3015. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3016. if (!SWIG_IsOK(res1)) {
  3017. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  3018. }
  3019. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3020. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  3021. if (!SWIG_IsOK(res2)) {
  3022. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendEvent" "', argument " "2"" of type '" "ESLevent *""'");
  3023. }
  3024. arg2 = reinterpret_cast< ESLevent * >(argp2);
  3025. result = (ESLevent *)(arg1)->sendEvent(arg2);
  3026. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3027. XSRETURN(argvi);
  3028. fail:
  3029. SWIG_croak_null();
  3030. }
  3031. }
  3032. XS(_wrap_ESLconnection_sendMSG) {
  3033. {
  3034. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3035. ESLevent *arg2 = (ESLevent *) 0 ;
  3036. char *arg3 = (char *) NULL ;
  3037. int result;
  3038. void *argp1 = 0 ;
  3039. int res1 = 0 ;
  3040. void *argp2 = 0 ;
  3041. int res2 = 0 ;
  3042. int res3 ;
  3043. char *buf3 = 0 ;
  3044. int alloc3 = 0 ;
  3045. int argvi = 0;
  3046. dXSARGS;
  3047. if ((items < 2) || (items > 3)) {
  3048. SWIG_croak("Usage: ESLconnection_sendMSG(self,send_me,uuid);");
  3049. }
  3050. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3051. if (!SWIG_IsOK(res1)) {
  3052. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendMSG" "', argument " "1"" of type '" "ESLconnection *""'");
  3053. }
  3054. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3055. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  3056. if (!SWIG_IsOK(res2)) {
  3057. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendMSG" "', argument " "2"" of type '" "ESLevent *""'");
  3058. }
  3059. arg2 = reinterpret_cast< ESLevent * >(argp2);
  3060. if (items > 2) {
  3061. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3062. if (!SWIG_IsOK(res3)) {
  3063. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_sendMSG" "', argument " "3"" of type '" "char const *""'");
  3064. }
  3065. arg3 = reinterpret_cast< char * >(buf3);
  3066. }
  3067. result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
  3068. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3069. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3070. XSRETURN(argvi);
  3071. fail:
  3072. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3073. SWIG_croak_null();
  3074. }
  3075. }
  3076. XS(_wrap_ESLconnection_recvEvent) {
  3077. {
  3078. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3079. ESLevent *result = 0 ;
  3080. void *argp1 = 0 ;
  3081. int res1 = 0 ;
  3082. int argvi = 0;
  3083. dXSARGS;
  3084. if ((items < 1) || (items > 1)) {
  3085. SWIG_croak("Usage: ESLconnection_recvEvent(self);");
  3086. }
  3087. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3088. if (!SWIG_IsOK(res1)) {
  3089. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  3090. }
  3091. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3092. result = (ESLevent *)(arg1)->recvEvent();
  3093. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3094. XSRETURN(argvi);
  3095. fail:
  3096. SWIG_croak_null();
  3097. }
  3098. }
  3099. XS(_wrap_ESLconnection_recvEventTimed) {
  3100. {
  3101. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3102. int arg2 ;
  3103. ESLevent *result = 0 ;
  3104. void *argp1 = 0 ;
  3105. int res1 = 0 ;
  3106. int val2 ;
  3107. int ecode2 = 0 ;
  3108. int argvi = 0;
  3109. dXSARGS;
  3110. if ((items < 2) || (items > 2)) {
  3111. SWIG_croak("Usage: ESLconnection_recvEventTimed(self,ms);");
  3112. }
  3113. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3114. if (!SWIG_IsOK(res1)) {
  3115. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEventTimed" "', argument " "1"" of type '" "ESLconnection *""'");
  3116. }
  3117. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3118. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  3119. if (!SWIG_IsOK(ecode2)) {
  3120. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLconnection_recvEventTimed" "', argument " "2"" of type '" "int""'");
  3121. }
  3122. arg2 = static_cast< int >(val2);
  3123. result = (ESLevent *)(arg1)->recvEventTimed(arg2);
  3124. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3125. XSRETURN(argvi);
  3126. fail:
  3127. SWIG_croak_null();
  3128. }
  3129. }
  3130. XS(_wrap_ESLconnection_filter) {
  3131. {
  3132. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3133. char *arg2 = (char *) 0 ;
  3134. char *arg3 = (char *) 0 ;
  3135. ESLevent *result = 0 ;
  3136. void *argp1 = 0 ;
  3137. int res1 = 0 ;
  3138. int res2 ;
  3139. char *buf2 = 0 ;
  3140. int alloc2 = 0 ;
  3141. int res3 ;
  3142. char *buf3 = 0 ;
  3143. int alloc3 = 0 ;
  3144. int argvi = 0;
  3145. dXSARGS;
  3146. if ((items < 3) || (items > 3)) {
  3147. SWIG_croak("Usage: ESLconnection_filter(self,header,value);");
  3148. }
  3149. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3150. if (!SWIG_IsOK(res1)) {
  3151. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_filter" "', argument " "1"" of type '" "ESLconnection *""'");
  3152. }
  3153. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3154. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3155. if (!SWIG_IsOK(res2)) {
  3156. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_filter" "', argument " "2"" of type '" "char const *""'");
  3157. }
  3158. arg2 = reinterpret_cast< char * >(buf2);
  3159. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3160. if (!SWIG_IsOK(res3)) {
  3161. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_filter" "', argument " "3"" of type '" "char const *""'");
  3162. }
  3163. arg3 = reinterpret_cast< char * >(buf3);
  3164. result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3);
  3165. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3166. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3167. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3168. XSRETURN(argvi);
  3169. fail:
  3170. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3171. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3172. SWIG_croak_null();
  3173. }
  3174. }
  3175. XS(_wrap_ESLconnection_events) {
  3176. {
  3177. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3178. char *arg2 = (char *) 0 ;
  3179. char *arg3 = (char *) 0 ;
  3180. int result;
  3181. void *argp1 = 0 ;
  3182. int res1 = 0 ;
  3183. int res2 ;
  3184. char *buf2 = 0 ;
  3185. int alloc2 = 0 ;
  3186. int res3 ;
  3187. char *buf3 = 0 ;
  3188. int alloc3 = 0 ;
  3189. int argvi = 0;
  3190. dXSARGS;
  3191. if ((items < 3) || (items > 3)) {
  3192. SWIG_croak("Usage: ESLconnection_events(self,etype,value);");
  3193. }
  3194. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3195. if (!SWIG_IsOK(res1)) {
  3196. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_events" "', argument " "1"" of type '" "ESLconnection *""'");
  3197. }
  3198. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3199. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3200. if (!SWIG_IsOK(res2)) {
  3201. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_events" "', argument " "2"" of type '" "char const *""'");
  3202. }
  3203. arg2 = reinterpret_cast< char * >(buf2);
  3204. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3205. if (!SWIG_IsOK(res3)) {
  3206. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_events" "', argument " "3"" of type '" "char const *""'");
  3207. }
  3208. arg3 = reinterpret_cast< char * >(buf3);
  3209. result = (int)(arg1)->events((char const *)arg2,(char const *)arg3);
  3210. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3211. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3212. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3213. XSRETURN(argvi);
  3214. fail:
  3215. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3216. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3217. SWIG_croak_null();
  3218. }
  3219. }
  3220. XS(_wrap_ESLconnection_execute) {
  3221. {
  3222. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3223. char *arg2 = (char *) 0 ;
  3224. char *arg3 = (char *) NULL ;
  3225. char *arg4 = (char *) NULL ;
  3226. ESLevent *result = 0 ;
  3227. void *argp1 = 0 ;
  3228. int res1 = 0 ;
  3229. int res2 ;
  3230. char *buf2 = 0 ;
  3231. int alloc2 = 0 ;
  3232. int res3 ;
  3233. char *buf3 = 0 ;
  3234. int alloc3 = 0 ;
  3235. int res4 ;
  3236. char *buf4 = 0 ;
  3237. int alloc4 = 0 ;
  3238. int argvi = 0;
  3239. dXSARGS;
  3240. if ((items < 2) || (items > 4)) {
  3241. SWIG_croak("Usage: ESLconnection_execute(self,app,arg,uuid);");
  3242. }
  3243. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3244. if (!SWIG_IsOK(res1)) {
  3245. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_execute" "', argument " "1"" of type '" "ESLconnection *""'");
  3246. }
  3247. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3248. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3249. if (!SWIG_IsOK(res2)) {
  3250. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_execute" "', argument " "2"" of type '" "char const *""'");
  3251. }
  3252. arg2 = reinterpret_cast< char * >(buf2);
  3253. if (items > 2) {
  3254. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3255. if (!SWIG_IsOK(res3)) {
  3256. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_execute" "', argument " "3"" of type '" "char const *""'");
  3257. }
  3258. arg3 = reinterpret_cast< char * >(buf3);
  3259. }
  3260. if (items > 3) {
  3261. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  3262. if (!SWIG_IsOK(res4)) {
  3263. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_execute" "', argument " "4"" of type '" "char const *""'");
  3264. }
  3265. arg4 = reinterpret_cast< char * >(buf4);
  3266. }
  3267. result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
  3268. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3269. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3270. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3271. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3272. XSRETURN(argvi);
  3273. fail:
  3274. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3275. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3276. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3277. SWIG_croak_null();
  3278. }
  3279. }
  3280. XS(_wrap_ESLconnection_executeAsync) {
  3281. {
  3282. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3283. char *arg2 = (char *) 0 ;
  3284. char *arg3 = (char *) NULL ;
  3285. char *arg4 = (char *) NULL ;
  3286. ESLevent *result = 0 ;
  3287. void *argp1 = 0 ;
  3288. int res1 = 0 ;
  3289. int res2 ;
  3290. char *buf2 = 0 ;
  3291. int alloc2 = 0 ;
  3292. int res3 ;
  3293. char *buf3 = 0 ;
  3294. int alloc3 = 0 ;
  3295. int res4 ;
  3296. char *buf4 = 0 ;
  3297. int alloc4 = 0 ;
  3298. int argvi = 0;
  3299. dXSARGS;
  3300. if ((items < 2) || (items > 4)) {
  3301. SWIG_croak("Usage: ESLconnection_executeAsync(self,app,arg,uuid);");
  3302. }
  3303. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3304. if (!SWIG_IsOK(res1)) {
  3305. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_executeAsync" "', argument " "1"" of type '" "ESLconnection *""'");
  3306. }
  3307. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3308. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3309. if (!SWIG_IsOK(res2)) {
  3310. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_executeAsync" "', argument " "2"" of type '" "char const *""'");
  3311. }
  3312. arg2 = reinterpret_cast< char * >(buf2);
  3313. if (items > 2) {
  3314. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3315. if (!SWIG_IsOK(res3)) {
  3316. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_executeAsync" "', argument " "3"" of type '" "char const *""'");
  3317. }
  3318. arg3 = reinterpret_cast< char * >(buf3);
  3319. }
  3320. if (items > 3) {
  3321. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  3322. if (!SWIG_IsOK(res4)) {
  3323. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_executeAsync" "', argument " "4"" of type '" "char const *""'");
  3324. }
  3325. arg4 = reinterpret_cast< char * >(buf4);
  3326. }
  3327. result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
  3328. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3329. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3330. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3331. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3332. XSRETURN(argvi);
  3333. fail:
  3334. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3335. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3336. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3337. SWIG_croak_null();
  3338. }
  3339. }
  3340. XS(_wrap_ESLconnection_setAsyncExecute) {
  3341. {
  3342. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3343. char *arg2 = (char *) 0 ;
  3344. int result;
  3345. void *argp1 = 0 ;
  3346. int res1 = 0 ;
  3347. int res2 ;
  3348. char *buf2 = 0 ;
  3349. int alloc2 = 0 ;
  3350. int argvi = 0;
  3351. dXSARGS;
  3352. if ((items < 2) || (items > 2)) {
  3353. SWIG_croak("Usage: ESLconnection_setAsyncExecute(self,val);");
  3354. }
  3355. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3356. if (!SWIG_IsOK(res1)) {
  3357. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setAsyncExecute" "', argument " "1"" of type '" "ESLconnection *""'");
  3358. }
  3359. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3360. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3361. if (!SWIG_IsOK(res2)) {
  3362. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setAsyncExecute" "', argument " "2"" of type '" "char const *""'");
  3363. }
  3364. arg2 = reinterpret_cast< char * >(buf2);
  3365. result = (int)(arg1)->setAsyncExecute((char const *)arg2);
  3366. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3367. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3368. XSRETURN(argvi);
  3369. fail:
  3370. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3371. SWIG_croak_null();
  3372. }
  3373. }
  3374. XS(_wrap_ESLconnection_setEventLock) {
  3375. {
  3376. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3377. char *arg2 = (char *) 0 ;
  3378. int result;
  3379. void *argp1 = 0 ;
  3380. int res1 = 0 ;
  3381. int res2 ;
  3382. char *buf2 = 0 ;
  3383. int alloc2 = 0 ;
  3384. int argvi = 0;
  3385. dXSARGS;
  3386. if ((items < 2) || (items > 2)) {
  3387. SWIG_croak("Usage: ESLconnection_setEventLock(self,val);");
  3388. }
  3389. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3390. if (!SWIG_IsOK(res1)) {
  3391. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setEventLock" "', argument " "1"" of type '" "ESLconnection *""'");
  3392. }
  3393. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3394. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3395. if (!SWIG_IsOK(res2)) {
  3396. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setEventLock" "', argument " "2"" of type '" "char const *""'");
  3397. }
  3398. arg2 = reinterpret_cast< char * >(buf2);
  3399. result = (int)(arg1)->setEventLock((char const *)arg2);
  3400. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3401. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3402. XSRETURN(argvi);
  3403. fail:
  3404. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3405. SWIG_croak_null();
  3406. }
  3407. }
  3408. XS(_wrap_ESLconnection_disconnect) {
  3409. {
  3410. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3411. int result;
  3412. void *argp1 = 0 ;
  3413. int res1 = 0 ;
  3414. int argvi = 0;
  3415. dXSARGS;
  3416. if ((items < 1) || (items > 1)) {
  3417. SWIG_croak("Usage: ESLconnection_disconnect(self);");
  3418. }
  3419. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3420. if (!SWIG_IsOK(res1)) {
  3421. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_disconnect" "', argument " "1"" of type '" "ESLconnection *""'");
  3422. }
  3423. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3424. result = (int)(arg1)->disconnect();
  3425. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3426. XSRETURN(argvi);
  3427. fail:
  3428. SWIG_croak_null();
  3429. }
  3430. }
  3431. XS(_wrap_eslSetLogLevel) {
  3432. {
  3433. int arg1 ;
  3434. int val1 ;
  3435. int ecode1 = 0 ;
  3436. int argvi = 0;
  3437. dXSARGS;
  3438. if ((items < 1) || (items > 1)) {
  3439. SWIG_croak("Usage: eslSetLogLevel(level);");
  3440. }
  3441. ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
  3442. if (!SWIG_IsOK(ecode1)) {
  3443. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "eslSetLogLevel" "', argument " "1"" of type '" "int""'");
  3444. }
  3445. arg1 = static_cast< int >(val1);
  3446. eslSetLogLevel(arg1);
  3447. XSRETURN(argvi);
  3448. fail:
  3449. SWIG_croak_null();
  3450. }
  3451. }
  3452. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  3453. static swig_type_info _swigt__p_ESLconnection = {"_p_ESLconnection", "ESLconnection *", 0, 0, (void*)"ESL::ESLconnection", 0};
  3454. static swig_type_info _swigt__p_ESLevent = {"_p_ESLevent", "ESLevent *", 0, 0, (void*)"ESL::ESLevent", 0};
  3455. static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  3456. static swig_type_info _swigt__p_esl_event_t = {"_p_esl_event_t", "esl_event_t *", 0, 0, (void*)0, 0};
  3457. static swig_type_info _swigt__p_esl_priority_t = {"_p_esl_priority_t", "esl_priority_t *", 0, 0, (void*)0, 0};
  3458. static swig_type_info *swig_type_initial[] = {
  3459. &_swigt__p_ESLconnection,
  3460. &_swigt__p_ESLevent,
  3461. &_swigt__p_char,
  3462. &_swigt__p_esl_event_t,
  3463. &_swigt__p_esl_priority_t,
  3464. };
  3465. static swig_cast_info _swigc__p_ESLconnection[] = { {&_swigt__p_ESLconnection, 0, 0, 0},{0, 0, 0, 0}};
  3466. static swig_cast_info _swigc__p_ESLevent[] = { {&_swigt__p_ESLevent, 0, 0, 0},{0, 0, 0, 0}};
  3467. static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  3468. static swig_cast_info _swigc__p_esl_event_t[] = { {&_swigt__p_esl_event_t, 0, 0, 0},{0, 0, 0, 0}};
  3469. static swig_cast_info _swigc__p_esl_priority_t[] = { {&_swigt__p_esl_priority_t, 0, 0, 0},{0, 0, 0, 0}};
  3470. static swig_cast_info *swig_cast_initial[] = {
  3471. _swigc__p_ESLconnection,
  3472. _swigc__p_ESLevent,
  3473. _swigc__p_char,
  3474. _swigc__p_esl_event_t,
  3475. _swigc__p_esl_priority_t,
  3476. };
  3477. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  3478. static swig_constant_info swig_constants[] = {
  3479. {0,0,0,0,0,0}
  3480. };
  3481. #ifdef __cplusplus
  3482. }
  3483. #endif
  3484. static swig_variable_info swig_variables[] = {
  3485. {0,0,0,0}
  3486. };
  3487. static swig_command_info swig_commands[] = {
  3488. {"ESLc::ESLevent_event_set", _wrap_ESLevent_event_set},
  3489. {"ESLc::ESLevent_event_get", _wrap_ESLevent_event_get},
  3490. {"ESLc::ESLevent_serialized_string_set", _wrap_ESLevent_serialized_string_set},
  3491. {"ESLc::ESLevent_serialized_string_get", _wrap_ESLevent_serialized_string_get},
  3492. {"ESLc::ESLevent_mine_set", _wrap_ESLevent_mine_set},
  3493. {"ESLc::ESLevent_mine_get", _wrap_ESLevent_mine_get},
  3494. {"ESLc::new_ESLevent", _wrap_new_ESLevent},
  3495. {"ESLc::delete_ESLevent", _wrap_delete_ESLevent},
  3496. {"ESLc::ESLevent_serialize", _wrap_ESLevent_serialize},
  3497. {"ESLc::ESLevent_setPriority", _wrap_ESLevent_setPriority},
  3498. {"ESLc::ESLevent_getHeader", _wrap_ESLevent_getHeader},
  3499. {"ESLc::ESLevent_getBody", _wrap_ESLevent_getBody},
  3500. {"ESLc::ESLevent_getType", _wrap_ESLevent_getType},
  3501. {"ESLc::ESLevent_addBody", _wrap_ESLevent_addBody},
  3502. {"ESLc::ESLevent_addHeader", _wrap_ESLevent_addHeader},
  3503. {"ESLc::ESLevent_pushHeader", _wrap_ESLevent_pushHeader},
  3504. {"ESLc::ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader},
  3505. {"ESLc::ESLevent_delHeader", _wrap_ESLevent_delHeader},
  3506. {"ESLc::ESLevent_firstHeader", _wrap_ESLevent_firstHeader},
  3507. {"ESLc::ESLevent_nextHeader", _wrap_ESLevent_nextHeader},
  3508. {"ESLc::new_ESLconnection", _wrap_new_ESLconnection},
  3509. {"ESLc::delete_ESLconnection", _wrap_delete_ESLconnection},
  3510. {"ESLc::ESLconnection_socketDescriptor", _wrap_ESLconnection_socketDescriptor},
  3511. {"ESLc::ESLconnection_connected", _wrap_ESLconnection_connected},
  3512. {"ESLc::ESLconnection_getInfo", _wrap_ESLconnection_getInfo},
  3513. {"ESLc::ESLconnection_send", _wrap_ESLconnection_send},
  3514. {"ESLc::ESLconnection_sendRecv", _wrap_ESLconnection_sendRecv},
  3515. {"ESLc::ESLconnection_api", _wrap_ESLconnection_api},
  3516. {"ESLc::ESLconnection_bgapi", _wrap_ESLconnection_bgapi},
  3517. {"ESLc::ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent},
  3518. {"ESLc::ESLconnection_sendMSG", _wrap_ESLconnection_sendMSG},
  3519. {"ESLc::ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent},
  3520. {"ESLc::ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed},
  3521. {"ESLc::ESLconnection_filter", _wrap_ESLconnection_filter},
  3522. {"ESLc::ESLconnection_events", _wrap_ESLconnection_events},
  3523. {"ESLc::ESLconnection_execute", _wrap_ESLconnection_execute},
  3524. {"ESLc::ESLconnection_executeAsync", _wrap_ESLconnection_executeAsync},
  3525. {"ESLc::ESLconnection_setAsyncExecute", _wrap_ESLconnection_setAsyncExecute},
  3526. {"ESLc::ESLconnection_setEventLock", _wrap_ESLconnection_setEventLock},
  3527. {"ESLc::ESLconnection_disconnect", _wrap_ESLconnection_disconnect},
  3528. {"ESLc::eslSetLogLevel", _wrap_eslSetLogLevel},
  3529. {0,0}
  3530. };
  3531. /* -----------------------------------------------------------------------------
  3532. * Type initialization:
  3533. * This problem is tough by the requirement that no dynamic
  3534. * memory is used. Also, since swig_type_info structures store pointers to
  3535. * swig_cast_info structures and swig_cast_info structures store pointers back
  3536. * to swig_type_info structures, we need some lookup code at initialization.
  3537. * The idea is that swig generates all the structures that are needed.
  3538. * The runtime then collects these partially filled structures.
  3539. * The SWIG_InitializeModule function takes these initial arrays out of
  3540. * swig_module, and does all the lookup, filling in the swig_module.types
  3541. * array with the correct data and linking the correct swig_cast_info
  3542. * structures together.
  3543. *
  3544. * The generated swig_type_info structures are assigned staticly to an initial
  3545. * array. We just loop through that array, and handle each type individually.
  3546. * First we lookup if this type has been already loaded, and if so, use the
  3547. * loaded structure instead of the generated one. Then we have to fill in the
  3548. * cast linked list. The cast data is initially stored in something like a
  3549. * two-dimensional array. Each row corresponds to a type (there are the same
  3550. * number of rows as there are in the swig_type_initial array). Each entry in
  3551. * a column is one of the swig_cast_info structures for that type.
  3552. * The cast_initial array is actually an array of arrays, because each row has
  3553. * a variable number of columns. So to actually build the cast linked list,
  3554. * we find the array of casts associated with the type, and loop through it
  3555. * adding the casts to the list. The one last trick we need to do is making
  3556. * sure the type pointer in the swig_cast_info struct is correct.
  3557. *
  3558. * First off, we lookup the cast->type name to see if it is already loaded.
  3559. * There are three cases to handle:
  3560. * 1) If the cast->type has already been loaded AND the type we are adding
  3561. * casting info to has not been loaded (it is in this module), THEN we
  3562. * replace the cast->type pointer with the type pointer that has already
  3563. * been loaded.
  3564. * 2) If BOTH types (the one we are adding casting info to, and the
  3565. * cast->type) are loaded, THEN the cast info has already been loaded by
  3566. * the previous module so we just ignore it.
  3567. * 3) Finally, if cast->type has not already been loaded, then we add that
  3568. * swig_cast_info to the linked list (because the cast->type) pointer will
  3569. * be correct.
  3570. * ----------------------------------------------------------------------------- */
  3571. #ifdef __cplusplus
  3572. extern "C" {
  3573. #if 0
  3574. } /* c-mode */
  3575. #endif
  3576. #endif
  3577. #if 0
  3578. #define SWIGRUNTIME_DEBUG
  3579. #endif
  3580. SWIGRUNTIME void
  3581. SWIG_InitializeModule(void *clientdata) {
  3582. size_t i;
  3583. swig_module_info *module_head, *iter;
  3584. int found, init;
  3585. clientdata = clientdata;
  3586. /* check to see if the circular list has been setup, if not, set it up */
  3587. if (swig_module.next==0) {
  3588. /* Initialize the swig_module */
  3589. swig_module.type_initial = swig_type_initial;
  3590. swig_module.cast_initial = swig_cast_initial;
  3591. swig_module.next = &swig_module;
  3592. init = 1;
  3593. } else {
  3594. init = 0;
  3595. }
  3596. /* Try and load any already created modules */
  3597. module_head = SWIG_GetModule(clientdata);
  3598. if (!module_head) {
  3599. /* This is the first module loaded for this interpreter */
  3600. /* so set the swig module into the interpreter */
  3601. SWIG_SetModule(clientdata, &swig_module);
  3602. module_head = &swig_module;
  3603. } else {
  3604. /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  3605. found=0;
  3606. iter=module_head;
  3607. do {
  3608. if (iter==&swig_module) {
  3609. found=1;
  3610. break;
  3611. }
  3612. iter=iter->next;
  3613. } while (iter!= module_head);
  3614. /* if the is found in the list, then all is done and we may leave */
  3615. if (found) return;
  3616. /* otherwise we must add out module into the list */
  3617. swig_module.next = module_head->next;
  3618. module_head->next = &swig_module;
  3619. }
  3620. /* When multiple interpeters are used, a module could have already been initialized in
  3621. a different interpreter, but not yet have a pointer in this interpreter.
  3622. In this case, we do not want to continue adding types... everything should be
  3623. set up already */
  3624. if (init == 0) return;
  3625. /* Now work on filling in swig_module.types */
  3626. #ifdef SWIGRUNTIME_DEBUG
  3627. printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  3628. #endif
  3629. for (i = 0; i < swig_module.size; ++i) {
  3630. swig_type_info *type = 0;
  3631. swig_type_info *ret;
  3632. swig_cast_info *cast;
  3633. #ifdef SWIGRUNTIME_DEBUG
  3634. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  3635. #endif
  3636. /* if there is another module already loaded */
  3637. if (swig_module.next != &swig_module) {
  3638. type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  3639. }
  3640. if (type) {
  3641. /* Overwrite clientdata field */
  3642. #ifdef SWIGRUNTIME_DEBUG
  3643. printf("SWIG_InitializeModule: found type %s\n", type->name);
  3644. #endif
  3645. if (swig_module.type_initial[i]->clientdata) {
  3646. type->clientdata = swig_module.type_initial[i]->clientdata;
  3647. #ifdef SWIGRUNTIME_DEBUG
  3648. printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  3649. #endif
  3650. }
  3651. } else {
  3652. type = swig_module.type_initial[i];
  3653. }
  3654. /* Insert casting types */
  3655. cast = swig_module.cast_initial[i];
  3656. while (cast->type) {
  3657. /* Don't need to add information already in the list */
  3658. ret = 0;
  3659. #ifdef SWIGRUNTIME_DEBUG
  3660. printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  3661. #endif
  3662. if (swig_module.next != &swig_module) {
  3663. ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  3664. #ifdef SWIGRUNTIME_DEBUG
  3665. if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  3666. #endif
  3667. }
  3668. if (ret) {
  3669. if (type == swig_module.type_initial[i]) {
  3670. #ifdef SWIGRUNTIME_DEBUG
  3671. printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  3672. #endif
  3673. cast->type = ret;
  3674. ret = 0;
  3675. } else {
  3676. /* Check for casting already in the list */
  3677. swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  3678. #ifdef SWIGRUNTIME_DEBUG
  3679. if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  3680. #endif
  3681. if (!ocast) ret = 0;
  3682. }
  3683. }
  3684. if (!ret) {
  3685. #ifdef SWIGRUNTIME_DEBUG
  3686. printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  3687. #endif
  3688. if (type->cast) {
  3689. type->cast->prev = cast;
  3690. cast->next = type->cast;
  3691. }
  3692. type->cast = cast;
  3693. }
  3694. cast++;
  3695. }
  3696. /* Set entry in modules->types array equal to the type */
  3697. swig_module.types[i] = type;
  3698. }
  3699. swig_module.types[i] = 0;
  3700. #ifdef SWIGRUNTIME_DEBUG
  3701. printf("**** SWIG_InitializeModule: Cast List ******\n");
  3702. for (i = 0; i < swig_module.size; ++i) {
  3703. int j = 0;
  3704. swig_cast_info *cast = swig_module.cast_initial[i];
  3705. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  3706. while (cast->type) {
  3707. printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  3708. cast++;
  3709. ++j;
  3710. }
  3711. printf("---- Total casts: %d\n",j);
  3712. }
  3713. printf("**** SWIG_InitializeModule: Cast List ******\n");
  3714. #endif
  3715. }
  3716. /* This function will propagate the clientdata field of type to
  3717. * any new swig_type_info structures that have been added into the list
  3718. * of equivalent types. It is like calling
  3719. * SWIG_TypeClientData(type, clientdata) a second time.
  3720. */
  3721. SWIGRUNTIME void
  3722. SWIG_PropagateClientData(void) {
  3723. size_t i;
  3724. swig_cast_info *equiv;
  3725. static int init_run = 0;
  3726. if (init_run) return;
  3727. init_run = 1;
  3728. for (i = 0; i < swig_module.size; i++) {
  3729. if (swig_module.types[i]->clientdata) {
  3730. equiv = swig_module.types[i]->cast;
  3731. while (equiv) {
  3732. if (!equiv->converter) {
  3733. if (equiv->type && !equiv->type->clientdata)
  3734. SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  3735. }
  3736. equiv = equiv->next;
  3737. }
  3738. }
  3739. }
  3740. }
  3741. #ifdef __cplusplus
  3742. #if 0
  3743. {
  3744. /* c-mode */
  3745. #endif
  3746. }
  3747. #endif
  3748. #ifdef __cplusplus
  3749. extern "C"
  3750. #endif
  3751. XS(SWIG_init) {
  3752. dXSARGS;
  3753. int i;
  3754. SWIG_InitializeModule(0);
  3755. /* Install commands */
  3756. for (i = 0; swig_commands[i].name; i++) {
  3757. newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
  3758. }
  3759. /* Install variables */
  3760. for (i = 0; swig_variables[i].name; i++) {
  3761. SV *sv;
  3762. sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
  3763. if (swig_variables[i].type) {
  3764. SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
  3765. } else {
  3766. sv_setiv(sv,(IV) 0);
  3767. }
  3768. swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
  3769. }
  3770. /* Install constant */
  3771. for (i = 0; swig_constants[i].type; i++) {
  3772. SV *sv;
  3773. sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
  3774. switch(swig_constants[i].type) {
  3775. case SWIG_INT:
  3776. sv_setiv(sv, (IV) swig_constants[i].lvalue);
  3777. break;
  3778. case SWIG_FLOAT:
  3779. sv_setnv(sv, (double) swig_constants[i].dvalue);
  3780. break;
  3781. case SWIG_STRING:
  3782. sv_setpv(sv, (char *) swig_constants[i].pvalue);
  3783. break;
  3784. case SWIG_POINTER:
  3785. SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
  3786. break;
  3787. case SWIG_BINARY:
  3788. SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
  3789. break;
  3790. default:
  3791. break;
  3792. }
  3793. SvREADONLY_on(sv);
  3794. }
  3795. SWIG_TypeClientData(SWIGTYPE_p_ESLevent, (void*) "ESL::ESLevent");
  3796. SWIG_TypeClientData(SWIGTYPE_p_ESLconnection, (void*) "ESL::ESLconnection");
  3797. ST(0) = &PL_sv_yes;
  3798. XSRETURN(1);
  3799. }