xml-axkit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jw...@apache.org
Subject cvs commit: xml-axkit/lib/Apache/AxKit CharsetConv.xs
Date Wed, 03 Jul 2002 19:03:10 GMT
jwalt       2002/07/03 12:03:10

  Modified:    lib/Apache/AxKit CharsetConv.xs
  Log:
  - use New instead of malloc
  
  Revision  Changes    Path
  1.3       +3 -4      xml-axkit/lib/Apache/AxKit/CharsetConv.xs
  
  Index: CharsetConv.xs
  ===================================================================
  RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/CharsetConv.xs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CharsetConv.xs	3 Jul 2002 18:52:18 -0000	1.2
  +++ CharsetConv.xs	3 Jul 2002 19:03:10 -0000	1.3
  @@ -132,7 +132,7 @@
      return perl_str;
   }
   
  -typedef struct {
  +typedef struct Apache__AxKit__CharsetConv_struct {
       iconv_t iconv_handle;
       int is_target_utf8;
   } *Apache__AxKit__CharsetConv;
  @@ -160,8 +160,7 @@
      char *fromcode
      char *tocode
      CODE:
  -   RETVAL = malloc(sizeof(*RETVAL));
  -   if (!RETVAL) croak("Insufficient memory to allocate object");
  +   New(0, RETVAL, 1, struct Apache__AxKit__CharsetConv_struct);
   
      if((RETVAL->iconv_handle = iconv_open(tocode, fromcode)) == (iconv_t)-1)
      {
  
  
  

Mime
View raw message