DumpRenderTreeSupport_wrapPregenerated.c 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 1.3.24
  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. #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
  11. # if defined(__SUNPRO_CC)
  12. # define SWIG_TEMPLATE_DISAMBIGUATOR template
  13. # else
  14. # define SWIG_TEMPLATE_DISAMBIGUATOR
  15. # endif
  16. #endif
  17. /***********************************************************************
  18. * swigrun.swg
  19. *
  20. * This file contains generic CAPI SWIG runtime support for pointer
  21. * type checking.
  22. *
  23. ************************************************************************/
  24. /* This should only be incremented when either the layout of swig_type_info changes,
  25. or for whatever reason, the runtime changes incompatibly */
  26. #define SWIG_RUNTIME_VERSION "1"
  27. /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  28. #ifdef SWIG_TYPE_TABLE
  29. #define SWIG_QUOTE_STRING(x) #x
  30. #define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  31. #define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  32. #else
  33. #define SWIG_TYPE_TABLE_NAME
  34. #endif
  35. #include <string.h>
  36. #ifndef SWIGINLINE
  37. #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  38. # define SWIGINLINE inline
  39. #else
  40. # define SWIGINLINE
  41. #endif
  42. #endif
  43. /*
  44. You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  45. creating a static or dynamic library from the swig runtime code.
  46. In 99.9% of the cases, swig just needs to declare them as 'static'.
  47. But only do this if is strictly necessary, ie, if you have problems
  48. with your compiler or so.
  49. */
  50. #ifndef SWIGRUNTIME
  51. #define SWIGRUNTIME static
  52. #endif
  53. #ifndef SWIGRUNTIMEINLINE
  54. #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  55. #endif
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. typedef void *(*swig_converter_func)(void *);
  60. typedef struct swig_type_info *(*swig_dycast_func)(void **);
  61. typedef struct swig_type_info {
  62. const char *name;
  63. swig_converter_func converter;
  64. const char *str;
  65. void *clientdata;
  66. swig_dycast_func dcast;
  67. struct swig_type_info *next;
  68. struct swig_type_info *prev;
  69. } swig_type_info;
  70. /*
  71. Compare two type names skipping the space characters, therefore
  72. "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  73. Return 0 when the two name types are equivalent, as in
  74. strncmp, but skipping ' '.
  75. */
  76. SWIGRUNTIME int
  77. SWIG_TypeNameComp(const char *f1, const char *l1,
  78. const char *f2, const char *l2) {
  79. for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  80. while ((*f1 == ' ') && (f1 != l1)) ++f1;
  81. while ((*f2 == ' ') && (f2 != l2)) ++f2;
  82. if (*f1 != *f2) return *f1 - *f2;
  83. }
  84. return (l1 - f1) - (l2 - f2);
  85. }
  86. /*
  87. Check type equivalence in a name list like <name1>|<name2>|...
  88. */
  89. SWIGRUNTIME int
  90. SWIG_TypeEquiv(const char *nb, const char *tb) {
  91. int equiv = 0;
  92. const char* te = tb + strlen(tb);
  93. const char* ne = nb;
  94. while (!equiv && *ne) {
  95. for (nb = ne; *ne; ++ne) {
  96. if (*ne == '|') break;
  97. }
  98. equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
  99. if (*ne) ++ne;
  100. }
  101. return equiv;
  102. }
  103. /*
  104. Register a type mapping with the type-checking
  105. */
  106. SWIGRUNTIME swig_type_info *
  107. SWIG_TypeRegisterTL(swig_type_info **tl, swig_type_info *ti) {
  108. swig_type_info *tc, *head, *ret, *next;
  109. /* Check to see if this type has already been registered */
  110. tc = *tl;
  111. while (tc) {
  112. /* check simple type equivalence */
  113. int typeequiv = (strcmp(tc->name, ti->name) == 0);
  114. /* check full type equivalence, resolving typedefs */
  115. if (!typeequiv) {
  116. /* only if tc is not a typedef (no '|' on it) */
  117. if (tc->str && ti->str && !strstr(tc->str,"|")) {
  118. typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
  119. }
  120. }
  121. if (typeequiv) {
  122. /* Already exists in the table. Just add additional types to the list */
  123. if (ti->clientdata) tc->clientdata = ti->clientdata;
  124. head = tc;
  125. next = tc->next;
  126. goto l1;
  127. }
  128. tc = tc->prev;
  129. }
  130. head = ti;
  131. next = 0;
  132. /* Place in list */
  133. ti->prev = *tl;
  134. *tl = ti;
  135. /* Build linked lists */
  136. l1:
  137. ret = head;
  138. tc = ti + 1;
  139. /* Patch up the rest of the links */
  140. while (tc->name) {
  141. head->next = tc;
  142. tc->prev = head;
  143. head = tc;
  144. tc++;
  145. }
  146. if (next) next->prev = head;
  147. head->next = next;
  148. return ret;
  149. }
  150. /*
  151. Check the typename
  152. */
  153. SWIGRUNTIME swig_type_info *
  154. SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  155. swig_type_info *s;
  156. if (!ty) return 0; /* Void pointer */
  157. s = ty->next; /* First element always just a name */
  158. do {
  159. if (strcmp(s->name,c) == 0) {
  160. if (s == ty->next) return s;
  161. /* Move s to the top of the linked list */
  162. s->prev->next = s->next;
  163. if (s->next) {
  164. s->next->prev = s->prev;
  165. }
  166. /* Insert s as second element in the list */
  167. s->next = ty->next;
  168. if (ty->next) ty->next->prev = s;
  169. ty->next = s;
  170. s->prev = ty;
  171. return s;
  172. }
  173. s = s->next;
  174. } while (s && (s != ty->next));
  175. return 0;
  176. }
  177. /*
  178. Cast a pointer up an inheritance hierarchy
  179. */
  180. SWIGRUNTIMEINLINE void *
  181. SWIG_TypeCast(swig_type_info *ty, void *ptr) {
  182. return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
  183. }
  184. /*
  185. Dynamic pointer casting. Down an inheritance hierarchy
  186. */
  187. SWIGRUNTIME swig_type_info *
  188. SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  189. swig_type_info *lastty = ty;
  190. if (!ty || !ty->dcast) return ty;
  191. while (ty && (ty->dcast)) {
  192. ty = (*ty->dcast)(ptr);
  193. if (ty) lastty = ty;
  194. }
  195. return lastty;
  196. }
  197. /*
  198. Return the name associated with this type
  199. */
  200. SWIGRUNTIMEINLINE const char *
  201. SWIG_TypeName(const swig_type_info *ty) {
  202. return ty->name;
  203. }
  204. /*
  205. Return the pretty name associated with this type,
  206. that is an unmangled type name in a form presentable to the user.
  207. */
  208. SWIGRUNTIME const char *
  209. SWIG_TypePrettyName(const swig_type_info *type) {
  210. /* The "str" field contains the equivalent pretty names of the
  211. type, separated by vertical-bar characters. We choose
  212. to print the last name, as it is often (?) the most
  213. specific. */
  214. if (type->str != NULL) {
  215. const char *last_name = type->str;
  216. const char *s;
  217. for (s = type->str; *s; s++)
  218. if (*s == '|') last_name = s+1;
  219. return last_name;
  220. }
  221. else
  222. return type->name;
  223. }
  224. /*
  225. Search for a swig_type_info structure
  226. */
  227. SWIGRUNTIME swig_type_info *
  228. SWIG_TypeQueryTL(swig_type_info *tl, const char *name) {
  229. swig_type_info *ty = tl;
  230. while (ty) {
  231. if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
  232. if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
  233. ty = ty->prev;
  234. }
  235. return 0;
  236. }
  237. /*
  238. Set the clientdata field for a type
  239. */
  240. SWIGRUNTIME void
  241. SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) {
  242. swig_type_info *tc, *equiv;
  243. if (ti->clientdata) return;
  244. /* if (ti->clientdata == clientdata) return; */
  245. ti->clientdata = clientdata;
  246. equiv = ti->next;
  247. while (equiv) {
  248. if (!equiv->converter) {
  249. tc = tl;
  250. while (tc) {
  251. if ((strcmp(tc->name, equiv->name) == 0))
  252. SWIG_TypeClientDataTL(tl,tc,clientdata);
  253. tc = tc->prev;
  254. }
  255. }
  256. equiv = equiv->next;
  257. }
  258. }
  259. /*
  260. Pack binary data into a string
  261. */
  262. SWIGRUNTIME char *
  263. SWIG_PackData(char *c, void *ptr, size_t sz) {
  264. static char hex[17] = "0123456789abcdef";
  265. unsigned char *u = (unsigned char *) ptr;
  266. const unsigned char *eu = u + sz;
  267. register unsigned char uu;
  268. for (; u != eu; ++u) {
  269. uu = *u;
  270. *(c++) = hex[(uu & 0xf0) >> 4];
  271. *(c++) = hex[uu & 0xf];
  272. }
  273. return c;
  274. }
  275. /*
  276. Unpack binary data from a string
  277. */
  278. SWIGRUNTIME const char *
  279. SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  280. register unsigned char *u = (unsigned char *) ptr;
  281. register const unsigned char *eu = u + sz;
  282. for (; u != eu; ++u) {
  283. register int d = *(c++);
  284. register unsigned char uu = 0;
  285. if ((d >= '0') && (d <= '9'))
  286. uu = ((d - '0') << 4);
  287. else if ((d >= 'a') && (d <= 'f'))
  288. uu = ((d - ('a'-10)) << 4);
  289. else
  290. return (char *) 0;
  291. d = *(c++);
  292. if ((d >= '0') && (d <= '9'))
  293. uu |= (d - '0');
  294. else if ((d >= 'a') && (d <= 'f'))
  295. uu |= (d - ('a'-10));
  296. else
  297. return (char *) 0;
  298. *u = uu;
  299. }
  300. return c;
  301. }
  302. /*
  303. This function will propagate the clientdata field of type to any new
  304. swig_type_info structures that have been added into the list of
  305. equivalent types. It is like calling SWIG_TypeClientData(type,
  306. clientdata) a second time.
  307. */
  308. SWIGRUNTIME void
  309. SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
  310. swig_type_info *equiv = type->next;
  311. swig_type_info *tc;
  312. if (!type->clientdata) return;
  313. while (equiv) {
  314. if (!equiv->converter) {
  315. tc = tl;
  316. while (tc) {
  317. if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
  318. SWIG_TypeClientDataTL(tl,tc, type->clientdata);
  319. tc = tc->prev;
  320. }
  321. }
  322. equiv = equiv->next;
  323. }
  324. }
  325. /*
  326. Pack 'void *' into a string buffer.
  327. */
  328. SWIGRUNTIME char *
  329. SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  330. char *r = buff;
  331. if ((2*sizeof(void *) + 2) > bsz) return 0;
  332. *(r++) = '_';
  333. r = SWIG_PackData(r,&ptr,sizeof(void *));
  334. if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  335. strcpy(r,name);
  336. return buff;
  337. }
  338. SWIGRUNTIME const char *
  339. SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  340. if (*c != '_') {
  341. if (strcmp(c,"NULL") == 0) {
  342. *ptr = (void *) 0;
  343. return name;
  344. } else {
  345. return 0;
  346. }
  347. }
  348. return SWIG_UnpackData(++c,ptr,sizeof(void *));
  349. }
  350. SWIGRUNTIME char *
  351. SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  352. char *r = buff;
  353. size_t lname = (name ? strlen(name) : 0);
  354. if ((2*sz + 2 + lname) > bsz) return 0;
  355. *(r++) = '_';
  356. r = SWIG_PackData(r,ptr,sz);
  357. if (lname) {
  358. strncpy(r,name,lname+1);
  359. } else {
  360. *r = 0;
  361. }
  362. return buff;
  363. }
  364. SWIGRUNTIME const char *
  365. SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  366. if (*c != '_') {
  367. if (strcmp(c,"NULL") == 0) {
  368. memset(ptr,0,sz);
  369. return name;
  370. } else {
  371. return 0;
  372. }
  373. }
  374. return SWIG_UnpackData(++c,ptr,sz);
  375. }
  376. #ifdef __cplusplus
  377. }
  378. #endif
  379. /***********************************************************************
  380. * common.swg
  381. *
  382. * This file contains generic SWIG runtime support for pointer
  383. * type checking as well as a few commonly used macros to control
  384. * external linkage.
  385. *
  386. * Author : David Beazley (beazley@cs.uchicago.edu)
  387. *
  388. * Copyright (c) 1999-2000, The University of Chicago
  389. *
  390. * This file may be freely redistributed without license or fee provided
  391. * this copyright message remains intact.
  392. ************************************************************************/
  393. #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  394. # if !defined(STATIC_LINKED)
  395. # define SWIGEXPORT(a) __declspec(dllexport) a
  396. # else
  397. # define SWIGEXPORT(a) a
  398. # endif
  399. #else
  400. # define SWIGEXPORT(a) a
  401. #endif
  402. #ifdef __cplusplus
  403. extern "C" {
  404. #endif
  405. /*************************************************************************/
  406. /* The static type info list */
  407. static swig_type_info *swig_type_list = 0;
  408. static swig_type_info **swig_type_list_handle = &swig_type_list;
  409. /* Register a type mapping with the type-checking */
  410. static swig_type_info *
  411. SWIG_TypeRegister(swig_type_info *ti) {
  412. return SWIG_TypeRegisterTL(swig_type_list_handle, ti);
  413. }
  414. /* Search for a swig_type_info structure */
  415. static swig_type_info *
  416. SWIG_TypeQuery(const char *name) {
  417. return SWIG_TypeQueryTL(*swig_type_list_handle, name);
  418. }
  419. /* Set the clientdata field for a type */
  420. static void
  421. SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  422. SWIG_TypeClientDataTL(*swig_type_list_handle, ti, clientdata);
  423. }
  424. /* This function will propagate the clientdata field of type to
  425. * any new swig_type_info structures that have been added into the list
  426. * of equivalent types. It is like calling
  427. * SWIG_TypeClientData(type, clientdata) a second time.
  428. */
  429. static void
  430. SWIG_PropagateClientData(swig_type_info *type) {
  431. SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
  432. }
  433. #ifdef __cplusplus
  434. }
  435. #endif
  436. /* ---------------------------------------------------------------------- -*- c -*-
  437. * perl5.swg
  438. *
  439. * Perl5 runtime library
  440. * $Header: /cvsroot/swig/SWIG/Lib/perl5/perlrun.swg,v 1.20 2004/11/29 23:13:57 wuzzeb Exp $
  441. * ----------------------------------------------------------------------------- */
  442. #define SWIGPERL
  443. #define SWIGPERL5
  444. #ifdef __cplusplus
  445. /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
  446. #include <math.h>
  447. #include <stdlib.h>
  448. extern "C" {
  449. #endif
  450. #include "EXTERN.h"
  451. #include "perl.h"
  452. #include "XSUB.h"
  453. /* Get rid of free and malloc defined by perl */
  454. #undef free
  455. #undef malloc
  456. #ifndef pTHX_
  457. #define pTHX_
  458. #endif
  459. #include <string.h>
  460. #ifdef __cplusplus
  461. }
  462. #endif
  463. /* Macro to call an XS function */
  464. #ifdef PERL_OBJECT
  465. # define SWIG_CALLXS(_name) _name(cv,pPerl)
  466. #else
  467. # ifndef MULTIPLICITY
  468. # define SWIG_CALLXS(_name) _name(cv)
  469. # else
  470. # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
  471. # endif
  472. #endif
  473. /* Contract support */
  474. #define SWIG_contract_assert(expr,msg) if (!(expr)) { SWIG_croak(msg); } else
  475. /* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
  476. #ifdef PERL_OBJECT
  477. #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
  478. typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
  479. #ifdef __cplusplus
  480. extern "C" {
  481. #endif
  482. typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
  483. #ifdef __cplusplus
  484. }
  485. #endif
  486. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  487. #define SWIGCLASS_STATIC
  488. #else
  489. #define MAGIC_PPERL
  490. #define SWIGCLASS_STATIC static
  491. #ifndef MULTIPLICITY
  492. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  493. typedef int (*SwigMagicFunc)(SV *, MAGIC *);
  494. #ifdef __cplusplus
  495. extern "C" {
  496. #endif
  497. typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
  498. #ifdef __cplusplus
  499. }
  500. #endif
  501. #else
  502. #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
  503. typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
  504. #ifdef __cplusplus
  505. extern "C" {
  506. #endif
  507. typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
  508. #ifdef __cplusplus
  509. }
  510. #endif
  511. #endif
  512. #endif
  513. #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
  514. #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
  515. #endif
  516. /* Modifications for newer Perl 5.005 releases */
  517. #if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
  518. # ifndef PL_sv_yes
  519. # define PL_sv_yes sv_yes
  520. # endif
  521. # ifndef PL_sv_undef
  522. # define PL_sv_undef sv_undef
  523. # endif
  524. # ifndef PL_na
  525. # define PL_na na
  526. # endif
  527. #endif
  528. #include <stdlib.h>
  529. #ifdef __cplusplus
  530. extern "C" {
  531. #endif
  532. #define SWIG_OWNER 1
  533. #define SWIG_SHADOW 2
  534. /* Common SWIG API */
  535. #ifdef PERL_OBJECT
  536. # define SWIG_ConvertPtr(obj, pp, type, flags) \
  537. SWIG_Perl_ConvertPtr(pPerl, obj, pp, type, flags)
  538. # define SWIG_NewPointerObj(p, type, flags) \
  539. SWIG_Perl_NewPointerObj(pPerl, p, type, flags)
  540. # define SWIG_MakePackedObj(sv, p, s, type) \
  541. SWIG_Perl_MakePackedObj(pPerl, sv, p, s, type)
  542. # define SWIG_ConvertPacked(obj, p, s, type, flags) \
  543. SWIG_Perl_ConvertPacked(pPerl, obj, p, s, type, flags)
  544. #else
  545. # define SWIG_ConvertPtr(obj, pp, type, flags) \
  546. SWIG_Perl_ConvertPtr(obj, pp, type, flags)
  547. # define SWIG_NewPointerObj(p, type, flags) \
  548. SWIG_Perl_NewPointerObj(p, type, flags)
  549. # define SWIG_MakePackedObj(sv, p, s, type) \
  550. SWIG_Perl_MakePackedObj(sv, p, s, type )
  551. # define SWIG_ConvertPacked(obj, p, s, type, flags) \
  552. SWIG_Perl_ConvertPacked(obj, p, s, type, flags)
  553. #endif
  554. /* Perl-specific API */
  555. #ifdef PERL_OBJECT
  556. # define SWIG_MakePtr(sv, ptr, type, flags) \
  557. SWIG_Perl_MakePtr(pPerl, sv, ptr, type, flags)
  558. # define SWIG_SetError(str) \
  559. SWIG_Perl_SetError(pPerl, str)
  560. #else
  561. # define SWIG_MakePtr(sv, ptr, type, flags) \
  562. SWIG_Perl_MakePtr(sv, ptr, type, flags)
  563. # define SWIG_SetError(str) \
  564. SWIG_Perl_SetError(str)
  565. # define SWIG_SetErrorSV(str) \
  566. SWIG_Perl_SetErrorSV(str)
  567. #endif
  568. #define SWIG_SetErrorf SWIG_Perl_SetErrorf
  569. #ifdef PERL_OBJECT
  570. # define SWIG_MAYBE_PERL_OBJECT CPerlObj *pPerl,
  571. #else
  572. # define SWIG_MAYBE_PERL_OBJECT
  573. #endif
  574. static swig_type_info **
  575. SWIG_Perl_GetTypeListHandle() {
  576. static void *type_pointer = (void *)0;
  577. SV *pointer;
  578. /* first check if pointer already created */
  579. if (!type_pointer) {
  580. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE);
  581. if (pointer && SvOK(pointer)) {
  582. type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
  583. }
  584. }
  585. return (swig_type_info **) type_pointer;
  586. }
  587. /*
  588. Search for a swig_type_info structure
  589. */
  590. SWIGRUNTIMEINLINE swig_type_info *
  591. SWIG_Perl_GetTypeList() {
  592. swig_type_info **tlh = SWIG_Perl_GetTypeListHandle();
  593. return tlh ? *tlh : (swig_type_info*)0;
  594. }
  595. #define SWIG_Runtime_GetTypeList SWIG_Perl_GetTypeList
  596. static swig_type_info *
  597. SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
  598. swig_type_info *s;
  599. if (!ty) return 0; /* Void pointer */
  600. s = ty->next; /* First element always just a name */
  601. do {
  602. if (sv_derived_from(rv, (char *) s->name)) {
  603. if (s == ty->next) return s;
  604. /* Move s to the top of the linked list */
  605. s->prev->next = s->next;
  606. if (s->next) {
  607. s->next->prev = s->prev;
  608. }
  609. /* Insert s as second element in the list */
  610. s->next = ty->next;
  611. if (ty->next) ty->next->prev = s;
  612. ty->next = s;
  613. s->prev = ty;
  614. return s;
  615. }
  616. s = s->next;
  617. } while (s && (s != ty->next));
  618. return 0;
  619. }
  620. /* Function for getting a pointer value */
  621. static int
  622. SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  623. swig_type_info *tc;
  624. void *voidptr = (void *)0;
  625. /* If magical, apply more magic */
  626. if (SvGMAGICAL(sv))
  627. mg_get(sv);
  628. /* Check to see if this is an object */
  629. if (sv_isobject(sv)) {
  630. SV *tsv = (SV*) SvRV(sv);
  631. IV tmp = 0;
  632. if ((SvTYPE(tsv) == SVt_PVHV)) {
  633. MAGIC *mg;
  634. if (SvMAGICAL(tsv)) {
  635. mg = mg_find(tsv,'P');
  636. if (mg) {
  637. sv = mg->mg_obj;
  638. if (sv_isobject(sv)) {
  639. tmp = SvIV((SV*)SvRV(sv));
  640. }
  641. }
  642. } else {
  643. return -1;
  644. }
  645. } else {
  646. tmp = SvIV((SV*)SvRV(sv));
  647. }
  648. voidptr = (void *)tmp;
  649. if (!_t) {
  650. *(ptr) = voidptr;
  651. return 0;
  652. }
  653. } else if (! SvOK(sv)) { /* Check for undef */
  654. *(ptr) = (void *) 0;
  655. return 0;
  656. } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
  657. *(ptr) = (void *) 0;
  658. if (!SvROK(sv))
  659. return 0;
  660. else
  661. return -1;
  662. } else { /* Don't know what it is */
  663. *(ptr) = (void *) 0;
  664. return -1;
  665. }
  666. if (_t) {
  667. /* Now see if the types match */
  668. char *_c = HvNAME(SvSTASH(SvRV(sv)));
  669. tc = SWIG_TypeCheck(_c,_t);
  670. if (!tc) {
  671. *ptr = voidptr;
  672. return -1;
  673. }
  674. *ptr = SWIG_TypeCast(tc,voidptr);
  675. return 0;
  676. }
  677. *ptr = voidptr;
  678. return 0;
  679. }
  680. static void
  681. SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  682. if (ptr && (flags & SWIG_SHADOW)) {
  683. SV *self;
  684. SV *obj=newSV(0);
  685. HV *hash=newHV();
  686. HV *stash;
  687. sv_setref_pv(obj, (char *) t->name, ptr);
  688. stash=SvSTASH(SvRV(obj));
  689. if (flags & SWIG_OWNER) {
  690. HV *hv;
  691. GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
  692. if (!isGV(gv))
  693. gv_init(gv, stash, "OWNER", 5, FALSE);
  694. hv=GvHVn(gv);
  695. hv_store_ent(hv, obj, newSViv(1), 0);
  696. }
  697. sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
  698. SvREFCNT_dec(obj);
  699. self=newRV_noinc((SV *)hash);
  700. sv_setsv(sv, self);
  701. SvREFCNT_dec((SV *)self);
  702. sv_bless(sv, stash);
  703. }
  704. else {
  705. sv_setref_pv(sv, (char *) t->name, ptr);
  706. }
  707. }
  708. static SWIGINLINE SV *
  709. SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  710. SV *result = sv_newmortal();
  711. SWIG_MakePtr(result, ptr, t, flags);
  712. return result;
  713. }
  714. static void
  715. SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  716. char result[1024];
  717. char *r = result;
  718. if ((2*sz + 1 + strlen(type->name)) > 1000) return;
  719. *(r++) = '_';
  720. r = SWIG_PackData(r,ptr,sz);
  721. strcpy(r,type->name);
  722. sv_setpv(sv, result);
  723. }
  724. /* Convert a packed value value */
  725. static int
  726. SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
  727. swig_type_info *tc;
  728. const char *c = 0;
  729. if ((!obj) || (!SvOK(obj))) return -1;
  730. c = SvPV(obj, PL_na);
  731. /* Pointer values must start with leading underscore */
  732. if (*c != '_') return -1;
  733. c++;
  734. c = SWIG_UnpackData(c,ptr,sz);
  735. if (ty) {
  736. tc = SWIG_TypeCheck(c,ty);
  737. if (!tc) return -1;
  738. }
  739. return 0;
  740. }
  741. static SWIGINLINE void
  742. SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
  743. if (error) sv_setpv(perl_get_sv("@", TRUE), error);
  744. }
  745. static SWIGINLINE void
  746. SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
  747. if (error) sv_setsv(perl_get_sv("@", TRUE), error);
  748. }
  749. static void
  750. SWIG_Perl_SetErrorf(const char *fmt, ...) {
  751. va_list args;
  752. va_start(args, fmt);
  753. sv_vsetpvfn(perl_get_sv("@", TRUE), fmt, strlen(fmt), &args, Null(SV**), 0, Null(bool*));
  754. va_end(args);
  755. }
  756. /* Macros for low-level exception handling */
  757. #define SWIG_fail goto fail
  758. #define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
  759. #define SWIG_croakSV(x) { SWIG_SetErrorSV(x); goto fail; }
  760. /* most preprocessors do not support vararg macros :-( */
  761. /* #define SWIG_croakf(x...) { SWIG_SetErrorf(x); goto fail; } */
  762. typedef XS(SwigPerlWrapper);
  763. typedef SwigPerlWrapper *SwigPerlWrapperPtr;
  764. /* Structure for command table */
  765. typedef struct {
  766. const char *name;
  767. SwigPerlWrapperPtr wrapper;
  768. } swig_command_info;
  769. /* Information for constant table */
  770. #define SWIG_INT 1
  771. #define SWIG_FLOAT 2
  772. #define SWIG_STRING 3
  773. #define SWIG_POINTER 4
  774. #define SWIG_BINARY 5
  775. /* Constant information structure */
  776. typedef struct swig_constant_info {
  777. int type;
  778. const char *name;
  779. long lvalue;
  780. double dvalue;
  781. void *pvalue;
  782. swig_type_info **ptype;
  783. } swig_constant_info;
  784. #ifdef __cplusplus
  785. }
  786. #endif
  787. /* Structure for variable table */
  788. typedef struct {
  789. const char *name;
  790. SwigMagicFunc set;
  791. SwigMagicFunc get;
  792. swig_type_info **type;
  793. } swig_variable_info;
  794. /* Magic variable code */
  795. #ifndef PERL_OBJECT
  796. #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
  797. #ifndef MULTIPLICITY
  798. static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
  799. #else
  800. static void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) {
  801. #endif
  802. #else
  803. # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
  804. static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) {
  805. #endif
  806. MAGIC *mg;
  807. sv_magic(sv,sv,'U',(char *) name,strlen(name));
  808. mg = mg_find(sv,'U');
  809. mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  810. mg->mg_virtual->svt_get = (SwigMagicFuncHack) get;
  811. mg->mg_virtual->svt_set = (SwigMagicFuncHack) set;
  812. mg->mg_virtual->svt_len = 0;
  813. mg->mg_virtual->svt_clear = 0;
  814. mg->mg_virtual->svt_free = 0;
  815. }
  816. #ifdef do_open
  817. #undef do_open
  818. #endif
  819. #ifdef do_close
  820. #undef do_close
  821. #endif
  822. #ifdef scalar
  823. #undef scalar
  824. #endif
  825. #ifdef list
  826. #undef list
  827. #endif
  828. #ifdef apply
  829. #undef apply
  830. #endif
  831. #ifdef convert
  832. #undef convert
  833. #endif
  834. #ifdef Error
  835. #undef Error
  836. #endif
  837. #ifdef form
  838. #undef form
  839. #endif
  840. #ifdef vform
  841. #undef vform
  842. #endif
  843. #ifdef LABEL
  844. #undef LABEL
  845. #endif
  846. #ifdef METHOD
  847. #undef METHOD
  848. #endif
  849. #ifdef Move
  850. #undef Move
  851. #endif
  852. #ifdef yylex
  853. #undef yylex
  854. #endif
  855. #ifdef yyparse
  856. #undef yyparse
  857. #endif
  858. #ifdef yyerror
  859. #undef yyerror
  860. #endif
  861. #ifdef invert
  862. #undef invert
  863. #endif
  864. #ifdef ref
  865. #undef ref
  866. #endif
  867. #ifdef ENTER
  868. #undef ENTER
  869. #endif
  870. /* -------- TYPES TABLE (BEGIN) -------- */
  871. static swig_type_info *swig_types[1];
  872. /* -------- TYPES TABLE (END) -------- */
  873. #define SWIG_init boot_DumpRenderTreeSupport
  874. #define SWIG_name "DumpRenderTreeSupportc::boot_DumpRenderTreeSupport"
  875. #define SWIG_prefix "DumpRenderTreeSupportc::"
  876. #ifdef __cplusplus
  877. extern "C"
  878. #endif
  879. #ifndef PERL_OBJECT
  880. #ifndef MULTIPLICITY
  881. SWIGEXPORT(void) SWIG_init (CV* cv);
  882. #else
  883. SWIGEXPORT(void) SWIG_init (pTHXo_ CV* cv);
  884. #endif
  885. #else
  886. SWIGEXPORT(void) SWIG_init (CV *cv, CPerlObj *);
  887. #endif
  888. int processIsCrashing(int);
  889. #ifdef PERL_OBJECT
  890. #define MAGIC_CLASS _wrap_DumpRenderTreeSupport_var::
  891. class _wrap_DumpRenderTreeSupport_var : public CPerlObj {
  892. public:
  893. #else
  894. #define MAGIC_CLASS
  895. #endif
  896. SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *sv, MAGIC *mg) {
  897. MAGIC_PPERL
  898. sv = sv; mg = mg;
  899. croak("Value is read-only.");
  900. return 0;
  901. }
  902. #ifdef PERL_OBJECT
  903. };
  904. #endif
  905. #ifdef __cplusplus
  906. extern "C" {
  907. #endif
  908. XS(_wrap_processIsCrashing) {
  909. {
  910. int arg1 ;
  911. int result;
  912. int argvi = 0;
  913. dXSARGS;
  914. if ((items < 1) || (items > 1)) {
  915. SWIG_croak("Usage: processIsCrashing(pid);");
  916. }
  917. arg1 = (int) SvIV(ST(0));
  918. result = (int)processIsCrashing(arg1);
  919. ST(argvi) = sv_newmortal();
  920. sv_setiv(ST(argvi++), (IV) result);
  921. XSRETURN(argvi);
  922. fail:
  923. ;
  924. }
  925. croak(Nullch);
  926. }
  927. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  928. static swig_type_info *swig_types_initial[] = {
  929. 0
  930. };
  931. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  932. static swig_constant_info swig_constants[] = {
  933. {0,0,0,0,0,0}
  934. };
  935. #ifdef __cplusplus
  936. }
  937. #endif
  938. static swig_variable_info swig_variables[] = {
  939. {0,0,0,0}
  940. };
  941. static swig_command_info swig_commands[] = {
  942. {"DumpRenderTreeSupportc::processIsCrashing", _wrap_processIsCrashing},
  943. {0,0}
  944. };
  945. static void SWIG_Perl_SetTypeListHandle(swig_type_info **handle) {
  946. SV *pointer;
  947. /* create a new pointer */
  948. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE);
  949. sv_setiv(pointer, PTR2IV(swig_type_list_handle));
  950. }
  951. static swig_type_info **
  952. SWIG_Perl_LookupTypePointer(swig_type_info **type_list_handle) {
  953. swig_type_info **type_pointer;
  954. /* first check if module already created */
  955. type_pointer = SWIG_Perl_GetTypeListHandle();
  956. if (type_pointer) {
  957. return type_pointer;
  958. } else {
  959. /* create a new module and variable */
  960. SWIG_Perl_SetTypeListHandle(type_list_handle);
  961. return type_list_handle;
  962. }
  963. }
  964. #ifdef __cplusplus
  965. extern "C"
  966. #endif
  967. XS(SWIG_init) {
  968. dXSARGS;
  969. int i;
  970. static int _init = 0;
  971. if (!_init) {
  972. swig_type_list_handle = SWIG_Perl_LookupTypePointer(swig_type_list_handle);
  973. for (i = 0; swig_types_initial[i]; i++) {
  974. swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
  975. }
  976. _init = 1;
  977. }
  978. /* Install commands */
  979. for (i = 0; swig_commands[i].name; i++) {
  980. newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
  981. }
  982. /* Install variables */
  983. for (i = 0; swig_variables[i].name; i++) {
  984. SV *sv;
  985. sv = perl_get_sv((char*) swig_variables[i].name, TRUE | 0x2);
  986. if (swig_variables[i].type) {
  987. SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
  988. } else {
  989. sv_setiv(sv,(IV) 0);
  990. }
  991. swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
  992. }
  993. /* Install constant */
  994. for (i = 0; swig_constants[i].type; i++) {
  995. SV *sv;
  996. sv = perl_get_sv((char*)swig_constants[i].name, TRUE | 0x2);
  997. switch(swig_constants[i].type) {
  998. case SWIG_INT:
  999. sv_setiv(sv, (IV) swig_constants[i].lvalue);
  1000. break;
  1001. case SWIG_FLOAT:
  1002. sv_setnv(sv, (double) swig_constants[i].dvalue);
  1003. break;
  1004. case SWIG_STRING:
  1005. sv_setpv(sv, (char *) swig_constants[i].pvalue);
  1006. break;
  1007. case SWIG_POINTER:
  1008. SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
  1009. break;
  1010. case SWIG_BINARY:
  1011. SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
  1012. break;
  1013. default:
  1014. break;
  1015. }
  1016. SvREADONLY_on(sv);
  1017. }
  1018. ST(0) = &PL_sv_yes;
  1019. XSRETURN(1);
  1020. }