PageRenderTime 20ms CodeModel.GetById 2ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/xml/example_xml.expected-xml

#
Unknown | 1624 lines | 1575 code | 49 blank | 0 comment | 0 complexity | c43fd6d1b9a02f07f68194b07692e091 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
   2  <swig:top >
   3    <swigxml:child >
   4      <swig:file name="../../Lib/swig.swg" >
   5        <swigxml:type string="include"  />
   6      </swig:file>
   7      <swig:file name="example_xml.i" >
   8        <swigxml:child >
   9          <swig:module name="my_example"  />
  10          <c:enum name="color" >
  11            <swigxml:child >
  12              <c:enumvalue name="RED" >
  13                <swigxml:value string="RED"  />
  14              </c:enumvalue>
  15              <c:enumvalue name="BLUE"  />
  16              <c:enumvalue name="GREEN"  />
  17            </swigxml:child>
  18          </c:enum>
  19          <c:class name="Foo" >
  20            <swigxml:child >
  21              <c:access name="public"  />
  22              <c:function name="Foo" >
  23                <swigxml:code >
  24{ }                </swigxml:code>
  25                <swigxml:type string="int"  />
  26              </c:function>
  27              <c:enum name="speed" >
  28                <swigxml:child >
  29                  <c:enumvalue name="IMPULSE"  />
  30                  <c:enumvalue name="WARP"  />
  31                  <c:enumvalue name="LUDICROUS"  />
  32                </swigxml:child>
  33              </c:enum>
  34              <c:function name="enum_test" >
  35                <swigxml:parms >
  36                  <swigxml:parm name="s" >
  37                    <swigxml:type string="speed"  />
  38                  </swigxml:parm>
  39                </swigxml:parms>
  40                <swigxml:type string="void"  />
  41              </c:function>
  42            </swigxml:child>
  43            <swigxml:classtype string="class"  />
  44            <swigxml:namespace string="Foo"  />
  45          </c:class>
  46          <c:function name="enum_test" >
  47            <swigxml:parms >
  48              <swigxml:parm name="c" >
  49                <swigxml:type string="color"  />
  50              </swigxml:parm>
  51              <swigxml:parm name="s" >
  52                <swigxml:type string="Foo::speed"  />
  53              </swigxml:parm>
  54            </swigxml:parms>
  55            <swigxml:type string="void"  />
  56          </c:function>
  57          <swig:file name="../../Lib/pointer.i" >
  58            <swigxml:child >
  59              <swig:module name="pointer"  />
  60              <swig:insert >
  61                <swigxml:code >
  62
  63%include pointer.i
  64
  65The pointer.i library provides run-time support for managing and 
  66manipulating a variety of C/C++ pointer values.  In particular,
  67you can create various kinds of objects and dereference common
  68pointer types.  This is done through a common set of functions:
  69
  70    ptrvalue     - Dereferences a pointer 
  71    ptrset       - Set the value of an object referenced by 
  72                   a pointer.
  73    ptrcreate    - Create a new object and return a pointer.
  74    ptrfree      - Free the memory allocated by ptrcreate.
  75    ptradd       - Increment/decrement a pointer value.
  76
  77When creating, dereferencing, or setting the value of pointer
  78variable, only the common C datatypes of int, short, long, float,
  79double, char, and char * are currently supported.   Other
  80datatypes may generate an error.
  81
  82One of the more interesting aspects of this library is that
  83it operates with a wide range of datatypes.  For example,
  84the "ptrvalue" function can dereference "double *", "int *",
  85"long *", "char *", and other datatypes. Since SWIG encodes
  86pointers with type information, this can be done transparently
  87and in most cases, you can dereference a pointer without
  88ever knowing what type it actually is.
  89
  90This library is primarily designed for utility, not high 
  91performance (the dynamic determination of pointer types takes
  92more work than most normal wrapper functions).  As a result,
  93you may achieve better performance by writing customized
  94"helper" functions if you're making lots of calls to these
  95functions in inner loops or other intensive operations.
  96                </swigxml:code>
  97                <swigxml:section string="doc"  />
  98              </swig:insert>
  99              <swig:types >
 100                <swigxml:parms >
 101                  <swigxml:parm >
 102                    <swigxml:type string="p.int"  />
 103                  </swigxml:parm>
 104                  <swigxml:parm >
 105                    <swigxml:type string="p.short"  />
 106                  </swigxml:parm>
 107                  <swigxml:parm >
 108                    <swigxml:type string="p.long"  />
 109                  </swigxml:parm>
 110                  <swigxml:parm >
 111                    <swigxml:type string="p.float"  />
 112                  </swigxml:parm>
 113                  <swigxml:parm >
 114                    <swigxml:type string="p.double"  />
 115                  </swigxml:parm>
 116                  <swigxml:parm >
 117                    <swigxml:type string="p.char"  />
 118                  </swigxml:parm>
 119                  <swigxml:parm >
 120                    <swigxml:type string="p.p.char"  />
 121                  </swigxml:parm>
 122                  <swigxml:parm >
 123                    <swigxml:type string="p.void"  />
 124                  </swigxml:parm>
 125                </swigxml:parms>
 126              </swig:types>
 127              <swig:file name="../../Lib/xml/ptrlang.i" >
 128                <swigxml:child >
 129                  <swig:insert >
 130                    <swigxml:code >
 131
 132#include &amp;lt;ctype.h>
 133
 134/* Types used by the library */
 135static swig_type_info *SWIG_POINTER_int_p = 0;
 136static swig_type_info *SWIG_POINTER_short_p =0;
 137static swig_type_info *SWIG_POINTER_long_p = 0;
 138static swig_type_info *SWIG_POINTER_float_p = 0;
 139static swig_type_info *SWIG_POINTER_double_p = 0;
 140static swig_type_info *SWIG_POINTER_char_p = 0;
 141static swig_type_info *SWIG_POINTER_char_pp = 0;
 142static swig_type_info *SWIG_POINTER_void_p = 0;
 143                    </swigxml:code>
 144                  </swig:insert>
 145                  <swig:insert >
 146                    <swigxml:code >
 147
 148  SWIG_POINTER_int_p = SWIG_TypeQuery("int *");
 149  SWIG_POINTER_short_p = SWIG_TypeQuery("short *");
 150  SWIG_POINTER_long_p = SWIG_TypeQuery("long *");
 151  SWIG_POINTER_float_p = SWIG_TypeQuery("float *");
 152  SWIG_POINTER_double_p = SWIG_TypeQuery("double *");
 153  SWIG_POINTER_char_p = SWIG_TypeQuery("char *");
 154  SWIG_POINTER_char_pp = SWIG_TypeQuery("char **");
 155  SWIG_POINTER_void_p = SWIG_TypeQuery("void *");
 156                    </swigxml:code>
 157                    <swigxml:section string="init"  />
 158                  </swig:insert>
 159                  <swig:insert >
 160                    <swigxml:code >
 161
 162
 163/* #ifdef WIN32
 164#undef isspace
 165#define isspace(c) (c == ' ')
 166#endif
 167*/
 168
 169/*------------------------------------------------------------------
 170  ptrvalue(ptr,type = 0)
 171
 172  Attempts to dereference a pointer value.  If type is given, it
 173  will try to use that type.  Otherwise, this function will attempt
 174  to "guess" the proper datatype by checking against all of the
 175  builtin C datatypes.
 176  ------------------------------------------------------------------ */
 177
 178#ifdef PERL_OBJECT
 179static SV *_ptrvalue(CPerlObj *pPerl,SV *_PTRVALUE, int index, char *type) {
 180#define ptrvalue(a,b,c) _ptrvalue(pPerl,a,b,c)
 181#else
 182static SV *_ptrvalue(SV *_PTRVALUE, int index, char *type) {
 183#define ptrvalue(a,b,c) _ptrvalue(a,b,c)
 184#endif
 185
 186  void     *ptr;
 187  SV       *obj = 0;
 188
 189  if (SWIG_ConvertPtr(_PTRVALUE, &amp;ptr, 0) &amp;lt; 0) {
 190    croak("Type error it ptrvalue. Argument is not a valid pointer value.");
 191  } else {
 192    /* If no datatype was passed, try a few common datatypes first */
 193    if (!type) {
 194
 195      /* No datatype was passed.   Type to figure out if it's a common one */
 196
 197      if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_int_p) >= 0) {
 198	type = "int";
 199      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_double_p) >= 0) {
 200	type = "double";
 201      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_short_p) >= 0) {
 202	type = "short";
 203      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_long_p) >= 0) {
 204	type = "long";
 205      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_float_p) >= 0) {
 206	type = "float";
 207      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_char_p) >= 0) {
 208	type = "char";
 209      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_char_pp) >= 0) {
 210	type = "char *";
 211      } else {
 212	type = "unknown";
 213      }
 214    }
 215
 216    if (!ptr) {
 217      croak("Unable to dereference NULL pointer.");
 218      return 0;
 219    }
 220
 221    /* Now we have a datatype.  Try to figure out what to do about it */
 222    if (strcmp(type,"int") == 0) {
 223      obj = sv_newmortal();
 224      sv_setiv(obj,(IV) *(((int *) ptr) + index));
 225    } else if (strcmp(type,"double") == 0) {
 226      obj = sv_newmortal();
 227      sv_setnv(obj,(double) *(((double *) ptr)+index));
 228    } else if (strcmp(type,"short") == 0) {
 229      obj = sv_newmortal();
 230      sv_setiv(obj,(IV) *(((short *) ptr) + index));
 231    } else if (strcmp(type,"long") == 0) {
 232      obj = sv_newmortal();
 233      sv_setiv(obj,(IV) *(((long *) ptr) + index));
 234    } else if (strcmp(type,"float") == 0) {
 235      obj = sv_newmortal();
 236      sv_setnv(obj,(double) *(((float *) ptr)+index));
 237    } else if (strcmp(type,"char") == 0) {
 238      obj = sv_newmortal();
 239      sv_setpv(obj,((char *) ptr)+index);
 240    } else if (strcmp(type,"char *") == 0) {
 241      char *c = *(((char **) ptr)+index);
 242      obj = sv_newmortal();
 243      if (c)
 244	sv_setpv(obj,c);
 245      else
 246	sv_setpv(obj,"NULL");
 247    } else {
 248      croak("Unable to dereference unsupported datatype.");
 249      obj = 0;
 250    }
 251  }
 252  return obj;
 253}
 254
 255/*------------------------------------------------------------------
 256  ptrcreate(type,value = 0,numelements = 1)
 257
 258  Attempts to create a new object of given type.  Type must be
 259  a basic C datatype.  Will not create complex objects.
 260  ------------------------------------------------------------------ */
 261#ifdef PERL_OBJECT
 262static SV *_ptrcreate(CPerlObj *pPerl, char *type, SV *value, int numelements) {
 263#define ptrcreate(a,b,c) _ptrcreate(pPerl,a,b,c)
 264#else
 265static SV *_ptrcreate(char *type, SV *value, int numelements) {
 266#define ptrcreate(a,b,c) _ptrcreate(a,b,c)
 267#endif
 268
 269  void     *ptr;
 270  SV       *obj;
 271  int       sz;
 272  swig_type_info *cast = 0;
 273
 274  /* Check the type string against a variety of possibilities */
 275
 276  if (strcmp(type,"int") == 0) {
 277    sz = sizeof(int)*numelements;
 278    cast = SWIG_POINTER_int_p;
 279  } else if (strcmp(type,"short") == 0) {
 280    sz = sizeof(short)*numelements;
 281    cast = SWIG_POINTER_short_p;
 282  } else if (strcmp(type,"long") == 0) {
 283    sz = sizeof(long)*numelements;
 284    cast = SWIG_POINTER_long_p;
 285  } else if (strcmp(type,"double") == 0) {
 286    sz = sizeof(double)*numelements;
 287    cast = SWIG_POINTER_double_p;
 288  } else if (strcmp(type,"float") == 0) {
 289    sz = sizeof(float)*numelements;
 290    cast = SWIG_POINTER_float_p;
 291  } else if (strcmp(type,"char") == 0) {
 292    sz = sizeof(char)*numelements;
 293    cast = SWIG_POINTER_char_p;
 294  } else if (strcmp(type,"char *") == 0) {
 295    sz = sizeof(char *)*(numelements+1);
 296    cast = SWIG_POINTER_char_pp;
 297  } else if (strcmp(type,"void") == 0) {
 298    sz = numelements;
 299    cast = SWIG_POINTER_void_p;
 300  } else {
 301    croak("Unable to create unknown datatype.");
 302    return 0;
 303  }
 304
 305  /* Create the new object */
 306
 307  ptr = (void *) malloc(sz);
 308  if (!ptr) {
 309    croak("Out of memory in ptrcreate.");
 310    return 0;
 311  }
 312
 313  /* Now try to set its default value */
 314
 315  if (value) {
 316    if (strcmp(type,"int") == 0) {
 317      int *ip,i,ivalue;
 318      ivalue = (int) SvIV(value);
 319      ip = (int *) ptr;
 320      for (i = 0; i &amp;lt; numelements; i++)
 321	ip[i] = ivalue;
 322    } else if (strcmp(type,"short") == 0) {
 323      short *ip,ivalue;
 324      int i;
 325      ivalue = (short) SvIV(value);
 326      ip = (short *) ptr;
 327      for (i = 0; i &amp;lt; numelements; i++)
 328	ip[i] = ivalue;
 329    } else if (strcmp(type,"long") == 0) {
 330      long *ip,ivalue;
 331      int i;
 332      ivalue = (long) SvIV(value);
 333      ip = (long *) ptr;
 334      for (i = 0; i &amp;lt; numelements; i++)
 335	ip[i] = ivalue;
 336    } else if (strcmp(type,"double") == 0) {
 337      double *ip,ivalue;
 338      int i;
 339      ivalue = (double) SvNV(value);
 340      ip = (double *) ptr;
 341      for (i = 0; i &amp;lt; numelements; i++)
 342	ip[i] = ivalue;
 343    } else if (strcmp(type,"float") == 0) {
 344      float *ip,ivalue;
 345      int i;
 346      ivalue = (float) SvNV(value);
 347      ip = (float *) ptr;
 348      for (i = 0; i &amp;lt; numelements; i++)
 349	ip[i] = ivalue;
 350    } else if (strcmp(type,"char") == 0) {
 351      char *ip,*ivalue;
 352      ivalue = (char *) SvPV(value,PL_na);
 353      ip = (char *) ptr;
 354      strncpy(ip,ivalue,numelements-1);
 355    } else if (strcmp(type,"char *") == 0) {
 356      char **ip, *ivalue;
 357      int  i;
 358      ivalue = (char *) SvPV(value,PL_na);
 359      ip = (char **) ptr;
 360      for (i = 0; i &amp;lt; numelements; i++) {
 361	if (ivalue) {
 362	  ip[i] = (char *) malloc(strlen(ivalue)+1);
 363	  strcpy(ip[i],ivalue);
 364	} else {
 365	  ip[i] = 0;
 366	}
 367      }
 368      ip[numelements] = 0;
 369    }
 370  }
 371  /* Create the pointer value */
 372
 373
 374  obj = sv_newmortal();
 375  SWIG_MakePtr(obj,ptr,cast);
 376  return obj;
 377}
 378
 379/*------------------------------------------------------------------
 380  ptrset(ptr,value,index = 0,type = 0)
 381
 382  Attempts to set the value of a pointer variable.  If type is
 383  given, we will use that type.  Otherwise, we'll guess the datatype.
 384  ------------------------------------------------------------------ */
 385
 386#ifdef PERL_OBJECT
 387static void _ptrset(CPerlObj *pPerl,SV *_PTRVALUE, SV *value, int index, char *type) {
 388#define ptrset(a,b,c,d) _ptrset(pPerl,a,b,c,d)
 389#else
 390static void _ptrset(SV *_PTRVALUE, SV *value, int index, char *type) {
 391#define ptrset(a,b,c,d) _ptrset(a,b,c,d)
 392#endif
 393  void     *ptr;
 394  SV       *obj;
 395
 396
 397  if (SWIG_ConvertPtr(_PTRVALUE, &amp;ptr, 0) &amp;lt; 0) {
 398    croak("Type error it ptrvalue. Argument is not a valid pointer value.");
 399  } else {
 400    /* If no datatype was passed, try a few common datatypes first */
 401    if (!type) {
 402      /* No datatype was passed.   Type to figure out if it's a common one */
 403      if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_int_p) >= 0) {
 404	type = "int";
 405      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_double_p) >= 0) {
 406	type = "double";
 407      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_short_p) >= 0) {
 408	type = "short";
 409      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_long_p) >= 0) {
 410	type = "long";
 411      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_float_p) >= 0) {
 412	type = "float";
 413      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_char_p) >= 0) {
 414	type = "char";
 415      } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_char_pp) >= 0) {
 416	type = "char *";
 417      } else {
 418	type = "unknown";
 419      }
 420    }
 421  }
 422  if (!ptr) {
 423    croak("Unable to set NULL pointer.");
 424    return;
 425  }
 426
 427  /* Now we have a datatype.  Try to figure out what to do about it */
 428  if (strcmp(type,"int") == 0) {
 429    *(((int *) ptr)+index) = (int) SvIV(value);
 430  } else if (strcmp(type,"double") == 0) {
 431    *(((double *) ptr)+index) = (double) SvNV(value);
 432  } else if (strcmp(type,"short") == 0) {
 433    *(((short *) ptr)+index) = (short) SvIV(value);
 434  } else if (strcmp(type,"long") == 0) {
 435    *(((long *) ptr)+index) = (long) SvIV(value);
 436  } else if (strcmp(type,"float") == 0) {
 437    *(((float *) ptr)+index) = (float) SvNV(value);
 438  } else if (strcmp(type,"char") == 0) {
 439    char *c = SvPV(value,PL_na);
 440    strcpy(((char *) ptr)+index, c);
 441  } else if (strcmp(type,"char *") == 0) {
 442    char *c = SvPV(value,PL_na);
 443    char **ca = (char **) ptr;
 444    if (ca[index]) free(ca[index]);
 445    if (strcmp(c,"NULL") == 0) {
 446      ca[index] = 0;
 447    } else {
 448      ca[index] = (char *) malloc(strlen(c)+1);
 449      strcpy(ca[index],c);
 450    }
 451  } else {
 452    croak("Unable to set unsupported datatype.");
 453    return;
 454  }
 455}
 456
 457/*------------------------------------------------------------------
 458  ptradd(ptr,offset)
 459
 460  Adds a value to an existing pointer value.  Will do a type-dependent
 461  add for basic datatypes.  For other datatypes, will do a byte-add.
 462  ------------------------------------------------------------------ */
 463
 464#ifdef PERL_OBJECT
 465static SV *_ptradd(CPerlObj *pPerl, SV *_PTRVALUE, int offset) {
 466#define ptradd(a,b) _ptradd(pPerl,a,b)
 467#else
 468static SV *_ptradd(SV *_PTRVALUE, int offset) {
 469#define ptradd(a,b) _ptradd(a,b)
 470#endif
 471
 472  void *ptr,*junk;
 473  SV   *obj;
 474  swig_type_info *type;
 475  char *tname;
 476
 477  /* Try to handle a few common datatypes first */
 478
 479  if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_int_p) >= 0) {
 480    ptr = (void *) (((int *) ptr) + offset);
 481  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_double_p) >= 0) {
 482    ptr = (void *) (((double *) ptr) + offset);
 483  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_short_p) >= 0) {
 484    ptr = (void *) (((short *) ptr) + offset);
 485  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_long_p) >= 0) {
 486    ptr = (void *) (((long *) ptr) + offset);
 487  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_float_p) >= 0) {
 488    ptr = (void *) (((float *) ptr) + offset);
 489  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,SWIG_POINTER_char_p) >= 0) {
 490    ptr = (void *) (((char *) ptr) + offset);
 491  } else if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,0) >= 0) {
 492    ptr = (void *) (((char *) ptr) + offset);
 493  } else {
 494    croak("Type error in ptradd. Argument is not a valid pointer value.");
 495    return 0;
 496  }
 497  printf("ptradd = %x\n", ptr);
 498  tname = HvNAME(SvSTASH(SvRV(_PTRVALUE)));
 499  obj = sv_newmortal();
 500  sv_setref_pv(obj,tname,ptr);
 501  return obj;
 502}
 503
 504/*------------------------------------------------------------------
 505  ptrfree(ptr)
 506
 507  Destroys a pointer value
 508  ------------------------------------------------------------------ */
 509#ifdef PERL_OBJECT
 510void _ptrfree(CPerlObj *pPerl, SV *_PTRVALUE) {
 511#define ptrfree(a) _ptrfree(pPerl, a)
 512#else
 513void _ptrfree(SV *_PTRVALUE) {
 514#define ptrfree(a) _ptrfree(a)
 515#endif
 516
 517  void *ptr, *junk;
 518
 519  if (SWIG_ConvertPtr(_PTRVALUE,&amp;ptr,0) &amp;lt; 0) {
 520    croak("Type error in ptrfree. Argument is not a valid pointer value.");
 521    return;
 522  }
 523
 524  /* Check to see if this pointer is a char ** */
 525  if (SWIG_ConvertPtr(_PTRVALUE,&amp;junk,SWIG_POINTER_char_pp) >= 0) {
 526    char **c = (char **) ptr;
 527    if (c) {
 528      int i = 0;
 529      while (c[i]) {
 530	free(c[i]);
 531	i++;
 532      }
 533    }
 534  }
 535  if (ptr)
 536    free((char *) ptr);
 537}
 538
 539                    </swigxml:code>
 540                  </swig:insert>
 541                  <swig:typemap name="ptr" >
 542                    <swigxml:code >
 543{
 544  $target = $source;
 545}                    </swigxml:code>
 546                    <swigxml:method string="in"  />
 547                    <swigxml:type string="p.SV"  />
 548                    <swigxml:lang string="perl5"  />
 549                  </swig:typemap>
 550                  <swig:typemap name="value" >
 551                    <swigxml:code >
 552{
 553  $target = $source;
 554}                    </swigxml:code>
 555                    <swigxml:method string="in"  />
 556                    <swigxml:type string="p.SV"  />
 557                    <swigxml:lang string="perl5"  />
 558                  </swig:typemap>
 559                  <swig:typemap name="ptrcast" >
 560                    <swigxml:code >
 561{
 562  $target = $source;
 563  argvi++;
 564}                    </swigxml:code>
 565                    <swigxml:method string="out"  />
 566                    <swigxml:type string="p.SV"  />
 567                    <swigxml:lang string="perl5"  />
 568                  </swig:typemap>
 569                  <swig:typemap name="ptrvalue" >
 570                    <swigxml:code >
 571{
 572  $target = $source;
 573  argvi++;
 574}                    </swigxml:code>
 575                    <swigxml:method string="out"  />
 576                    <swigxml:type string="p.SV"  />
 577                    <swigxml:lang string="perl5"  />
 578                  </swig:typemap>
 579                  <swig:typemap name="ptrcreate" >
 580                    <swigxml:code >
 581{
 582  $target = $source;
 583  argvi++;
 584}                    </swigxml:code>
 585                    <swigxml:method string="out"  />
 586                    <swigxml:type string="p.SV"  />
 587                    <swigxml:lang string="perl5"  />
 588                  </swig:typemap>
 589                  <swig:typemap name="ptradd" >
 590                    <swigxml:code >
 591{
 592  $target = $source;
 593  argvi++;
 594}                    </swigxml:code>
 595                    <swigxml:method string="out"  />
 596                    <swigxml:type string="p.SV"  />
 597                    <swigxml:lang string="perl5"  />
 598                  </swig:typemap>
 599                  <swig:typemap name="ptrset" >
 600                    <swigxml:code >
 601{
 602  if ($source == -1) return NULL;
 603}                    </swigxml:code>
 604                    <swigxml:method string="ret"  />
 605                    <swigxml:type string="int"  />
 606                    <swigxml:lang string="perl5"  />
 607                  </swig:typemap>
 608                  <c:function name="ptrvalue" >
 609                    <swigxml:parms >
 610                      <swigxml:parm name="ptr" >
 611                        <swigxml:type string="p.SV"  />
 612                      </swigxml:parm>
 613                      <swigxml:parm name="index" >
 614                        <swigxml:value string="0"  />
 615                        <swigxml:type string="int"  />
 616                      </swigxml:parm>
 617                      <swigxml:parm name="type" >
 618                        <swigxml:value string="0"  />
 619                        <swigxml:type string="p.char"  />
 620                      </swigxml:parm>
 621                    </swigxml:parms>
 622                    <swigxml:type string="p.SV"  />
 623                  </c:function>
 624                  <c:function name="ptrset" >
 625                    <swigxml:parms >
 626                      <swigxml:parm name="ptr" >
 627                        <swigxml:type string="p.SV"  />
 628                      </swigxml:parm>
 629                      <swigxml:parm name="value" >
 630                        <swigxml:type string="p.SV"  />
 631                      </swigxml:parm>
 632                      <swigxml:parm name="index" >
 633                        <swigxml:value string="0"  />
 634                        <swigxml:type string="int"  />
 635                      </swigxml:parm>
 636                      <swigxml:parm name="type" >
 637                        <swigxml:value string="0"  />
 638                        <swigxml:type string="p.char"  />
 639                      </swigxml:parm>
 640                    </swigxml:parms>
 641                    <swigxml:type string="void"  />
 642                  </c:function>
 643                  <c:function name="ptrcreate" >
 644                    <swigxml:parms >
 645                      <swigxml:parm name="type" >
 646                        <swigxml:type string="p.char"  />
 647                      </swigxml:parm>
 648                      <swigxml:parm name="value" >
 649                        <swigxml:value string="0"  />
 650                        <swigxml:type string="p.SV"  />
 651                      </swigxml:parm>
 652                      <swigxml:parm name="nitems" >
 653                        <swigxml:value string="1"  />
 654                        <swigxml:type string="int"  />
 655                      </swigxml:parm>
 656                    </swigxml:parms>
 657                    <swigxml:type string="p.SV"  />
 658                  </c:function>
 659                  <c:function name="ptrfree" >
 660                    <swigxml:parms >
 661                      <swigxml:parm name="ptr" >
 662                        <swigxml:type string="p.SV"  />
 663                      </swigxml:parm>
 664                    </swigxml:parms>
 665                    <swigxml:type string="void"  />
 666                  </c:function>
 667                  <c:function name="ptradd" >
 668                    <swigxml:parms >
 669                      <swigxml:parm name="ptr" >
 670                        <swigxml:type string="p.SV"  />
 671                      </swigxml:parm>
 672                      <swigxml:parm name="offset" >
 673                        <swigxml:type string="int"  />
 674                      </swigxml:parm>
 675                    </swigxml:parms>
 676                    <swigxml:type string="p.SV"  />
 677                  </c:function>
 678                </swigxml:child>
 679                <swigxml:type string="include"  />
 680              </swig:file>
 681            </swigxml:child>
 682            <swigxml:type string="include"  />
 683          </swig:file>
 684          <swig:file name="../../Lib/xml/typemaps.i" >
 685            <swigxml:child >
 686              <swig:typemap name="INPUT" >
 687                <swigxml:parms >
 688                  <swigxml:parm name="temp" >
 689                    <swigxml:type string="double"  />
 690                  </swigxml:parm>
 691                </swigxml:parms>
 692                <swigxml:code >
 693{
 694  temp = (double) SvNV($source);
 695  $target = &amp;temp;
 696}                </swigxml:code>
 697                <swigxml:method string="in"  />
 698                <swigxml:type string="p.double"  />
 699                <swigxml:lang string="perl5"  />
 700              </swig:typemap>
 701              <swig:typemap name="INPUT" >
 702                <swigxml:parms >
 703                  <swigxml:parm name="temp" >
 704                    <swigxml:type string="float"  />
 705                  </swigxml:parm>
 706                </swigxml:parms>
 707                <swigxml:code >
 708{
 709  temp = (float) SvNV($source);
 710  $target = &amp;temp;
 711}                </swigxml:code>
 712                <swigxml:method string="in"  />
 713                <swigxml:type string="p.float"  />
 714                <swigxml:lang string="perl5"  />
 715              </swig:typemap>
 716              <swig:typemap name="INPUT" >
 717                <swigxml:parms >
 718                  <swigxml:parm name="temp" >
 719                    <swigxml:type string="int"  />
 720                  </swigxml:parm>
 721                </swigxml:parms>
 722                <swigxml:code >
 723{
 724  temp = (int) SvIV($source);
 725  $target = &amp;temp;
 726}                </swigxml:code>
 727                <swigxml:method string="in"  />
 728                <swigxml:type string="p.int"  />
 729                <swigxml:lang string="perl5"  />
 730              </swig:typemap>
 731              <swig:typemap name="INPUT" >
 732                <swigxml:parms >
 733                  <swigxml:parm name="temp" >
 734                    <swigxml:type string="short"  />
 735                  </swigxml:parm>
 736                </swigxml:parms>
 737                <swigxml:code >
 738{
 739  temp = (short) SvIV($source);
 740  $target = &amp;temp;
 741}                </swigxml:code>
 742                <swigxml:method string="in"  />
 743                <swigxml:type string="p.short"  />
 744                <swigxml:lang string="perl5"  />
 745              </swig:typemap>
 746              <swig:typemap name="INPUT" >
 747                <swigxml:parms >
 748                  <swigxml:parm name="temp" >
 749                    <swigxml:type string="long"  />
 750                  </swigxml:parm>
 751                </swigxml:parms>
 752                <swigxml:code >
 753{
 754  temp = (long) SvIV($source);
 755  $target = &amp;temp;
 756}                </swigxml:code>
 757                <swigxml:method string="in"  />
 758                <swigxml:type string="p.long"  />
 759                <swigxml:lang string="perl5"  />
 760              </swig:typemap>
 761              <swig:typemap name="INPUT" >
 762                <swigxml:parms >
 763                  <swigxml:parm name="temp" >
 764                    <swigxml:type string="unsigned int"  />
 765                  </swigxml:parm>
 766                </swigxml:parms>
 767                <swigxml:code >
 768{
 769  temp = (unsigned int) SvIV($source);
 770  $target = &amp;temp;
 771}                </swigxml:code>
 772                <swigxml:method string="in"  />
 773                <swigxml:type string="p.unsigned int"  />
 774                <swigxml:lang string="perl5"  />
 775              </swig:typemap>
 776              <swig:typemap name="INPUT" >
 777                <swigxml:parms >
 778                  <swigxml:parm name="temp" >
 779                    <swigxml:type string="unsigned short"  />
 780                  </swigxml:parm>
 781                </swigxml:parms>
 782                <swigxml:code >
 783{
 784  temp = (unsigned short) SvIV($source);
 785  $target = &amp;temp;
 786}                </swigxml:code>
 787                <swigxml:method string="in"  />
 788                <swigxml:type string="p.unsigned short"  />
 789                <swigxml:lang string="perl5"  />
 790              </swig:typemap>
 791              <swig:typemap name="INPUT" >
 792                <swigxml:parms >
 793                  <swigxml:parm name="temp" >
 794                    <swigxml:type string="unsigned long"  />
 795                  </swigxml:parm>
 796                </swigxml:parms>
 797                <swigxml:code >
 798{
 799  temp = (unsigned long) SvIV($source);
 800  $target = &amp;temp;
 801}                </swigxml:code>
 802                <swigxml:method string="in"  />
 803                <swigxml:type string="p.unsigned long"  />
 804                <swigxml:lang string="perl5"  />
 805              </swig:typemap>
 806              <swig:typemap name="INPUT" >
 807                <swigxml:parms >
 808                  <swigxml:parm name="temp" >
 809                    <swigxml:type string="unsigned char"  />
 810                  </swigxml:parm>
 811                </swigxml:parms>
 812                <swigxml:code >
 813{
 814  temp = (unsigned char) SvIV($source);
 815  $target = &amp;temp;
 816}                </swigxml:code>
 817                <swigxml:method string="in"  />
 818                <swigxml:type string="p.unsigned char"  />
 819                <swigxml:lang string="perl5"  />
 820              </swig:typemap>
 821              <swig:typemap name="OUTPUT" >
 822                <swigxml:parms >
 823                  <swigxml:parm name="temp" >
 824                    <swigxml:type string="int"  />
 825                  </swigxml:parm>
 826                </swigxml:parms>
 827                <swigxml:code >
 828{
 829  $target = &amp;temp;
 830}                </swigxml:code>
 831                <swigxml:method string="ignore"  />
 832                <swigxml:type string="p.int"  />
 833                <swigxml:lang string="perl5"  />
 834              </swig:typemap>
 835              <swig:typemap name="OUTPUT" >
 836                <swigxml:parms >
 837                  <swigxml:parm name="temp" >
 838                    <swigxml:type string="short"  />
 839                  </swigxml:parm>
 840                </swigxml:parms>
 841                <swigxml:code >
 842{
 843  $target = &amp;amp;temp;
 844}                </swigxml:code>
 845                <swigxml:method string="ignore"  />
 846                <swigxml:type string="p.short"  />
 847                <swigxml:lang string="perl5"  />
 848              </swig:typemap>
 849              <swig:typemap name="OUTPUT" >
 850                <swigxml:parms >
 851                  <swigxml:parm name="temp" >
 852                    <swigxml:type string="long"  />
 853                  </swigxml:parm>
 854                </swigxml:parms>
 855                <swigxml:code >
 856{
 857  $target = &amp;amp;amp;temp;
 858}                </swigxml:code>
 859                <swigxml:method string="ignore"  />
 860                <swigxml:type string="p.long"  />
 861                <swigxml:lang string="perl5"  />
 862              </swig:typemap>
 863              <swig:typemap name="OUTPUT" >
 864                <swigxml:parms >
 865                  <swigxml:parm name="temp" >
 866                    <swigxml:type string="unsigned int"  />
 867                  </swigxml:parm>
 868                </swigxml:parms>
 869                <swigxml:code >
 870{
 871  $target = &amp;amp;amp;amp;temp;
 872}                </swigxml:code>
 873                <swigxml:method string="ignore"  />
 874                <swigxml:type string="p.unsigned int"  />
 875                <swigxml:lang string="perl5"  />
 876              </swig:typemap>
 877              <swig:typemap name="OUTPUT" >
 878                <swigxml:parms >
 879                  <swigxml:parm name="temp" >
 880                    <swigxml:type string="unsigned short"  />
 881                  </swigxml:parm>
 882                </swigxml:parms>
 883                <swigxml:code >
 884{
 885  $target = &amp;amp;amp;amp;amp;temp;
 886}                </swigxml:code>
 887                <swigxml:method string="ignore"  />
 888                <swigxml:type string="p.unsigned short"  />
 889                <swigxml:lang string="perl5"  />
 890              </swig:typemap>
 891              <swig:typemap name="OUTPUT" >
 892                <swigxml:parms >
 893                  <swigxml:parm name="temp" >
 894                    <swigxml:type string="unsigned long"  />
 895                  </swigxml:parm>
 896                </swigxml:parms>
 897                <swigxml:code >
 898{
 899  $target = &amp;amp;amp;amp;amp;amp;temp;
 900}                </swigxml:code>
 901                <swigxml:method string="ignore"  />
 902                <swigxml:type string="p.unsigned long"  />
 903                <swigxml:lang string="perl5"  />
 904              </swig:typemap>
 905              <swig:typemap name="OUTPUT" >
 906                <swigxml:parms >
 907                  <swigxml:parm name="temp" >
 908                    <swigxml:type string="unsigned char"  />
 909                  </swigxml:parm>
 910                </swigxml:parms>
 911                <swigxml:code >
 912{
 913  $target = &amp;amp;amp;amp;amp;amp;amp;temp;
 914}                </swigxml:code>
 915                <swigxml:method string="ignore"  />
 916                <swigxml:type string="p.unsigned char"  />
 917                <swigxml:lang string="perl5"  />
 918              </swig:typemap>
 919              <swig:typemap name="OUTPUT" >
 920                <swigxml:parms >
 921                  <swigxml:parm name="temp" >
 922                    <swigxml:type string="float"  />
 923                  </swigxml:parm>
 924                </swigxml:parms>
 925                <swigxml:code >
 926{
 927  $target = &amp;amp;amp;amp;amp;amp;amp;amp;temp;
 928}                </swigxml:code>
 929                <swigxml:method string="ignore"  />
 930                <swigxml:type string="p.float"  />
 931                <swigxml:lang string="perl5"  />
 932              </swig:typemap>
 933              <swig:typemap name="OUTPUT" >
 934                <swigxml:parms >
 935                  <swigxml:parm name="temp" >
 936                    <swigxml:type string="double"  />
 937                  </swigxml:parm>
 938                </swigxml:parms>
 939                <swigxml:code >
 940{
 941  $target = &amp;amp;amp;amp;amp;amp;amp;amp;amp;temp;
 942}                </swigxml:code>
 943                <swigxml:method string="ignore"  />
 944                <swigxml:type string="p.double"  />
 945                <swigxml:lang string="perl5"  />
 946              </swig:typemap>
 947              <swig:typemap name="OUTPUT" >
 948                <swigxml:code >
 949{
 950  if (argvi >= items) {
 951    EXTEND(sp,1);
 952  }
 953  $target = sv_newmortal();
 954  sv_setiv($target,(IV) *($source));
 955  argvi++;
 956}                </swigxml:code>
 957                <swigxml:method string="argout"  />
 958                <swigxml:type string="p.int"  />
 959                <swigxml:lang string="perl5"  />
 960              </swig:typemap>
 961              <swig:typemap name="OUTPUT" >
 962                <swigxml:code >
 963{
 964  if (argvi >= items) {
 965    EXTEND(sp,1);
 966  }
 967  $target = sv_newmortal();
 968  sv_setiv($target,(IV) *($source));
 969  argvi++;
 970}                </swigxml:code>
 971                <swigxml:method string="argout"  />
 972                <swigxml:type string="p.short"  />
 973                <swigxml:lang string="perl5"  />
 974              </swig:typemap>
 975              <swig:typemap name="OUTPUT" >
 976                <swigxml:code >
 977{
 978  if (argvi >= items) {
 979    EXTEND(sp,1);
 980  }
 981  $target = sv_newmortal();
 982  sv_setiv($target,(IV) *($source));
 983  argvi++;
 984}                </swigxml:code>
 985                <swigxml:method string="argout"  />
 986                <swigxml:type string="p.long"  />
 987                <swigxml:lang string="perl5"  />
 988              </swig:typemap>
 989              <swig:typemap name="OUTPUT" >
 990                <swigxml:code >
 991{
 992  if (argvi >= items) {
 993    EXTEND(sp,1);
 994  }
 995  $target = sv_newmortal();
 996  sv_setiv($target,(IV) *($source));
 997  argvi++;
 998}                </swigxml:code>
 999                <swigxml:method string="argout"  />
1000                <swigxml:type string="p.unsigned int"  />
1001                <swigxml:lang string="perl5"  />
1002              </swig:typemap>
1003              <swig:typemap name="OUTPUT" >
1004                <swigxml:code >
1005{
1006  if (argvi >= items) {
1007    EXTEND(sp,1);
1008  }
1009  $target = sv_newmortal();
1010  sv_setiv($target,(IV) *($source));
1011  argvi++;
1012}                </swigxml:code>
1013                <swigxml:method string="argout"  />
1014                <swigxml:type string="p.unsigned short"  />
1015                <swigxml:lang string="perl5"  />
1016              </swig:typemap>
1017              <swig:typemap name="OUTPUT" >
1018                <swigxml:code >
1019{
1020  if (argvi >= items) {
1021    EXTEND(sp,1);
1022  }
1023  $target = sv_newmortal();
1024  sv_setiv($target,(IV) *($source));
1025  argvi++;
1026}                </swigxml:code>
1027                <swigxml:method string="argout"  />
1028                <swigxml:type string="p.unsigned long"  />
1029                <swigxml:lang string="perl5"  />
1030              </swig:typemap>
1031              <swig:typemap name="OUTPUT" >
1032                <swigxml:code >
1033{
1034  if (argvi >= items) {
1035    EXTEND(sp,1);
1036  }
1037  $target = sv_newmortal();
1038  sv_setiv($target,(IV) *($source));
1039  argvi++;
1040}                </swigxml:code>
1041                <swigxml:method string="argout"  />
1042                <swigxml:type string="p.unsigned char"  />
1043                <swigxml:lang string="perl5"  />
1044              </swig:typemap>
1045              <swig:typemap name="OUTPUT" >
1046                <swigxml:code >
1047{
1048  if (argvi >= items) {
1049    EXTEND(sp,1);
1050  }
1051  $target = sv_newmortal();
1052  sv_setnv($target,(double) *($source));
1053  argvi++;
1054}                </swigxml:code>
1055                <swigxml:method string="argout"  />
1056                <swigxml:type string="p.float"  />
1057                <swigxml:lang string="perl5"  />
1058              </swig:typemap>
1059              <swig:typemap name="OUTPUT" >
1060                <swigxml:code >
1061{
1062  if (argvi >= items) {
1063    EXTEND(sp,1);
1064  }
1065  $target = sv_newmortal();
1066  sv_setnv($target,(double) *($source));
1067  argvi++;
1068}                </swigxml:code>
1069                <swigxml:method string="argout"  />
1070                <swigxml:type string="p.double"  />
1071                <swigxml:lang string="perl5"  />
1072              </swig:typemap>
1073              <swig:typemap name="BOTH" >
1074                <swigxml:srctype string="p.int"  />
1075                <swigxml:method string="in"  />
1076                <swigxml:type string="p.int"  />
1077                <swigxml:lang string="perl5"  />
1078                <swigxml:srcname string="INPUT"  />
1079              </swig:typemap>
1080              <swig:typemap name="BOTH" >
1081                <swigxml:srctype string="p.short"  />
1082                <swigxml:method string="in"  />
1083                <swigxml:type string="p.short"  />
1084                <swigxml:lang string="perl5"  />
1085                <swigxml:srcname string="INPUT"  />
1086              </swig:typemap>
1087              <swig:typemap name="BOTH" >
1088                <swigxml:srctype string="p.long"  />
1089                <swigxml:method string="in"  />
1090                <swigxml:type string="p.long"  />
1091                <swigxml:lang string="perl5"  />
1092                <swigxml:srcname string="INPUT"  />
1093              </swig:typemap>
1094              <swig:typemap name="BOTH" >
1095                <swigxml:srctype string="p.unsigned"  />
1096                <swigxml:method string="in"  />
1097                <swigxml:type string="p.unsigned"  />
1098                <swigxml:lang string="perl5"  />
1099                <swigxml:srcname string="INPUT"  />
1100              </swig:typemap>
1101              <swig:typemap name="BOTH" >
1102                <swigxml:srctype string="p.unsigned short"  />
1103                <swigxml:method string="in"  />
1104                <swigxml:type string="p.unsigned short"  />
1105                <swigxml:lang string="perl5"  />
1106                <swigxml:srcname string="INPUT"  />
1107              </swig:typemap>
1108              <swig:typemap name="BOTH" >
1109                <swigxml:srctype string="p.unsigned long"  />
1110                <swigxml:method string="in"  />
1111                <swigxml:type string="p.unsigned long"  />
1112                <swigxml:lang string="perl5"  />
1113                <swigxml:srcname string="INPUT"  />
1114              </swig:typemap>
1115              <swig:typemap name="BOTH" >
1116                <swigxml:srctype string="p.unsigned char"  />
1117                <swigxml:method string="in"  />
1118                <swigxml:type string="p.unsigned char"  />
1119                <swigxml:lang string="perl5"  />
1120                <swigxml:srcname string="INPUT"  />
1121              </swig:typemap>
1122              <swig:typemap name="BOTH" >
1123                <swigxml:srctype string="p.float"  />
1124                <swigxml:method string="in"  />
1125                <swigxml:type string="p.float"  />
1126                <swigxml:lang string="perl5"  />
1127                <swigxml:srcname string="INPUT"  />
1128              </swig:typemap>
1129              <swig:typemap name="BOTH" >
1130                <swigxml:srctype string="p.double"  />
1131                <swigxml:method string="in"  />
1132                <swigxml:type string="p.double"  />
1133                <swigxml:lang string="perl5"  />
1134                <swigxml:srcname string="INPUT"  />
1135              </swig:typemap>
1136              <swig:typemap name="BOTH" >
1137                <swigxml:srctype string="p.int"  />
1138                <swigxml:method string="argout"  />
1139                <swigxml:type string="p.int"  />
1140                <swigxml:lang string="perl5"  />
1141                <swigxml:srcname string="OUTPUT"  />
1142              </swig:typemap>
1143              <swig:typemap name="BOTH" >
1144                <swigxml:srctype string="p.short"  />
1145                <swigxml:method string="argout"  />
1146                <swigxml:type string="p.short"  />
1147                <swigxml:lang string="perl5"  />
1148                <swigxml:srcname string="OUTPUT"  />
1149              </swig:typemap>
1150              <swig:typemap name="BOTH" >
1151                <swigxml:srctype string="p.long"  />
1152                <swigxml:method string="argout"  />
1153                <swigxml:type string="p.long"  />
1154                <swigxml:lang string="perl5"  />
1155                <swigxml:srcname string="OUTPUT"  />
1156              </swig:typemap>
1157              <swig:typemap name="BOTH" >
1158                <swigxml:srctype string="p.unsigned"  />
1159                <swigxml:method string="argout"  />
1160                <swigxml:type string="p.unsigned"  />
1161                <swigxml:lang string="perl5"  />
1162                <swigxml:srcname string="OUTPUT"  />
1163              </swig:typemap>
1164              <swig:typemap name="BOTH" >
1165                <swigxml:srctype string="p.unsigned short"  />
1166                <swigxml:method string="argout"  />
1167                <swigxml:type string="p.unsigned short"  />
1168                <swigxml:lang string="perl5"  />
1169                <swigxml:srcname string="OUTPUT"  />
1170              </swig:typemap>
1171              <swig:typemap name="BOTH" >
1172                <swigxml:srctype string="p.unsigned long"  />
1173                <swigxml:method string="argout"  />
1174                <swigxml:type string="p.unsigned long"  />
1175                <swigxml:lang string="perl5"  />
1176                <swigxml:srcname string="OUTPUT"  />
1177              </swig:typemap>
1178              <swig:typemap name="BOTH" >
1179                <swigxml:srctype string="p.unsigned char"  />
1180                <swigxml:method string="argout"  />
1181                <swigxml:type string="p.unsigned char"  />
1182                <swigxml:lang string="perl5"  />
1183                <swigxml:srcname string="OUTPUT"  />
1184              </swig:typemap>
1185              <swig:typemap name="BOTH" >
1186                <swigxml:srctype string="p.float"  />
1187                <swigxml:method string="argout"  />
1188                <swigxml:type string="p.float"  />
1189                <swigxml:lang string="perl5"  />
1190                <swigxml:srcname string="OUTPUT"  />
1191              </swig:typemap>
1192              <swig:typemap name="BOTH" >
1193                <swigxml:srctype string="p.double"  />
1194                <swigxml:method string="argout"  />
1195                <swigxml:type string="p.double"  />
1196                <swigxml:lang string="perl5"  />
1197                <swigxml:srcname string="OUTPUT"  />
1198              </swig:typemap>
1199              <swig:typemap name="REFERENCE" >
1200                <swigxml:parms >
1201                  <swigxml:parm name="dvalue" >
1202                    <swigxml:type string="double"  />
1203                  </swigxml:parm>
1204                </swigxml:parms>
1205                <swigxml:code >
1206{
1207  SV *tempsv;
1208  if (!SvROK($source)) {
1209    croak("expected a reference");
1210  }
1211  tempsv = SvRV($source);
1212  if ((!SvNOK(tempsv)) &amp;&amp; (!SvIOK(tempsv))) {
1213	printf("Received %d\n", SvTYPE(tempsv));
1214	croak("Expected a double reference.");
1215  }
1216  dvalue = SvNV(tempsv);
1217  $target = &amp;dvalue;
1218}                </swigxml:code>
1219                <swigxml:method string="in"  />
1220                <swigxml:type string="p.double"  />
1221                <swigxml:lang string="perl5"  />
1222              </swig:typemap>
1223              <swig:typemap name="REFERENCE" >
1224                <swigxml:parms >
1225                  <swigxml:parm name="dvalue" >
1226                    <swigxml:type string="float"  />
1227                  </swigxml:parm>
1228                </swigxml:parms>
1229                <swigxml:code >
1230{
1231  SV *tempsv;
1232  if (!SvROK($source)) {
1233    croak("expected a reference");
1234  }
1235  tempsv = SvRV($source);
1236  if ((!SvNOK(tempsv)) &amp;&amp; (!SvIOK(tempsv))) {
1237    croak("expected a double reference");
1238  }
1239  dvalue = (float) SvNV(tempsv);
1240  $target = &amp;dvalue;
1241}                </swigxml:code>
1242                <swigxml:method string="in"  />
1243                <swigxml:type string="p.float"  />
1244                <swigxml:lang string="perl5"  />
1245              </swig:typemap>
1246              <swig:typemap name="REFERENCE" >
1247                <swigxml:parms >
1248                  <swigxml:parm name="dvalue" >
1249                    <swigxml:type string="int"  />
1250                  </swigxml:parm>
1251                </swigxml:parms>
1252                <swigxml:code >
1253{
1254  SV *tempsv;
1255  if (!SvROK($source)) {
1256    croak("expected a reference");
1257  }
1258  tempsv = SvRV($source);
1259  if (!SvIOK(tempsv)) {
1260    croak("expected a integer reference");
1261  }
1262  dvalue = SvIV(tempsv);
1263  $target = &amp;dvalue;
1264}                </swigxml:code>
1265                <swigxml:method string="in"  />
1266                <swigxml:type string="p.int"  />
1267                <swigxml:lang string="perl5"  />
1268              </swig:typemap>
1269              <swig:typemap name="REFERENCE" >
1270                <swigxml:parms >
1271                  <swigxml:parm name="dvalue" >
1272                    <swigxml:type string="short"  />
1273                  </swigxml:parm>
1274                </swigxml:parms>
1275                <swigxml:code >
1276{
1277  SV *tempsv;
1278  if (!SvROK($source)) {
1279    croak("expected a reference");
1280  }
1281  tempsv = SvRV($source);
1282  if (!SvIOK(tempsv)) {
1283    croak("expected a integer reference");
1284  }
1285  dvalue = (short) SvIV(tempsv);
1286  $target = &amp;dvalue;
1287}                </swigxml:code>
1288                <swigxml:method string="in"  />
1289                <swigxml:type string="p.short"  />
1290                <swigxml:lang string="perl5"  />
1291              </swig:typemap>
1292              <swig:typemap name="REFERENCE" >
1293                <swigxml:parms >
1294                  <swigxml:parm name="dvalue" >
1295                    <swigxml:type string="long"  />
1296                  </swigxml:parm>
1297                </swigxml:parms>
1298                <swigxml:code >
1299{
1300  SV *tempsv;
1301  if (!SvROK($source)) {
1302    croak("expected a reference");
1303  }
1304  tempsv = SvRV($source);
1305  if (!SvIOK(tempsv)) {
1306    croak("expected a integer reference");
1307  }
1308  dvalue = (long) SvIV(tempsv);
1309  $target = &amp;dvalue;
1310}                </swigxml:code>
1311                <swigxml:method string="in"  />
1312                <swigxml:type string="p.long"  />
1313                <swigxml:lang string="perl5"  />
1314              </swig:typemap>
1315              <swig:typemap name="REFERENCE" >
1316                <swigxml:parms >
1317                  <swigxml:parm name="dvalue" >
1318                    <swigxml:type string="unsigned int"  />
1319                  </swigxml:parm>
1320                </swigxml:parms>
1321                <swigxml:code >
1322{
1323  SV *tempsv;
1324  if (!SvROK($source)) {
1325    croak("expected a reference");
1326  }
1327  tempsv = SvRV($source);
1328  if (!SvIOK(tempsv)) {
1329    croak("expected a integer reference");
1330  }
1331  dvalue = (unsigned int) SvIV(tempsv);
1332  $target = &amp;dvalue;
1333}                </swigxml:code>
1334                <swigxml:method string="in"  />
1335                <swigxml:type string="p.unsigned int"  />
1336                <swigxml:lang string="perl5"  />
1337              </swig:typemap>
1338              <swig:typemap name="REFERENCE" >
1339                <swigxml:parms >
1340                  <swigxml:parm name="dvalue" >
1341                    <swigxml:type string="unsigned short"  />
1342                  </swigxml:parm>
1343                </swigxml:parms>
1344                <swigxml:code >
1345{
1346  SV *tempsv;
1347  if (!SvROK($source)) {
1348    croak("expected a reference");
1349  }
1350  tempsv = SvRV($source);
1351  if (!SvIOK(tempsv)) {
1352    croak("expected a integer reference");
1353  }
1354  dvalue = (unsigned short) SvIV(tempsv);
1355  $target = &amp;dvalue;
1356}                </swigxml:code>
1357                <swigxml:method string="in"  />
1358                <swigxml:type string="p.unsigned short"  />
1359                <swigxml:lang string="perl5"  />
1360              </swig:typemap>
1361              <swig:typemap name="REFERENCE" >
1362                <swigxml:parms >
1363                  <swigxml:parm name="dvalue" >
1364                    <swigxml:type string="unsigned long"  />
1365                  </swigxml:parm>
1366                </swigxml:parms>
1367                <swigxml:code >
1368{
1369  SV *tempsv;
1370  if (!SvROK($source)) {
1371    croak("expected a reference");
1372  }
1373  tempsv = SvRV($source);
1374  if (!SvIOK(tempsv)) {
1375    croak("expected a integer reference");
1376  }
1377  dvalue = (unsigned long) SvIV(tempsv);
1378  $target = &amp;dvalue;
1379}                </swigxml:code>
1380                <swigxml:method string="in"  />
1381                <swigxml:type string="p.unsigned long"  />
1382                <swigxml:lang string="perl5"  />
1383              </swig:typemap>
1384              <swig:typemap name="REFERENCE" >
1385                <swigxml:code >
1386{
1387  SV *tempsv;
1388  tempsv = SvRV($arg);
1389  sv_setnv(tempsv, (double) *$source);
1390}            …

Large files files are truncated, but you can click here to view the full file