You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2002/10/20 01:02:39 UTC

cvs commit: xml-xerces/perl typemaps.i

jasons      2002/10/19 16:02:39

  Modified:    perl     typemaps.i
  Log:
  	* typemaps.i (Repository):
  	deal with XMLByte I/O
  	handle auto-overload typeconversion for SV*'s and XMLCh*
  
  Revision  Changes    Path
  1.13      +17 -0     xml-xerces/perl/typemaps.i
  
  Index: typemaps.i
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/typemaps.i,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- typemaps.i	27 Aug 2002 19:40:37 -0000	1.12
  +++ typemaps.i	19 Oct 2002 23:02:39 -0000	1.13
  @@ -1,3 +1,5 @@
  +%include typemaps.i
  +
   /***********/
   /*         */
   /* XMLCh * */
  @@ -153,6 +155,21 @@
   // 
   %typemap(in) SV * {
     $1 = $input;
  +}
  +
  +// XMLByte arrays are just char*'s
  +%apply char * {  XMLByte * }
  +
  +%typecheck(SWIG_TYPECHECK_CHAR) 
  +	SV*
  +{
  +  $1 = SvOK($input) ? 1 : 0;
  +}
  +
  +%typecheck(SWIG_TYPECHECK_UNICHAR) 
  +XMLCh*, const XMLCh*
  +{
  +  $1 = SvPOK($input)||SvIOK($input)||SvNOK($input) ? 1 : 0;
   }
   
   //
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org